@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 39 lines 1.4 KB
Raw
1 import type * as xray from "@distilled.cloud/aws/xray";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 export interface GetInsightEventsRequest extends xray.GetInsightEventsRequest {}
6
7 /**
8 * Retrieve the intermediate states (events) X-Ray recorded while
9 * re-evaluating an insight — the insight's impact timeline.
10 *
11 * Bind the operation in the function's init phase to get a runtime callable;
12 * provide the implementation with `Effect.provide(XRay.GetInsightEventsHttp)`.
13 * The action is account-scoped: X-Ray does not support resource-level
14 * permissions for `xray:GetInsightEvents`, so the binding grants it on `*`.
15 * ### Insights
16 * **Example:** Walk an insight's impact timeline
17 * ```typescript
18 * import * as XRay from "@alchemy.run/aws/XRay";
19 *
20 * // init — grants xray:GetInsightEvents
21 * const getInsightEvents = yield* XRay.GetInsightEvents();
22 *
23 * // runtime
24 * const result = yield* getInsightEvents({ InsightId: insightId });
25 * const timeline = result.InsightEvents ?? [];
26 * ```
27 *
28 * @binding
29 */
30 export interface GetInsightEvents extends Binding.Service<
31 GetInsightEvents,
32 "AWS.XRay.GetInsightEvents",
33 () => Effect.Effect<
34 (
35 request: GetInsightEventsRequest,
36 ) => Effect.Effect<xray.GetInsightEventsResult, xray.GetInsightEventsError>
37 >
38 > {}
39 export const GetInsightEvents = Binding.Service<GetInsightEvents>("AWS.XRay.GetInsightEvents");