@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 37 lines 1.27 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 GetInsightRequest extends xray.GetInsightRequest {}
6
7 /**
8 * Retrieve the summary information of an X-Ray insight — the anomaly
9 * details X-Ray detected for a group with insights enabled.
10 *
11 * Bind the operation in the function's init phase to get a runtime callable;
12 * provide the implementation with `Effect.provide(XRay.GetInsightHttp)`.
13 * The action is account-scoped: X-Ray does not support resource-level
14 * permissions for `xray:GetInsight`, so the binding grants it on `*`.
15 * ### Insights
16 * **Example:** Fetch an insight by id
17 * ```typescript
18 * import * as XRay from "@alchemy.run/aws/XRay";
19 *
20 * // init — grants xray:GetInsight
21 * const getInsight = yield* XRay.GetInsight();
22 *
23 * // runtime
24 * const result = yield* getInsight({ InsightId: insightId });
25 * const state = result.Insight?.State;
26 * ```
27 *
28 * @binding
29 */
30 export interface GetInsight extends Binding.Service<
31 GetInsight,
32 "AWS.XRay.GetInsight",
33 () => Effect.Effect<
34 (request: GetInsightRequest) => Effect.Effect<xray.GetInsightResult, xray.GetInsightError>
35 >
36 > {}
37 export const GetInsight = Binding.Service<GetInsight>("AWS.XRay.GetInsight");