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:DetectFaces` — detect the 100 largest faces in an image and return facial landmarks, pose, and optional attributes (age range, emotions, etc.).
7 *
8 * The binding takes no arguments and grants the function
9 * `rekognition:DetectFaces` 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.DetectFacesHttp)`.
13 *
14 * ### Image Analysis
15 * **Example:** Detect Faces with All Attributes
16 * ```typescript
17 * // init
18 * const detectFaces = yield* AWS.Rekognition.DetectFaces();
19 *
20 * // runtime
21 * const result = yield* detectFaces({
22 * Image: { Bytes: imageBytes },
23 * Attributes: ["ALL"],
24 * });
25 * const ages = (result.FaceDetails ?? []).map((f) => f.AgeRange);
26 * ```
27 *
28 * @binding
29 */
30export interface DetectFaces extends Binding.Service<
31 DetectFaces,
32 "AWS.Rekognition.DetectFaces",
33 () => Effect.Effect<
34 (
35 request: rekognition.DetectFacesRequest,
36 ) => Effect.Effect<
37 rekognition.DetectFacesResponse,
38 rekognition.DetectFacesError
39 >
40 >
41> {}
42export const DetectFaces = Binding.Service<DetectFaces>(
43 "AWS.Rekognition.DetectFaces",
44);