evo360-types 1.3.574 → 1.3.581
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apps/evo-chat/channel/zod-schemas.d.ts +273 -0
- package/dist/apps/evo-chat/channel/zod-schemas.js +17 -1
- package/dist/apps/evo-chat/channel/zod-schemas.ts +19 -0
- package/dist/apps/evo-chat/thread-message/zod-schemas.d.ts +24 -0
- package/dist/apps/evo-chat/thread-message/zod-schemas.js +2 -0
- package/dist/apps/evo-chat/thread-message/zod-schemas.ts +2 -0
- package/dist/apps/evo-chat/waba-template/zod-schemas.d.ts +6 -0
- package/dist/apps/evo-chat/waba-template/zod-schemas.js +2 -0
- package/dist/apps/evo-chat/waba-template/zod-schemas.ts +2 -0
- package/dist/apps/evo-crm/lead/zod-schemas.d.ts +9 -0
- package/dist/apps/evo-med/calendar/zod-schemas.d.ts +4215 -1256
- package/dist/apps/evo-med/calendar/zod-schemas.js +61 -1
- package/dist/apps/evo-med/calendar/zod-schemas.ts +64 -0
- package/dist/apps/evo-med/insurance/zod-schemas.d.ts +9 -0
- package/dist/apps/evo-med/people/zod-schemas.d.ts +18 -0
- package/dist/apps/evo-notifications/zod-schemas.d.ts +110 -0
- package/dist/apps/evo-notifications/zod-schemas.js +8 -1
- package/dist/apps/evo-notifications/zod-schemas.ts +9 -0
- package/dist/apps/evo-telemedicine/zod-schemas.d.ts +161 -13
- package/dist/apps/evo-telemedicine/zod-schemas.js +93 -2
- package/dist/apps/evo-telemedicine/zod-schemas.ts +96 -0
- package/dist/apps/shared/zod-schemas.d.ts +3 -0
- package/dist/apps/shared/zod-schemas.js +2 -0
- package/dist/apps/shared/zod-schemas.ts +2 -0
- package/dist/types/evo-chat/channel/index.d.ts +19 -0
- package/dist/types/evo-chat/channel/index.ts +24 -0
- package/dist/types/evo-chat/thread-message/index.d.ts +4 -0
- package/dist/types/evo-chat/thread-message/index.ts +4 -0
- package/dist/types/evo-chat/waba-template/index.d.ts +6 -0
- package/dist/types/evo-chat/waba-template/index.js +3 -1
- package/dist/types/evo-chat/waba-template/index.ts +7 -0
- package/dist/types/evo-finops/common/contract.d.ts +8 -0
- package/dist/types/evo-finops/common/contract.js +7 -0
- package/dist/types/evo-finops/common/contract.ts +7 -0
- package/dist/types/evo-med/calendar/index.d.ts +124 -1
- package/dist/types/evo-med/calendar/index.js +60 -1
- package/dist/types/evo-med/calendar/index.ts +167 -1
- package/dist/types/evo-notifications/index.d.ts +11 -0
- package/dist/types/evo-notifications/index.ts +13 -0
- package/dist/types/evo-reports/index.d.ts +27 -0
- package/dist/types/evo-reports/index.ts +28 -0
- package/dist/types/evo-telemedicine/index.d.ts +421 -6
- package/dist/types/evo-telemedicine/index.js +69 -1
- package/dist/types/evo-telemedicine/index.ts +454 -6
- package/dist/types/shared/index.d.ts +1 -0
- package/dist/types/shared/index.ts +2 -0
- package/package.json +1 -1
|
@@ -27,10 +27,12 @@ export declare const zConsentDecisionSchema: z.ZodEnum<["accepted", "declined",
|
|
|
27
27
|
export declare const zConsentActorTypeSchema: z.ZodEnum<["patient", "doctor"]>;
|
|
28
28
|
/** Espelha `ArtifactTypeEnum`. */
|
|
29
29
|
export declare const zArtifactTypeSchema: z.ZodEnum<["recording_audio_video", "recording_audio", "transcript"]>;
|
|
30
|
+
/** Espelha `ArtifactDispositionEnum` (feat-160 F21). */
|
|
31
|
+
export declare const zArtifactDispositionSchema: z.ZodEnum<["inline", "attachment"]>;
|
|
30
32
|
/** Espelha `ArtifactStatusEnum`. */
|
|
31
33
|
export declare const zArtifactStatusSchema: z.ZodEnum<["pending", "processing", "ready", "failed", "deleting", "deleted"]>;
|
|
32
34
|
/** Espelha `AccessGrantKindEnum`. */
|
|
33
|
-
export declare const zAccessGrantKindSchema: z.ZodEnum<["qr_capability", "launch_code", "browser_session"]>;
|
|
35
|
+
export declare const zAccessGrantKindSchema: z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>;
|
|
34
36
|
/** Espelha `AccessGrantStateEnum`. */
|
|
35
37
|
export declare const zAccessGrantStateSchema: z.ZodEnum<["active", "consumed", "blocked", "revoked", "expired"]>;
|
|
36
38
|
/** Espelha `AccessSendChannelKindEnum`. */
|
|
@@ -42,7 +44,7 @@ export declare const zTeleconsultationEventActorTypeSchema: z.ZodEnum<["user", "
|
|
|
42
44
|
/** Espelha `TeleconsultationEventSourceEnum`. */
|
|
43
45
|
export declare const zTeleconsultationEventSourceSchema: z.ZodEnum<["api", "webhook", "appointment_reconciler", "retention_job", "sweep"]>;
|
|
44
46
|
/** Espelha `TeleconsultationEventTypeEnum`. ADITIVO: eventos já gravados dependem desta lista. */
|
|
45
|
-
export declare const zTeleconsultationEventTypeSchema: z.ZodEnum<["teleconsultation.created", "teleconsultation.rescheduled", "teleconsultation.cancelled", "teleconsultation.expired", "teleconsultation.diverged", "access.created", "access.revoked", "access.exchanged", "access.verification_failed", "access.blocked", "host.claimed", "host.reassigned", "waiting_policy.changed", "doctor.prepared", "doctor.joined", "doctor.disconnected", "doctor.rejoined", "doctor.left", "patient.verified", "patient.waiting", "patient.admitted", "patient.rejected", "patient.joined", "patient.disconnected", "patient.rejoined", "patient.left", "recording.consent_requested", "recording.consent_accepted", "recording.consent_declined", "recording.consent_withdrawn", "recording.started", "recording.stopped", "recording.failed", "transcription.queued", "transcription.ready", "transcription.failed", "transcription.deleted", "consultation.started", "consultation.reconnecting", "consultation.ended", "artifact.accessed", "artifact.deleted", "entitlement.denied", "rollout.denied", "permission.denied", "webhook.observed"]>;
|
|
47
|
+
export declare const zTeleconsultationEventTypeSchema: z.ZodEnum<["teleconsultation.created", "teleconsultation.rescheduled", "teleconsultation.cancelled", "teleconsultation.expired", "teleconsultation.diverged", "access.created", "access.link_revealed", "access.revoked", "access.exchanged", "access.verification_failed", "access.blocked", "host.claimed", "host.reassigned", "waiting_policy.changed", "doctor.prepared", "doctor.joined", "doctor.disconnected", "doctor.rejoined", "doctor.left", "patient.verified", "patient.waiting", "patient.admitted", "patient.rejected", "patient.joined", "patient.disconnected", "patient.rejoined", "patient.left", "recording.consent_requested", "recording.consent_accepted", "recording.consent_declined", "recording.consent_declined_pre_join", "recording.consent_withdrawn", "recording.started", "recording.auto_started", "recording.stopped", "recording.failed", "transcription.queued", "transcription.ready", "transcription.failed", "transcription.deleted", "consultation.started", "consultation.reconnecting", "consultation.ended", "teleconsultation.usage_skipped", "artifact.accessed", "artifact.deleted", "entitlement.denied", "rollout.denied", "permission.denied", "webhook.observed"]>;
|
|
46
48
|
/** Espelha `WebhookEventStatusEnum`. */
|
|
47
49
|
export declare const zWebhookEventStatusSchema: z.ZodEnum<["pending", "claimed", "completed", "failed"]>;
|
|
48
50
|
/** Espelha `LegalTextStatusEnum`. */
|
|
@@ -132,7 +134,17 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
132
134
|
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
133
135
|
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
134
136
|
recording_status: z.ZodEnum<["idle", "consent_pending", "recording", "stopping", "failed"]>;
|
|
137
|
+
recording_request_id: z.ZodOptional<z.ZodString>;
|
|
138
|
+
recording_terms_version: z.ZodOptional<z.ZodString>;
|
|
139
|
+
recording_requested_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
140
|
+
recording_requested_by: z.ZodOptional<z.ZodString>;
|
|
141
|
+
recording_started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
142
|
+
recording_stopped_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
143
|
+
recording_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
+
recording_segment: z.ZodOptional<z.ZodNumber>;
|
|
135
145
|
transcription_status: z.ZodEnum<["not_requested", "queued", "processing", "ready", "failed", "deleted"]>;
|
|
146
|
+
provider_teardown_pending: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
metadata_retention_until: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
136
148
|
entitlement_snapshot: z.ZodObject<{
|
|
137
149
|
version: z.ZodNumber;
|
|
138
150
|
capabilities: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>;
|
|
@@ -147,6 +159,8 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
147
159
|
reschedule_count: z.ZodOptional<z.ZodNumber>;
|
|
148
160
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
149
161
|
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
162
|
+
usage_metering_due_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
163
|
+
usage_metered_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
150
164
|
version: z.ZodNumber;
|
|
151
165
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
152
166
|
id: z.ZodString;
|
|
@@ -191,7 +205,17 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
191
205
|
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
192
206
|
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
193
207
|
recording_status: z.ZodEnum<["idle", "consent_pending", "recording", "stopping", "failed"]>;
|
|
208
|
+
recording_request_id: z.ZodOptional<z.ZodString>;
|
|
209
|
+
recording_terms_version: z.ZodOptional<z.ZodString>;
|
|
210
|
+
recording_requested_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
211
|
+
recording_requested_by: z.ZodOptional<z.ZodString>;
|
|
212
|
+
recording_started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
213
|
+
recording_stopped_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
214
|
+
recording_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
215
|
+
recording_segment: z.ZodOptional<z.ZodNumber>;
|
|
194
216
|
transcription_status: z.ZodEnum<["not_requested", "queued", "processing", "ready", "failed", "deleted"]>;
|
|
217
|
+
provider_teardown_pending: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
+
metadata_retention_until: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
195
219
|
entitlement_snapshot: z.ZodObject<{
|
|
196
220
|
version: z.ZodNumber;
|
|
197
221
|
capabilities: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>;
|
|
@@ -206,6 +230,8 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
206
230
|
reschedule_count: z.ZodOptional<z.ZodNumber>;
|
|
207
231
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
208
232
|
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
233
|
+
usage_metering_due_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
234
|
+
usage_metered_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
209
235
|
version: z.ZodNumber;
|
|
210
236
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
211
237
|
id: z.ZodString;
|
|
@@ -250,7 +276,17 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
250
276
|
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
251
277
|
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
252
278
|
recording_status: z.ZodEnum<["idle", "consent_pending", "recording", "stopping", "failed"]>;
|
|
279
|
+
recording_request_id: z.ZodOptional<z.ZodString>;
|
|
280
|
+
recording_terms_version: z.ZodOptional<z.ZodString>;
|
|
281
|
+
recording_requested_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
282
|
+
recording_requested_by: z.ZodOptional<z.ZodString>;
|
|
283
|
+
recording_started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
284
|
+
recording_stopped_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
285
|
+
recording_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
286
|
+
recording_segment: z.ZodOptional<z.ZodNumber>;
|
|
253
287
|
transcription_status: z.ZodEnum<["not_requested", "queued", "processing", "ready", "failed", "deleted"]>;
|
|
288
|
+
provider_teardown_pending: z.ZodOptional<z.ZodBoolean>;
|
|
289
|
+
metadata_retention_until: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
254
290
|
entitlement_snapshot: z.ZodObject<{
|
|
255
291
|
version: z.ZodNumber;
|
|
256
292
|
capabilities: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>;
|
|
@@ -265,8 +301,53 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
265
301
|
reschedule_count: z.ZodOptional<z.ZodNumber>;
|
|
266
302
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
267
303
|
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
304
|
+
usage_metering_due_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
305
|
+
usage_metered_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
268
306
|
version: z.ZodNumber;
|
|
269
307
|
}, z.ZodTypeAny, "passthrough">>;
|
|
308
|
+
/**
|
|
309
|
+
* Espelha `ITeleconsultationPrivateProvider` (subdoc `private/provider`).
|
|
310
|
+
*
|
|
311
|
+
* NÃO estende `zFireDocSchema`: o subdoc não é um IFireDoc (não tem `version`
|
|
312
|
+
* de concorrência nem `ref`), e é lido sempre pelo backend com `id` do snap.
|
|
313
|
+
*/
|
|
314
|
+
export declare const zTeleconsultationPrivateProviderSchema: z.ZodObject<{
|
|
315
|
+
id: z.ZodString;
|
|
316
|
+
tenant: z.ZodString;
|
|
317
|
+
teleconsultation_id: z.ZodString;
|
|
318
|
+
provider: z.ZodEnum<["realtimekit"]>;
|
|
319
|
+
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
320
|
+
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
321
|
+
provider_session_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
322
|
+
provider_participant_ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
323
|
+
active_provider_recording_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
324
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
325
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
326
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
327
|
+
id: z.ZodString;
|
|
328
|
+
tenant: z.ZodString;
|
|
329
|
+
teleconsultation_id: z.ZodString;
|
|
330
|
+
provider: z.ZodEnum<["realtimekit"]>;
|
|
331
|
+
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
332
|
+
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
333
|
+
provider_session_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
334
|
+
provider_participant_ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
335
|
+
active_provider_recording_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
336
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
337
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
338
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
339
|
+
id: z.ZodString;
|
|
340
|
+
tenant: z.ZodString;
|
|
341
|
+
teleconsultation_id: z.ZodString;
|
|
342
|
+
provider: z.ZodEnum<["realtimekit"]>;
|
|
343
|
+
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
344
|
+
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
345
|
+
provider_session_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
346
|
+
provider_participant_ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
347
|
+
active_provider_recording_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
348
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
349
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
350
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
270
351
|
/** Espelha `ITeleconsultationParticipant`. */
|
|
271
352
|
export declare const zTeleconsultationParticipantSchema: z.ZodObject<{
|
|
272
353
|
id: z.ZodString;
|
|
@@ -442,7 +523,6 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
442
523
|
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
443
524
|
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
444
525
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
445
|
-
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
446
526
|
} & {
|
|
447
527
|
teleconsultation_id: z.ZodString;
|
|
448
528
|
type: z.ZodEnum<["recording_audio_video", "recording_audio", "transcript"]>;
|
|
@@ -459,6 +539,7 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
459
539
|
started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
460
540
|
ended_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
461
541
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
542
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
462
543
|
error_code: z.ZodOptional<z.ZodString>;
|
|
463
544
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
464
545
|
id: z.ZodString;
|
|
@@ -467,7 +548,6 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
467
548
|
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
468
549
|
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
469
550
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
470
|
-
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
471
551
|
} & {
|
|
472
552
|
teleconsultation_id: z.ZodString;
|
|
473
553
|
type: z.ZodEnum<["recording_audio_video", "recording_audio", "transcript"]>;
|
|
@@ -484,6 +564,7 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
484
564
|
started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
485
565
|
ended_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
486
566
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
567
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
487
568
|
error_code: z.ZodOptional<z.ZodString>;
|
|
488
569
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
489
570
|
id: z.ZodString;
|
|
@@ -492,7 +573,6 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
492
573
|
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
493
574
|
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
494
575
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
495
|
-
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
496
576
|
} & {
|
|
497
577
|
teleconsultation_id: z.ZodString;
|
|
498
578
|
type: z.ZodEnum<["recording_audio_video", "recording_audio", "transcript"]>;
|
|
@@ -509,6 +589,7 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
509
589
|
started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
510
590
|
ended_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
511
591
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
592
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
512
593
|
error_code: z.ZodOptional<z.ZodString>;
|
|
513
594
|
}, z.ZodTypeAny, "passthrough">>;
|
|
514
595
|
/** Espelha `ITeleconsultationEvent` (append-only). */
|
|
@@ -522,7 +603,7 @@ export declare const zTeleconsultationEventSchema: z.ZodObject<{
|
|
|
522
603
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
523
604
|
} & {
|
|
524
605
|
teleconsultation_id: z.ZodString;
|
|
525
|
-
type: z.ZodEnum<["teleconsultation.created", "teleconsultation.rescheduled", "teleconsultation.cancelled", "teleconsultation.expired", "teleconsultation.diverged", "access.created", "access.revoked", "access.exchanged", "access.verification_failed", "access.blocked", "host.claimed", "host.reassigned", "waiting_policy.changed", "doctor.prepared", "doctor.joined", "doctor.disconnected", "doctor.rejoined", "doctor.left", "patient.verified", "patient.waiting", "patient.admitted", "patient.rejected", "patient.joined", "patient.disconnected", "patient.rejoined", "patient.left", "recording.consent_requested", "recording.consent_accepted", "recording.consent_declined", "recording.consent_withdrawn", "recording.started", "recording.stopped", "recording.failed", "transcription.queued", "transcription.ready", "transcription.failed", "transcription.deleted", "consultation.started", "consultation.reconnecting", "consultation.ended", "artifact.accessed", "artifact.deleted", "entitlement.denied", "rollout.denied", "permission.denied", "webhook.observed"]>;
|
|
606
|
+
type: z.ZodEnum<["teleconsultation.created", "teleconsultation.rescheduled", "teleconsultation.cancelled", "teleconsultation.expired", "teleconsultation.diverged", "access.created", "access.link_revealed", "access.revoked", "access.exchanged", "access.verification_failed", "access.blocked", "host.claimed", "host.reassigned", "waiting_policy.changed", "doctor.prepared", "doctor.joined", "doctor.disconnected", "doctor.rejoined", "doctor.left", "patient.verified", "patient.waiting", "patient.admitted", "patient.rejected", "patient.joined", "patient.disconnected", "patient.rejoined", "patient.left", "recording.consent_requested", "recording.consent_accepted", "recording.consent_declined", "recording.consent_declined_pre_join", "recording.consent_withdrawn", "recording.started", "recording.auto_started", "recording.stopped", "recording.failed", "transcription.queued", "transcription.ready", "transcription.failed", "transcription.deleted", "consultation.started", "consultation.reconnecting", "consultation.ended", "teleconsultation.usage_skipped", "artifact.accessed", "artifact.deleted", "entitlement.denied", "rollout.denied", "permission.denied", "webhook.observed"]>;
|
|
526
607
|
occurred_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
527
608
|
actor: z.ZodObject<{
|
|
528
609
|
type: z.ZodEnum<["user", "patient", "system", "provider"]>;
|
|
@@ -551,7 +632,7 @@ export declare const zTeleconsultationEventSchema: z.ZodObject<{
|
|
|
551
632
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
552
633
|
} & {
|
|
553
634
|
teleconsultation_id: z.ZodString;
|
|
554
|
-
type: z.ZodEnum<["teleconsultation.created", "teleconsultation.rescheduled", "teleconsultation.cancelled", "teleconsultation.expired", "teleconsultation.diverged", "access.created", "access.revoked", "access.exchanged", "access.verification_failed", "access.blocked", "host.claimed", "host.reassigned", "waiting_policy.changed", "doctor.prepared", "doctor.joined", "doctor.disconnected", "doctor.rejoined", "doctor.left", "patient.verified", "patient.waiting", "patient.admitted", "patient.rejected", "patient.joined", "patient.disconnected", "patient.rejoined", "patient.left", "recording.consent_requested", "recording.consent_accepted", "recording.consent_declined", "recording.consent_withdrawn", "recording.started", "recording.stopped", "recording.failed", "transcription.queued", "transcription.ready", "transcription.failed", "transcription.deleted", "consultation.started", "consultation.reconnecting", "consultation.ended", "artifact.accessed", "artifact.deleted", "entitlement.denied", "rollout.denied", "permission.denied", "webhook.observed"]>;
|
|
635
|
+
type: z.ZodEnum<["teleconsultation.created", "teleconsultation.rescheduled", "teleconsultation.cancelled", "teleconsultation.expired", "teleconsultation.diverged", "access.created", "access.link_revealed", "access.revoked", "access.exchanged", "access.verification_failed", "access.blocked", "host.claimed", "host.reassigned", "waiting_policy.changed", "doctor.prepared", "doctor.joined", "doctor.disconnected", "doctor.rejoined", "doctor.left", "patient.verified", "patient.waiting", "patient.admitted", "patient.rejected", "patient.joined", "patient.disconnected", "patient.rejoined", "patient.left", "recording.consent_requested", "recording.consent_accepted", "recording.consent_declined", "recording.consent_declined_pre_join", "recording.consent_withdrawn", "recording.started", "recording.auto_started", "recording.stopped", "recording.failed", "transcription.queued", "transcription.ready", "transcription.failed", "transcription.deleted", "consultation.started", "consultation.reconnecting", "consultation.ended", "teleconsultation.usage_skipped", "artifact.accessed", "artifact.deleted", "entitlement.denied", "rollout.denied", "permission.denied", "webhook.observed"]>;
|
|
555
636
|
occurred_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
556
637
|
actor: z.ZodObject<{
|
|
557
638
|
type: z.ZodEnum<["user", "patient", "system", "provider"]>;
|
|
@@ -580,7 +661,7 @@ export declare const zTeleconsultationEventSchema: z.ZodObject<{
|
|
|
580
661
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
581
662
|
} & {
|
|
582
663
|
teleconsultation_id: z.ZodString;
|
|
583
|
-
type: z.ZodEnum<["teleconsultation.created", "teleconsultation.rescheduled", "teleconsultation.cancelled", "teleconsultation.expired", "teleconsultation.diverged", "access.created", "access.revoked", "access.exchanged", "access.verification_failed", "access.blocked", "host.claimed", "host.reassigned", "waiting_policy.changed", "doctor.prepared", "doctor.joined", "doctor.disconnected", "doctor.rejoined", "doctor.left", "patient.verified", "patient.waiting", "patient.admitted", "patient.rejected", "patient.joined", "patient.disconnected", "patient.rejoined", "patient.left", "recording.consent_requested", "recording.consent_accepted", "recording.consent_declined", "recording.consent_withdrawn", "recording.started", "recording.stopped", "recording.failed", "transcription.queued", "transcription.ready", "transcription.failed", "transcription.deleted", "consultation.started", "consultation.reconnecting", "consultation.ended", "artifact.accessed", "artifact.deleted", "entitlement.denied", "rollout.denied", "permission.denied", "webhook.observed"]>;
|
|
664
|
+
type: z.ZodEnum<["teleconsultation.created", "teleconsultation.rescheduled", "teleconsultation.cancelled", "teleconsultation.expired", "teleconsultation.diverged", "access.created", "access.link_revealed", "access.revoked", "access.exchanged", "access.verification_failed", "access.blocked", "host.claimed", "host.reassigned", "waiting_policy.changed", "doctor.prepared", "doctor.joined", "doctor.disconnected", "doctor.rejoined", "doctor.left", "patient.verified", "patient.waiting", "patient.admitted", "patient.rejected", "patient.joined", "patient.disconnected", "patient.rejoined", "patient.left", "recording.consent_requested", "recording.consent_accepted", "recording.consent_declined", "recording.consent_declined_pre_join", "recording.consent_withdrawn", "recording.started", "recording.auto_started", "recording.stopped", "recording.failed", "transcription.queued", "transcription.ready", "transcription.failed", "transcription.deleted", "consultation.started", "consultation.reconnecting", "consultation.ended", "teleconsultation.usage_skipped", "artifact.accessed", "artifact.deleted", "entitlement.denied", "rollout.denied", "permission.denied", "webhook.observed"]>;
|
|
584
665
|
occurred_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
585
666
|
actor: z.ZodObject<{
|
|
586
667
|
type: z.ZodEnum<["user", "patient", "system", "provider"]>;
|
|
@@ -695,7 +776,7 @@ export declare const zTeleconsultationAccessGrantSchema: z.ZodObject<{
|
|
|
695
776
|
} & {
|
|
696
777
|
teleconsultation_id: z.ZodString;
|
|
697
778
|
role: z.ZodEnum<["doctor", "patient"]>;
|
|
698
|
-
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session"]>;
|
|
779
|
+
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>;
|
|
699
780
|
secret_hash: z.ZodString;
|
|
700
781
|
recipient_ref_hash: z.ZodOptional<z.ZodString>;
|
|
701
782
|
actor_user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -724,7 +805,7 @@ export declare const zTeleconsultationAccessGrantSchema: z.ZodObject<{
|
|
|
724
805
|
} & {
|
|
725
806
|
teleconsultation_id: z.ZodString;
|
|
726
807
|
role: z.ZodEnum<["doctor", "patient"]>;
|
|
727
|
-
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session"]>;
|
|
808
|
+
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>;
|
|
728
809
|
secret_hash: z.ZodString;
|
|
729
810
|
recipient_ref_hash: z.ZodOptional<z.ZodString>;
|
|
730
811
|
actor_user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -753,7 +834,7 @@ export declare const zTeleconsultationAccessGrantSchema: z.ZodObject<{
|
|
|
753
834
|
} & {
|
|
754
835
|
teleconsultation_id: z.ZodString;
|
|
755
836
|
role: z.ZodEnum<["doctor", "patient"]>;
|
|
756
|
-
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session"]>;
|
|
837
|
+
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>;
|
|
757
838
|
secret_hash: z.ZodString;
|
|
758
839
|
recipient_ref_hash: z.ZodOptional<z.ZodString>;
|
|
759
840
|
actor_user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -787,6 +868,8 @@ export declare const zTelemedicineAppointmentIndexSchema: z.ZodObject<{
|
|
|
787
868
|
active_teleconsultation_id: z.ZodNullable<z.ZodString>;
|
|
788
869
|
generation: z.ZodNumber;
|
|
789
870
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
871
|
+
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
872
|
+
last_teleconsultation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
790
873
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
791
874
|
id: z.ZodString;
|
|
792
875
|
ref: z.ZodAny;
|
|
@@ -801,6 +884,8 @@ export declare const zTelemedicineAppointmentIndexSchema: z.ZodObject<{
|
|
|
801
884
|
active_teleconsultation_id: z.ZodNullable<z.ZodString>;
|
|
802
885
|
generation: z.ZodNumber;
|
|
803
886
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
887
|
+
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
888
|
+
last_teleconsultation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
804
889
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
805
890
|
id: z.ZodString;
|
|
806
891
|
ref: z.ZodAny;
|
|
@@ -815,6 +900,8 @@ export declare const zTelemedicineAppointmentIndexSchema: z.ZodObject<{
|
|
|
815
900
|
active_teleconsultation_id: z.ZodNullable<z.ZodString>;
|
|
816
901
|
generation: z.ZodNumber;
|
|
817
902
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
903
|
+
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
904
|
+
last_teleconsultation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
818
905
|
}, z.ZodTypeAny, "passthrough">>;
|
|
819
906
|
/** Espelha `ITelemedicineEntitlementAudit`. */
|
|
820
907
|
export declare const zTelemedicineEntitlementAuditSchema: z.ZodObject<{
|
|
@@ -1239,6 +1326,7 @@ export declare const zTelemedicineGrantIndexSchema: z.ZodObject<{
|
|
|
1239
1326
|
tenant: z.ZodString;
|
|
1240
1327
|
teleconsultation_id: z.ZodString;
|
|
1241
1328
|
grant_id: z.ZodString;
|
|
1329
|
+
kind: z.ZodOptional<z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>>;
|
|
1242
1330
|
expires_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1243
1331
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1244
1332
|
id: z.ZodString;
|
|
@@ -1252,6 +1340,7 @@ export declare const zTelemedicineGrantIndexSchema: z.ZodObject<{
|
|
|
1252
1340
|
tenant: z.ZodString;
|
|
1253
1341
|
teleconsultation_id: z.ZodString;
|
|
1254
1342
|
grant_id: z.ZodString;
|
|
1343
|
+
kind: z.ZodOptional<z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>>;
|
|
1255
1344
|
expires_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1256
1345
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1257
1346
|
id: z.ZodString;
|
|
@@ -1265,6 +1354,7 @@ export declare const zTelemedicineGrantIndexSchema: z.ZodObject<{
|
|
|
1265
1354
|
tenant: z.ZodString;
|
|
1266
1355
|
teleconsultation_id: z.ZodString;
|
|
1267
1356
|
grant_id: z.ZodString;
|
|
1357
|
+
kind: z.ZodOptional<z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>>;
|
|
1268
1358
|
expires_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1269
1359
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1270
1360
|
/** `PATCH /waiting-policy` — espelha `IWaitingPolicyCommand`. */
|
|
@@ -1358,6 +1448,40 @@ export declare const zConsentCommandSchema: z.ZodObject<{
|
|
|
1358
1448
|
decision: "declined" | "accepted";
|
|
1359
1449
|
terms_version: string;
|
|
1360
1450
|
}>;
|
|
1451
|
+
/**
|
|
1452
|
+
* `POST /api/room/v1/join` — espelha `IJoinCommand`.
|
|
1453
|
+
*
|
|
1454
|
+
* `.passthrough()`, não `.strict()`, ao contrário dos outros comandos: o
|
|
1455
|
+
* backend hoje LÊ os dois booleanos à mão e ignora o resto, e o corpo é a
|
|
1456
|
+
* intenção de mídia do preflight. Trocar por `.strict()` faria um campo novo do
|
|
1457
|
+
* SPA derrubar o join inteiro em `400` — alto preço para um corpo que o
|
|
1458
|
+
* servidor pode ignorar por completo.
|
|
1459
|
+
*/
|
|
1460
|
+
export declare const zJoinCommandSchema: z.ZodObject<{
|
|
1461
|
+
audio: z.ZodOptional<z.ZodBoolean>;
|
|
1462
|
+
video: z.ZodOptional<z.ZodBoolean>;
|
|
1463
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1464
|
+
audio: z.ZodOptional<z.ZodBoolean>;
|
|
1465
|
+
video: z.ZodOptional<z.ZodBoolean>;
|
|
1466
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1467
|
+
audio: z.ZodOptional<z.ZodBoolean>;
|
|
1468
|
+
video: z.ZodOptional<z.ZodBoolean>;
|
|
1469
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1470
|
+
/**
|
|
1471
|
+
* `POST /api/room/v1/leave` — espelha `ILeaveCommand`.
|
|
1472
|
+
*
|
|
1473
|
+
* `.passthrough()` pelo mesmo motivo, agravado: este corpo chega pelo
|
|
1474
|
+
* `pagehide` com `fetch(keepalive)` e é a ÚLTIMA chance de registrar a saída.
|
|
1475
|
+
* Um 400 aqui é uma saída perdida, e o backend já trata corpo ausente
|
|
1476
|
+
* (`reason` default `'temporary'`).
|
|
1477
|
+
*/
|
|
1478
|
+
export declare const zLeaveCommandSchema: z.ZodObject<{
|
|
1479
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1480
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1481
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1482
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1483
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1484
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1361
1485
|
/** `POST /api/room/v1/presence` — espelha `IPresenceCommand`. */
|
|
1362
1486
|
export declare const zPresenceCommandSchema: z.ZodObject<{
|
|
1363
1487
|
state: z.ZodEnum<["waiting", "connected", "disconnected", "left"]>;
|
|
@@ -1401,11 +1525,11 @@ export declare const zRecordingConsentCommandSchema: z.ZodObject<{
|
|
|
1401
1525
|
recording_request_id: z.ZodString;
|
|
1402
1526
|
terms_version: z.ZodString;
|
|
1403
1527
|
}, "strict", z.ZodTypeAny, {
|
|
1404
|
-
terms_version: string;
|
|
1405
1528
|
recording_request_id: string;
|
|
1406
|
-
}, {
|
|
1407
1529
|
terms_version: string;
|
|
1530
|
+
}, {
|
|
1408
1531
|
recording_request_id: string;
|
|
1532
|
+
terms_version: string;
|
|
1409
1533
|
}>;
|
|
1410
1534
|
/** `POST /api/room/v1/recording/stop` — espelha `IRecordingStopCommand`. */
|
|
1411
1535
|
export declare const zRecordingStopCommandSchema: z.ZodObject<{
|
|
@@ -1443,3 +1567,27 @@ export declare const zTelemetryCommandSchema: z.ZodObject<{
|
|
|
1443
1567
|
attrs?: Record<string, string | number | boolean> | undefined;
|
|
1444
1568
|
}[];
|
|
1445
1569
|
}>;
|
|
1570
|
+
/**
|
|
1571
|
+
* `POST /v1/teleconsultations/:id/artifacts/:artifactId/signed-url` (feat-160
|
|
1572
|
+
* F21) — espelha `IArtifactSignedUrlCommand`.
|
|
1573
|
+
*
|
|
1574
|
+
* `.strict()` de propósito: chave desconhecida aqui é erro de contrato —
|
|
1575
|
+
* `ttlSeconds` em camelCase passaria em silêncio como "sem TTL pedido" e o bug
|
|
1576
|
+
* apareceria como "o teto não respeita o que eu mandei". 30 s é o piso do use
|
|
1577
|
+
* case e 900 s (`ARTIFACT_INLINE_SIGNED_URL_MAX_SECONDS`) o teto do modo mais
|
|
1578
|
+
* generoso; o teto REAL por modo é aplicado pelo use case e de novo pelo
|
|
1579
|
+
* adapter — este schema só recusa forma.
|
|
1580
|
+
*/
|
|
1581
|
+
export declare const zArtifactSignedUrlCommandSchema: z.ZodObject<{
|
|
1582
|
+
disposition: z.ZodOptional<z.ZodEnum<["inline", "attachment"]>>;
|
|
1583
|
+
ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
1584
|
+
refresh: z.ZodOptional<z.ZodBoolean>;
|
|
1585
|
+
}, "strict", z.ZodTypeAny, {
|
|
1586
|
+
ttl_seconds?: number | undefined;
|
|
1587
|
+
disposition?: "inline" | "attachment" | undefined;
|
|
1588
|
+
refresh?: boolean | undefined;
|
|
1589
|
+
}, {
|
|
1590
|
+
ttl_seconds?: number | undefined;
|
|
1591
|
+
disposition?: "inline" | "attachment" | undefined;
|
|
1592
|
+
refresh?: boolean | undefined;
|
|
1593
|
+
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.zTelemetryCommandSchema = exports.zRecordingStopCommandSchema = exports.zRecordingConsentCommandSchema = exports.zRecordingRequestCommandSchema = exports.zRejectCommandSchema = exports.zAdmitCommandSchema = exports.zPresenceCommandSchema = exports.zConsentCommandSchema = exports.zIdentityVerifyCommandSchema = exports.zExchangeCommandSchema = void 0;
|
|
3
|
+
exports.zAccessSendCommandSchema = exports.zReassignHostCommandSchema = exports.zWaitingPolicyCommandSchema = exports.zTelemedicineGrantIndexSchema = exports.zTelemedicineTranscriptionConfigSchema = exports.zTelemedicineRolloutSchema = exports.zTelemedicineLegalTextSchema = exports.zTelemedicineEntitlementAuditSchema = exports.zTelemedicineAppointmentIndexSchema = exports.zTeleconsultationAccessGrantSchema = exports.zTeleconsultationWebhookEventSchema = exports.zTeleconsultationEventSchema = exports.zTeleconsultationArtifactSchema = exports.zTeleconsultationConsentSchema = exports.zTeleconsultationConsentEvidenceSchema = exports.zTeleconsultationParticipantSchema = exports.zTeleconsultationPrivateProviderSchema = exports.zTeleconsultationSchema = exports.zTeleconsultationEventActorSchema = exports.zTeleconsultationEntitlementSnapshotSchema = exports.zTeleconsultationEndedBySchema = exports.zTeleconsultationEventMetadataSchema = exports.zTelemedicineErrorCodeSchema = exports.zEntitlementAuditActionSchema = exports.zTranscriptionProviderSchema = exports.zLegalTextStatusSchema = exports.zWebhookEventStatusSchema = exports.zTeleconsultationEventTypeSchema = exports.zTeleconsultationEventSourceSchema = exports.zTeleconsultationEventActorTypeSchema = exports.zEndedByTypeSchema = exports.zAccessSendChannelKindSchema = exports.zAccessGrantStateSchema = exports.zAccessGrantKindSchema = exports.zArtifactStatusSchema = exports.zArtifactDispositionSchema = exports.zArtifactTypeSchema = exports.zConsentActorTypeSchema = exports.zConsentDecisionSchema = exports.zConsentSubjectSchema = exports.zTranscriptionStatusSchema = exports.zRecordingStatusSchema = exports.zIdentityLevelSchema = exports.zPresenceStateSchema = exports.zParticipantStateSchema = exports.zParticipantRoleSchema = exports.zTeleconsultationProviderSchema = exports.zTeleconsultationModeSchema = exports.zWaitingPolicySchema = exports.zTeleconsultationStatusSchema = void 0;
|
|
4
|
+
exports.zArtifactSignedUrlCommandSchema = exports.zTelemetryCommandSchema = exports.zRecordingStopCommandSchema = exports.zRecordingConsentCommandSchema = exports.zRecordingRequestCommandSchema = exports.zRejectCommandSchema = exports.zAdmitCommandSchema = exports.zPresenceCommandSchema = exports.zLeaveCommandSchema = exports.zJoinCommandSchema = exports.zConsentCommandSchema = exports.zIdentityVerifyCommandSchema = exports.zExchangeCommandSchema = exports.zEndCommandSchema = exports.zAccessRevokeCommandSchema = void 0;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
7
7
|
const zod_schemas_2 = require("../evo-tenant/zod-schemas");
|
|
@@ -96,6 +96,8 @@ exports.zArtifactTypeSchema = zod_1.z.enum([
|
|
|
96
96
|
"recording_audio",
|
|
97
97
|
"transcript",
|
|
98
98
|
]);
|
|
99
|
+
/** Espelha `ArtifactDispositionEnum` (feat-160 F21). */
|
|
100
|
+
exports.zArtifactDispositionSchema = zod_1.z.enum(["inline", "attachment"]);
|
|
99
101
|
/** Espelha `ArtifactStatusEnum`. */
|
|
100
102
|
exports.zArtifactStatusSchema = zod_1.z.enum([
|
|
101
103
|
"pending",
|
|
@@ -110,6 +112,8 @@ exports.zAccessGrantKindSchema = zod_1.z.enum([
|
|
|
110
112
|
"qr_capability",
|
|
111
113
|
"launch_code",
|
|
112
114
|
"browser_session",
|
|
115
|
+
// feat-160 F7: `kind` de uma ENTRADA do `grant-index`, nunca de um grant.
|
|
116
|
+
"ics_capability",
|
|
113
117
|
]);
|
|
114
118
|
/** Espelha `AccessGrantStateEnum`. */
|
|
115
119
|
exports.zAccessGrantStateSchema = zod_1.z.enum([
|
|
@@ -150,6 +154,7 @@ exports.zTeleconsultationEventTypeSchema = zod_1.z.enum([
|
|
|
150
154
|
"teleconsultation.expired",
|
|
151
155
|
"teleconsultation.diverged",
|
|
152
156
|
"access.created",
|
|
157
|
+
"access.link_revealed",
|
|
153
158
|
"access.revoked",
|
|
154
159
|
"access.exchanged",
|
|
155
160
|
"access.verification_failed",
|
|
@@ -173,8 +178,10 @@ exports.zTeleconsultationEventTypeSchema = zod_1.z.enum([
|
|
|
173
178
|
"recording.consent_requested",
|
|
174
179
|
"recording.consent_accepted",
|
|
175
180
|
"recording.consent_declined",
|
|
181
|
+
"recording.consent_declined_pre_join",
|
|
176
182
|
"recording.consent_withdrawn",
|
|
177
183
|
"recording.started",
|
|
184
|
+
"recording.auto_started",
|
|
178
185
|
"recording.stopped",
|
|
179
186
|
"recording.failed",
|
|
180
187
|
"transcription.queued",
|
|
@@ -184,6 +191,7 @@ exports.zTeleconsultationEventTypeSchema = zod_1.z.enum([
|
|
|
184
191
|
"consultation.started",
|
|
185
192
|
"consultation.reconnecting",
|
|
186
193
|
"consultation.ended",
|
|
194
|
+
"teleconsultation.usage_skipped",
|
|
187
195
|
"artifact.accessed",
|
|
188
196
|
"artifact.deleted",
|
|
189
197
|
"entitlement.denied",
|
|
@@ -283,7 +291,17 @@ exports.zTeleconsultationSchema = zod_schemas_1.zFireDocSchema
|
|
|
283
291
|
provider_meeting_id: zod_1.z.string().optional(),
|
|
284
292
|
active_provider_session_id: zod_1.z.string().optional(),
|
|
285
293
|
recording_status: exports.zRecordingStatusSchema,
|
|
294
|
+
recording_request_id: zod_1.z.string().optional(),
|
|
295
|
+
recording_terms_version: zod_1.z.string().optional(),
|
|
296
|
+
recording_requested_at: zDateNullable,
|
|
297
|
+
recording_requested_by: zod_1.z.string().optional(),
|
|
298
|
+
recording_started_at: zDateNullable,
|
|
299
|
+
recording_stopped_at: zDateNullable,
|
|
300
|
+
recording_failure_code: zod_1.z.string().nullable().optional(),
|
|
301
|
+
recording_segment: zod_1.z.number().int().min(0).optional(),
|
|
286
302
|
transcription_status: exports.zTranscriptionStatusSchema,
|
|
303
|
+
provider_teardown_pending: zod_1.z.boolean().optional(),
|
|
304
|
+
metadata_retention_until: zDateNullable,
|
|
287
305
|
entitlement_snapshot: exports.zTeleconsultationEntitlementSnapshotSchema,
|
|
288
306
|
generation: zod_1.z.number().int().min(0),
|
|
289
307
|
reschedule_count: zod_1.z.number().int().min(0).optional(),
|
|
@@ -292,9 +310,32 @@ exports.zTeleconsultationSchema = zod_schemas_1.zFireDocSchema
|
|
|
292
310
|
.nullable()
|
|
293
311
|
.optional(),
|
|
294
312
|
last_reconciled_at: zDateNullable,
|
|
313
|
+
usage_metering_due_at: zDateNullable,
|
|
314
|
+
usage_metered_at: zDateNullable,
|
|
295
315
|
version: zod_1.z.number().int().min(0),
|
|
296
316
|
})
|
|
297
317
|
.passthrough();
|
|
318
|
+
/**
|
|
319
|
+
* Espelha `ITeleconsultationPrivateProvider` (subdoc `private/provider`).
|
|
320
|
+
*
|
|
321
|
+
* NÃO estende `zFireDocSchema`: o subdoc não é um IFireDoc (não tem `version`
|
|
322
|
+
* de concorrência nem `ref`), e é lido sempre pelo backend com `id` do snap.
|
|
323
|
+
*/
|
|
324
|
+
exports.zTeleconsultationPrivateProviderSchema = zod_1.z
|
|
325
|
+
.object({
|
|
326
|
+
id: zod_1.z.string(),
|
|
327
|
+
tenant: zod_1.z.string().min(1),
|
|
328
|
+
teleconsultation_id: zod_1.z.string().min(1),
|
|
329
|
+
provider: exports.zTeleconsultationProviderSchema,
|
|
330
|
+
provider_meeting_id: zod_1.z.string().optional(),
|
|
331
|
+
active_provider_session_id: zod_1.z.string().optional(),
|
|
332
|
+
provider_session_ids: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
333
|
+
provider_participant_ids: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
334
|
+
active_provider_recording_id: zod_1.z.string().nullable().optional(),
|
|
335
|
+
created_at: zDateNullable,
|
|
336
|
+
updated_at: zDateNullable,
|
|
337
|
+
})
|
|
338
|
+
.passthrough();
|
|
298
339
|
/** Espelha `ITeleconsultationParticipant`. */
|
|
299
340
|
exports.zTeleconsultationParticipantSchema = zod_schemas_1.zFireDocSchema
|
|
300
341
|
.extend({
|
|
@@ -353,6 +394,7 @@ exports.zTeleconsultationArtifactSchema = zod_schemas_1.zFireDocSchema
|
|
|
353
394
|
started_at: zDateNullable,
|
|
354
395
|
ended_at: zDateNullable,
|
|
355
396
|
expires_at: zDateNullable,
|
|
397
|
+
deleted_at: zDateNullable,
|
|
356
398
|
error_code: zod_1.z.string().optional(),
|
|
357
399
|
})
|
|
358
400
|
.passthrough();
|
|
@@ -433,6 +475,8 @@ exports.zTelemedicineAppointmentIndexSchema = zod_schemas_1.zFireDocSchema
|
|
|
433
475
|
.union([zod_1.z.number(), zod_1.z.string()])
|
|
434
476
|
.nullable()
|
|
435
477
|
.optional(),
|
|
478
|
+
last_reconciled_at: zDateNullable,
|
|
479
|
+
last_teleconsultation_id: zod_1.z.string().nullable().optional(),
|
|
436
480
|
})
|
|
437
481
|
.passthrough();
|
|
438
482
|
/** Espelha `ITelemedicineEntitlementAudit`. */
|
|
@@ -509,6 +553,7 @@ exports.zTelemedicineGrantIndexSchema = zGlobalDocSchema
|
|
|
509
553
|
tenant: zod_1.z.string().min(1),
|
|
510
554
|
teleconsultation_id: zod_1.z.string().min(1),
|
|
511
555
|
grant_id: zod_1.z.string().min(1),
|
|
556
|
+
kind: exports.zAccessGrantKindSchema.optional(),
|
|
512
557
|
expires_at: zDate,
|
|
513
558
|
})
|
|
514
559
|
.passthrough();
|
|
@@ -583,6 +628,34 @@ exports.zConsentCommandSchema = zod_1.z
|
|
|
583
628
|
decision: zod_1.z.enum(["accepted", "declined"]),
|
|
584
629
|
})
|
|
585
630
|
.strict();
|
|
631
|
+
/**
|
|
632
|
+
* `POST /api/room/v1/join` — espelha `IJoinCommand`.
|
|
633
|
+
*
|
|
634
|
+
* `.passthrough()`, não `.strict()`, ao contrário dos outros comandos: o
|
|
635
|
+
* backend hoje LÊ os dois booleanos à mão e ignora o resto, e o corpo é a
|
|
636
|
+
* intenção de mídia do preflight. Trocar por `.strict()` faria um campo novo do
|
|
637
|
+
* SPA derrubar o join inteiro em `400` — alto preço para um corpo que o
|
|
638
|
+
* servidor pode ignorar por completo.
|
|
639
|
+
*/
|
|
640
|
+
exports.zJoinCommandSchema = zod_1.z
|
|
641
|
+
.object({
|
|
642
|
+
audio: zod_1.z.boolean().optional(),
|
|
643
|
+
video: zod_1.z.boolean().optional(),
|
|
644
|
+
})
|
|
645
|
+
.passthrough();
|
|
646
|
+
/**
|
|
647
|
+
* `POST /api/room/v1/leave` — espelha `ILeaveCommand`.
|
|
648
|
+
*
|
|
649
|
+
* `.passthrough()` pelo mesmo motivo, agravado: este corpo chega pelo
|
|
650
|
+
* `pagehide` com `fetch(keepalive)` e é a ÚLTIMA chance de registrar a saída.
|
|
651
|
+
* Um 400 aqui é uma saída perdida, e o backend já trata corpo ausente
|
|
652
|
+
* (`reason` default `'temporary'`).
|
|
653
|
+
*/
|
|
654
|
+
exports.zLeaveCommandSchema = zod_1.z
|
|
655
|
+
.object({
|
|
656
|
+
reason: zod_1.z.string().trim().min(1).max(60).optional(),
|
|
657
|
+
})
|
|
658
|
+
.passthrough();
|
|
586
659
|
/** `POST /api/room/v1/presence` — espelha `IPresenceCommand`. */
|
|
587
660
|
exports.zPresenceCommandSchema = zod_1.z
|
|
588
661
|
.object({
|
|
@@ -639,3 +712,21 @@ exports.zTelemetryCommandSchema = zod_1.z
|
|
|
639
712
|
.max(50),
|
|
640
713
|
})
|
|
641
714
|
.strict();
|
|
715
|
+
/**
|
|
716
|
+
* `POST /v1/teleconsultations/:id/artifacts/:artifactId/signed-url` (feat-160
|
|
717
|
+
* F21) — espelha `IArtifactSignedUrlCommand`.
|
|
718
|
+
*
|
|
719
|
+
* `.strict()` de propósito: chave desconhecida aqui é erro de contrato —
|
|
720
|
+
* `ttlSeconds` em camelCase passaria em silêncio como "sem TTL pedido" e o bug
|
|
721
|
+
* apareceria como "o teto não respeita o que eu mandei". 30 s é o piso do use
|
|
722
|
+
* case e 900 s (`ARTIFACT_INLINE_SIGNED_URL_MAX_SECONDS`) o teto do modo mais
|
|
723
|
+
* generoso; o teto REAL por modo é aplicado pelo use case e de novo pelo
|
|
724
|
+
* adapter — este schema só recusa forma.
|
|
725
|
+
*/
|
|
726
|
+
exports.zArtifactSignedUrlCommandSchema = zod_1.z
|
|
727
|
+
.object({
|
|
728
|
+
disposition: exports.zArtifactDispositionSchema.optional(),
|
|
729
|
+
ttl_seconds: zod_1.z.number().int().min(30).max(900).optional(),
|
|
730
|
+
refresh: zod_1.z.boolean().optional(),
|
|
731
|
+
})
|
|
732
|
+
.strict();
|