@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, 04:45 UTC

main
ts 50 lines 1.63 KB
Raw
1 import type * as medicalimaging from "@distilled.cloud/aws/medical-imaging";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Datastore } from "./Datastore.ts";
5
6 /**
7 * `GetImageFrame` request with `datastoreId` injected from the bound data
8 * store.
9 */
10 export interface GetImageFrameRequest extends Omit<
11 medicalimaging.GetImageFrameRequest,
12 "datastoreId"
13 > {}
14
15 /**
16 * Runtime binding for the `GetImageFrame` operation (IAM action
17 * `medical-imaging:GetImageFrame`), scoped to one {@link Datastore}.
18 *
19 * Streams the pixel data of a single image frame (HTJ2K- or
20 * JPEG2000-encoded, per the data store's `losslessStorageFormat`). Image
21 * frame ids come from the image set metadata blob read with
22 * {@link GetImageSetMetadata}. Provide the implementation with
23 * `Effect.provide(AWS.MedicalImaging.GetImageFrameHttp)`.
24 *
25 * ### Reading Image Frames
26 * **Example:** Fetch an Image Frame's Pixel Data
27 * ```typescript
28 * const getImageFrame = yield* MedicalImaging.GetImageFrame(datastore);
29 *
30 * const frame = yield* getImageFrame({
31 * imageSetId,
32 * imageFrameInformation: { imageFrameId },
33 * });
34 * // frame.imageFrameBlob (streaming body), frame.contentType
35 * ```
36 *
37 * @binding
38 */
39 export interface GetImageFrame extends Binding.Service<
40 GetImageFrame,
41 "AWS.MedicalImaging.GetImageFrame",
42 (
43 datastore: Datastore,
44 ) => Effect.Effect<
45 (
46 request: GetImageFrameRequest,
47 ) => Effect.Effect<medicalimaging.GetImageFrameResponse, medicalimaging.GetImageFrameError>
48 >
49 > {}
50 export const GetImageFrame = Binding.Service<GetImageFrame>("AWS.MedicalImaging.GetImageFrame");