evo360-types 1.3.654 → 1.3.656
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-csq/zod-schemas.d.ts +894 -12
- package/dist/apps/evo-csq/zod-schemas.js +54 -2
- package/dist/apps/evo-csq/zod-schemas.ts +58 -0
- package/dist/apps/hub-automation/zod-schemas.d.ts +66 -0
- package/dist/apps/hub-automation/zod-schemas.js +3 -0
- package/dist/apps/hub-automation/zod-schemas.ts +3 -0
- package/dist/types/evo-csq/index.d.ts +77 -0
- package/dist/types/evo-csq/index.ts +92 -0
- package/dist/types/hub-automation/index.d.ts +2 -0
- package/dist/types/hub-automation/index.ts +6 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.zCsqLeadReportSchema = exports.zCsqRunSchema = exports.zCsqAlertCountsSchema = exports.zCsqEligibilitySchema = exports.zCsqEvaluatedForSchema = exports.zCsqReportHeaderSchema = exports.zCsqReportAttendantSchema = exports.zCsqReportPatientSchema = exports.zCsqReportLeadSchema = exports.zCsqSystemFactsSchema = exports.zCsqBillingFactSchema = exports.zCsqPreviousTicketFactSchema = exports.zCsqOverlapFactSchema = exports.zCsqOverlapFamilyHintsSchema = exports.zCsqOverlapAppointmentFactSchema = exports.zCsqAppointmentFactSchema = exports.zCsqJudgeOutputSchema = exports.zCsqJudgeResolvedAlertSchema = exports.zCsqJudgeRevalidationSchema = exports.zCsqLlmUsageSchema = exports.zCsqTranscriptMessageSchema = exports.zCsqTicketSummarySchema = exports.zCsqTrailEntrySchema = void 0;
|
|
3
|
+
exports.zCsqAppointmentEventKindSchema = exports.zCsqTriageDecisionSchema = exports.zCsqTriageReasonSchema = exports.zCsqTriageModeSchema = exports.zCsqReviewSchema = exports.zCsqReviewCriterionDisagreementSchema = exports.zCsqReviewMissedAlertSchema = exports.zCsqDataQualitySchema = exports.zCsqCoverageSchema = exports.zCsqContributorSchema = exports.zCsqEvaluationSchema = exports.zCsqPillarScoreSchema = exports.zCsqPillarCoverageSchema = exports.zCsqCriterionScoreSchema = exports.zCsqCrossCheckSchema = exports.zCsqClaimTypeSchema = exports.zCsqClaimSchema = exports.zCsqClaimPriceInformedSchema = exports.zCsqClaimPatientStatusSchema = exports.zCsqClaimFirstConcreteOfferSchema = exports.zCsqClaimQuestionRequiresAnswerSchema = exports.zCsqClaimOutcomeSchema = exports.zCsqClaimRequiredDataSchema = exports.zCsqClaimDataCollectedSchema = exports.zCsqClaimPromiseSchema = exports.zCsqClaimAppointmentInformedSchema = exports.zCsqLeadStateSchema = exports.zCsqLeadStateListFieldSchema = exports.zCsqLeadStateFieldSchema = exports.zCsqIndicatorsSchema = exports.zCsqIndicatorsSetSchema = exports.zCsqAlertSchema = exports.zCsqEvidenceSchema = exports.zCsqAlertSubtypeSchema = exports.zCsqAlertCodeSchema = exports.zCsqPillarCodeSchema = exports.zCsqCriterionScoreValueSchema = exports.zCsqAuthorKindSchema = exports.zCsqReviewVerdictSchema = exports.zCsqLlmConnectionSourceSchema = exports.zCsqPhaseSchema = exports.zCsqRunStatusSchema = exports.zCsqVerificationStateSchema = exports.zCsqAlertResolvedReasonSchema = exports.zCsqAlertLifecycleSchema = exports.zCsqAlertScopeSchema = exports.zCsqAlertSourceSchema = exports.zCsqSeveritySchema = exports.zCsqStatusSchema = exports.zCsqModeSchema = void 0;
|
|
4
|
+
exports.zCsqLeadReportSchema = exports.zCsqRunSchema = exports.zCsqAlertCountsSchema = exports.zCsqEligibilitySchema = exports.zCsqEvaluatedForSchema = exports.zCsqReportHeaderSchema = exports.zCsqReportAttendantSchema = exports.zCsqReportPatientSchema = exports.zCsqReportLeadSchema = exports.zCsqSystemFactsSchema = exports.zCsqBillingFactSchema = exports.zCsqPreviousTicketFactSchema = exports.zCsqOverlapFactSchema = exports.zCsqOverlapFamilyHintsSchema = exports.zCsqOverlapAppointmentFactSchema = exports.zCsqAppointmentFactSchema = exports.zCsqJudgeOutputSchema = exports.zCsqJudgeResolvedAlertSchema = exports.zCsqJudgeRevalidationSchema = exports.zCsqLlmUsageSchema = exports.zCsqTranscriptMessageSchema = exports.zCsqTicketSummarySchema = exports.zCsqTrailEntrySchema = exports.zCsqPromptBlockUsageSchema = exports.zCsqDetectorReportSchema = exports.zCsqDetectorLlmSchema = exports.zCsqDetectorModeSchema = exports.zCsqAppointmentEventSchema = void 0;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
7
7
|
// Schemas zod do CSQ 2.0 (feat-154). As interfaces TS equivalentes ficam em
|
|
@@ -224,6 +224,9 @@ exports.zCsqClaimAppointmentInformedSchema = zod_1.z.object({
|
|
|
224
224
|
patient_name: zod_1.z.string().optional(),
|
|
225
225
|
/** feat-206 F6: cancelado ou substituido depois, na mesma jornada. */
|
|
226
226
|
superseded: zod_1.z.boolean().optional(),
|
|
227
|
+
/** feat-206 F3: origem do claim (ausente = juiz). */
|
|
228
|
+
source: zod_1.z.enum(["judge", "detector", "both"]).optional(),
|
|
229
|
+
superseded_by: zod_1.z.string().optional(),
|
|
227
230
|
evidence: zod_1.z.array(exports.zCsqEvidenceSchema),
|
|
228
231
|
});
|
|
229
232
|
exports.zCsqClaimPromiseSchema = zod_1.z.object({
|
|
@@ -396,6 +399,54 @@ exports.zCsqTriageDecisionSchema = zod_1.z.object({
|
|
|
396
399
|
mode: exports.zCsqTriageModeSchema,
|
|
397
400
|
reasons: zod_1.z.array(exports.zCsqTriageReasonSchema),
|
|
398
401
|
});
|
|
402
|
+
// ───────── Detector de agenda (feat-206 F3) ─────────
|
|
403
|
+
exports.zCsqAppointmentEventKindSchema = zod_1.z.enum([
|
|
404
|
+
"slot_offered",
|
|
405
|
+
"slot_accepted",
|
|
406
|
+
"appointment_confirmed",
|
|
407
|
+
"reschedule_requested",
|
|
408
|
+
"appointment_cancelled",
|
|
409
|
+
]);
|
|
410
|
+
exports.zCsqAppointmentEventSchema = zod_1.z.object({
|
|
411
|
+
kind: exports.zCsqAppointmentEventKindSchema,
|
|
412
|
+
date: zod_1.z.string().optional(),
|
|
413
|
+
time: zod_1.z.string().optional(),
|
|
414
|
+
professional: zod_1.z.string().optional(),
|
|
415
|
+
patient_name: zod_1.z.string().optional(),
|
|
416
|
+
modality: zod_1.z.string().optional(),
|
|
417
|
+
actor: zod_1.z.enum(["attendant", "lead", "hubia", "automation"]),
|
|
418
|
+
evidence: zod_1.z.array(exports.zCsqEvidenceSchema),
|
|
419
|
+
supersedes: zod_1.z.string().optional(),
|
|
420
|
+
});
|
|
421
|
+
exports.zCsqDetectorModeSchema = zod_1.z.enum(["off", "shadow", "on"]);
|
|
422
|
+
exports.zCsqDetectorLlmSchema = zod_1.z.object({
|
|
423
|
+
provider: zod_1.z.string(),
|
|
424
|
+
model: zod_1.z.string(),
|
|
425
|
+
connection_id: zod_1.z.string().nullable(),
|
|
426
|
+
connection_source: zod_1.z.enum(["extractor", "judge"]),
|
|
427
|
+
input_tokens: zod_1.z.number(),
|
|
428
|
+
cache_read_tokens: zod_1.z.number().optional(),
|
|
429
|
+
output_tokens: zod_1.z.number(),
|
|
430
|
+
rounds: zod_1.z.number(),
|
|
431
|
+
cost_usd_est: zod_1.z.number().nullable(),
|
|
432
|
+
duration_ms: zod_1.z.number(),
|
|
433
|
+
});
|
|
434
|
+
exports.zCsqDetectorReportSchema = zod_1.z.object({
|
|
435
|
+
mode: exports.zCsqDetectorModeSchema,
|
|
436
|
+
outcome: zod_1.z.enum(["no_signal", "ok", "failed", "skipped"]),
|
|
437
|
+
signals: zod_1.z.number(),
|
|
438
|
+
excerpt_messages: zod_1.z.number(),
|
|
439
|
+
events: zod_1.z.number(),
|
|
440
|
+
claims_detector: zod_1.z.number(),
|
|
441
|
+
claims_judge: zod_1.z.number(),
|
|
442
|
+
only_detector: zod_1.z.number(),
|
|
443
|
+
only_judge: zod_1.z.number(),
|
|
444
|
+
superseded_by_detector: zod_1.z.number(),
|
|
445
|
+
time_mismatch: zod_1.z.number().optional(),
|
|
446
|
+
event_list: zod_1.z.array(exports.zCsqAppointmentEventSchema).optional(),
|
|
447
|
+
llm: exports.zCsqDetectorLlmSchema.nullable().optional(),
|
|
448
|
+
error: zod_1.z.string().optional(),
|
|
449
|
+
});
|
|
399
450
|
exports.zCsqPromptBlockUsageSchema = zod_1.z.object({
|
|
400
451
|
name: zod_1.z.string(),
|
|
401
452
|
chars: zod_1.z.number(),
|
|
@@ -660,5 +711,6 @@ exports.zCsqLeadReportSchema = zod_schemas_1.zFireDocSchema
|
|
|
660
711
|
judge_error: zod_1.z.string().optional(),
|
|
661
712
|
triage: exports.zCsqTriageDecisionSchema.optional(),
|
|
662
713
|
judge_skipped_reasons: zod_1.z.array(exports.zCsqTriageReasonSchema).optional(),
|
|
714
|
+
detector: exports.zCsqDetectorReportSchema.optional(),
|
|
663
715
|
})
|
|
664
716
|
.passthrough();
|
|
@@ -254,6 +254,9 @@ export const zCsqClaimAppointmentInformedSchema = z.object({
|
|
|
254
254
|
patient_name: z.string().optional(),
|
|
255
255
|
/** feat-206 F6: cancelado ou substituido depois, na mesma jornada. */
|
|
256
256
|
superseded: z.boolean().optional(),
|
|
257
|
+
/** feat-206 F3: origem do claim (ausente = juiz). */
|
|
258
|
+
source: z.enum(["judge", "detector", "both"]).optional(),
|
|
259
|
+
superseded_by: z.string().optional(),
|
|
257
260
|
evidence: z.array(zCsqEvidenceSchema),
|
|
258
261
|
});
|
|
259
262
|
|
|
@@ -455,6 +458,60 @@ export const zCsqTriageDecisionSchema = z.object({
|
|
|
455
458
|
reasons: z.array(zCsqTriageReasonSchema),
|
|
456
459
|
});
|
|
457
460
|
|
|
461
|
+
// ───────── Detector de agenda (feat-206 F3) ─────────
|
|
462
|
+
|
|
463
|
+
export const zCsqAppointmentEventKindSchema = z.enum([
|
|
464
|
+
"slot_offered",
|
|
465
|
+
"slot_accepted",
|
|
466
|
+
"appointment_confirmed",
|
|
467
|
+
"reschedule_requested",
|
|
468
|
+
"appointment_cancelled",
|
|
469
|
+
]);
|
|
470
|
+
|
|
471
|
+
export const zCsqAppointmentEventSchema = z.object({
|
|
472
|
+
kind: zCsqAppointmentEventKindSchema,
|
|
473
|
+
date: z.string().optional(),
|
|
474
|
+
time: z.string().optional(),
|
|
475
|
+
professional: z.string().optional(),
|
|
476
|
+
patient_name: z.string().optional(),
|
|
477
|
+
modality: z.string().optional(),
|
|
478
|
+
actor: z.enum(["attendant", "lead", "hubia", "automation"]),
|
|
479
|
+
evidence: z.array(zCsqEvidenceSchema),
|
|
480
|
+
supersedes: z.string().optional(),
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
export const zCsqDetectorModeSchema = z.enum(["off", "shadow", "on"]);
|
|
484
|
+
|
|
485
|
+
export const zCsqDetectorLlmSchema = z.object({
|
|
486
|
+
provider: z.string(),
|
|
487
|
+
model: z.string(),
|
|
488
|
+
connection_id: z.string().nullable(),
|
|
489
|
+
connection_source: z.enum(["extractor", "judge"]),
|
|
490
|
+
input_tokens: z.number(),
|
|
491
|
+
cache_read_tokens: z.number().optional(),
|
|
492
|
+
output_tokens: z.number(),
|
|
493
|
+
rounds: z.number(),
|
|
494
|
+
cost_usd_est: z.number().nullable(),
|
|
495
|
+
duration_ms: z.number(),
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
export const zCsqDetectorReportSchema = z.object({
|
|
499
|
+
mode: zCsqDetectorModeSchema,
|
|
500
|
+
outcome: z.enum(["no_signal", "ok", "failed", "skipped"]),
|
|
501
|
+
signals: z.number(),
|
|
502
|
+
excerpt_messages: z.number(),
|
|
503
|
+
events: z.number(),
|
|
504
|
+
claims_detector: z.number(),
|
|
505
|
+
claims_judge: z.number(),
|
|
506
|
+
only_detector: z.number(),
|
|
507
|
+
only_judge: z.number(),
|
|
508
|
+
superseded_by_detector: z.number(),
|
|
509
|
+
time_mismatch: z.number().optional(),
|
|
510
|
+
event_list: z.array(zCsqAppointmentEventSchema).optional(),
|
|
511
|
+
llm: zCsqDetectorLlmSchema.nullable().optional(),
|
|
512
|
+
error: z.string().optional(),
|
|
513
|
+
});
|
|
514
|
+
|
|
458
515
|
export const zCsqPromptBlockUsageSchema = z.object({
|
|
459
516
|
name: z.string(),
|
|
460
517
|
chars: z.number(),
|
|
@@ -754,5 +811,6 @@ export const zCsqLeadReportSchema = zFireDocSchema
|
|
|
754
811
|
judge_error: z.string().optional(),
|
|
755
812
|
triage: zCsqTriageDecisionSchema.optional(),
|
|
756
813
|
judge_skipped_reasons: z.array(zCsqTriageReasonSchema).optional(),
|
|
814
|
+
detector: zCsqDetectorReportSchema.optional(),
|
|
757
815
|
})
|
|
758
816
|
.passthrough();
|
|
@@ -172,6 +172,8 @@ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
|
|
|
172
172
|
payment_status_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
173
173
|
appointment_mode_in: z.ZodOptional<z.ZodArray<z.ZodEnum<["telemedicine", "in_person"]>, "many">>;
|
|
174
174
|
appointment_mode_not_in: z.ZodOptional<z.ZodArray<z.ZodEnum<["telemedicine", "in_person"]>, "many">>;
|
|
175
|
+
appointment_type_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
176
|
+
appointment_type_names_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
175
177
|
time_range: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
176
178
|
start: z.ZodString;
|
|
177
179
|
end: z.ZodString;
|
|
@@ -212,6 +214,8 @@ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
|
|
|
212
214
|
payment_status_not_in?: string[] | undefined;
|
|
213
215
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
214
216
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
217
|
+
appointment_type_names?: string[] | undefined;
|
|
218
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
215
219
|
time_range?: {
|
|
216
220
|
start: string;
|
|
217
221
|
end: string;
|
|
@@ -240,6 +244,8 @@ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
|
|
|
240
244
|
payment_status_not_in?: string[] | undefined;
|
|
241
245
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
242
246
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
247
|
+
appointment_type_names?: string[] | undefined;
|
|
248
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
243
249
|
time_range?: {
|
|
244
250
|
start: string;
|
|
245
251
|
end: string;
|
|
@@ -270,6 +276,8 @@ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
|
|
|
270
276
|
payment_status_not_in?: string[] | undefined;
|
|
271
277
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
272
278
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
279
|
+
appointment_type_names?: string[] | undefined;
|
|
280
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
273
281
|
time_range?: {
|
|
274
282
|
start: string;
|
|
275
283
|
end: string;
|
|
@@ -301,6 +309,8 @@ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
|
|
|
301
309
|
payment_status_not_in?: string[] | undefined;
|
|
302
310
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
303
311
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
312
|
+
appointment_type_names?: string[] | undefined;
|
|
313
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
304
314
|
time_range?: {
|
|
305
315
|
start: string;
|
|
306
316
|
end: string;
|
|
@@ -405,6 +415,8 @@ export declare const zAutomationSelectionSchema: z.ZodDiscriminatedUnion<"target
|
|
|
405
415
|
payment_status_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
406
416
|
appointment_mode_in: z.ZodOptional<z.ZodArray<z.ZodEnum<["telemedicine", "in_person"]>, "many">>;
|
|
407
417
|
appointment_mode_not_in: z.ZodOptional<z.ZodArray<z.ZodEnum<["telemedicine", "in_person"]>, "many">>;
|
|
418
|
+
appointment_type_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
419
|
+
appointment_type_names_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
408
420
|
time_range: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
409
421
|
start: z.ZodString;
|
|
410
422
|
end: z.ZodString;
|
|
@@ -445,6 +457,8 @@ export declare const zAutomationSelectionSchema: z.ZodDiscriminatedUnion<"target
|
|
|
445
457
|
payment_status_not_in?: string[] | undefined;
|
|
446
458
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
447
459
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
460
|
+
appointment_type_names?: string[] | undefined;
|
|
461
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
448
462
|
time_range?: {
|
|
449
463
|
start: string;
|
|
450
464
|
end: string;
|
|
@@ -473,6 +487,8 @@ export declare const zAutomationSelectionSchema: z.ZodDiscriminatedUnion<"target
|
|
|
473
487
|
payment_status_not_in?: string[] | undefined;
|
|
474
488
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
475
489
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
490
|
+
appointment_type_names?: string[] | undefined;
|
|
491
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
476
492
|
time_range?: {
|
|
477
493
|
start: string;
|
|
478
494
|
end: string;
|
|
@@ -503,6 +519,8 @@ export declare const zAutomationSelectionSchema: z.ZodDiscriminatedUnion<"target
|
|
|
503
519
|
payment_status_not_in?: string[] | undefined;
|
|
504
520
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
505
521
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
522
|
+
appointment_type_names?: string[] | undefined;
|
|
523
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
506
524
|
time_range?: {
|
|
507
525
|
start: string;
|
|
508
526
|
end: string;
|
|
@@ -534,6 +552,8 @@ export declare const zAutomationSelectionSchema: z.ZodDiscriminatedUnion<"target
|
|
|
534
552
|
payment_status_not_in?: string[] | undefined;
|
|
535
553
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
536
554
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
555
|
+
appointment_type_names?: string[] | undefined;
|
|
556
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
537
557
|
time_range?: {
|
|
538
558
|
start: string;
|
|
539
559
|
end: string;
|
|
@@ -2680,6 +2700,8 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
|
|
|
2680
2700
|
payment_status_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2681
2701
|
appointment_mode_in: z.ZodOptional<z.ZodArray<z.ZodEnum<["telemedicine", "in_person"]>, "many">>;
|
|
2682
2702
|
appointment_mode_not_in: z.ZodOptional<z.ZodArray<z.ZodEnum<["telemedicine", "in_person"]>, "many">>;
|
|
2703
|
+
appointment_type_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2704
|
+
appointment_type_names_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2683
2705
|
time_range: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
2684
2706
|
start: z.ZodString;
|
|
2685
2707
|
end: z.ZodString;
|
|
@@ -2720,6 +2742,8 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
|
|
|
2720
2742
|
payment_status_not_in?: string[] | undefined;
|
|
2721
2743
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
2722
2744
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
2745
|
+
appointment_type_names?: string[] | undefined;
|
|
2746
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
2723
2747
|
time_range?: {
|
|
2724
2748
|
start: string;
|
|
2725
2749
|
end: string;
|
|
@@ -2748,6 +2772,8 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
|
|
|
2748
2772
|
payment_status_not_in?: string[] | undefined;
|
|
2749
2773
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
2750
2774
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
2775
|
+
appointment_type_names?: string[] | undefined;
|
|
2776
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
2751
2777
|
time_range?: {
|
|
2752
2778
|
start: string;
|
|
2753
2779
|
end: string;
|
|
@@ -2778,6 +2804,8 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
|
|
|
2778
2804
|
payment_status_not_in?: string[] | undefined;
|
|
2779
2805
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
2780
2806
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
2807
|
+
appointment_type_names?: string[] | undefined;
|
|
2808
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
2781
2809
|
time_range?: {
|
|
2782
2810
|
start: string;
|
|
2783
2811
|
end: string;
|
|
@@ -2809,6 +2837,8 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
|
|
|
2809
2837
|
payment_status_not_in?: string[] | undefined;
|
|
2810
2838
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
2811
2839
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
2840
|
+
appointment_type_names?: string[] | undefined;
|
|
2841
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
2812
2842
|
time_range?: {
|
|
2813
2843
|
start: string;
|
|
2814
2844
|
end: string;
|
|
@@ -3764,6 +3794,8 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
|
|
|
3764
3794
|
payment_status_not_in?: string[] | undefined;
|
|
3765
3795
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
3766
3796
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
3797
|
+
appointment_type_names?: string[] | undefined;
|
|
3798
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
3767
3799
|
time_range?: {
|
|
3768
3800
|
start: string;
|
|
3769
3801
|
end: string;
|
|
@@ -3975,6 +4007,8 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
|
|
|
3975
4007
|
payment_status_not_in?: string[] | undefined;
|
|
3976
4008
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
3977
4009
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
4010
|
+
appointment_type_names?: string[] | undefined;
|
|
4011
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
3978
4012
|
time_range?: {
|
|
3979
4013
|
start: string;
|
|
3980
4014
|
end: string;
|
|
@@ -4250,6 +4284,8 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
|
|
|
4250
4284
|
payment_status_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4251
4285
|
appointment_mode_in: z.ZodOptional<z.ZodArray<z.ZodEnum<["telemedicine", "in_person"]>, "many">>;
|
|
4252
4286
|
appointment_mode_not_in: z.ZodOptional<z.ZodArray<z.ZodEnum<["telemedicine", "in_person"]>, "many">>;
|
|
4287
|
+
appointment_type_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4288
|
+
appointment_type_names_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4253
4289
|
time_range: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
4254
4290
|
start: z.ZodString;
|
|
4255
4291
|
end: z.ZodString;
|
|
@@ -4290,6 +4326,8 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
|
|
|
4290
4326
|
payment_status_not_in?: string[] | undefined;
|
|
4291
4327
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
4292
4328
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
4329
|
+
appointment_type_names?: string[] | undefined;
|
|
4330
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
4293
4331
|
time_range?: {
|
|
4294
4332
|
start: string;
|
|
4295
4333
|
end: string;
|
|
@@ -4318,6 +4356,8 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
|
|
|
4318
4356
|
payment_status_not_in?: string[] | undefined;
|
|
4319
4357
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
4320
4358
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
4359
|
+
appointment_type_names?: string[] | undefined;
|
|
4360
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
4321
4361
|
time_range?: {
|
|
4322
4362
|
start: string;
|
|
4323
4363
|
end: string;
|
|
@@ -4348,6 +4388,8 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
|
|
|
4348
4388
|
payment_status_not_in?: string[] | undefined;
|
|
4349
4389
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
4350
4390
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
4391
|
+
appointment_type_names?: string[] | undefined;
|
|
4392
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
4351
4393
|
time_range?: {
|
|
4352
4394
|
start: string;
|
|
4353
4395
|
end: string;
|
|
@@ -4379,6 +4421,8 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
|
|
|
4379
4421
|
payment_status_not_in?: string[] | undefined;
|
|
4380
4422
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
4381
4423
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
4424
|
+
appointment_type_names?: string[] | undefined;
|
|
4425
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
4382
4426
|
time_range?: {
|
|
4383
4427
|
start: string;
|
|
4384
4428
|
end: string;
|
|
@@ -5296,6 +5340,8 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
|
|
|
5296
5340
|
payment_status_not_in?: string[] | undefined;
|
|
5297
5341
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5298
5342
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5343
|
+
appointment_type_names?: string[] | undefined;
|
|
5344
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
5299
5345
|
time_range?: {
|
|
5300
5346
|
start: string;
|
|
5301
5347
|
end: string;
|
|
@@ -5492,6 +5538,8 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
|
|
|
5492
5538
|
payment_status_not_in?: string[] | undefined;
|
|
5493
5539
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5494
5540
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5541
|
+
appointment_type_names?: string[] | undefined;
|
|
5542
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
5495
5543
|
time_range?: {
|
|
5496
5544
|
start: string;
|
|
5497
5545
|
end: string;
|
|
@@ -5754,6 +5802,8 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
|
|
|
5754
5802
|
payment_status_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5755
5803
|
appointment_mode_in: z.ZodOptional<z.ZodArray<z.ZodEnum<["telemedicine", "in_person"]>, "many">>;
|
|
5756
5804
|
appointment_mode_not_in: z.ZodOptional<z.ZodArray<z.ZodEnum<["telemedicine", "in_person"]>, "many">>;
|
|
5805
|
+
appointment_type_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5806
|
+
appointment_type_names_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5757
5807
|
time_range: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
5758
5808
|
start: z.ZodString;
|
|
5759
5809
|
end: z.ZodString;
|
|
@@ -5794,6 +5844,8 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
|
|
|
5794
5844
|
payment_status_not_in?: string[] | undefined;
|
|
5795
5845
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5796
5846
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5847
|
+
appointment_type_names?: string[] | undefined;
|
|
5848
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
5797
5849
|
time_range?: {
|
|
5798
5850
|
start: string;
|
|
5799
5851
|
end: string;
|
|
@@ -5822,6 +5874,8 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
|
|
|
5822
5874
|
payment_status_not_in?: string[] | undefined;
|
|
5823
5875
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5824
5876
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5877
|
+
appointment_type_names?: string[] | undefined;
|
|
5878
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
5825
5879
|
time_range?: {
|
|
5826
5880
|
start: string;
|
|
5827
5881
|
end: string;
|
|
@@ -5852,6 +5906,8 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
|
|
|
5852
5906
|
payment_status_not_in?: string[] | undefined;
|
|
5853
5907
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5854
5908
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5909
|
+
appointment_type_names?: string[] | undefined;
|
|
5910
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
5855
5911
|
time_range?: {
|
|
5856
5912
|
start: string;
|
|
5857
5913
|
end: string;
|
|
@@ -5883,6 +5939,8 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
|
|
|
5883
5939
|
payment_status_not_in?: string[] | undefined;
|
|
5884
5940
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5885
5941
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
5942
|
+
appointment_type_names?: string[] | undefined;
|
|
5943
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
5886
5944
|
time_range?: {
|
|
5887
5945
|
start: string;
|
|
5888
5946
|
end: string;
|
|
@@ -6800,6 +6858,8 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
|
|
|
6800
6858
|
payment_status_not_in?: string[] | undefined;
|
|
6801
6859
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
6802
6860
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
6861
|
+
appointment_type_names?: string[] | undefined;
|
|
6862
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
6803
6863
|
time_range?: {
|
|
6804
6864
|
start: string;
|
|
6805
6865
|
end: string;
|
|
@@ -6996,6 +7056,8 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
|
|
|
6996
7056
|
payment_status_not_in?: string[] | undefined;
|
|
6997
7057
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
6998
7058
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
7059
|
+
appointment_type_names?: string[] | undefined;
|
|
7060
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
6999
7061
|
time_range?: {
|
|
7000
7062
|
start: string;
|
|
7001
7063
|
end: string;
|
|
@@ -7195,6 +7257,8 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
|
|
|
7195
7257
|
payment_status_not_in?: string[] | undefined;
|
|
7196
7258
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
7197
7259
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
7260
|
+
appointment_type_names?: string[] | undefined;
|
|
7261
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
7198
7262
|
time_range?: {
|
|
7199
7263
|
start: string;
|
|
7200
7264
|
end: string;
|
|
@@ -7394,6 +7458,8 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
|
|
|
7394
7458
|
payment_status_not_in?: string[] | undefined;
|
|
7395
7459
|
appointment_mode_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
7396
7460
|
appointment_mode_not_in?: ("telemedicine" | "in_person")[] | undefined;
|
|
7461
|
+
appointment_type_names?: string[] | undefined;
|
|
7462
|
+
appointment_type_names_not_in?: string[] | undefined;
|
|
7397
7463
|
time_range?: {
|
|
7398
7464
|
start: string;
|
|
7399
7465
|
end: string;
|
|
@@ -88,6 +88,9 @@ exports.zAutomationAppointmentSelectionSchema = zod_1.z.object({
|
|
|
88
88
|
appointment_mode_not_in: zod_1.z
|
|
89
89
|
.array(exports.zAutomationAppointmentModeSchema)
|
|
90
90
|
.optional(),
|
|
91
|
+
// fix-262: type NAME (`appointmentType`), glob-aware.
|
|
92
|
+
appointment_type_names: zod_1.z.array(zod_1.z.string()).optional(),
|
|
93
|
+
appointment_type_names_not_in: zod_1.z.array(zod_1.z.string()).optional(),
|
|
91
94
|
// Local-time window over startDate in the tenant timezone;
|
|
92
95
|
// `start <= hh:mm < end`, inverted range = overnight wraparound.
|
|
93
96
|
time_range: zod_1.z
|
|
@@ -100,6 +100,9 @@ export const zAutomationAppointmentSelectionSchema = z.object({
|
|
|
100
100
|
appointment_mode_not_in: z
|
|
101
101
|
.array(zAutomationAppointmentModeSchema)
|
|
102
102
|
.optional(),
|
|
103
|
+
// fix-262: type NAME (`appointmentType`), glob-aware.
|
|
104
|
+
appointment_type_names: z.array(z.string()).optional(),
|
|
105
|
+
appointment_type_names_not_in: z.array(z.string()).optional(),
|
|
103
106
|
// Local-time window over startDate in the tenant timezone;
|
|
104
107
|
// `start <= hh:mm < end`, inverted range = overnight wraparound.
|
|
105
108
|
time_range: z
|
|
@@ -288,8 +288,17 @@ export interface ICsqClaimAppointmentInformed {
|
|
|
288
288
|
* jornada (o lead cancelou/desistiu, ou foi trocado por outro horario). O
|
|
289
289
|
* codigo nao exige registro na agenda de um claim assim. */
|
|
290
290
|
superseded?: boolean;
|
|
291
|
+
/** feat-206 F3: quem extraiu o claim. Ausente = o juiz (laudos anteriores a
|
|
292
|
+
* F3 e claim so do juiz). `detector` = so o detector de agenda; `both` = os
|
|
293
|
+
* dois (mesma data/hora; a evidencia e a uniao). */
|
|
294
|
+
source?: CsqClaimSource;
|
|
295
|
+
/** feat-206 F3: `YYYY-MM-DD|HH:mm` do horario que substituiu este (o
|
|
296
|
+
* detector viu um horario confirmado depois). */
|
|
297
|
+
superseded_by?: string;
|
|
291
298
|
evidence: ICsqEvidence[];
|
|
292
299
|
}
|
|
300
|
+
/** feat-206 F3: origem de um claim `appointment_informed`. */
|
|
301
|
+
export type CsqClaimSource = "judge" | "detector" | "both";
|
|
293
302
|
/** "Prometi X ate quando". */
|
|
294
303
|
export interface ICsqClaimPromise {
|
|
295
304
|
type: "promise";
|
|
@@ -496,6 +505,71 @@ export interface ICsqTriageDecision {
|
|
|
496
505
|
mode: CsqTriageMode;
|
|
497
506
|
reasons: CsqTriageReason[];
|
|
498
507
|
}
|
|
508
|
+
/** Evento canonico de agenda extraido pelo detector (independente do juiz).
|
|
509
|
+
* `slot_offered` sozinho nao vira claim: oferta nao aceita nao e agendamento
|
|
510
|
+
* informado. */
|
|
511
|
+
export type CsqAppointmentEventKind = "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
|
|
512
|
+
/** Quem produziu o evento na conversa. */
|
|
513
|
+
export type CsqAppointmentEventActor = "attendant" | "lead" | "hubia" | "automation";
|
|
514
|
+
export interface ICsqAppointmentEvent {
|
|
515
|
+
kind: CsqAppointmentEventKind;
|
|
516
|
+
/** YYYY-MM-DD absoluto, TZ do tenant. */
|
|
517
|
+
date?: string;
|
|
518
|
+
/** HH:mm absoluto, TZ do tenant. */
|
|
519
|
+
time?: string;
|
|
520
|
+
professional?: string;
|
|
521
|
+
patient_name?: string;
|
|
522
|
+
modality?: string;
|
|
523
|
+
actor: CsqAppointmentEventActor;
|
|
524
|
+
/** `message_id`/`ticket_id` do recorte; `ts` sempre do transcript. */
|
|
525
|
+
evidence: ICsqEvidence[];
|
|
526
|
+
/** `YYYY-MM-DD|HH:mm` (hora pode faltar: `YYYY-MM-DD|`) do agendamento que
|
|
527
|
+
* este evento cancela ou remarca. */
|
|
528
|
+
supersedes?: string;
|
|
529
|
+
}
|
|
530
|
+
/** `off`: nao roda; `shadow`: roda e registra em `report.detector`, sem mexer
|
|
531
|
+
* nos claims; `on`: os claims do detector entram na verificacao. */
|
|
532
|
+
export type CsqDetectorMode = "off" | "shadow" | "on";
|
|
533
|
+
/** Como terminou a extracao por LLM do detector. */
|
|
534
|
+
export type CsqDetectorOutcome = "no_signal" | "ok" | "failed" | "skipped";
|
|
535
|
+
/** Uso do LLM do extrator (so quando houve chamada). */
|
|
536
|
+
export interface ICsqDetectorLlm {
|
|
537
|
+
provider: string;
|
|
538
|
+
model: string;
|
|
539
|
+
/** Doc em `llm-connections`; `null` quando sintetica. */
|
|
540
|
+
connection_id: string | null;
|
|
541
|
+
/** `extractor` = `extractor_connection_id`; `judge` = conexao do juiz. */
|
|
542
|
+
connection_source: "extractor" | "judge";
|
|
543
|
+
input_tokens: number;
|
|
544
|
+
/** Parte da entrada servida do cache do provedor (OpenAI: prefixo do system). */
|
|
545
|
+
cache_read_tokens?: number;
|
|
546
|
+
output_tokens: number;
|
|
547
|
+
rounds: number;
|
|
548
|
+
cost_usd_est: number | null;
|
|
549
|
+
duration_ms: number;
|
|
550
|
+
}
|
|
551
|
+
/** Divergencia detector x juiz do laudo (registrada, nao escalada — F4). */
|
|
552
|
+
export interface ICsqDetectorReport {
|
|
553
|
+
mode: CsqDetectorMode;
|
|
554
|
+
outcome: CsqDetectorOutcome;
|
|
555
|
+
/** Mensagens com sinal deterministico (data/hora, confirmacao, desfecho). */
|
|
556
|
+
signals: number;
|
|
557
|
+
/** Mensagens no recorte enviado ao extrator (sinais + vizinhanca). */
|
|
558
|
+
excerpt_messages: number;
|
|
559
|
+
events: number;
|
|
560
|
+
claims_detector: number;
|
|
561
|
+
claims_judge: number;
|
|
562
|
+
only_detector: number;
|
|
563
|
+
only_judge: number;
|
|
564
|
+
superseded_by_detector: number;
|
|
565
|
+
/** Claims do detector no MESMO dia de um claim do juiz, com outra hora: nao
|
|
566
|
+
* entram na verificacao (o juiz manda), so contam. */
|
|
567
|
+
time_mismatch?: number;
|
|
568
|
+
/** Eventos extraidos (com evidencia ja validada). */
|
|
569
|
+
event_list?: ICsqAppointmentEvent[];
|
|
570
|
+
llm?: ICsqDetectorLlm | null;
|
|
571
|
+
error?: string;
|
|
572
|
+
}
|
|
499
573
|
/** Tamanho de um bloco do prompt do juiz. `tokens_est` e estimativa
|
|
500
574
|
* deterministica (chars / 3,6), nao contagem do tokenizer. */
|
|
501
575
|
export interface ICsqPromptBlockUsage {
|
|
@@ -818,4 +892,7 @@ export interface ICsqLeadReport extends IFireDoc {
|
|
|
818
892
|
/** feat-206: presente quando o ULTIMO ticket nao passou pelo juiz. A avaliacao
|
|
819
893
|
* (score, pilares, criterios), `model` e `llm_usage` sao do ultimo juiz. */
|
|
820
894
|
judge_skipped_reasons?: CsqTriageReason[];
|
|
895
|
+
/** feat-206 F3: detector de agenda (contagens e divergencia com o juiz).
|
|
896
|
+
* Ausente quando o detector esta `off` ou o laudo e anterior a F3. */
|
|
897
|
+
detector?: ICsqDetectorReport;
|
|
821
898
|
}
|