@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.46 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 * `ListTables` request with `tableBucketARN` injected from the bound
8 * {@link TableBucket}.
9 */
10 export interface ListTablesRequest extends Omit<s3tables.ListTablesRequest, "tableBucketARN"> {}
11
12 /**
13 * Runtime binding for the `ListTables` operation (IAM action
14 * `s3tables:ListTables` on the table bucket ARN).
15 *
16 * Lists the tables in the bound {@link TableBucket}, optionally filtered to
17 * a namespace or name prefix. Useful for compute that enumerates the
18 * catalog at runtime. Provide the implementation with
19 * `Effect.provide(AWS.S3Tables.ListTablesHttp)`.
20 * ### Discovering Namespaces and Tables
21 * **Example:** List the tables in a namespace
22 * ```typescript
23 * const listTables = yield* AWS.S3Tables.ListTables(bucket);
24 *
25 * const { tables } = yield* listTables({ namespace: "events" });
26 * for (const table of tables) {
27 * yield* Effect.log(`table: ${table.name}`);
28 * }
29 * ```
30 *
31 * @binding
32 */
33 export interface ListTables extends Binding.Service<
34 ListTables,
35 "AWS.S3Tables.ListTables",
36 (
37 tableBucket: TableBucket,
38 ) => Effect.Effect<
39 (
40 request?: ListTablesRequest,
41 ) => Effect.Effect<s3tables.ListTablesResponse, s3tables.ListTablesError>
42 >
43 > {}
44 export const ListTables = Binding.Service<ListTables>("AWS.S3Tables.ListTables");