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

main
ts 37 lines 1.13 KB
Raw
1 import type * as storage from "@distilled.cloud/gcp/storage_v1";
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 { Bucket } from "./Bucket.ts";
6
7 export interface DeleteObjectRequest extends Omit<storage.DeleteObjectsRequest, "bucket"> {}
8
9 /**
10 * Runtime binding for Cloud Storage `objects.delete`.
11 *
12 * Bind this operation to a {@link Bucket} in a Function/Action init phase.
13 * Provide {@link DeleteObjectHttp}.
14 *
15 * ### Deleting Objects
16 * **Example:** Delete an object
17 * ```typescript
18 * const deleteObject = yield* GCP.Storage.DeleteObject(bucket);
19 * yield* deleteObject({ object: "hello.txt" });
20 * ```
21 *
22 * @binding
23 * @category Storage
24 */
25 export interface DeleteObject extends Binding.Service<
26 DeleteObject,
27 "GCP.Storage.DeleteObject",
28 (
29 bucket: Bucket,
30 ) => Effect.Effect<
31 (
32 request: DeleteObjectRequest,
33 ) => Effect.Effect<storage.DeleteObjectsResponse, storage.DeleteObjectsError, RuntimeContext>
34 >
35 > {}
36
37 export const DeleteObject = Binding.Service<DeleteObject>("GCP.Storage.DeleteObject");