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

main
ts 46 lines 1.45 KB
Raw
1 import type * as ecrpublic from "@distilled.cloud/aws/ecr-public";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { PublicRepository } from "./Repository.ts";
5
6 /** Request for {@link InitiateLayerUpload} — `repositoryName` is injected. */
7 export interface InitiateLayerUploadRequest extends Omit<
8 ecrpublic.InitiateLayerUploadRequest,
9 "repositoryName"
10 > {}
11
12 /**
13 * Runtime binding for `ecr-public:InitiateLayerUpload`.
14 *
15 * Starts an image layer upload to the bound {@link PublicRepository},
16 * returning the `uploadId` used by {@link UploadLayerPart} and
17 * {@link CompleteLayerUpload}. Provide the implementation with
18 * `Effect.provide(AWS.ECRPublic.InitiateLayerUploadHttp)`.
19 *
20 * ### Pushing Images
21 * **Example:** Start A Layer Upload
22 * ```typescript
23 * // init
24 * const initiateLayerUpload = yield* AWS.ECRPublic.InitiateLayerUpload(repository);
25 *
26 * // runtime
27 * const { uploadId } = yield* initiateLayerUpload();
28 * ```
29 *
30 * @binding
31 */
32 export interface InitiateLayerUpload extends Binding.Service<
33 InitiateLayerUpload,
34 "AWS.ECRPublic.InitiateLayerUpload",
35 <R extends PublicRepository>(
36 repository: R,
37 ) => Effect.Effect<
38 (
39 request?: InitiateLayerUploadRequest,
40 ) => Effect.Effect<ecrpublic.InitiateLayerUploadResponse, ecrpublic.InitiateLayerUploadError>
41 >
42 > {}
43
44 export const InitiateLayerUpload = Binding.Service<InitiateLayerUpload>(
45 "AWS.ECRPublic.InitiateLayerUpload",
46 );