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
| 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 ListObjectsV2Request extends Omit<S3.ListObjectsV2Request, "Bucket"> {} |
| 9 | |
| 10 | /** |
| 11 | * Runtime binding for Tigris `ListObjectsV2` over the S3 API. |
| 12 | * |
| 13 | * Bind this operation to a {@link Bucket} in Service init. Provide |
| 14 | * {@link ListObjectsV2Http}. |
| 15 | * |
| 16 | * |
| 17 | * ### Listing Objects |
| 18 | * **Example:** List Objects Under a Prefix |
| 19 | * ```typescript |
| 20 | * const listObjects = yield* Fly.ListObjectsV2(Data); |
| 21 | * const result = yield* listObjects({ Prefix: "jobs/", MaxKeys: 100 }); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | * @product Bucket |
| 26 | */ |
| 27 | export interface ListObjectsV2 extends Binding.Service< |
| 28 | ListObjectsV2, |
| 29 | "Fly.ListObjectsV2", |
| 30 | ( |
| 31 | bucket: Bucket, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request?: ListObjectsV2Request, |
| 35 | ) => Effect.Effect< |
| 36 | S3.ListObjectsV2Output, |
| 37 | S3.ListObjectsV2Error | TigrisCredentialsMissing, |
| 38 | RuntimeContext |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | |
| 43 | export const ListObjectsV2 = Binding.Service<ListObjectsV2>("Fly.ListObjectsV2"); |