@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 41 lines 1.37 KB
Raw
1 import type * as detective from "@distilled.cloud/aws/detective";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Graph } from "./Graph.ts";
5
6 /**
7 * Runtime binding for `detective:GetInvestigation`.
8 *
9 * Reads a single investigation's detail — entity, scope window, status,
10 * severity, and state — so a triage function can poll a running
11 * investigation to completion. The graph ARN is injected from the bound
12 * {@link Graph}.
13 * Provide the implementation with
14 * `Effect.provide(AWS.Detective.GetInvestigationHttp)`.
15 * ### Running Investigations
16 * **Example:** Poll An Investigation
17 * ```typescript
18 * // init
19 * const getInvestigation = yield* AWS.Detective.GetInvestigation(graph);
20 *
21 * // runtime
22 * const detail = yield* getInvestigation({ InvestigationId: id });
23 * if (detail.Status === "SUCCESSFUL") {
24 * yield* Effect.log(`severity: ${detail.Severity}`);
25 * }
26 * ```
27 *
28 * @binding
29 */
30 export interface GetInvestigation extends Binding.Service<
31 GetInvestigation,
32 "AWS.Detective.GetInvestigation",
33 (
34 graph: Graph,
35 ) => Effect.Effect<
36 (
37 request: Omit<detective.GetInvestigationRequest, "GraphArn">,
38 ) => Effect.Effect<detective.GetInvestigationResponse, detective.GetInvestigationError>
39 >
40 > {}
41 export const GetInvestigation = Binding.Service<GetInvestigation>("AWS.Detective.GetInvestigation");