@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.38 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 StartImageScan} — `repositoryName` is injected from the
8 * bound {@link Repository} (the registry defaults to the caller's account).
9 */
10 export interface StartImageScanRequest extends Omit<
11 ecr.StartImageScanRequest,
12 "registryId" | "repositoryName"
13 > {}
14
15 /**
16 * Runtime binding for `ecr:StartImageScan`.
17 *
18 * Starts an on-demand vulnerability scan of an image in the bound repository (basic scanning; one scan per image per day). Provide the implementation with
19 * `Effect.provide(AWS.ECR.StartImageScanHttp)`.
20 * ### Image Scanning
21 * **Example:** Scan an Image on Demand
22 * ```typescript
23 * const startImageScan = yield* AWS.ECR.StartImageScan(repository);
24 *
25 * const res = yield* startImageScan({ imageId: { imageTag: "latest" } });
26 * console.log(res.imageScanStatus?.status);
27 * ```
28 *
29 * @binding
30 */
31 export interface StartImageScan extends Binding.Service<
32 StartImageScan,
33 "AWS.ECR.StartImageScan",
34 (
35 repository: Repository,
36 ) => Effect.Effect<
37 (
38 request: StartImageScanRequest,
39 ) => Effect.Effect<ecr.StartImageScanResponse, ecr.StartImageScanError>
40 >
41 > {}
42
43 export const StartImageScan = Binding.Service<StartImageScan>("AWS.ECR.StartImageScan");