@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 53 lines 1.71 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 * `CompleteMultipartUpload` request with `accountId` and `vaultName` injected from the bound
8 * {@link Vault}.
9 */
10 export interface CompleteMultipartUploadRequest extends Omit<
11 glacier.CompleteMultipartUploadInput,
12 "accountId" | "vaultName"
13 > {}
14
15 /**
16 * Runtime binding for the `CompleteMultipartUpload` operation (IAM action
17 * `glacier:CompleteMultipartUpload` on the vault ARN).
18 *
19 * Assembles the uploaded parts of a multipart upload into an archive in
20 * the bound {@link Vault}. `archiveSize` is the total size in bytes (as a
21 * string) and `checksum` the SHA-256 tree hash of the whole archive; the
22 * response carries the new `archiveId`.
23 * Provide the implementation with
24 * `Effect.provide(AWS.Glacier.CompleteMultipartUploadHttp)`.
25 * ### Uploading Archives
26 * **Example:** Complete a multipart upload
27 * ```typescript
28 * const completeMultipartUpload =
29 * yield* AWS.Glacier.CompleteMultipartUpload(vault);
30 *
31 * const { archiveId } = yield* completeMultipartUpload({
32 * uploadId,
33 * archiveSize: String(totalSize),
34 * checksum: treeHash,
35 * });
36 * ```
37 *
38 * @binding
39 */
40 export interface CompleteMultipartUpload extends Binding.Service<
41 CompleteMultipartUpload,
42 "AWS.Glacier.CompleteMultipartUpload",
43 (
44 vault: Vault,
45 ) => Effect.Effect<
46 (
47 request: CompleteMultipartUploadRequest,
48 ) => Effect.Effect<glacier.ArchiveCreationOutput, glacier.CompleteMultipartUploadError>
49 >
50 > {}
51 export const CompleteMultipartUpload = Binding.Service<CompleteMultipartUpload>(
52 "AWS.Glacier.CompleteMultipartUpload",
53 );