@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 45 lines 1.5 KB
Raw
1 import type * as kvs from "@distilled.cloud/aws/cloudfront-keyvaluestore";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { KeyValueStore } from "./KeyValueStore.ts";
5
6 export interface DescribeKeyValueStoreRequest extends Omit<
7 kvs.DescribeKeyValueStoreRequest,
8 "KvsARN"
9 > {}
10
11 /**
12 * Runtime binding for `cloudfront-keyvaluestore:DescribeKeyValueStore`.
13 *
14 * Reads the bound KeyValueStore's data-plane metadata — item count, total
15 * size, and the current `ETag` that write operations ({@link PutKey},
16 * {@link DeleteKey}, {@link UpdateKeys}) require as `IfMatch`. Provide the
17 * implementation with `Effect.provide(AWS.CloudFront.DescribeKeyValueStoreHttp)`.
18 * ### Reading KeyValueStore Data
19 * **Example:** Fetch the Store's ETag Before a Write
20 * ```typescript
21 * // init — bind the operation to the store
22 * const describeStore = yield* CloudFront.DescribeKeyValueStore(store);
23 *
24 * // runtime
25 * const meta = yield* describeStore({});
26 * console.log(meta.ETag, meta.ItemCount);
27 * ```
28 *
29 * @binding
30 */
31 export interface DescribeKeyValueStore extends Binding.Service<
32 DescribeKeyValueStore,
33 "AWS.CloudFront.DescribeKeyValueStore",
34 (
35 store: KeyValueStore,
36 ) => Effect.Effect<
37 (
38 request: DescribeKeyValueStoreRequest,
39 ) => Effect.Effect<kvs.DescribeKeyValueStoreResponse, kvs.DescribeKeyValueStoreError>
40 >
41 > {}
42
43 export const DescribeKeyValueStore = Binding.Service<DescribeKeyValueStore>(
44 "AWS.CloudFront.DescribeKeyValueStore",
45 );