@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, 06:00 UTC

main
ts 46 lines 1.45 KB
Raw
1 import type * as glacier from "@distilled.cloud/aws/glacier";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Vault } from "./Vault.ts";
5
6 /**
7 * `GetJobOutput` request with `accountId` and `vaultName` injected from the bound
8 * {@link Vault}.
9 */
10 export interface GetJobOutputRequest extends Omit<
11 glacier.GetJobOutputInput,
12 "accountId" | "vaultName"
13 > {}
14
15 /**
16 * Runtime binding for the `GetJobOutput` operation (IAM action
17 * `glacier:GetJobOutput` on the vault ARN).
18 *
19 * Downloads the output of a completed job on the bound {@link Vault} — the
20 * archive bytes for an archive-retrieval job, or the JSON inventory for an
21 * inventory-retrieval job. Supports ranged reads via the `range` header
22 * field for chunked downloads.
23 * Provide the implementation with
24 * `Effect.provide(AWS.Glacier.GetJobOutputHttp)`.
25 * ### Retrieving Archives
26 * **Example:** Download a completed job's output
27 * ```typescript
28 * const getJobOutput = yield* AWS.Glacier.GetJobOutput(vault);
29 *
30 * const { body, status } = yield* getJobOutput({ jobId });
31 * ```
32 *
33 * @binding
34 */
35 export interface GetJobOutput extends Binding.Service<
36 GetJobOutput,
37 "AWS.Glacier.GetJobOutput",
38 (
39 vault: Vault,
40 ) => Effect.Effect<
41 (
42 request: GetJobOutputRequest,
43 ) => Effect.Effect<glacier.GetJobOutputOutput, glacier.GetJobOutputError>
44 >
45 > {}
46 export const GetJobOutput = Binding.Service<GetJobOutput>("AWS.Glacier.GetJobOutput");