@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 37 lines 1.21 KB
Raw
1 import * as DynamoDB from "@distilled.cloud/aws/dynamodb";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { Table } from "./Table.ts";
5
6 export interface DescribeTableRequest extends Omit<DynamoDB.DescribeTableInput, "TableName"> {}
7
8 /**
9 * Runtime binding for `dynamodb:DescribeTable`.
10 *
11 * Bind this operation to a `Table` inside a function runtime to get a callable
12 * that reads the table's metadata (key schema, indexes, status, throughput).
13 * Provide the `DescribeTableHttp` layer on the Function to satisfy the binding.
14 * ### Table Metadata
15 * **Example:** Describe the Bound Table
16 * ```typescript
17 * const describeTable = yield* AWS.DynamoDB.DescribeTable(table);
18 *
19 * const response = yield* describeTable();
20 * const status = response.Table?.TableStatus;
21 * ```
22 *
23 * @binding
24 */
25 export interface DescribeTable extends Binding.Service<
26 DescribeTable,
27 "AWS.DynamoDB.DescribeTable",
28 <T extends Table>(
29 table: T,
30 ) => Effect.Effect<
31 (
32 request?: DescribeTableRequest,
33 ) => Effect.Effect<DynamoDB.DescribeTableOutput, DynamoDB.DescribeTableError>
34 >
35 > {}
36
37 export const DescribeTable = Binding.Service<DescribeTable>("AWS.DynamoDB.DescribeTable");