| 1 | import type * as ecrpublic from "@distilled.cloud/aws/ecr-public"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { PublicRepository } from "./Repository.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Request for {@link GetRepositoryCatalogData} — `repositoryName` is |
| 8 | * injected. |
| 9 | */ |
| 10 | export interface GetRepositoryCatalogDataRequest extends Omit< |
| 11 | ecrpublic.GetRepositoryCatalogDataRequest, |
| 12 | "repositoryName" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for `ecr-public:GetRepositoryCatalogData`. |
| 17 | * |
| 18 | * Reads the gallery catalog metadata (description, architectures, about / |
| 19 | * usage markdown) of the bound {@link PublicRepository}. Provide the |
| 20 | * implementation with |
| 21 | * `Effect.provide(AWS.ECRPublic.GetRepositoryCatalogDataHttp)`. |
| 22 | * |
| 23 | * ### Catalog Metadata |
| 24 | * **Example:** Read A Repository's Gallery Metadata |
| 25 | * ```typescript |
| 26 | * // init |
| 27 | * const getCatalogData = yield* AWS.ECRPublic.GetRepositoryCatalogData(repository); |
| 28 | * |
| 29 | * // runtime |
| 30 | * const result = yield* getCatalogData(); |
| 31 | * const description = result.catalogData?.description; |
| 32 | * ``` |
| 33 | * |
| 34 | * @binding |
| 35 | */ |
| 36 | export interface GetRepositoryCatalogData extends Binding.Service< |
| 37 | GetRepositoryCatalogData, |
| 38 | "AWS.ECRPublic.GetRepositoryCatalogData", |
| 39 | <R extends PublicRepository>( |
| 40 | repository: R, |
| 41 | ) => Effect.Effect< |
| 42 | ( |
| 43 | request?: GetRepositoryCatalogDataRequest, |
| 44 | ) => Effect.Effect< |
| 45 | ecrpublic.GetRepositoryCatalogDataResponse, |
| 46 | ecrpublic.GetRepositoryCatalogDataError |
| 47 | > |
| 48 | > |
| 49 | > {} |
| 50 | |
| 51 | export const GetRepositoryCatalogData = |
| 52 | Binding.Service<GetRepositoryCatalogData>( |
| 53 | "AWS.ECRPublic.GetRepositoryCatalogData", |
| 54 | ); |