1import type * as glacier from "@distilled.cloud/aws/glacier";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Vault } from "./Vault.ts";
5
6/**
7 * `ListParts` request with `accountId` and `vaultName` injected from the bound
8 * {@link Vault}.
9 */
10export interface ListPartsRequest extends Omit<
11 glacier.ListPartsInput,
12 "accountId" | "vaultName"
13> {}
14
15/**
16 * Runtime binding for the `ListParts` operation (IAM action
17 * `glacier:ListParts` on the vault ARN).
18 *
19 * Lists the parts already uploaded for an in-progress multipart upload on
20 * the bound {@link Vault}, sorted by byte range — the resume point after a
21 * crashed uploader.
22 * Provide the implementation with
23 * `Effect.provide(AWS.Glacier.ListPartsHttp)`.
24 * ### Uploading Archives
25 * **Example:** List a multipart upload's parts
26 * ```typescript
27 * const listParts = yield* AWS.Glacier.ListParts(vault);
28 *
29 * const { Parts } = yield* listParts({ uploadId });
30 * ```
31 *
32 * @binding
33 */
34export interface ListParts extends Binding.Service<
35 ListParts,
36 "AWS.Glacier.ListParts",
37 (
38 vault: Vault,
39 ) => Effect.Effect<
40 (
41 request: ListPartsRequest,
42 ) => Effect.Effect<glacier.ListPartsOutput, glacier.ListPartsError>
43 >
44> {}
45export const ListParts = Binding.Service<ListParts>("AWS.Glacier.ListParts");