@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

main
ts 39 lines 1.32 KB
Raw
1 import type * as s3control from "@distilled.cloud/aws/s3-control";
2 import type * as sts from "@distilled.cloud/aws/sts";
3 import * as Binding from "alchemy/Binding";
4 import type * as Effect from "effect/Effect";
5
6 /**
7 * Runtime binding for `s3:DescribeJob` (S3 Batch Operations).
8 *
9 * Reads an S3 Batch Operations job's configuration, status and progress
10 * summary — e.g. a controller polling a bulk copy it submitted with
11 * {@link CreateJob}. The account id is resolved once via
12 * `sts:GetCallerIdentity`. Provide the implementation with
13 * `Effect.provide(AWS.S3Control.DescribeJobHttp)`.
14 * ### Running Batch Operations Jobs
15 * **Example:** Poll a Job's Status
16 * ```typescript
17 * // init — account-level binding, no resource argument
18 * const describeJob = yield* AWS.S3Control.DescribeJob();
19 *
20 * // runtime
21 * const { Job } = yield* describeJob({ JobId: jobId });
22 * // Job?.Status === "Complete"
23 * ```
24 *
25 * @binding
26 */
27 export interface DescribeJob extends Binding.Service<
28 DescribeJob,
29 "AWS.S3Control.DescribeJob",
30 () => Effect.Effect<
31 (
32 request: Omit<s3control.DescribeJobRequest, "AccountId">,
33 ) => Effect.Effect<
34 s3control.DescribeJobResult,
35 s3control.DescribeJobError | sts.GetCallerIdentityError
36 >
37 >
38 > {}
39 export const DescribeJob = Binding.Service<DescribeJob>("AWS.S3Control.DescribeJob");