@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 39 lines 1.24 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 GetAttributesRequest extends Omit<sdb.GetAttributesRequest, "DomainName"> {}
8
9 /**
10 * Runtime binding for `sdb:GetAttributes`.
11 *
12 * Bind this operation to a {@link Domain} inside a function runtime to get a
13 * callable that automatically injects the domain name.
14 * ### Reading Items
15 * **Example:** Read an Item's Attributes
16 * ```typescript
17 * const getAttributes = yield* AWS.SimpleDB.GetAttributes(domain);
18 *
19 * const response = yield* getAttributes({
20 * ItemName: "user#123",
21 * ConsistentRead: true,
22 * });
23 * // response.Attributes: [{ Name: "email", Value: "a@b.com" }, ...]
24 * ```
25 *
26 * @binding
27 */
28 export interface GetAttributes extends Binding.Service<
29 GetAttributes,
30 "AWS.SimpleDB.GetAttributes",
31 (
32 domain: Domain,
33 ) => Effect.Effect<
34 (
35 request: GetAttributesRequest,
36 ) => Effect.Effect<sdb.GetAttributesResponse, sdb.GetAttributesError, RuntimeContext>
37 >
38 > {}
39 export const GetAttributes = Binding.Service<GetAttributes>("AWS.SimpleDB.GetAttributes");