@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 43 lines 1.28 KB
Raw
1 import type * as DynamoDB from "@distilled.cloud/aws/dynamodb";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Table } from "./Table.ts";
5
6 export interface UpdateTimeToLiveRequest extends Omit<
7 DynamoDB.UpdateTimeToLiveInput,
8 "TableName"
9 > {}
10
11 /**
12 * Runtime binding for `dynamodb:UpdateTimeToLive`.
13 *
14 * Bind this operation to a `Table` inside a function runtime to get a callable
15 * that enables or disables TTL expiry on an attribute. Provide the
16 * `UpdateTimeToLiveHttp` layer on the Function to satisfy the binding.
17 * ### Time to Live
18 * **Example:** Enable TTL on an Attribute
19 * ```typescript
20 * const updateTimeToLive = yield* AWS.DynamoDB.UpdateTimeToLive(table);
21 *
22 * yield* updateTimeToLive({
23 * TimeToLiveSpecification: {
24 * AttributeName: "expiresAt",
25 * Enabled: true,
26 * },
27 * });
28 * ```
29 *
30 * @binding
31 */
32 export interface UpdateTimeToLive extends Binding.Service<
33 UpdateTimeToLive,
34 "AWS.DynamoDB.UpdateTimeToLive",
35 <T extends Table>(
36 table: T,
37 ) => Effect.Effect<
38 (
39 request: UpdateTimeToLiveRequest,
40 ) => Effect.Effect<DynamoDB.UpdateTimeToLiveOutput, DynamoDB.UpdateTimeToLiveError>
41 >
42 > {}
43 export const UpdateTimeToLive = Binding.Service<UpdateTimeToLive>("AWS.DynamoDB.UpdateTimeToLive");