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

main
ts 37 lines 1.29 KB
Raw
1 import * as S3 from "@distilled.cloud/aws/s3";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { Bucket } from "./Bucket.ts";
5
6 export interface ListObjectVersionsRequest extends Omit<S3.ListObjectVersionsRequest, "Bucket"> {}
7
8 /**
9 * Runtime binding for `s3:ListBucketVersions`.
10 *
11 * Bind this operation to a bucket to get a callable that lists object
12 * versions and delete markers — the bucket name is injected automatically and
13 * `s3:ListBucketVersions` is granted on the bucket. Provide the
14 * implementation with `Effect.provide(AWS.S3.ListObjectVersionsHttp)`.
15 * ### Listing Objects
16 * **Example:** List Versions Under a Prefix
17 * ```typescript
18 * const listObjectVersions = yield* AWS.S3.ListObjectVersions(bucket);
19 *
20 * const result = yield* listObjectVersions({ Prefix: "reports/" });
21 * const versions = result.Versions ?? [];
22 * ```
23 *
24 * @binding
25 */
26 export interface ListObjectVersions extends Binding.Service<
27 ListObjectVersions,
28 "AWS.S3.ListObjectVersions",
29 (
30 bucket: Bucket,
31 ) => Effect.Effect<
32 (
33 request?: ListObjectVersionsRequest,
34 ) => Effect.Effect<S3.ListObjectVersionsOutput, S3.ListObjectVersionsError>
35 >
36 > {}
37 export const ListObjectVersions = Binding.Service<ListObjectVersions>("AWS.S3.ListObjectVersions");