@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 47 lines 1.51 KB
Raw
1 import type * as s3tables from "@distilled.cloud/aws/s3tables";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { TableBucket } from "./TableBucket.ts";
5
6 /**
7 * `ListNamespaces` request with `tableBucketARN` injected from the bound
8 * {@link TableBucket}.
9 */
10 export interface ListNamespacesRequest extends Omit<
11 s3tables.ListNamespacesRequest,
12 "tableBucketARN"
13 > {}
14
15 /**
16 * Runtime binding for the `ListNamespaces` operation (IAM action
17 * `s3tables:ListNamespaces` on the table bucket ARN).
18 *
19 * Lists the namespaces in the bound {@link TableBucket} — the catalog's
20 * databases. Useful for compute that discovers tables dynamically at
21 * runtime. Provide the implementation with
22 * `Effect.provide(AWS.S3Tables.ListNamespacesHttp)`.
23 * ### Discovering Namespaces and Tables
24 * **Example:** List the bucket's namespaces
25 * ```typescript
26 * const listNamespaces = yield* AWS.S3Tables.ListNamespaces(bucket);
27 *
28 * const { namespaces } = yield* listNamespaces();
29 * for (const ns of namespaces) {
30 * yield* Effect.log(`namespace: ${ns.namespace[0]}`);
31 * }
32 * ```
33 *
34 * @binding
35 */
36 export interface ListNamespaces extends Binding.Service<
37 ListNamespaces,
38 "AWS.S3Tables.ListNamespaces",
39 (
40 tableBucket: TableBucket,
41 ) => Effect.Effect<
42 (
43 request?: ListNamespacesRequest,
44 ) => Effect.Effect<s3tables.ListNamespacesResponse, s3tables.ListNamespacesError>
45 >
46 > {}
47 export const ListNamespaces = Binding.Service<ListNamespaces>("AWS.S3Tables.ListNamespaces");