1import type * as rekognition from "@distilled.cloud/aws/rekognition";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `rekognition:SearchFaces` — search a face collection for faces matching a face ID already stored in the collection.
7 *
8 * The binding takes no arguments and grants the function
9 * `rekognition:SearchFaces` on `*` (Rekognition data-plane resources such
10 * as collections, users, and jobs are routinely created at runtime, so
11 * their identifiers are unknown at deploy time). Provide the
12 * implementation with `Effect.provide(AWS.Rekognition.SearchFacesHttp)`.
13 *
14 * ### Face Collections
15 * **Example:** Search by Face ID
16 * ```typescript
17 * // init
18 * const searchFaces = yield* AWS.Rekognition.SearchFaces();
19 *
20 * // runtime
21 * const result = yield* searchFaces({
22 * CollectionId: "tenant-42",
23 * FaceId: faceId,
24 * FaceMatchThreshold: 95,
25 * });
26 * const matches = result.FaceMatches ?? [];
27 * ```
28 *
29 * @binding
30 */
31export interface SearchFaces extends Binding.Service<
32 SearchFaces,
33 "AWS.Rekognition.SearchFaces",
34 () => Effect.Effect<
35 (
36 request: rekognition.SearchFacesRequest,
37 ) => Effect.Effect<
38 rekognition.SearchFacesResponse,
39 rekognition.SearchFacesError
40 >
41 >
42> {}
43export const SearchFaces = Binding.Service<SearchFaces>(
44 "AWS.Rekognition.SearchFaces",
45);