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:GetMatchingJob`.
8 *
9 * Reads the status, metrics, and errors of a matching job run of the bound
10 * workflow. Provide the implementation with
11 * `Effect.provide(AWS.EntityResolution.GetMatchingJobHttp)`.
12 * ### Running Matching Jobs
13 * **Example:** Poll a Job's Status
14 * ```typescript
15 * // init — bind the operation to the workflow
16 * const getMatchingJob = yield* AWS.EntityResolution.GetMatchingJob(workflow);
17 *
18 * // runtime
19 * const job = yield* getMatchingJob({ jobId });
20 * console.log(job.status, job.metrics?.matchIDs);
21 * ```
22 *
23 * @binding
24 */
25export interface GetMatchingJob extends Binding.Service<
26 GetMatchingJob,
27 "AWS.EntityResolution.GetMatchingJob",
28 (
29 workflow: MatchingWorkflow,
30 ) => Effect.Effect<
31 (
32 request: Omit<entityresolution.GetMatchingJobInput, "workflowName">,
33 ) => Effect.Effect<
34 entityresolution.GetMatchingJobOutput,
35 entityresolution.GetMatchingJobError
36 >
37 >
38> {}
39
40export const GetMatchingJob = Binding.Service<GetMatchingJob>(
41 "AWS.EntityResolution.GetMatchingJob",
42);