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:GetFaceLivenessSessionResults` — get the confidence score, status, and audit images of a completed Face Liveness session.
7 *
8 * The binding takes no arguments and grants the function
9 * `rekognition:GetFaceLivenessSessionResults` 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.GetFaceLivenessSessionResultsHttp)`.
13 *
14 * ### Face Liveness
15 * **Example:** Fetch Liveness Results
16 * ```typescript
17 * // init
18 * const getFaceLivenessSessionResults = yield* AWS.Rekognition.GetFaceLivenessSessionResults();
19 *
20 * // runtime
21 * const results = yield* getFaceLivenessSessionResults({
22 * SessionId: sessionId,
23 * });
24 * const isLive = results.Status === "SUCCEEDED" && (results.Confidence ?? 0) > 80;
25 * ```
26 *
27 * @binding
28 */
29export interface GetFaceLivenessSessionResults extends Binding.Service<
30 GetFaceLivenessSessionResults,
31 "AWS.Rekognition.GetFaceLivenessSessionResults",
32 () => Effect.Effect<
33 (
34 request: rekognition.GetFaceLivenessSessionResultsRequest,
35 ) => Effect.Effect<
36 rekognition.GetFaceLivenessSessionResultsResponse,
37 rekognition.GetFaceLivenessSessionResultsError
38 >
39 >
40> {}
41export const GetFaceLivenessSessionResults =
42 Binding.Service<GetFaceLivenessSessionResults>(
43 "AWS.Rekognition.GetFaceLivenessSessionResults",
44 );