1import type * as appflow from "@distilled.cloud/aws/appflow";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { ConnectorProfile } from "./ConnectorProfile.ts";
5
6export interface DescribeConnectorEntityRequest extends Omit<
7 appflow.DescribeConnectorEntityRequest,
8 "connectorProfileName"
9> {}
10
11/**
12 * Runtime binding for `appflow:DescribeConnectorEntity`.
13 *
14 * Bind this operation to a {@link ConnectorProfile} in the function's init
15 * phase to get a callable that describes one entity's fields (the data model
16 * of a Salesforce object, a database table, etc.). The connector profile name
17 * is injected automatically and `appflow:DescribeConnectorEntity` is granted
18 * on the profile. Provide the implementation with
19 * `Effect.provide(AWS.AppFlow.DescribeConnectorEntityHttp)`.
20 * ### Discovering Connector Entities
21 * **Example:** Describe an Entity's Fields
22 * ```typescript
23 * // init — bind the operation to the connector profile
24 * const describeConnectorEntity =
25 * yield* AWS.AppFlow.DescribeConnectorEntity(profile);
26 *
27 * // runtime — read the entity's field metadata
28 * const result = yield* describeConnectorEntity({
29 * connectorEntityName: "Account",
30 * });
31 * // result.connectorEntityFields lists each field with its type
32 * ```
33 *
34 * @binding
35 */
36export interface DescribeConnectorEntity extends Binding.Service<
37 DescribeConnectorEntity,
38 "AWS.AppFlow.DescribeConnectorEntity",
39 (
40 profile: ConnectorProfile,
41 ) => Effect.Effect<
42 (
43 request: DescribeConnectorEntityRequest,
44 ) => Effect.Effect<
45 appflow.DescribeConnectorEntityResponse,
46 appflow.DescribeConnectorEntityError
47 >
48 >
49> {}
50
51export const DescribeConnectorEntity = Binding.Service<DescribeConnectorEntity>(
52 "AWS.AppFlow.DescribeConnectorEntity",
53);