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