The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type * as S3 from "@distilled.cloud/aws/s3"; |
| 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 | import type { TigrisCredentialsMissing } from "./Errors.ts"; |
| 7 | |
| 8 | export interface DeleteObjectRequest extends Omit<S3.DeleteObjectRequest, "Bucket"> {} |
| 9 | |
| 10 | /** |
| 11 | * Runtime binding for Tigris `DeleteObject` over the S3 API. |
| 12 | * |
| 13 | * Bind this operation to a {@link Bucket} in Service init. Provide |
| 14 | * {@link DeleteObjectHttp}. |
| 15 | * |
| 16 | * |
| 17 | * ### Deleting Objects |
| 18 | * **Example:** Delete an Object |
| 19 | * ```typescript |
| 20 | * const deleteObject = yield* Fly.DeleteObject(Data); |
| 21 | * yield* deleteObject({ Key: "hello.txt" }); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | * @product Bucket |
| 26 | */ |
| 27 | export interface DeleteObject extends Binding.Service< |
| 28 | DeleteObject, |
| 29 | "Fly.DeleteObject", |
| 30 | ( |
| 31 | bucket: Bucket, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request: DeleteObjectRequest, |
| 35 | ) => Effect.Effect< |
| 36 | S3.DeleteObjectOutput, |
| 37 | S3.DeleteObjectError | TigrisCredentialsMissing, |
| 38 | RuntimeContext |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | |
| 43 | export const DeleteObject = Binding.Service<DeleteObject>("Fly.DeleteObject"); |