1import type * as entityresolution from "@distilled.cloud/aws/entityresolution";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { MatchingWorkflow } from "./MatchingWorkflow.ts";
5
6/**
7 * Runtime binding for `entityresolution:GetMatchId`.
8 *
9 * Returns the Match ID of a customer record if it has already been processed
10 * by the bound rule-based matching workflow — a read-only dry run of an
11 * incremental load. Provide the implementation with
12 * `Effect.provide(AWS.EntityResolution.GetMatchIdHttp)`.
13 * ### Real-Time Matching
14 * **Example:** Look Up a Record's Match ID
15 * ```typescript
16 * // init — bind the operation to the workflow
17 * const getMatchId = yield* AWS.EntityResolution.GetMatchId(workflow);
18 *
19 * // runtime
20 * const { matchId, matchRule } = yield* getMatchId({
21 * record: { id: "1", email: "jane@example.com" },
22 * });
23 * ```
24 *
25 * @binding
26 */
27export interface GetMatchId extends Binding.Service<
28 GetMatchId,
29 "AWS.EntityResolution.GetMatchId",
30 (
31 workflow: MatchingWorkflow,
32 ) => Effect.Effect<
33 (
34 request: Omit<entityresolution.GetMatchIdInput, "workflowName">,
35 ) => Effect.Effect<
36 entityresolution.GetMatchIdOutput,
37 entityresolution.GetMatchIdError
38 >
39 >
40> {}
41
42export const GetMatchId = Binding.Service<GetMatchId>(
43 "AWS.EntityResolution.GetMatchId",
44);