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

main
ts 41 lines 1.26 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 ListImages} — `repositoryName` is injected from the
8 * bound {@link Repository} (the registry defaults to the caller's account).
9 */
10 export interface ListImagesRequest extends Omit<
11 ecr.ListImagesRequest,
12 "registryId" | "repositoryName"
13 > {}
14
15 /**
16 * Runtime binding for `ecr:ListImages`.
17 *
18 * Lists the image IDs (digest + tag) in the bound repository. Provide the implementation with
19 * `Effect.provide(AWS.ECR.ListImagesHttp)`.
20 * ### Reading Images
21 * **Example:** List Tagged Image IDs
22 * ```typescript
23 * const listImages = yield* AWS.ECR.ListImages(repository);
24 *
25 * const res = yield* listImages({ filter: { tagStatus: "TAGGED" } });
26 * for (const id of res.imageIds ?? []) console.log(id.imageTag);
27 * ```
28 *
29 * @binding
30 */
31 export interface ListImages extends Binding.Service<
32 ListImages,
33 "AWS.ECR.ListImages",
34 (
35 repository: Repository,
36 ) => Effect.Effect<
37 (request?: ListImagesRequest) => Effect.Effect<ecr.ListImagesResponse, ecr.ListImagesError>
38 >
39 > {}
40
41 export const ListImages = Binding.Service<ListImages>("AWS.ECR.ListImages");