@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 43 lines 1.47 KB
Raw
1 import type * as rekognition from "@distilled.cloud/aws/rekognition";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `rekognition:DetectLabels` — detect real-world
7 * entities (objects, scenes, concepts) in a JPEG or PNG image.
8 *
9 * Rekognition is a pure pay-per-call service with no resource to manage:
10 * the binding takes no arguments and grants the function
11 * `rekognition:DetectLabels` (the action has no resource-level IAM).
12 * Pass the image as raw bytes (`Image.Bytes`) or as an S3 object
13 * reference (`Image.S3Object`) — raw distilled types, no marshalling.
14 * Provide the implementation with
15 * `Effect.provide(AWS.Rekognition.DetectLabelsHttp)`.
16 *
17 * ### Detecting Labels
18 * **Example:** Detect Labels in Image Bytes
19 * ```typescript
20 * // init
21 * const detectLabels = yield* AWS.Rekognition.DetectLabels();
22 *
23 * // runtime
24 * const result = yield* detectLabels({
25 * Image: { Bytes: imageBytes },
26 * MaxLabels: 10,
27 * MinConfidence: 50,
28 * });
29 * const names = (result.Labels ?? []).map((label) => label.Name);
30 * ```
31 *
32 * @binding
33 */
34 export interface DetectLabels extends Binding.Service<
35 DetectLabels,
36 "AWS.Rekognition.DetectLabels",
37 () => Effect.Effect<
38 (
39 request: rekognition.DetectLabelsRequest,
40 ) => Effect.Effect<rekognition.DetectLabelsResponse, rekognition.DetectLabelsError>
41 >
42 > {}
43 export const DetectLabels = Binding.Service<DetectLabels>("AWS.Rekognition.DetectLabels");