| 1 | import type * as appflow from "@distilled.cloud/aws/appflow"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { ConnectorProfile } from "./ConnectorProfile.ts"; |
| 5 | |
| 6 | export interface ListConnectorEntitiesRequest extends Omit< |
| 7 | appflow.ListConnectorEntitiesRequest, |
| 8 | "connectorProfileName" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `appflow:ListConnectorEntities`. |
| 13 | * |
| 14 | * Bind this operation to a {@link ConnectorProfile} in the function's init |
| 15 | * phase to get a callable that discovers the entities the connected |
| 16 | * application exposes (e.g. Salesforce objects, database tables) — useful for |
| 17 | * dynamic schema discovery at runtime. The connector profile name is injected |
| 18 | * automatically and `appflow:ListConnectorEntities` is granted on the |
| 19 | * profile. Provide the implementation with |
| 20 | * `Effect.provide(AWS.AppFlow.ListConnectorEntitiesHttp)`. |
| 21 | * ### Discovering Connector Entities |
| 22 | * **Example:** List the Entities Behind a Connector Profile |
| 23 | * ```typescript |
| 24 | * // init — bind the operation to the connector profile |
| 25 | * const listConnectorEntities = |
| 26 | * yield* AWS.AppFlow.ListConnectorEntities(profile); |
| 27 | * |
| 28 | * // runtime — enumerate the connector's entities |
| 29 | * const result = yield* listConnectorEntities(); |
| 30 | * // result.connectorEntityMap groups entities by category |
| 31 | * ``` |
| 32 | * |
| 33 | * @binding |
| 34 | */ |
| 35 | export interface ListConnectorEntities extends Binding.Service< |
| 36 | ListConnectorEntities, |
| 37 | "AWS.AppFlow.ListConnectorEntities", |
| 38 | ( |
| 39 | profile: ConnectorProfile, |
| 40 | ) => Effect.Effect< |
| 41 | ( |
| 42 | request?: ListConnectorEntitiesRequest, |
| 43 | ) => Effect.Effect< |
| 44 | appflow.ListConnectorEntitiesResponse, |
| 45 | appflow.ListConnectorEntitiesError |
| 46 | > |
| 47 | > |
| 48 | > {} |
| 49 | |
| 50 | export const ListConnectorEntities = Binding.Service<ListConnectorEntities>( |
| 51 | "AWS.AppFlow.ListConnectorEntities", |
| 52 | ); |