evo360-types 1.3.591 → 1.3.598
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 +13 -0
- package/dist/apps/evo-csq/zod-schemas.js +13 -2
- package/dist/apps/evo-csq/zod-schemas.ts +12 -0
- package/dist/apps/evo-med/appointment/zod-schemas.d.ts +6 -6
- package/dist/apps/evo-med/appointment/zod-schemas.js +2 -11
- package/dist/apps/evo-med/appointment/zod-schemas.ts +2 -11
- package/dist/types/evo-csq/index.d.ts +18 -1
- package/dist/types/evo-csq/index.js +5 -1
- package/dist/types/evo-csq/index.ts +24 -1
- package/dist/types/evo-med/appointment/index.d.ts +2 -4
- package/dist/types/evo-med/appointment/index.ts +2 -4
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ export declare const zCsqAlertLifecycleSchema: z.ZodEnum<["open", "resolved"]>;
|
|
|
10
10
|
export declare const zCsqVerificationStateSchema: z.ZodEnum<["pending", "confirmed_ok", "confirmed", "inconclusive"]>;
|
|
11
11
|
export declare const zCsqRunStatusSchema: z.ZodEnum<["running", "done", "failed", "quarantined"]>;
|
|
12
12
|
export declare const zCsqPhaseSchema: z.ZodEnum<["f0", "f1"]>;
|
|
13
|
+
export declare const zCsqLlmConnectionSourceSchema: z.ZodEnum<["tenant", "legacy_channel", "platform_default", "constant", "kill_switch"]>;
|
|
13
14
|
export declare const zCsqReviewVerdictSchema: z.ZodEnum<["agree", "disagree"]>;
|
|
14
15
|
export declare const zCsqAuthorKindSchema: z.ZodEnum<["lead", "human", "automation", "hubia", "event", "note"]>;
|
|
15
16
|
/** Escala por criterio: 0 / 50 / 100 / N/A. */
|
|
@@ -6438,6 +6439,10 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
6438
6439
|
rounds?: number | undefined;
|
|
6439
6440
|
}>>;
|
|
6440
6441
|
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
6442
|
+
llm_provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6443
|
+
llm_location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6444
|
+
llm_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6445
|
+
llm_connection_source: z.ZodOptional<z.ZodNullable<z.ZodEnum<["tenant", "legacy_channel", "platform_default", "constant", "kill_switch"]>>>;
|
|
6441
6446
|
trail: z.ZodArray<z.ZodObject<{
|
|
6442
6447
|
ticket_id: z.ZodString;
|
|
6443
6448
|
closed_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
@@ -8455,6 +8460,10 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
8455
8460
|
rounds?: number | undefined;
|
|
8456
8461
|
}>>;
|
|
8457
8462
|
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
8463
|
+
llm_provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8464
|
+
llm_location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8465
|
+
llm_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8466
|
+
llm_connection_source: z.ZodOptional<z.ZodNullable<z.ZodEnum<["tenant", "legacy_channel", "platform_default", "constant", "kill_switch"]>>>;
|
|
8458
8467
|
trail: z.ZodArray<z.ZodObject<{
|
|
8459
8468
|
ticket_id: z.ZodString;
|
|
8460
8469
|
closed_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
@@ -10472,6 +10481,10 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
10472
10481
|
rounds?: number | undefined;
|
|
10473
10482
|
}>>;
|
|
10474
10483
|
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
10484
|
+
llm_provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10485
|
+
llm_location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10486
|
+
llm_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10487
|
+
llm_connection_source: z.ZodOptional<z.ZodNullable<z.ZodEnum<["tenant", "legacy_channel", "platform_default", "constant", "kill_switch"]>>>;
|
|
10475
10488
|
trail: z.ZodArray<z.ZodObject<{
|
|
10476
10489
|
ticket_id: z.ZodString;
|
|
10477
10490
|
closed_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
@@ -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 = void 0;
|
|
3
|
+
exports.zCsqOverlapFactSchema = exports.zCsqAppointmentFactSchema = exports.zCsqJudgeOutputSchema = exports.zCsqLlmUsageSchema = exports.zCsqTranscriptMessageSchema = exports.zCsqTicketSummarySchema = exports.zCsqTrailEntrySchema = exports.zCsqReviewSchema = 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.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 = 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
|
|
@@ -36,6 +36,13 @@ exports.zCsqRunStatusSchema = zod_1.z.enum([
|
|
|
36
36
|
"quarantined",
|
|
37
37
|
]);
|
|
38
38
|
exports.zCsqPhaseSchema = zod_1.z.enum(["f0", "f1"]);
|
|
39
|
+
exports.zCsqLlmConnectionSourceSchema = zod_1.z.enum([
|
|
40
|
+
"tenant",
|
|
41
|
+
"legacy_channel",
|
|
42
|
+
"platform_default",
|
|
43
|
+
"constant",
|
|
44
|
+
"kill_switch",
|
|
45
|
+
]);
|
|
39
46
|
exports.zCsqReviewVerdictSchema = zod_1.z.enum(["agree", "disagree"]);
|
|
40
47
|
exports.zCsqAuthorKindSchema = zod_1.z.enum([
|
|
41
48
|
"lead",
|
|
@@ -549,6 +556,10 @@ exports.zCsqLeadReportSchema = zod_schemas_1.zFireDocSchema
|
|
|
549
556
|
dictionary_snapshot_hash: zod_1.z.string().nullable(),
|
|
550
557
|
llm_usage: exports.zCsqLlmUsageSchema.nullable(),
|
|
551
558
|
cost_usd_est: zod_1.z.number().nullable(),
|
|
559
|
+
llm_provider: zod_1.z.string().nullable().optional(),
|
|
560
|
+
llm_location: zod_1.z.string().nullable().optional(),
|
|
561
|
+
llm_connection_id: zod_1.z.string().nullable().optional(),
|
|
562
|
+
llm_connection_source: exports.zCsqLlmConnectionSourceSchema.nullable().optional(),
|
|
552
563
|
trail: zod_1.z.array(exports.zCsqTrailEntrySchema),
|
|
553
564
|
judge_error: zod_1.z.string().optional(),
|
|
554
565
|
})
|
|
@@ -45,6 +45,14 @@ export const zCsqRunStatusSchema = z.enum([
|
|
|
45
45
|
|
|
46
46
|
export const zCsqPhaseSchema = z.enum(["f0", "f1"]);
|
|
47
47
|
|
|
48
|
+
export const zCsqLlmConnectionSourceSchema = z.enum([
|
|
49
|
+
"tenant",
|
|
50
|
+
"legacy_channel",
|
|
51
|
+
"platform_default",
|
|
52
|
+
"constant",
|
|
53
|
+
"kill_switch",
|
|
54
|
+
]);
|
|
55
|
+
|
|
48
56
|
export const zCsqReviewVerdictSchema = z.enum(["agree", "disagree"]);
|
|
49
57
|
|
|
50
58
|
export const zCsqAuthorKindSchema = z.enum([
|
|
@@ -630,6 +638,10 @@ export const zCsqLeadReportSchema = zFireDocSchema
|
|
|
630
638
|
|
|
631
639
|
llm_usage: zCsqLlmUsageSchema.nullable(),
|
|
632
640
|
cost_usd_est: z.number().nullable(),
|
|
641
|
+
llm_provider: z.string().nullable().optional(),
|
|
642
|
+
llm_location: z.string().nullable().optional(),
|
|
643
|
+
llm_connection_id: z.string().nullable().optional(),
|
|
644
|
+
llm_connection_source: zCsqLlmConnectionSourceSchema.nullable().optional(),
|
|
633
645
|
trail: z.array(zCsqTrailEntrySchema),
|
|
634
646
|
judge_error: z.string().optional(),
|
|
635
647
|
})
|
|
@@ -342,7 +342,7 @@ export declare const zAppointmentSchema: z.ZodObject<{
|
|
|
342
342
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
343
343
|
} & {
|
|
344
344
|
startDate: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
345
|
-
endDate: z.
|
|
345
|
+
endDate: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
346
346
|
status: z.ZodString;
|
|
347
347
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
348
348
|
notes: z.ZodOptional<z.ZodString>;
|
|
@@ -689,7 +689,7 @@ export declare const zAppointmentSchema: z.ZodObject<{
|
|
|
689
689
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
690
690
|
} & {
|
|
691
691
|
startDate: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
692
|
-
endDate: z.
|
|
692
|
+
endDate: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
693
693
|
status: z.ZodString;
|
|
694
694
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
695
695
|
notes: z.ZodOptional<z.ZodString>;
|
|
@@ -1036,7 +1036,7 @@ export declare const zAppointmentSchema: z.ZodObject<{
|
|
|
1036
1036
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1037
1037
|
} & {
|
|
1038
1038
|
startDate: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1039
|
-
endDate: z.
|
|
1039
|
+
endDate: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1040
1040
|
status: z.ZodString;
|
|
1041
1041
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
1042
1042
|
notes: z.ZodOptional<z.ZodString>;
|
|
@@ -1378,7 +1378,7 @@ export declare const zPatientAppointmentSchema: z.ZodObject<{
|
|
|
1378
1378
|
calendarId: z.ZodString;
|
|
1379
1379
|
appointmentId: z.ZodString;
|
|
1380
1380
|
startDate: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1381
|
-
duration: z.
|
|
1381
|
+
duration: z.ZodNumber;
|
|
1382
1382
|
status: z.ZodString;
|
|
1383
1383
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
1384
1384
|
appointmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["telemedicine", "in_person"]>>>;
|
|
@@ -1472,7 +1472,7 @@ export declare const zPatientAppointmentSchema: z.ZodObject<{
|
|
|
1472
1472
|
calendarId: z.ZodString;
|
|
1473
1473
|
appointmentId: z.ZodString;
|
|
1474
1474
|
startDate: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1475
|
-
duration: z.
|
|
1475
|
+
duration: z.ZodNumber;
|
|
1476
1476
|
status: z.ZodString;
|
|
1477
1477
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
1478
1478
|
appointmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["telemedicine", "in_person"]>>>;
|
|
@@ -1566,7 +1566,7 @@ export declare const zPatientAppointmentSchema: z.ZodObject<{
|
|
|
1566
1566
|
calendarId: z.ZodString;
|
|
1567
1567
|
appointmentId: z.ZodString;
|
|
1568
1568
|
startDate: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
1569
|
-
duration: z.
|
|
1569
|
+
duration: z.ZodNumber;
|
|
1570
1570
|
status: z.ZodString;
|
|
1571
1571
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
1572
1572
|
appointmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["telemedicine", "in_person"]>>>;
|
|
@@ -187,12 +187,7 @@ exports.zAppointmentSpecialtySchema = zod_1.z
|
|
|
187
187
|
exports.zAppointmentSchema = zod_schemas_1.zFireDocSchema
|
|
188
188
|
.extend({
|
|
189
189
|
startDate: zod_schemas_1.zFirestoreDateSchema,
|
|
190
|
-
|
|
191
|
-
// Desktop) grava só o início. Exigir o campo fazia o parseDoc DESCARTAR o
|
|
192
|
-
// appointment inteiro — ele sumia da agenda em vez de aparecer sem hora
|
|
193
|
-
// final. A duração passa a ser derivada na renderização, pelo vizinho
|
|
194
|
-
// seguinte (ou pelo fim do expediente, no último do dia).
|
|
195
|
-
endDate: zod_schemas_1.zFirestoreDateSchema.nullable().optional(),
|
|
190
|
+
endDate: zod_schemas_1.zFirestoreDateSchema,
|
|
196
191
|
status: zod_1.z.string(), // Status customizado do dicionário
|
|
197
192
|
statusBase: exports.zAppointmentStatusTypeSchema, // Tipo base para lógica
|
|
198
193
|
notes: zod_1.z.string().optional(),
|
|
@@ -244,11 +239,7 @@ exports.zPatientAppointmentSchema = zod_1.z
|
|
|
244
239
|
calendarId: zod_1.z.string().min(1), // ID do calendário
|
|
245
240
|
appointmentId: zod_1.z.string().min(1), // ID do agendamento
|
|
246
241
|
startDate: zod_schemas_1.zFirestoreDateSchema,
|
|
247
|
-
|
|
248
|
-
// duração a replicar. OMITIDO em vez de `0` — zero se lê como agendamento de
|
|
249
|
-
// duração nula, e preencher com o `interval` da agenda reintroduziria a
|
|
250
|
-
// fabricação que esta mudança remove.
|
|
251
|
-
duration: zod_1.z.number().nullable().optional(), // Duração em minutos
|
|
242
|
+
duration: zod_1.z.number(), // Duração em minutos
|
|
252
243
|
status: zod_1.z.string(), // Status customizado do dicionário
|
|
253
244
|
statusBase: exports.zAppointmentStatusTypeSchema, // Tipo base para lógica
|
|
254
245
|
appointmentMode: exports.zAppointmentModeSchema.nullable().optional(),
|
|
@@ -206,12 +206,7 @@ export const zAppointmentSpecialtySchema = z
|
|
|
206
206
|
export const zAppointmentSchema = zFireDocSchema
|
|
207
207
|
.extend({
|
|
208
208
|
startDate: zFirestoreDateSchema,
|
|
209
|
-
|
|
210
|
-
// Desktop) grava só o início. Exigir o campo fazia o parseDoc DESCARTAR o
|
|
211
|
-
// appointment inteiro — ele sumia da agenda em vez de aparecer sem hora
|
|
212
|
-
// final. A duração passa a ser derivada na renderização, pelo vizinho
|
|
213
|
-
// seguinte (ou pelo fim do expediente, no último do dia).
|
|
214
|
-
endDate: zFirestoreDateSchema.nullable().optional(),
|
|
209
|
+
endDate: zFirestoreDateSchema,
|
|
215
210
|
status: z.string(), // Status customizado do dicionário
|
|
216
211
|
statusBase: zAppointmentStatusTypeSchema, // Tipo base para lógica
|
|
217
212
|
notes: z.string().optional(),
|
|
@@ -269,11 +264,7 @@ export const zPatientAppointmentSchema = z
|
|
|
269
264
|
calendarId: z.string().min(1), // ID do calendário
|
|
270
265
|
appointmentId: z.string().min(1), // ID do agendamento
|
|
271
266
|
startDate: zFirestoreDateSchema,
|
|
272
|
-
|
|
273
|
-
// duração a replicar. OMITIDO em vez de `0` — zero se lê como agendamento de
|
|
274
|
-
// duração nula, e preencher com o `interval` da agenda reintroduziria a
|
|
275
|
-
// fabricação que esta mudança remove.
|
|
276
|
-
duration: z.number().nullable().optional(), // Duração em minutos
|
|
267
|
+
duration: z.number(), // Duração em minutos
|
|
277
268
|
status: z.string(), // Status customizado do dicionário
|
|
278
269
|
statusBase: zAppointmentStatusTypeSchema, // Tipo base para lógica
|
|
279
270
|
appointmentMode: zAppointmentModeSchema.nullable().optional(),
|
|
@@ -5,7 +5,11 @@ export * from "./fb_collections";
|
|
|
5
5
|
/** v1.1 (2026-09-09): `qualificacao_coerente` e `origem_registrada` no pilar
|
|
6
6
|
* `roteiro_conversao`. Laudos v1 continuam interpretaveis: pilar com 5 criterios
|
|
7
7
|
* em vez de 7 no denominador. */
|
|
8
|
-
|
|
8
|
+
/** v1.2 (2026-09-18, calibracao semana 1 da DMS): mesmos pilares/criterios; muda o TEXTO
|
|
9
|
+
* da rubrica (profissional de saude no canal, nome completo so com agendamento, agenda so pelo
|
|
10
|
+
* codigo, urgencia = encaixe, soma de familia, responsavel x paciente). Serve para separar as
|
|
11
|
+
* series antes/depois na analise. */
|
|
12
|
+
export declare const CSQ_RUBRIC_VERSION = "v1.2";
|
|
9
13
|
/** Modo do CSQ por departamento (gravado no binding da HubIA).
|
|
10
14
|
* - `off` : nao avalia (default quando ausente).
|
|
11
15
|
* - `shadow` : avalia e grava o laudo, sem notificar supervisores.
|
|
@@ -42,6 +46,12 @@ export type CsqReviewVerdict = "agree" | "disagree";
|
|
|
42
46
|
/** Fase do pipeline: `f0` = so indicadores + alertas deterministicos;
|
|
43
47
|
* `f1` = com o juiz LLM. */
|
|
44
48
|
export type CsqPhase = "f0" | "f1";
|
|
49
|
+
/** De onde veio a conexao de LLM do juiz (feat-191 §2.3), na ordem de
|
|
50
|
+
* resolucao: `tenant` (`judge_connection_id`), `legacy_channel`
|
|
51
|
+
* (`channel_config.csq_judge_model`), `platform_default`, `constant`; e
|
|
52
|
+
* `kill_switch` quando `/platform/evo-csq.llm.transport_kill_switch` forca a
|
|
53
|
+
* Anthropic direta. */
|
|
54
|
+
export type CsqLlmConnectionSource = "tenant" | "legacy_channel" | "platform_default" | "constant" | "kill_switch";
|
|
45
55
|
/** Autor de uma mensagem da transcricao entregue ao juiz. */
|
|
46
56
|
export type CsqAuthorKind = "lead" | "human" | "automation" | "hubia" | "event" | "note";
|
|
47
57
|
/** Codigos de alerta v1. Os subtipos de `POLITICA_VIOLADA` e
|
|
@@ -636,6 +646,13 @@ export interface ICsqLeadReport extends IFireDoc {
|
|
|
636
646
|
dictionary_snapshot_hash: string | null;
|
|
637
647
|
llm_usage: ICsqLlmUsage | null;
|
|
638
648
|
cost_usd_est: number | null;
|
|
649
|
+
/** Provedor do juiz (`vertex-anthropic`, `anthropic` no kill-switch). Null na F0. */
|
|
650
|
+
llm_provider?: string | null;
|
|
651
|
+
/** Regiao do provedor (`us`, `eu`); null na API direta e na F0. */
|
|
652
|
+
llm_location?: string | null;
|
|
653
|
+
/** `/platform/evo-csq/llm-connections/{id}` usada; null quando sintetica. */
|
|
654
|
+
llm_connection_id?: string | null;
|
|
655
|
+
llm_connection_source?: CsqLlmConnectionSource | null;
|
|
639
656
|
trail: ICsqTrailEntry[];
|
|
640
657
|
judge_error?: string;
|
|
641
658
|
}
|
|
@@ -30,7 +30,11 @@ __exportStar(require("./fb_collections"), exports);
|
|
|
30
30
|
/** v1.1 (2026-09-09): `qualificacao_coerente` e `origem_registrada` no pilar
|
|
31
31
|
* `roteiro_conversao`. Laudos v1 continuam interpretaveis: pilar com 5 criterios
|
|
32
32
|
* em vez de 7 no denominador. */
|
|
33
|
-
|
|
33
|
+
/** v1.2 (2026-09-18, calibracao semana 1 da DMS): mesmos pilares/criterios; muda o TEXTO
|
|
34
|
+
* da rubrica (profissional de saude no canal, nome completo so com agendamento, agenda so pelo
|
|
35
|
+
* codigo, urgencia = encaixe, soma de familia, responsavel x paciente). Serve para separar as
|
|
36
|
+
* series antes/depois na analise. */
|
|
37
|
+
exports.CSQ_RUBRIC_VERSION = "v1.2";
|
|
34
38
|
// ───────── Catalogo de alertas (report-spec §6) ─────────
|
|
35
39
|
/** Codigos de alerta v1. Os subtipos de `POLITICA_VIOLADA` e
|
|
36
40
|
* `FLUXO_VENDA_NAO_SEGUIDO` vivem em `ICsqAlert.subtype`, nao como codigos. */
|
|
@@ -18,7 +18,11 @@ export * from "./fb_collections";
|
|
|
18
18
|
/** v1.1 (2026-09-09): `qualificacao_coerente` e `origem_registrada` no pilar
|
|
19
19
|
* `roteiro_conversao`. Laudos v1 continuam interpretaveis: pilar com 5 criterios
|
|
20
20
|
* em vez de 7 no denominador. */
|
|
21
|
-
|
|
21
|
+
/** v1.2 (2026-09-18, calibracao semana 1 da DMS): mesmos pilares/criterios; muda o TEXTO
|
|
22
|
+
* da rubrica (profissional de saude no canal, nome completo so com agendamento, agenda so pelo
|
|
23
|
+
* codigo, urgencia = encaixe, soma de familia, responsavel x paciente). Serve para separar as
|
|
24
|
+
* series antes/depois na analise. */
|
|
25
|
+
export const CSQ_RUBRIC_VERSION = "v1.2";
|
|
22
26
|
|
|
23
27
|
// ───────── Enums / Literals ─────────
|
|
24
28
|
|
|
@@ -79,6 +83,18 @@ export type CsqReviewVerdict = "agree" | "disagree";
|
|
|
79
83
|
* `f1` = com o juiz LLM. */
|
|
80
84
|
export type CsqPhase = "f0" | "f1";
|
|
81
85
|
|
|
86
|
+
/** De onde veio a conexao de LLM do juiz (feat-191 §2.3), na ordem de
|
|
87
|
+
* resolucao: `tenant` (`judge_connection_id`), `legacy_channel`
|
|
88
|
+
* (`channel_config.csq_judge_model`), `platform_default`, `constant`; e
|
|
89
|
+
* `kill_switch` quando `/platform/evo-csq.llm.transport_kill_switch` forca a
|
|
90
|
+
* Anthropic direta. */
|
|
91
|
+
export type CsqLlmConnectionSource =
|
|
92
|
+
| "tenant"
|
|
93
|
+
| "legacy_channel"
|
|
94
|
+
| "platform_default"
|
|
95
|
+
| "constant"
|
|
96
|
+
| "kill_switch";
|
|
97
|
+
|
|
82
98
|
/** Autor de uma mensagem da transcricao entregue ao juiz. */
|
|
83
99
|
export type CsqAuthorKind =
|
|
84
100
|
| "lead"
|
|
@@ -904,6 +920,13 @@ export interface ICsqLeadReport extends IFireDoc {
|
|
|
904
920
|
|
|
905
921
|
llm_usage: ICsqLlmUsage | null;
|
|
906
922
|
cost_usd_est: number | null;
|
|
923
|
+
/** Provedor do juiz (`vertex-anthropic`, `anthropic` no kill-switch). Null na F0. */
|
|
924
|
+
llm_provider?: string | null;
|
|
925
|
+
/** Regiao do provedor (`us`, `eu`); null na API direta e na F0. */
|
|
926
|
+
llm_location?: string | null;
|
|
927
|
+
/** `/platform/evo-csq/llm-connections/{id}` usada; null quando sintetica. */
|
|
928
|
+
llm_connection_id?: string | null;
|
|
929
|
+
llm_connection_source?: CsqLlmConnectionSource | null;
|
|
907
930
|
trail: ICsqTrailEntry[];
|
|
908
931
|
judge_error?: string;
|
|
909
932
|
}
|
|
@@ -167,8 +167,7 @@ export interface IAppointmentSpecialty {
|
|
|
167
167
|
}
|
|
168
168
|
export interface IAppointment extends IFireDoc {
|
|
169
169
|
startDate: Date;
|
|
170
|
-
|
|
171
|
-
endDate?: Date | null;
|
|
170
|
+
endDate: Date;
|
|
172
171
|
status: string;
|
|
173
172
|
statusBase: AppointmentStatusType;
|
|
174
173
|
notes?: string;
|
|
@@ -211,8 +210,7 @@ export interface IPatientAppointment {
|
|
|
211
210
|
calendarId: string;
|
|
212
211
|
appointmentId: string;
|
|
213
212
|
startDate: Date;
|
|
214
|
-
|
|
215
|
-
duration?: number | null;
|
|
213
|
+
duration: number;
|
|
216
214
|
status: string;
|
|
217
215
|
statusBase: AppointmentStatusType;
|
|
218
216
|
appointmentMode?: AppointmentMode | null;
|
|
@@ -224,8 +224,7 @@ export interface IAppointmentSpecialty {
|
|
|
224
224
|
// Interface principal do Appointment
|
|
225
225
|
export interface IAppointment extends IFireDoc {
|
|
226
226
|
startDate: Date;
|
|
227
|
-
|
|
228
|
-
endDate?: Date | null;
|
|
227
|
+
endDate: Date;
|
|
229
228
|
status: string;
|
|
230
229
|
statusBase: AppointmentStatusType;
|
|
231
230
|
notes?: string;
|
|
@@ -273,8 +272,7 @@ export interface IPatientAppointment {
|
|
|
273
272
|
calendarId: string;
|
|
274
273
|
appointmentId: string;
|
|
275
274
|
startDate: Date;
|
|
276
|
-
|
|
277
|
-
duration?: number | null;
|
|
275
|
+
duration: number;
|
|
278
276
|
status: string;
|
|
279
277
|
statusBase: AppointmentStatusType;
|
|
280
278
|
appointmentMode?: AppointmentMode | null;
|