evo360-types 1.3.574 → 1.3.578
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-crm/lead/zod-schemas.d.ts +9 -0
- package/dist/apps/evo-med/calendar/zod-schemas.d.ts +535 -0
- package/dist/apps/evo-med/calendar/zod-schemas.js +52 -1
- package/dist/apps/evo-med/calendar/zod-schemas.ts +55 -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-telemedicine/zod-schemas.d.ts +135 -13
- package/dist/apps/evo-telemedicine/zod-schemas.js +70 -2
- package/dist/apps/evo-telemedicine/zod-schemas.ts +71 -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-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 +98 -0
- package/dist/types/evo-med/calendar/index.js +60 -1
- package/dist/types/evo-med/calendar/index.ts +140 -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 +253 -6
- package/dist/types/evo-telemedicine/index.js +27 -1
- package/dist/types/evo-telemedicine/index.ts +259 -6
- package/dist/types/shared/index.d.ts +1 -0
- package/dist/types/shared/index.ts +2 -0
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ export declare const zArtifactTypeSchema: z.ZodEnum<["recording_audio_video", "r
|
|
|
30
30
|
/** Espelha `ArtifactStatusEnum`. */
|
|
31
31
|
export declare const zArtifactStatusSchema: z.ZodEnum<["pending", "processing", "ready", "failed", "deleting", "deleted"]>;
|
|
32
32
|
/** Espelha `AccessGrantKindEnum`. */
|
|
33
|
-
export declare const zAccessGrantKindSchema: z.ZodEnum<["qr_capability", "launch_code", "browser_session"]>;
|
|
33
|
+
export declare const zAccessGrantKindSchema: z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>;
|
|
34
34
|
/** Espelha `AccessGrantStateEnum`. */
|
|
35
35
|
export declare const zAccessGrantStateSchema: z.ZodEnum<["active", "consumed", "blocked", "revoked", "expired"]>;
|
|
36
36
|
/** Espelha `AccessSendChannelKindEnum`. */
|
|
@@ -42,7 +42,7 @@ export declare const zTeleconsultationEventActorTypeSchema: z.ZodEnum<["user", "
|
|
|
42
42
|
/** Espelha `TeleconsultationEventSourceEnum`. */
|
|
43
43
|
export declare const zTeleconsultationEventSourceSchema: z.ZodEnum<["api", "webhook", "appointment_reconciler", "retention_job", "sweep"]>;
|
|
44
44
|
/** 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"]>;
|
|
45
|
+
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_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"]>;
|
|
46
46
|
/** Espelha `WebhookEventStatusEnum`. */
|
|
47
47
|
export declare const zWebhookEventStatusSchema: z.ZodEnum<["pending", "claimed", "completed", "failed"]>;
|
|
48
48
|
/** Espelha `LegalTextStatusEnum`. */
|
|
@@ -132,7 +132,17 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
132
132
|
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
133
133
|
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
134
134
|
recording_status: z.ZodEnum<["idle", "consent_pending", "recording", "stopping", "failed"]>;
|
|
135
|
+
recording_request_id: z.ZodOptional<z.ZodString>;
|
|
136
|
+
recording_terms_version: z.ZodOptional<z.ZodString>;
|
|
137
|
+
recording_requested_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
138
|
+
recording_requested_by: z.ZodOptional<z.ZodString>;
|
|
139
|
+
recording_started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
140
|
+
recording_stopped_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
141
|
+
recording_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
|
+
recording_segment: z.ZodOptional<z.ZodNumber>;
|
|
135
143
|
transcription_status: z.ZodEnum<["not_requested", "queued", "processing", "ready", "failed", "deleted"]>;
|
|
144
|
+
provider_teardown_pending: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
+
metadata_retention_until: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
136
146
|
entitlement_snapshot: z.ZodObject<{
|
|
137
147
|
version: z.ZodNumber;
|
|
138
148
|
capabilities: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>;
|
|
@@ -147,6 +157,8 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
147
157
|
reschedule_count: z.ZodOptional<z.ZodNumber>;
|
|
148
158
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
149
159
|
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
160
|
+
usage_metering_due_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
161
|
+
usage_metered_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
150
162
|
version: z.ZodNumber;
|
|
151
163
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
152
164
|
id: z.ZodString;
|
|
@@ -191,7 +203,17 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
191
203
|
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
192
204
|
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
193
205
|
recording_status: z.ZodEnum<["idle", "consent_pending", "recording", "stopping", "failed"]>;
|
|
206
|
+
recording_request_id: z.ZodOptional<z.ZodString>;
|
|
207
|
+
recording_terms_version: z.ZodOptional<z.ZodString>;
|
|
208
|
+
recording_requested_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
209
|
+
recording_requested_by: z.ZodOptional<z.ZodString>;
|
|
210
|
+
recording_started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
211
|
+
recording_stopped_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
212
|
+
recording_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
213
|
+
recording_segment: z.ZodOptional<z.ZodNumber>;
|
|
194
214
|
transcription_status: z.ZodEnum<["not_requested", "queued", "processing", "ready", "failed", "deleted"]>;
|
|
215
|
+
provider_teardown_pending: z.ZodOptional<z.ZodBoolean>;
|
|
216
|
+
metadata_retention_until: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
195
217
|
entitlement_snapshot: z.ZodObject<{
|
|
196
218
|
version: z.ZodNumber;
|
|
197
219
|
capabilities: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>;
|
|
@@ -206,6 +228,8 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
206
228
|
reschedule_count: z.ZodOptional<z.ZodNumber>;
|
|
207
229
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
208
230
|
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
231
|
+
usage_metering_due_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
232
|
+
usage_metered_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
209
233
|
version: z.ZodNumber;
|
|
210
234
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
211
235
|
id: z.ZodString;
|
|
@@ -250,7 +274,17 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
250
274
|
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
251
275
|
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
252
276
|
recording_status: z.ZodEnum<["idle", "consent_pending", "recording", "stopping", "failed"]>;
|
|
277
|
+
recording_request_id: z.ZodOptional<z.ZodString>;
|
|
278
|
+
recording_terms_version: z.ZodOptional<z.ZodString>;
|
|
279
|
+
recording_requested_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
280
|
+
recording_requested_by: z.ZodOptional<z.ZodString>;
|
|
281
|
+
recording_started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
282
|
+
recording_stopped_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
283
|
+
recording_failure_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
+
recording_segment: z.ZodOptional<z.ZodNumber>;
|
|
253
285
|
transcription_status: z.ZodEnum<["not_requested", "queued", "processing", "ready", "failed", "deleted"]>;
|
|
286
|
+
provider_teardown_pending: z.ZodOptional<z.ZodBoolean>;
|
|
287
|
+
metadata_retention_until: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
254
288
|
entitlement_snapshot: z.ZodObject<{
|
|
255
289
|
version: z.ZodNumber;
|
|
256
290
|
capabilities: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber, z.ZodString]>>;
|
|
@@ -265,8 +299,53 @@ export declare const zTeleconsultationSchema: z.ZodObject<{
|
|
|
265
299
|
reschedule_count: z.ZodOptional<z.ZodNumber>;
|
|
266
300
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
267
301
|
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
302
|
+
usage_metering_due_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
303
|
+
usage_metered_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
268
304
|
version: z.ZodNumber;
|
|
269
305
|
}, z.ZodTypeAny, "passthrough">>;
|
|
306
|
+
/**
|
|
307
|
+
* Espelha `ITeleconsultationPrivateProvider` (subdoc `private/provider`).
|
|
308
|
+
*
|
|
309
|
+
* NÃO estende `zFireDocSchema`: o subdoc não é um IFireDoc (não tem `version`
|
|
310
|
+
* de concorrência nem `ref`), e é lido sempre pelo backend com `id` do snap.
|
|
311
|
+
*/
|
|
312
|
+
export declare const zTeleconsultationPrivateProviderSchema: z.ZodObject<{
|
|
313
|
+
id: z.ZodString;
|
|
314
|
+
tenant: z.ZodString;
|
|
315
|
+
teleconsultation_id: z.ZodString;
|
|
316
|
+
provider: z.ZodEnum<["realtimekit"]>;
|
|
317
|
+
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
318
|
+
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
319
|
+
provider_session_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
320
|
+
provider_participant_ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
321
|
+
active_provider_recording_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
322
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
323
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
324
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
325
|
+
id: z.ZodString;
|
|
326
|
+
tenant: z.ZodString;
|
|
327
|
+
teleconsultation_id: z.ZodString;
|
|
328
|
+
provider: z.ZodEnum<["realtimekit"]>;
|
|
329
|
+
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
330
|
+
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
331
|
+
provider_session_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
332
|
+
provider_participant_ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
333
|
+
active_provider_recording_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
334
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
335
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
336
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
337
|
+
id: z.ZodString;
|
|
338
|
+
tenant: z.ZodString;
|
|
339
|
+
teleconsultation_id: z.ZodString;
|
|
340
|
+
provider: z.ZodEnum<["realtimekit"]>;
|
|
341
|
+
provider_meeting_id: z.ZodOptional<z.ZodString>;
|
|
342
|
+
active_provider_session_id: z.ZodOptional<z.ZodString>;
|
|
343
|
+
provider_session_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
344
|
+
provider_participant_ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
345
|
+
active_provider_recording_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
346
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
347
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
348
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
270
349
|
/** Espelha `ITeleconsultationParticipant`. */
|
|
271
350
|
export declare const zTeleconsultationParticipantSchema: z.ZodObject<{
|
|
272
351
|
id: z.ZodString;
|
|
@@ -442,7 +521,6 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
442
521
|
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
443
522
|
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
444
523
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
445
|
-
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
446
524
|
} & {
|
|
447
525
|
teleconsultation_id: z.ZodString;
|
|
448
526
|
type: z.ZodEnum<["recording_audio_video", "recording_audio", "transcript"]>;
|
|
@@ -459,6 +537,7 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
459
537
|
started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
460
538
|
ended_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
461
539
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
540
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
462
541
|
error_code: z.ZodOptional<z.ZodString>;
|
|
463
542
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
464
543
|
id: z.ZodString;
|
|
@@ -467,7 +546,6 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
467
546
|
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
468
547
|
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
469
548
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
470
|
-
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
471
549
|
} & {
|
|
472
550
|
teleconsultation_id: z.ZodString;
|
|
473
551
|
type: z.ZodEnum<["recording_audio_video", "recording_audio", "transcript"]>;
|
|
@@ -484,6 +562,7 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
484
562
|
started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
485
563
|
ended_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
486
564
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
565
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
487
566
|
error_code: z.ZodOptional<z.ZodString>;
|
|
488
567
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
489
568
|
id: z.ZodString;
|
|
@@ -492,7 +571,6 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
492
571
|
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
493
572
|
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
494
573
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
495
|
-
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
496
574
|
} & {
|
|
497
575
|
teleconsultation_id: z.ZodString;
|
|
498
576
|
type: z.ZodEnum<["recording_audio_video", "recording_audio", "transcript"]>;
|
|
@@ -509,6 +587,7 @@ export declare const zTeleconsultationArtifactSchema: z.ZodObject<{
|
|
|
509
587
|
started_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
510
588
|
ended_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
511
589
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
590
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
512
591
|
error_code: z.ZodOptional<z.ZodString>;
|
|
513
592
|
}, z.ZodTypeAny, "passthrough">>;
|
|
514
593
|
/** Espelha `ITeleconsultationEvent` (append-only). */
|
|
@@ -522,7 +601,7 @@ export declare const zTeleconsultationEventSchema: z.ZodObject<{
|
|
|
522
601
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
523
602
|
} & {
|
|
524
603
|
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"]>;
|
|
604
|
+
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_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"]>;
|
|
526
605
|
occurred_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
527
606
|
actor: z.ZodObject<{
|
|
528
607
|
type: z.ZodEnum<["user", "patient", "system", "provider"]>;
|
|
@@ -551,7 +630,7 @@ export declare const zTeleconsultationEventSchema: z.ZodObject<{
|
|
|
551
630
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
552
631
|
} & {
|
|
553
632
|
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"]>;
|
|
633
|
+
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_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"]>;
|
|
555
634
|
occurred_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
556
635
|
actor: z.ZodObject<{
|
|
557
636
|
type: z.ZodEnum<["user", "patient", "system", "provider"]>;
|
|
@@ -580,7 +659,7 @@ export declare const zTeleconsultationEventSchema: z.ZodObject<{
|
|
|
580
659
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
581
660
|
} & {
|
|
582
661
|
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"]>;
|
|
662
|
+
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_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"]>;
|
|
584
663
|
occurred_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
585
664
|
actor: z.ZodObject<{
|
|
586
665
|
type: z.ZodEnum<["user", "patient", "system", "provider"]>;
|
|
@@ -695,7 +774,7 @@ export declare const zTeleconsultationAccessGrantSchema: z.ZodObject<{
|
|
|
695
774
|
} & {
|
|
696
775
|
teleconsultation_id: z.ZodString;
|
|
697
776
|
role: z.ZodEnum<["doctor", "patient"]>;
|
|
698
|
-
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session"]>;
|
|
777
|
+
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>;
|
|
699
778
|
secret_hash: z.ZodString;
|
|
700
779
|
recipient_ref_hash: z.ZodOptional<z.ZodString>;
|
|
701
780
|
actor_user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -724,7 +803,7 @@ export declare const zTeleconsultationAccessGrantSchema: z.ZodObject<{
|
|
|
724
803
|
} & {
|
|
725
804
|
teleconsultation_id: z.ZodString;
|
|
726
805
|
role: z.ZodEnum<["doctor", "patient"]>;
|
|
727
|
-
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session"]>;
|
|
806
|
+
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>;
|
|
728
807
|
secret_hash: z.ZodString;
|
|
729
808
|
recipient_ref_hash: z.ZodOptional<z.ZodString>;
|
|
730
809
|
actor_user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -753,7 +832,7 @@ export declare const zTeleconsultationAccessGrantSchema: z.ZodObject<{
|
|
|
753
832
|
} & {
|
|
754
833
|
teleconsultation_id: z.ZodString;
|
|
755
834
|
role: z.ZodEnum<["doctor", "patient"]>;
|
|
756
|
-
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session"]>;
|
|
835
|
+
kind: z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>;
|
|
757
836
|
secret_hash: z.ZodString;
|
|
758
837
|
recipient_ref_hash: z.ZodOptional<z.ZodString>;
|
|
759
838
|
actor_user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -787,6 +866,8 @@ export declare const zTelemedicineAppointmentIndexSchema: z.ZodObject<{
|
|
|
787
866
|
active_teleconsultation_id: z.ZodNullable<z.ZodString>;
|
|
788
867
|
generation: z.ZodNumber;
|
|
789
868
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
869
|
+
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
870
|
+
last_teleconsultation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
790
871
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
791
872
|
id: z.ZodString;
|
|
792
873
|
ref: z.ZodAny;
|
|
@@ -801,6 +882,8 @@ export declare const zTelemedicineAppointmentIndexSchema: z.ZodObject<{
|
|
|
801
882
|
active_teleconsultation_id: z.ZodNullable<z.ZodString>;
|
|
802
883
|
generation: z.ZodNumber;
|
|
803
884
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
885
|
+
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
886
|
+
last_teleconsultation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
804
887
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
805
888
|
id: z.ZodString;
|
|
806
889
|
ref: z.ZodAny;
|
|
@@ -815,6 +898,8 @@ export declare const zTelemedicineAppointmentIndexSchema: z.ZodObject<{
|
|
|
815
898
|
active_teleconsultation_id: z.ZodNullable<z.ZodString>;
|
|
816
899
|
generation: z.ZodNumber;
|
|
817
900
|
last_reconciled_appointment_version: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
901
|
+
last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodDate, Date, unknown>>>;
|
|
902
|
+
last_teleconsultation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
818
903
|
}, z.ZodTypeAny, "passthrough">>;
|
|
819
904
|
/** Espelha `ITelemedicineEntitlementAudit`. */
|
|
820
905
|
export declare const zTelemedicineEntitlementAuditSchema: z.ZodObject<{
|
|
@@ -1239,6 +1324,7 @@ export declare const zTelemedicineGrantIndexSchema: z.ZodObject<{
|
|
|
1239
1324
|
tenant: z.ZodString;
|
|
1240
1325
|
teleconsultation_id: z.ZodString;
|
|
1241
1326
|
grant_id: z.ZodString;
|
|
1327
|
+
kind: z.ZodOptional<z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>>;
|
|
1242
1328
|
expires_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1243
1329
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1244
1330
|
id: z.ZodString;
|
|
@@ -1252,6 +1338,7 @@ export declare const zTelemedicineGrantIndexSchema: z.ZodObject<{
|
|
|
1252
1338
|
tenant: z.ZodString;
|
|
1253
1339
|
teleconsultation_id: z.ZodString;
|
|
1254
1340
|
grant_id: z.ZodString;
|
|
1341
|
+
kind: z.ZodOptional<z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>>;
|
|
1255
1342
|
expires_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1256
1343
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1257
1344
|
id: z.ZodString;
|
|
@@ -1265,6 +1352,7 @@ export declare const zTelemedicineGrantIndexSchema: z.ZodObject<{
|
|
|
1265
1352
|
tenant: z.ZodString;
|
|
1266
1353
|
teleconsultation_id: z.ZodString;
|
|
1267
1354
|
grant_id: z.ZodString;
|
|
1355
|
+
kind: z.ZodOptional<z.ZodEnum<["qr_capability", "launch_code", "browser_session", "ics_capability"]>>;
|
|
1268
1356
|
expires_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1269
1357
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1270
1358
|
/** `PATCH /waiting-policy` — espelha `IWaitingPolicyCommand`. */
|
|
@@ -1358,6 +1446,40 @@ export declare const zConsentCommandSchema: z.ZodObject<{
|
|
|
1358
1446
|
decision: "declined" | "accepted";
|
|
1359
1447
|
terms_version: string;
|
|
1360
1448
|
}>;
|
|
1449
|
+
/**
|
|
1450
|
+
* `POST /api/room/v1/join` — espelha `IJoinCommand`.
|
|
1451
|
+
*
|
|
1452
|
+
* `.passthrough()`, não `.strict()`, ao contrário dos outros comandos: o
|
|
1453
|
+
* backend hoje LÊ os dois booleanos à mão e ignora o resto, e o corpo é a
|
|
1454
|
+
* intenção de mídia do preflight. Trocar por `.strict()` faria um campo novo do
|
|
1455
|
+
* SPA derrubar o join inteiro em `400` — alto preço para um corpo que o
|
|
1456
|
+
* servidor pode ignorar por completo.
|
|
1457
|
+
*/
|
|
1458
|
+
export declare const zJoinCommandSchema: z.ZodObject<{
|
|
1459
|
+
audio: z.ZodOptional<z.ZodBoolean>;
|
|
1460
|
+
video: z.ZodOptional<z.ZodBoolean>;
|
|
1461
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1462
|
+
audio: z.ZodOptional<z.ZodBoolean>;
|
|
1463
|
+
video: z.ZodOptional<z.ZodBoolean>;
|
|
1464
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1465
|
+
audio: z.ZodOptional<z.ZodBoolean>;
|
|
1466
|
+
video: z.ZodOptional<z.ZodBoolean>;
|
|
1467
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1468
|
+
/**
|
|
1469
|
+
* `POST /api/room/v1/leave` — espelha `ILeaveCommand`.
|
|
1470
|
+
*
|
|
1471
|
+
* `.passthrough()` pelo mesmo motivo, agravado: este corpo chega pelo
|
|
1472
|
+
* `pagehide` com `fetch(keepalive)` e é a ÚLTIMA chance de registrar a saída.
|
|
1473
|
+
* Um 400 aqui é uma saída perdida, e o backend já trata corpo ausente
|
|
1474
|
+
* (`reason` default `'temporary'`).
|
|
1475
|
+
*/
|
|
1476
|
+
export declare const zLeaveCommandSchema: z.ZodObject<{
|
|
1477
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1478
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1479
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1480
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1481
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1482
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1361
1483
|
/** `POST /api/room/v1/presence` — espelha `IPresenceCommand`. */
|
|
1362
1484
|
export declare const zPresenceCommandSchema: z.ZodObject<{
|
|
1363
1485
|
state: z.ZodEnum<["waiting", "connected", "disconnected", "left"]>;
|
|
@@ -1401,11 +1523,11 @@ export declare const zRecordingConsentCommandSchema: z.ZodObject<{
|
|
|
1401
1523
|
recording_request_id: z.ZodString;
|
|
1402
1524
|
terms_version: z.ZodString;
|
|
1403
1525
|
}, "strict", z.ZodTypeAny, {
|
|
1404
|
-
terms_version: string;
|
|
1405
1526
|
recording_request_id: string;
|
|
1406
|
-
}, {
|
|
1407
1527
|
terms_version: string;
|
|
1528
|
+
}, {
|
|
1408
1529
|
recording_request_id: string;
|
|
1530
|
+
terms_version: string;
|
|
1409
1531
|
}>;
|
|
1410
1532
|
/** `POST /api/room/v1/recording/stop` — espelha `IRecordingStopCommand`. */
|
|
1411
1533
|
export declare const zRecordingStopCommandSchema: z.ZodObject<{
|
|
@@ -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.zAccessRevokeCommandSchema = 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.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.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 = 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");
|
|
@@ -110,6 +110,8 @@ exports.zAccessGrantKindSchema = zod_1.z.enum([
|
|
|
110
110
|
"qr_capability",
|
|
111
111
|
"launch_code",
|
|
112
112
|
"browser_session",
|
|
113
|
+
// feat-160 F7: `kind` de uma ENTRADA do `grant-index`, nunca de um grant.
|
|
114
|
+
"ics_capability",
|
|
113
115
|
]);
|
|
114
116
|
/** Espelha `AccessGrantStateEnum`. */
|
|
115
117
|
exports.zAccessGrantStateSchema = zod_1.z.enum([
|
|
@@ -150,6 +152,7 @@ exports.zTeleconsultationEventTypeSchema = zod_1.z.enum([
|
|
|
150
152
|
"teleconsultation.expired",
|
|
151
153
|
"teleconsultation.diverged",
|
|
152
154
|
"access.created",
|
|
155
|
+
"access.link_revealed",
|
|
153
156
|
"access.revoked",
|
|
154
157
|
"access.exchanged",
|
|
155
158
|
"access.verification_failed",
|
|
@@ -283,7 +286,17 @@ exports.zTeleconsultationSchema = zod_schemas_1.zFireDocSchema
|
|
|
283
286
|
provider_meeting_id: zod_1.z.string().optional(),
|
|
284
287
|
active_provider_session_id: zod_1.z.string().optional(),
|
|
285
288
|
recording_status: exports.zRecordingStatusSchema,
|
|
289
|
+
recording_request_id: zod_1.z.string().optional(),
|
|
290
|
+
recording_terms_version: zod_1.z.string().optional(),
|
|
291
|
+
recording_requested_at: zDateNullable,
|
|
292
|
+
recording_requested_by: zod_1.z.string().optional(),
|
|
293
|
+
recording_started_at: zDateNullable,
|
|
294
|
+
recording_stopped_at: zDateNullable,
|
|
295
|
+
recording_failure_code: zod_1.z.string().nullable().optional(),
|
|
296
|
+
recording_segment: zod_1.z.number().int().min(0).optional(),
|
|
286
297
|
transcription_status: exports.zTranscriptionStatusSchema,
|
|
298
|
+
provider_teardown_pending: zod_1.z.boolean().optional(),
|
|
299
|
+
metadata_retention_until: zDateNullable,
|
|
287
300
|
entitlement_snapshot: exports.zTeleconsultationEntitlementSnapshotSchema,
|
|
288
301
|
generation: zod_1.z.number().int().min(0),
|
|
289
302
|
reschedule_count: zod_1.z.number().int().min(0).optional(),
|
|
@@ -292,9 +305,32 @@ exports.zTeleconsultationSchema = zod_schemas_1.zFireDocSchema
|
|
|
292
305
|
.nullable()
|
|
293
306
|
.optional(),
|
|
294
307
|
last_reconciled_at: zDateNullable,
|
|
308
|
+
usage_metering_due_at: zDateNullable,
|
|
309
|
+
usage_metered_at: zDateNullable,
|
|
295
310
|
version: zod_1.z.number().int().min(0),
|
|
296
311
|
})
|
|
297
312
|
.passthrough();
|
|
313
|
+
/**
|
|
314
|
+
* Espelha `ITeleconsultationPrivateProvider` (subdoc `private/provider`).
|
|
315
|
+
*
|
|
316
|
+
* NÃO estende `zFireDocSchema`: o subdoc não é um IFireDoc (não tem `version`
|
|
317
|
+
* de concorrência nem `ref`), e é lido sempre pelo backend com `id` do snap.
|
|
318
|
+
*/
|
|
319
|
+
exports.zTeleconsultationPrivateProviderSchema = zod_1.z
|
|
320
|
+
.object({
|
|
321
|
+
id: zod_1.z.string(),
|
|
322
|
+
tenant: zod_1.z.string().min(1),
|
|
323
|
+
teleconsultation_id: zod_1.z.string().min(1),
|
|
324
|
+
provider: exports.zTeleconsultationProviderSchema,
|
|
325
|
+
provider_meeting_id: zod_1.z.string().optional(),
|
|
326
|
+
active_provider_session_id: zod_1.z.string().optional(),
|
|
327
|
+
provider_session_ids: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
328
|
+
provider_participant_ids: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
329
|
+
active_provider_recording_id: zod_1.z.string().nullable().optional(),
|
|
330
|
+
created_at: zDateNullable,
|
|
331
|
+
updated_at: zDateNullable,
|
|
332
|
+
})
|
|
333
|
+
.passthrough();
|
|
298
334
|
/** Espelha `ITeleconsultationParticipant`. */
|
|
299
335
|
exports.zTeleconsultationParticipantSchema = zod_schemas_1.zFireDocSchema
|
|
300
336
|
.extend({
|
|
@@ -353,6 +389,7 @@ exports.zTeleconsultationArtifactSchema = zod_schemas_1.zFireDocSchema
|
|
|
353
389
|
started_at: zDateNullable,
|
|
354
390
|
ended_at: zDateNullable,
|
|
355
391
|
expires_at: zDateNullable,
|
|
392
|
+
deleted_at: zDateNullable,
|
|
356
393
|
error_code: zod_1.z.string().optional(),
|
|
357
394
|
})
|
|
358
395
|
.passthrough();
|
|
@@ -433,6 +470,8 @@ exports.zTelemedicineAppointmentIndexSchema = zod_schemas_1.zFireDocSchema
|
|
|
433
470
|
.union([zod_1.z.number(), zod_1.z.string()])
|
|
434
471
|
.nullable()
|
|
435
472
|
.optional(),
|
|
473
|
+
last_reconciled_at: zDateNullable,
|
|
474
|
+
last_teleconsultation_id: zod_1.z.string().nullable().optional(),
|
|
436
475
|
})
|
|
437
476
|
.passthrough();
|
|
438
477
|
/** Espelha `ITelemedicineEntitlementAudit`. */
|
|
@@ -509,6 +548,7 @@ exports.zTelemedicineGrantIndexSchema = zGlobalDocSchema
|
|
|
509
548
|
tenant: zod_1.z.string().min(1),
|
|
510
549
|
teleconsultation_id: zod_1.z.string().min(1),
|
|
511
550
|
grant_id: zod_1.z.string().min(1),
|
|
551
|
+
kind: exports.zAccessGrantKindSchema.optional(),
|
|
512
552
|
expires_at: zDate,
|
|
513
553
|
})
|
|
514
554
|
.passthrough();
|
|
@@ -583,6 +623,34 @@ exports.zConsentCommandSchema = zod_1.z
|
|
|
583
623
|
decision: zod_1.z.enum(["accepted", "declined"]),
|
|
584
624
|
})
|
|
585
625
|
.strict();
|
|
626
|
+
/**
|
|
627
|
+
* `POST /api/room/v1/join` — espelha `IJoinCommand`.
|
|
628
|
+
*
|
|
629
|
+
* `.passthrough()`, não `.strict()`, ao contrário dos outros comandos: o
|
|
630
|
+
* backend hoje LÊ os dois booleanos à mão e ignora o resto, e o corpo é a
|
|
631
|
+
* intenção de mídia do preflight. Trocar por `.strict()` faria um campo novo do
|
|
632
|
+
* SPA derrubar o join inteiro em `400` — alto preço para um corpo que o
|
|
633
|
+
* servidor pode ignorar por completo.
|
|
634
|
+
*/
|
|
635
|
+
exports.zJoinCommandSchema = zod_1.z
|
|
636
|
+
.object({
|
|
637
|
+
audio: zod_1.z.boolean().optional(),
|
|
638
|
+
video: zod_1.z.boolean().optional(),
|
|
639
|
+
})
|
|
640
|
+
.passthrough();
|
|
641
|
+
/**
|
|
642
|
+
* `POST /api/room/v1/leave` — espelha `ILeaveCommand`.
|
|
643
|
+
*
|
|
644
|
+
* `.passthrough()` pelo mesmo motivo, agravado: este corpo chega pelo
|
|
645
|
+
* `pagehide` com `fetch(keepalive)` e é a ÚLTIMA chance de registrar a saída.
|
|
646
|
+
* Um 400 aqui é uma saída perdida, e o backend já trata corpo ausente
|
|
647
|
+
* (`reason` default `'temporary'`).
|
|
648
|
+
*/
|
|
649
|
+
exports.zLeaveCommandSchema = zod_1.z
|
|
650
|
+
.object({
|
|
651
|
+
reason: zod_1.z.string().trim().min(1).max(60).optional(),
|
|
652
|
+
})
|
|
653
|
+
.passthrough();
|
|
586
654
|
/** `POST /api/room/v1/presence` — espelha `IPresenceCommand`. */
|
|
587
655
|
exports.zPresenceCommandSchema = zod_1.z
|
|
588
656
|
.object({
|
|
@@ -127,6 +127,8 @@ export const zAccessGrantKindSchema = z.enum([
|
|
|
127
127
|
"qr_capability",
|
|
128
128
|
"launch_code",
|
|
129
129
|
"browser_session",
|
|
130
|
+
// feat-160 F7: `kind` de uma ENTRADA do `grant-index`, nunca de um grant.
|
|
131
|
+
"ics_capability",
|
|
130
132
|
]);
|
|
131
133
|
|
|
132
134
|
/** Espelha `AccessGrantStateEnum`. */
|
|
@@ -173,6 +175,7 @@ export const zTeleconsultationEventTypeSchema = z.enum([
|
|
|
173
175
|
"teleconsultation.expired",
|
|
174
176
|
"teleconsultation.diverged",
|
|
175
177
|
"access.created",
|
|
178
|
+
"access.link_revealed",
|
|
176
179
|
"access.revoked",
|
|
177
180
|
"access.exchanged",
|
|
178
181
|
"access.verification_failed",
|
|
@@ -325,7 +328,17 @@ export const zTeleconsultationSchema = zFireDocSchema
|
|
|
325
328
|
provider_meeting_id: z.string().optional(),
|
|
326
329
|
active_provider_session_id: z.string().optional(),
|
|
327
330
|
recording_status: zRecordingStatusSchema,
|
|
331
|
+
recording_request_id: z.string().optional(),
|
|
332
|
+
recording_terms_version: z.string().optional(),
|
|
333
|
+
recording_requested_at: zDateNullable,
|
|
334
|
+
recording_requested_by: z.string().optional(),
|
|
335
|
+
recording_started_at: zDateNullable,
|
|
336
|
+
recording_stopped_at: zDateNullable,
|
|
337
|
+
recording_failure_code: z.string().nullable().optional(),
|
|
338
|
+
recording_segment: z.number().int().min(0).optional(),
|
|
328
339
|
transcription_status: zTranscriptionStatusSchema,
|
|
340
|
+
provider_teardown_pending: z.boolean().optional(),
|
|
341
|
+
metadata_retention_until: zDateNullable,
|
|
329
342
|
entitlement_snapshot: zTeleconsultationEntitlementSnapshotSchema,
|
|
330
343
|
generation: z.number().int().min(0),
|
|
331
344
|
reschedule_count: z.number().int().min(0).optional(),
|
|
@@ -334,10 +347,34 @@ export const zTeleconsultationSchema = zFireDocSchema
|
|
|
334
347
|
.nullable()
|
|
335
348
|
.optional(),
|
|
336
349
|
last_reconciled_at: zDateNullable,
|
|
350
|
+
usage_metering_due_at: zDateNullable,
|
|
351
|
+
usage_metered_at: zDateNullable,
|
|
337
352
|
version: z.number().int().min(0),
|
|
338
353
|
})
|
|
339
354
|
.passthrough();
|
|
340
355
|
|
|
356
|
+
/**
|
|
357
|
+
* Espelha `ITeleconsultationPrivateProvider` (subdoc `private/provider`).
|
|
358
|
+
*
|
|
359
|
+
* NÃO estende `zFireDocSchema`: o subdoc não é um IFireDoc (não tem `version`
|
|
360
|
+
* de concorrência nem `ref`), e é lido sempre pelo backend com `id` do snap.
|
|
361
|
+
*/
|
|
362
|
+
export const zTeleconsultationPrivateProviderSchema = z
|
|
363
|
+
.object({
|
|
364
|
+
id: z.string(),
|
|
365
|
+
tenant: z.string().min(1),
|
|
366
|
+
teleconsultation_id: z.string().min(1),
|
|
367
|
+
provider: zTeleconsultationProviderSchema,
|
|
368
|
+
provider_meeting_id: z.string().optional(),
|
|
369
|
+
active_provider_session_id: z.string().optional(),
|
|
370
|
+
provider_session_ids: z.array(z.string().min(1)).optional(),
|
|
371
|
+
provider_participant_ids: z.record(z.string(), z.string()).optional(),
|
|
372
|
+
active_provider_recording_id: z.string().nullable().optional(),
|
|
373
|
+
created_at: zDateNullable,
|
|
374
|
+
updated_at: zDateNullable,
|
|
375
|
+
})
|
|
376
|
+
.passthrough();
|
|
377
|
+
|
|
341
378
|
/** Espelha `ITeleconsultationParticipant`. */
|
|
342
379
|
export const zTeleconsultationParticipantSchema = zFireDocSchema
|
|
343
380
|
.extend({
|
|
@@ -399,6 +436,7 @@ export const zTeleconsultationArtifactSchema = zFireDocSchema
|
|
|
399
436
|
started_at: zDateNullable,
|
|
400
437
|
ended_at: zDateNullable,
|
|
401
438
|
expires_at: zDateNullable,
|
|
439
|
+
deleted_at: zDateNullable,
|
|
402
440
|
error_code: z.string().optional(),
|
|
403
441
|
})
|
|
404
442
|
.passthrough();
|
|
@@ -486,6 +524,8 @@ export const zTelemedicineAppointmentIndexSchema = zFireDocSchema
|
|
|
486
524
|
.union([z.number(), z.string()])
|
|
487
525
|
.nullable()
|
|
488
526
|
.optional(),
|
|
527
|
+
last_reconciled_at: zDateNullable,
|
|
528
|
+
last_teleconsultation_id: z.string().nullable().optional(),
|
|
489
529
|
})
|
|
490
530
|
.passthrough();
|
|
491
531
|
|
|
@@ -569,6 +609,7 @@ export const zTelemedicineGrantIndexSchema = zGlobalDocSchema
|
|
|
569
609
|
tenant: z.string().min(1),
|
|
570
610
|
teleconsultation_id: z.string().min(1),
|
|
571
611
|
grant_id: z.string().min(1),
|
|
612
|
+
kind: zAccessGrantKindSchema.optional(),
|
|
572
613
|
expires_at: zDate,
|
|
573
614
|
})
|
|
574
615
|
.passthrough();
|
|
@@ -654,6 +695,36 @@ export const zConsentCommandSchema = z
|
|
|
654
695
|
})
|
|
655
696
|
.strict();
|
|
656
697
|
|
|
698
|
+
/**
|
|
699
|
+
* `POST /api/room/v1/join` — espelha `IJoinCommand`.
|
|
700
|
+
*
|
|
701
|
+
* `.passthrough()`, não `.strict()`, ao contrário dos outros comandos: o
|
|
702
|
+
* backend hoje LÊ os dois booleanos à mão e ignora o resto, e o corpo é a
|
|
703
|
+
* intenção de mídia do preflight. Trocar por `.strict()` faria um campo novo do
|
|
704
|
+
* SPA derrubar o join inteiro em `400` — alto preço para um corpo que o
|
|
705
|
+
* servidor pode ignorar por completo.
|
|
706
|
+
*/
|
|
707
|
+
export const zJoinCommandSchema = z
|
|
708
|
+
.object({
|
|
709
|
+
audio: z.boolean().optional(),
|
|
710
|
+
video: z.boolean().optional(),
|
|
711
|
+
})
|
|
712
|
+
.passthrough();
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* `POST /api/room/v1/leave` — espelha `ILeaveCommand`.
|
|
716
|
+
*
|
|
717
|
+
* `.passthrough()` pelo mesmo motivo, agravado: este corpo chega pelo
|
|
718
|
+
* `pagehide` com `fetch(keepalive)` e é a ÚLTIMA chance de registrar a saída.
|
|
719
|
+
* Um 400 aqui é uma saída perdida, e o backend já trata corpo ausente
|
|
720
|
+
* (`reason` default `'temporary'`).
|
|
721
|
+
*/
|
|
722
|
+
export const zLeaveCommandSchema = z
|
|
723
|
+
.object({
|
|
724
|
+
reason: z.string().trim().min(1).max(60).optional(),
|
|
725
|
+
})
|
|
726
|
+
.passthrough();
|
|
727
|
+
|
|
657
728
|
/** `POST /api/room/v1/presence` — espelha `IPresenceCommand`. */
|
|
658
729
|
export const zPresenceCommandSchema = z
|
|
659
730
|
.object({
|