The best way to control Claude Code, Codex and more from any computer or phone

main
ts 39 lines 1.39 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 DeleteKeyRequest extends Omit<kvs.DeleteKeyRequest, "KvsARN"> {}
7
8 /**
9 * Runtime binding for `cloudfront-keyvaluestore:DeleteKey`.
10 *
11 * Deletes a single key from the bound KeyValueStore's data plane. Writes use
12 * optimistic concurrency: pass the store's current `ETag` as `IfMatch` (from
13 * {@link DescribeKeyValueStore} or a previous write's response). Provide the
14 * implementation with `Effect.provide(AWS.CloudFront.DeleteKeyHttp)`.
15 * ### Writing KeyValueStore Data
16 * **Example:** Delete a Key
17 * ```typescript
18 * // init — bind the operations to the store
19 * const describeStore = yield* CloudFront.DescribeKeyValueStore(store);
20 * const deleteKey = yield* CloudFront.DeleteKey(store);
21 *
22 * // runtime
23 * const meta = yield* describeStore({});
24 * yield* deleteKey({ Key: "routes:/about", IfMatch: meta.ETag });
25 * ```
26 *
27 * @binding
28 */
29 export interface DeleteKey extends Binding.Service<
30 DeleteKey,
31 "AWS.CloudFront.DeleteKey",
32 (
33 store: KeyValueStore,
34 ) => Effect.Effect<
35 (request: DeleteKeyRequest) => Effect.Effect<kvs.DeleteKeyResponse, kvs.DeleteKeyError>
36 >
37 > {}
38
39 export const DeleteKey = Binding.Service<DeleteKey>("AWS.CloudFront.DeleteKey");