| 1 | import type * as datazone from "@distilled.cloud/aws/datazone"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Domain } from "./Domain.ts"; |
| 5 | |
| 6 | export interface GetListingRequest extends Omit< |
| 7 | datazone.GetListingInput, |
| 8 | "domainIdentifier" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `datazone:GetListing`. |
| 13 | * |
| 14 | * Reads a published listing in the bound domain by id. The domain id is injected from the binding. |
| 15 | * Provide the implementation with |
| 16 | * `Effect.provide(AWS.DataZone.GetListingHttp)`. |
| 17 | * ### Searching the Catalog |
| 18 | * **Example:** Read a Listing |
| 19 | * ```typescript |
| 20 | * // init — bind the operation to the domain |
| 21 | * const getListing = yield* AWS.DataZone.GetListing(domain); |
| 22 | * |
| 23 | * // runtime |
| 24 | * const listing = yield* getListing({ identifier: listingId }); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface GetListing extends Binding.Service< |
| 30 | GetListing, |
| 31 | "AWS.DataZone.GetListing", |
| 32 | ( |
| 33 | domain: Domain, |
| 34 | ) => Effect.Effect< |
| 35 | ( |
| 36 | request: GetListingRequest, |
| 37 | ) => Effect.Effect<datazone.GetListingOutput, datazone.GetListingError> |
| 38 | > |
| 39 | > {} |
| 40 | export const GetListing = Binding.Service<GetListing>( |
| 41 | "AWS.DataZone.GetListing", |
| 42 | ); |