@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 64 lines 2.27 KB
Raw
1 import type * as transcribe from "@distilled.cloud/aws/transcribe";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Role } from "../IAM/Role.ts";
5
6 /**
7 * `StartMedicalScribeJob` request with `DataAccessRoleArn` defaulting to the role the
8 * binding was constructed with.
9 */
10 export interface StartMedicalScribeJobRequest extends Omit<
11 transcribe.StartMedicalScribeJobRequest,
12 "DataAccessRoleArn"
13 > {
14 /**
15 * IAM role Amazon Transcribe assumes to access your Amazon S3 data.
16 * @default the data-access role bound via `StartMedicalScribeJob(role)`
17 */
18 DataAccessRoleArn?: string;
19 }
20
21 /**
22 * Runtime binding for `transcribe:StartMedicalScribeJob` — start an AWS HealthScribe job that transcribes a patient-clinician conversation and generates preliminary clinical notes.
23 *
24 * The binding is constructed with the **data-access role** (the IAM role
25 * Amazon Transcribe assumes to read your Amazon S3 data and write results;
26 * its trust policy must allow `transcribe.amazonaws.com`). The role's ARN
27 * is injected as `DataAccessRoleArn` on every runtime request and the host
28 * is granted `iam:PassRole` on it alongside `transcribe:StartMedicalScribeJob`
29 * (which has no resource-level IAM).
30 *
31 * ### Medical Scribe Jobs
32 * **Example:** Start a Medical Scribe Job
33 * ```typescript
34 * // init — bind the Transcribe data-access role
35 * const startMedicalScribeJob = yield* AWS.Transcribe.StartMedicalScribeJob(dataAccessRole);
36 *
37 * // runtime
38 * const { MedicalScribeJob } = yield* startMedicalScribeJob({
39 * MedicalScribeJobName: "my-visit",
40 * Media: { MediaFileUri: "s3://my-bucket/visits/visit.wav" },
41 * OutputBucketName: "my-output-bucket",
42 * Settings: { ShowSpeakerLabels: true, MaxSpeakerLabels: 2 },
43 * });
44 * ```
45 *
46 * @binding
47 */
48 export interface StartMedicalScribeJob extends Binding.Service<
49 StartMedicalScribeJob,
50 "AWS.Transcribe.StartMedicalScribeJob",
51 <R extends Role>(
52 dataAccessRole: R,
53 ) => Effect.Effect<
54 (
55 request: StartMedicalScribeJobRequest,
56 ) => Effect.Effect<
57 transcribe.StartMedicalScribeJobResponse,
58 transcribe.StartMedicalScribeJobError
59 >
60 >
61 > {}
62 export const StartMedicalScribeJob = Binding.Service<StartMedicalScribeJob>(
63 "AWS.Transcribe.StartMedicalScribeJob",
64 );