| 1 | import type * as rekognition from "@distilled.cloud/aws/rekognition"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `rekognition:StartTextDetection` — start asynchronous detection of text in a stored video. |
| 7 | * |
| 8 | * Rekognition Video jobs read the video from S3 and run asynchronously — |
| 9 | * poll the paired `Get*` binding with the returned `JobId`, or pass a |
| 10 | * `NotificationChannel` (SNS topic + IAM role the caller must be allowed |
| 11 | * to pass) to be notified on completion. |
| 12 | * |
| 13 | * The binding takes no arguments and grants the function |
| 14 | * `rekognition:StartTextDetection` on `*` (Rekognition data-plane resources such |
| 15 | * as collections, users, and jobs are routinely created at runtime, so |
| 16 | * their identifiers are unknown at deploy time). Provide the |
| 17 | * implementation with `Effect.provide(AWS.Rekognition.StartTextDetectionHttp)`. |
| 18 | * |
| 19 | * ### Video Analysis |
| 20 | * **Example:** Start Text Detection |
| 21 | * ```typescript |
| 22 | * // init |
| 23 | * const startTextDetection = yield* AWS.Rekognition.StartTextDetection(); |
| 24 | * |
| 25 | * // runtime |
| 26 | * const started = yield* startTextDetection({ |
| 27 | * Video: { S3Object: { Bucket: "videos", Name: "input.mp4" } }, |
| 28 | * }); |
| 29 | * // started.JobId |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface StartTextDetection extends Binding.Service< |
| 35 | StartTextDetection, |
| 36 | "AWS.Rekognition.StartTextDetection", |
| 37 | () => Effect.Effect< |
| 38 | ( |
| 39 | request: rekognition.StartTextDetectionRequest, |
| 40 | ) => Effect.Effect< |
| 41 | rekognition.StartTextDetectionResponse, |
| 42 | rekognition.StartTextDetectionError |
| 43 | > |
| 44 | > |
| 45 | > {} |
| 46 | export const StartTextDetection = Binding.Service<StartTextDetection>( |
| 47 | "AWS.Rekognition.StartTextDetection", |
| 48 | ); |