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

main
ts 44 lines 1.4 KB
Raw
1 import type * as ecr from "@distilled.cloud/aws/ecr";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Repository } from "./Repository.ts";
5
6 /**
7 * Request for {@link InitiateLayerUpload} — `repositoryName` is injected from the
8 * bound {@link Repository} (the registry defaults to the caller's account).
9 */
10 export interface InitiateLayerUploadRequest extends Omit<
11 ecr.InitiateLayerUploadRequest,
12 "registryId" | "repositoryName"
13 > {}
14
15 /**
16 * Runtime binding for `ecr:InitiateLayerUpload`.
17 *
18 * Opens a layer-blob upload to the bound repository, returning the `uploadId` that `UploadLayerPart` and `CompleteLayerUpload` continue. Provide the implementation with
19 * `Effect.provide(AWS.ECR.InitiateLayerUploadHttp)`.
20 * ### Pushing Images
21 * **Example:** Start a Layer Upload
22 * ```typescript
23 * const initiateUpload = yield* AWS.ECR.InitiateLayerUpload(repository);
24 *
25 * const { uploadId } = yield* initiateUpload();
26 * ```
27 *
28 * @binding
29 */
30 export interface InitiateLayerUpload extends Binding.Service<
31 InitiateLayerUpload,
32 "AWS.ECR.InitiateLayerUpload",
33 (
34 repository: Repository,
35 ) => Effect.Effect<
36 (
37 request?: InitiateLayerUploadRequest,
38 ) => Effect.Effect<ecr.InitiateLayerUploadResponse, ecr.InitiateLayerUploadError>
39 >
40 > {}
41
42 export const InitiateLayerUpload = Binding.Service<InitiateLayerUpload>(
43 "AWS.ECR.InitiateLayerUpload",
44 );