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

main
ts 37 lines 1.26 KB
Raw
1 import type * as cloudtrail from "@distilled.cloud/aws/cloudtrail";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { EventDataStore } from "./EventDataStore.ts";
5
6 /**
7 * Runtime binding for `cloudtrail:ListQueries`.
8 *
9 * Lists the CloudTrail Lake queries that ran against the bound
10 * {@link EventDataStore} in the last seven days — the store is injected from
11 * the binding. Provide the implementation with
12 * `Effect.provide(AWS.CloudTrail.ListQueriesHttp)`.
13 * ### Querying CloudTrail Lake
14 * **Example:** List Recent Queries
15 * ```typescript
16 * // init — bind the operation to the event data store
17 * const listQueries = yield* AWS.CloudTrail.ListQueries(store);
18 *
19 * // runtime
20 * const result = yield* listQueries({ MaxResults: 10 });
21 * console.log(result.Queries?.map((q) => q.QueryId));
22 * ```
23 *
24 * @binding
25 */
26 export interface ListQueries extends Binding.Service<
27 ListQueries,
28 "AWS.CloudTrail.ListQueries",
29 (
30 store: EventDataStore,
31 ) => Effect.Effect<
32 (
33 request?: Omit<cloudtrail.ListQueriesRequest, "EventDataStore">,
34 ) => Effect.Effect<cloudtrail.ListQueriesResponse, cloudtrail.ListQueriesError>
35 >
36 > {}
37 export const ListQueries = Binding.Service<ListQueries>("AWS.CloudTrail.ListQueries");