@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 43 lines 1.43 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 BatchGetImage} — `repositoryName` is injected from the
8 * bound {@link Repository} (the registry defaults to the caller's account).
9 */
10 export interface BatchGetImageRequest extends Omit<
11 ecr.BatchGetImageRequest,
12 "registryId" | "repositoryName"
13 > {}
14
15 /**
16 * Runtime binding for `ecr:BatchGetImage`.
17 *
18 * Fetches image manifests from the bound repository — the read half of a registry pull, and the first step of re-tagging an image (`BatchGetImage` → `PutImage` with a new tag). Provide the implementation with
19 * `Effect.provide(AWS.ECR.BatchGetImageHttp)`.
20 * ### Pulling Images
21 * **Example:** Fetch an Image Manifest
22 * ```typescript
23 * const batchGetImage = yield* AWS.ECR.BatchGetImage(repository);
24 *
25 * const res = yield* batchGetImage({ imageIds: [{ imageTag: "latest" }] });
26 * const manifest = res.images?.[0]?.imageManifest;
27 * ```
28 *
29 * @binding
30 */
31 export interface BatchGetImage extends Binding.Service<
32 BatchGetImage,
33 "AWS.ECR.BatchGetImage",
34 (
35 repository: Repository,
36 ) => Effect.Effect<
37 (
38 request: BatchGetImageRequest,
39 ) => Effect.Effect<ecr.BatchGetImageResponse, ecr.BatchGetImageError>
40 >
41 > {}
42
43 export const BatchGetImage = Binding.Service<BatchGetImage>("AWS.ECR.BatchGetImage");