@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 52 lines 1.49 KB
Raw
1 import type * as sdb from "@distilled.cloud/aws/simpledb";
2 import * as Binding from "alchemy/Binding";
3 import type { RuntimeContext } from "alchemy/RuntimeContext";
4 import type * as Effect from "effect/Effect";
5 import type { Domain } from "./Domain.ts";
6
7 export interface BatchPutAttributesRequest extends Omit<
8 sdb.BatchPutAttributesRequest,
9 "DomainName"
10 > {}
11
12 /**
13 * Runtime binding for `sdb:BatchPutAttributes`.
14 *
15 * Bind this operation to a {@link Domain} inside a function runtime to get a
16 * callable that automatically injects the domain name. Puts attributes on up
17 * to 25 items in a single call.
18 * ### Writing Items
19 * **Example:** Batch Put Multiple Items
20 * ```typescript
21 * const batchPutAttributes = yield* AWS.SimpleDB.BatchPutAttributes(domain);
22 *
23 * yield* batchPutAttributes({
24 * Items: [
25 * {
26 * ItemName: "user#1",
27 * Attributes: [{ Name: "plan", Value: "free", Replace: true }],
28 * },
29 * {
30 * ItemName: "user#2",
31 * Attributes: [{ Name: "plan", Value: "pro", Replace: true }],
32 * },
33 * ],
34 * });
35 * ```
36 *
37 * @binding
38 */
39 export interface BatchPutAttributes extends Binding.Service<
40 BatchPutAttributes,
41 "AWS.SimpleDB.BatchPutAttributes",
42 (
43 domain: Domain,
44 ) => Effect.Effect<
45 (
46 request: BatchPutAttributesRequest,
47 ) => Effect.Effect<sdb.BatchPutAttributesResponse, sdb.BatchPutAttributesError, RuntimeContext>
48 >
49 > {}
50 export const BatchPutAttributes = Binding.Service<BatchPutAttributes>(
51 "AWS.SimpleDB.BatchPutAttributes",
52 );