@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, 06:00 UTC

main
ts 44 lines 1.54 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 ListRetrievedTracesRequest extends xray.ListRetrievedTracesRequest {}
6
7 /**
8 * Retrieve the traces fetched by a Transaction Search retrieval job.
9 * Returns an empty response until the job's `RetrievalStatus` is
10 * `COMPLETE`.
11 *
12 * Bind the operation in the function's init phase to get a runtime callable;
13 * provide the implementation with `Effect.provide(XRay.ListRetrievedTracesHttp)`.
14 * The action is account-scoped: X-Ray does not support resource-level
15 * permissions for `xray:ListRetrievedTraces`, so the binding grants it on `*`.
16 * ### Transaction Search
17 * **Example:** Poll a retrieval job for its traces
18 * ```typescript
19 * import * as XRay from "@alchemy.run/aws/XRay";
20 *
21 * // init — grants xray:ListRetrievedTraces
22 * const listRetrievedTraces = yield* XRay.ListRetrievedTraces();
23 *
24 * // runtime
25 * const result = yield* listRetrievedTraces({ RetrievalToken: token });
26 * if (result.RetrievalStatus === "COMPLETE") {
27 * const traces = result.Traces ?? [];
28 * }
29 * ```
30 *
31 * @binding
32 */
33 export interface ListRetrievedTraces extends Binding.Service<
34 ListRetrievedTraces,
35 "AWS.XRay.ListRetrievedTraces",
36 () => Effect.Effect<
37 (
38 request: ListRetrievedTracesRequest,
39 ) => Effect.Effect<xray.ListRetrievedTracesResult, xray.ListRetrievedTracesError>
40 >
41 > {}
42 export const ListRetrievedTraces = Binding.Service<ListRetrievedTraces>(
43 "AWS.XRay.ListRetrievedTraces",
44 );