evo360-types 1.3.711 → 1.3.715
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-core/nexus-claims.d.ts +12 -0
- package/dist/apps/evo-core/nexus-claims.js +42 -0
- package/dist/apps/evo-core/nexus-claims.ts +41 -0
- package/dist/apps/evo-core/zod-schemas.d.ts +30 -0
- package/dist/apps/evo-core/zod-schemas.js +2 -0
- package/dist/apps/evo-core/zod-schemas.ts +2 -0
- package/dist/apps/evo-csq/zod-schemas.d.ts +705 -0
- package/dist/apps/evo-csq/zod-schemas.js +73 -2
- package/dist/apps/evo-csq/zod-schemas.ts +87 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.ts +1 -0
- package/dist/types/evo-campaigns/index.d.ts +41 -0
- package/dist/types/evo-campaigns/index.ts +43 -0
- package/dist/types/evo-core/index.d.ts +3 -0
- package/dist/types/evo-core/index.ts +3 -0
- package/dist/types/evo-csq/index.d.ts +69 -0
- package/dist/types/evo-csq/index.js +5 -1
- package/dist/types/evo-csq/index.ts +76 -0
- package/package.json +1 -1
|
@@ -14,6 +14,8 @@ export declare const zCsqRunStatusSchema: z.ZodEnum<["running", "done", "failed"
|
|
|
14
14
|
export declare const zCsqPhaseSchema: z.ZodEnum<["f0", "f1"]>;
|
|
15
15
|
export declare const zCsqLlmConnectionSourceSchema: z.ZodEnum<["binding", "tenant", "legacy_channel", "platform_default", "constant", "kill_switch"]>;
|
|
16
16
|
export declare const zCsqReviewVerdictSchema: z.ZodEnum<["agree", "disagree"]>;
|
|
17
|
+
/** feat-280: origem da revisao (espelho de `CSQ_REVIEW_SOURCES`). */
|
|
18
|
+
export declare const zCsqReviewSourceSchema: z.ZodEnum<["nexus", "mcp"]>;
|
|
17
19
|
export declare const zCsqAuthorKindSchema: z.ZodEnum<["lead", "human", "automation", "hubia", "event", "note"]>;
|
|
18
20
|
/** Escala por criterio: 0 / 50 / 100 / N/A. */
|
|
19
21
|
export declare const zCsqCriterionScoreValueSchema: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<50>, z.ZodLiteral<100>, z.ZodLiteral<"NA">]>;
|
|
@@ -2270,11 +2272,16 @@ export declare const zCsqReviewSchema: z.ZodObject<{
|
|
|
2270
2272
|
}>, "many">>;
|
|
2271
2273
|
reviewer_login_id: z.ZodString;
|
|
2272
2274
|
reviewed_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
2275
|
+
/** feat-280: ausente = `nexus` (revisoes anteriores). */
|
|
2276
|
+
source: z.ZodOptional<z.ZodEnum<["nexus", "mcp"]>>;
|
|
2277
|
+
/** feat-280: `client_id` OAuth quando `source = 'mcp'`. */
|
|
2278
|
+
client_id: z.ZodOptional<z.ZodString>;
|
|
2273
2279
|
}, "strip", z.ZodTypeAny, {
|
|
2274
2280
|
verdict: "agree" | "disagree";
|
|
2275
2281
|
false_alert_fingerprints: string[];
|
|
2276
2282
|
reviewer_login_id: string;
|
|
2277
2283
|
reviewed_at: Date;
|
|
2284
|
+
source?: "nexus" | "mcp" | undefined;
|
|
2278
2285
|
note?: string | undefined;
|
|
2279
2286
|
missed_alerts?: {
|
|
2280
2287
|
code: "AGENDAMENTO_INFORMADO_NAO_REGISTRADO" | "AGENDAMENTO_DIVERGENTE" | "AGENDAMENTO_SOBREPOSTO" | "PACIENTE_NAO_VINCULADO" | "CONTRADICAO_PREMISSA_ANTERIOR" | "ORIENTACAO_CLINICA_INDEVIDA" | "POLITICA_VIOLADA" | "ULTIMA_MENSAGEM_SEM_RESPOSTA" | "PERGUNTA_NAO_RESPONDIDA" | "PROMESSA_NAO_CUMPRIDA" | "IDENTIDADE_ERRADA" | "DADO_JA_INFORMADO_RECOLETADO" | "DADO_OBRIGATORIO_NAO_COLETADO" | "FLUXO_VENDA_NAO_SEGUIDO" | "MOTIVO_ENCERRAMENTO_INCOMPATIVEL" | "SLA_RESPOSTA_ALTO" | "LEAD_QUENTE_SEM_FOLLOWUP" | "LEAD_ORIGEM_INCONSISTENTE" | "LEAD_QUALIFICACAO_INCONSISTENTE" | "AUTOMACAO_CONFLITANTE" | "DADO_SENSIVEL_SOLICITADO" | "URGENCIA_NAO_ENCAMINHADA" | "NF_NAO_ENVIADA" | "COBRANCA_NAO_ENVIADA";
|
|
@@ -2287,10 +2294,12 @@ export declare const zCsqReviewSchema: z.ZodObject<{
|
|
|
2287
2294
|
criterion: string;
|
|
2288
2295
|
note?: string | undefined;
|
|
2289
2296
|
}[] | undefined;
|
|
2297
|
+
client_id?: string | undefined;
|
|
2290
2298
|
}, {
|
|
2291
2299
|
verdict: "agree" | "disagree";
|
|
2292
2300
|
false_alert_fingerprints: string[];
|
|
2293
2301
|
reviewer_login_id: string;
|
|
2302
|
+
source?: "nexus" | "mcp" | undefined;
|
|
2294
2303
|
note?: string | undefined;
|
|
2295
2304
|
missed_alerts?: {
|
|
2296
2305
|
code: "AGENDAMENTO_INFORMADO_NAO_REGISTRADO" | "AGENDAMENTO_DIVERGENTE" | "AGENDAMENTO_SOBREPOSTO" | "PACIENTE_NAO_VINCULADO" | "CONTRADICAO_PREMISSA_ANTERIOR" | "ORIENTACAO_CLINICA_INDEVIDA" | "POLITICA_VIOLADA" | "ULTIMA_MENSAGEM_SEM_RESPOSTA" | "PERGUNTA_NAO_RESPONDIDA" | "PROMESSA_NAO_CUMPRIDA" | "IDENTIDADE_ERRADA" | "DADO_JA_INFORMADO_RECOLETADO" | "DADO_OBRIGATORIO_NAO_COLETADO" | "FLUXO_VENDA_NAO_SEGUIDO" | "MOTIVO_ENCERRAMENTO_INCOMPATIVEL" | "SLA_RESPOSTA_ALTO" | "LEAD_QUENTE_SEM_FOLLOWUP" | "LEAD_ORIGEM_INCONSISTENTE" | "LEAD_QUALIFICACAO_INCONSISTENTE" | "AUTOMACAO_CONFLITANTE" | "DADO_SENSIVEL_SOLICITADO" | "URGENCIA_NAO_ENCAMINHADA" | "NF_NAO_ENVIADA" | "COBRANCA_NAO_ENVIADA";
|
|
@@ -2304,6 +2313,7 @@ export declare const zCsqReviewSchema: z.ZodObject<{
|
|
|
2304
2313
|
note?: string | undefined;
|
|
2305
2314
|
}[] | undefined;
|
|
2306
2315
|
reviewed_at?: unknown;
|
|
2316
|
+
client_id?: string | undefined;
|
|
2307
2317
|
}>;
|
|
2308
2318
|
export declare const zCsqTriageModeSchema: z.ZodEnum<["skip_llm", "full_review"]>;
|
|
2309
2319
|
export declare const zCsqTriageReasonSchema: z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>;
|
|
@@ -2375,6 +2385,76 @@ export declare const zCsqAppointmentEventSchema: z.ZodObject<{
|
|
|
2375
2385
|
supersedes?: string | undefined;
|
|
2376
2386
|
}>;
|
|
2377
2387
|
export declare const zCsqDetectorModeSchema: z.ZodEnum<["off", "shadow", "on"]>;
|
|
2388
|
+
export declare const zCsqTransportKillSwitchSchema: z.ZodEnum<["vertex", "anthropic_direct"]>;
|
|
2389
|
+
/** feat-280: `/platform/evo-csq.llm` como lido (todos opcionais/nulos). */
|
|
2390
|
+
export declare const zCsqPlatformLlmConfigSchema: z.ZodObject<{
|
|
2391
|
+
default_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2392
|
+
extractor_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2393
|
+
detector_mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["off", "shadow", "on"]>>>;
|
|
2394
|
+
transport_kill_switch: z.ZodOptional<z.ZodNullable<z.ZodEnum<["vertex", "anthropic_direct"]>>>;
|
|
2395
|
+
service_account: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2396
|
+
}, "strip", z.ZodTypeAny, {
|
|
2397
|
+
service_account?: string | null | undefined;
|
|
2398
|
+
default_connection_id?: string | null | undefined;
|
|
2399
|
+
extractor_connection_id?: string | null | undefined;
|
|
2400
|
+
detector_mode?: "off" | "shadow" | "on" | null | undefined;
|
|
2401
|
+
transport_kill_switch?: "vertex" | "anthropic_direct" | null | undefined;
|
|
2402
|
+
}, {
|
|
2403
|
+
service_account?: string | null | undefined;
|
|
2404
|
+
default_connection_id?: string | null | undefined;
|
|
2405
|
+
extractor_connection_id?: string | null | undefined;
|
|
2406
|
+
detector_mode?: "off" | "shadow" | "on" | null | undefined;
|
|
2407
|
+
transport_kill_switch?: "vertex" | "anthropic_direct" | null | undefined;
|
|
2408
|
+
}>;
|
|
2409
|
+
/**
|
|
2410
|
+
* feat-280: patch da config de plataforma gravado pelo MCP do Nexus
|
|
2411
|
+
* (`chat.csq_admin`). `null` = apagar o campo (volta ao default do pacote).
|
|
2412
|
+
* `service_account` NAO entra (so leitura): `.strict()` recusa a chave.
|
|
2413
|
+
*/
|
|
2414
|
+
export declare const zCsqPlatformLlmConfigPatchFieldsSchema: z.ZodObject<{
|
|
2415
|
+
default_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2416
|
+
extractor_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2417
|
+
detector_mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["off", "shadow", "on"]>>>;
|
|
2418
|
+
transport_kill_switch: z.ZodOptional<z.ZodNullable<z.ZodEnum<["vertex", "anthropic_direct"]>>>;
|
|
2419
|
+
}, "strict", z.ZodTypeAny, {
|
|
2420
|
+
default_connection_id?: string | null | undefined;
|
|
2421
|
+
extractor_connection_id?: string | null | undefined;
|
|
2422
|
+
detector_mode?: "off" | "shadow" | "on" | null | undefined;
|
|
2423
|
+
transport_kill_switch?: "vertex" | "anthropic_direct" | null | undefined;
|
|
2424
|
+
}, {
|
|
2425
|
+
default_connection_id?: string | null | undefined;
|
|
2426
|
+
extractor_connection_id?: string | null | undefined;
|
|
2427
|
+
detector_mode?: "off" | "shadow" | "on" | null | undefined;
|
|
2428
|
+
transport_kill_switch?: "vertex" | "anthropic_direct" | null | undefined;
|
|
2429
|
+
}>;
|
|
2430
|
+
/** Patch completo: campos acima + "ao menos um campo". Para `inputSchema` de
|
|
2431
|
+
* tool MCP use `zCsqPlatformLlmConfigPatchFieldsSchema.shape`. */
|
|
2432
|
+
export declare const zCsqPlatformLlmConfigPatchSchema: z.ZodEffects<z.ZodObject<{
|
|
2433
|
+
default_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2434
|
+
extractor_connection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2435
|
+
detector_mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["off", "shadow", "on"]>>>;
|
|
2436
|
+
transport_kill_switch: z.ZodOptional<z.ZodNullable<z.ZodEnum<["vertex", "anthropic_direct"]>>>;
|
|
2437
|
+
}, "strict", z.ZodTypeAny, {
|
|
2438
|
+
default_connection_id?: string | null | undefined;
|
|
2439
|
+
extractor_connection_id?: string | null | undefined;
|
|
2440
|
+
detector_mode?: "off" | "shadow" | "on" | null | undefined;
|
|
2441
|
+
transport_kill_switch?: "vertex" | "anthropic_direct" | null | undefined;
|
|
2442
|
+
}, {
|
|
2443
|
+
default_connection_id?: string | null | undefined;
|
|
2444
|
+
extractor_connection_id?: string | null | undefined;
|
|
2445
|
+
detector_mode?: "off" | "shadow" | "on" | null | undefined;
|
|
2446
|
+
transport_kill_switch?: "vertex" | "anthropic_direct" | null | undefined;
|
|
2447
|
+
}>, {
|
|
2448
|
+
default_connection_id?: string | null | undefined;
|
|
2449
|
+
extractor_connection_id?: string | null | undefined;
|
|
2450
|
+
detector_mode?: "off" | "shadow" | "on" | null | undefined;
|
|
2451
|
+
transport_kill_switch?: "vertex" | "anthropic_direct" | null | undefined;
|
|
2452
|
+
}, {
|
|
2453
|
+
default_connection_id?: string | null | undefined;
|
|
2454
|
+
extractor_connection_id?: string | null | undefined;
|
|
2455
|
+
detector_mode?: "off" | "shadow" | "on" | null | undefined;
|
|
2456
|
+
transport_kill_switch?: "vertex" | "anthropic_direct" | null | undefined;
|
|
2457
|
+
}>;
|
|
2378
2458
|
export declare const zCsqDetectorLlmSchema: z.ZodObject<{
|
|
2379
2459
|
provider: z.ZodString;
|
|
2380
2460
|
model: z.ZodString;
|
|
@@ -7422,11 +7502,16 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
7422
7502
|
}>, "many">>;
|
|
7423
7503
|
reviewer_login_id: z.ZodString;
|
|
7424
7504
|
reviewed_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
7505
|
+
/** feat-280: ausente = `nexus` (revisoes anteriores). */
|
|
7506
|
+
source: z.ZodOptional<z.ZodEnum<["nexus", "mcp"]>>;
|
|
7507
|
+
/** feat-280: `client_id` OAuth quando `source = 'mcp'`. */
|
|
7508
|
+
client_id: z.ZodOptional<z.ZodString>;
|
|
7425
7509
|
}, "strip", z.ZodTypeAny, {
|
|
7426
7510
|
verdict: "agree" | "disagree";
|
|
7427
7511
|
false_alert_fingerprints: string[];
|
|
7428
7512
|
reviewer_login_id: string;
|
|
7429
7513
|
reviewed_at: Date;
|
|
7514
|
+
source?: "nexus" | "mcp" | undefined;
|
|
7430
7515
|
note?: string | undefined;
|
|
7431
7516
|
missed_alerts?: {
|
|
7432
7517
|
code: "AGENDAMENTO_INFORMADO_NAO_REGISTRADO" | "AGENDAMENTO_DIVERGENTE" | "AGENDAMENTO_SOBREPOSTO" | "PACIENTE_NAO_VINCULADO" | "CONTRADICAO_PREMISSA_ANTERIOR" | "ORIENTACAO_CLINICA_INDEVIDA" | "POLITICA_VIOLADA" | "ULTIMA_MENSAGEM_SEM_RESPOSTA" | "PERGUNTA_NAO_RESPONDIDA" | "PROMESSA_NAO_CUMPRIDA" | "IDENTIDADE_ERRADA" | "DADO_JA_INFORMADO_RECOLETADO" | "DADO_OBRIGATORIO_NAO_COLETADO" | "FLUXO_VENDA_NAO_SEGUIDO" | "MOTIVO_ENCERRAMENTO_INCOMPATIVEL" | "SLA_RESPOSTA_ALTO" | "LEAD_QUENTE_SEM_FOLLOWUP" | "LEAD_ORIGEM_INCONSISTENTE" | "LEAD_QUALIFICACAO_INCONSISTENTE" | "AUTOMACAO_CONFLITANTE" | "DADO_SENSIVEL_SOLICITADO" | "URGENCIA_NAO_ENCAMINHADA" | "NF_NAO_ENVIADA" | "COBRANCA_NAO_ENVIADA";
|
|
@@ -7439,10 +7524,12 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
7439
7524
|
criterion: string;
|
|
7440
7525
|
note?: string | undefined;
|
|
7441
7526
|
}[] | undefined;
|
|
7527
|
+
client_id?: string | undefined;
|
|
7442
7528
|
}, {
|
|
7443
7529
|
verdict: "agree" | "disagree";
|
|
7444
7530
|
false_alert_fingerprints: string[];
|
|
7445
7531
|
reviewer_login_id: string;
|
|
7532
|
+
source?: "nexus" | "mcp" | undefined;
|
|
7446
7533
|
note?: string | undefined;
|
|
7447
7534
|
missed_alerts?: {
|
|
7448
7535
|
code: "AGENDAMENTO_INFORMADO_NAO_REGISTRADO" | "AGENDAMENTO_DIVERGENTE" | "AGENDAMENTO_SOBREPOSTO" | "PACIENTE_NAO_VINCULADO" | "CONTRADICAO_PREMISSA_ANTERIOR" | "ORIENTACAO_CLINICA_INDEVIDA" | "POLITICA_VIOLADA" | "ULTIMA_MENSAGEM_SEM_RESPOSTA" | "PERGUNTA_NAO_RESPONDIDA" | "PROMESSA_NAO_CUMPRIDA" | "IDENTIDADE_ERRADA" | "DADO_JA_INFORMADO_RECOLETADO" | "DADO_OBRIGATORIO_NAO_COLETADO" | "FLUXO_VENDA_NAO_SEGUIDO" | "MOTIVO_ENCERRAMENTO_INCOMPATIVEL" | "SLA_RESPOSTA_ALTO" | "LEAD_QUENTE_SEM_FOLLOWUP" | "LEAD_ORIGEM_INCONSISTENTE" | "LEAD_QUALIFICACAO_INCONSISTENTE" | "AUTOMACAO_CONFLITANTE" | "DADO_SENSIVEL_SOLICITADO" | "URGENCIA_NAO_ENCAMINHADA" | "NF_NAO_ENVIADA" | "COBRANCA_NAO_ENVIADA";
|
|
@@ -7456,6 +7543,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
7456
7543
|
note?: string | undefined;
|
|
7457
7544
|
}[] | undefined;
|
|
7458
7545
|
reviewed_at?: unknown;
|
|
7546
|
+
client_id?: string | undefined;
|
|
7459
7547
|
}>>;
|
|
7460
7548
|
suppressed_alert_fingerprints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7461
7549
|
deleted_by_login_id: z.ZodOptional<z.ZodString>;
|
|
@@ -9879,11 +9967,16 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
9879
9967
|
}>, "many">>;
|
|
9880
9968
|
reviewer_login_id: z.ZodString;
|
|
9881
9969
|
reviewed_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
9970
|
+
/** feat-280: ausente = `nexus` (revisoes anteriores). */
|
|
9971
|
+
source: z.ZodOptional<z.ZodEnum<["nexus", "mcp"]>>;
|
|
9972
|
+
/** feat-280: `client_id` OAuth quando `source = 'mcp'`. */
|
|
9973
|
+
client_id: z.ZodOptional<z.ZodString>;
|
|
9882
9974
|
}, "strip", z.ZodTypeAny, {
|
|
9883
9975
|
verdict: "agree" | "disagree";
|
|
9884
9976
|
false_alert_fingerprints: string[];
|
|
9885
9977
|
reviewer_login_id: string;
|
|
9886
9978
|
reviewed_at: Date;
|
|
9979
|
+
source?: "nexus" | "mcp" | undefined;
|
|
9887
9980
|
note?: string | undefined;
|
|
9888
9981
|
missed_alerts?: {
|
|
9889
9982
|
code: "AGENDAMENTO_INFORMADO_NAO_REGISTRADO" | "AGENDAMENTO_DIVERGENTE" | "AGENDAMENTO_SOBREPOSTO" | "PACIENTE_NAO_VINCULADO" | "CONTRADICAO_PREMISSA_ANTERIOR" | "ORIENTACAO_CLINICA_INDEVIDA" | "POLITICA_VIOLADA" | "ULTIMA_MENSAGEM_SEM_RESPOSTA" | "PERGUNTA_NAO_RESPONDIDA" | "PROMESSA_NAO_CUMPRIDA" | "IDENTIDADE_ERRADA" | "DADO_JA_INFORMADO_RECOLETADO" | "DADO_OBRIGATORIO_NAO_COLETADO" | "FLUXO_VENDA_NAO_SEGUIDO" | "MOTIVO_ENCERRAMENTO_INCOMPATIVEL" | "SLA_RESPOSTA_ALTO" | "LEAD_QUENTE_SEM_FOLLOWUP" | "LEAD_ORIGEM_INCONSISTENTE" | "LEAD_QUALIFICACAO_INCONSISTENTE" | "AUTOMACAO_CONFLITANTE" | "DADO_SENSIVEL_SOLICITADO" | "URGENCIA_NAO_ENCAMINHADA" | "NF_NAO_ENVIADA" | "COBRANCA_NAO_ENVIADA";
|
|
@@ -9896,10 +9989,12 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
9896
9989
|
criterion: string;
|
|
9897
9990
|
note?: string | undefined;
|
|
9898
9991
|
}[] | undefined;
|
|
9992
|
+
client_id?: string | undefined;
|
|
9899
9993
|
}, {
|
|
9900
9994
|
verdict: "agree" | "disagree";
|
|
9901
9995
|
false_alert_fingerprints: string[];
|
|
9902
9996
|
reviewer_login_id: string;
|
|
9997
|
+
source?: "nexus" | "mcp" | undefined;
|
|
9903
9998
|
note?: string | undefined;
|
|
9904
9999
|
missed_alerts?: {
|
|
9905
10000
|
code: "AGENDAMENTO_INFORMADO_NAO_REGISTRADO" | "AGENDAMENTO_DIVERGENTE" | "AGENDAMENTO_SOBREPOSTO" | "PACIENTE_NAO_VINCULADO" | "CONTRADICAO_PREMISSA_ANTERIOR" | "ORIENTACAO_CLINICA_INDEVIDA" | "POLITICA_VIOLADA" | "ULTIMA_MENSAGEM_SEM_RESPOSTA" | "PERGUNTA_NAO_RESPONDIDA" | "PROMESSA_NAO_CUMPRIDA" | "IDENTIDADE_ERRADA" | "DADO_JA_INFORMADO_RECOLETADO" | "DADO_OBRIGATORIO_NAO_COLETADO" | "FLUXO_VENDA_NAO_SEGUIDO" | "MOTIVO_ENCERRAMENTO_INCOMPATIVEL" | "SLA_RESPOSTA_ALTO" | "LEAD_QUENTE_SEM_FOLLOWUP" | "LEAD_ORIGEM_INCONSISTENTE" | "LEAD_QUALIFICACAO_INCONSISTENTE" | "AUTOMACAO_CONFLITANTE" | "DADO_SENSIVEL_SOLICITADO" | "URGENCIA_NAO_ENCAMINHADA" | "NF_NAO_ENVIADA" | "COBRANCA_NAO_ENVIADA";
|
|
@@ -9913,6 +10008,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
9913
10008
|
note?: string | undefined;
|
|
9914
10009
|
}[] | undefined;
|
|
9915
10010
|
reviewed_at?: unknown;
|
|
10011
|
+
client_id?: string | undefined;
|
|
9916
10012
|
}>>;
|
|
9917
10013
|
suppressed_alert_fingerprints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
9918
10014
|
deleted_by_login_id: z.ZodOptional<z.ZodString>;
|
|
@@ -12336,11 +12432,16 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
12336
12432
|
}>, "many">>;
|
|
12337
12433
|
reviewer_login_id: z.ZodString;
|
|
12338
12434
|
reviewed_at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
12435
|
+
/** feat-280: ausente = `nexus` (revisoes anteriores). */
|
|
12436
|
+
source: z.ZodOptional<z.ZodEnum<["nexus", "mcp"]>>;
|
|
12437
|
+
/** feat-280: `client_id` OAuth quando `source = 'mcp'`. */
|
|
12438
|
+
client_id: z.ZodOptional<z.ZodString>;
|
|
12339
12439
|
}, "strip", z.ZodTypeAny, {
|
|
12340
12440
|
verdict: "agree" | "disagree";
|
|
12341
12441
|
false_alert_fingerprints: string[];
|
|
12342
12442
|
reviewer_login_id: string;
|
|
12343
12443
|
reviewed_at: Date;
|
|
12444
|
+
source?: "nexus" | "mcp" | undefined;
|
|
12344
12445
|
note?: string | undefined;
|
|
12345
12446
|
missed_alerts?: {
|
|
12346
12447
|
code: "AGENDAMENTO_INFORMADO_NAO_REGISTRADO" | "AGENDAMENTO_DIVERGENTE" | "AGENDAMENTO_SOBREPOSTO" | "PACIENTE_NAO_VINCULADO" | "CONTRADICAO_PREMISSA_ANTERIOR" | "ORIENTACAO_CLINICA_INDEVIDA" | "POLITICA_VIOLADA" | "ULTIMA_MENSAGEM_SEM_RESPOSTA" | "PERGUNTA_NAO_RESPONDIDA" | "PROMESSA_NAO_CUMPRIDA" | "IDENTIDADE_ERRADA" | "DADO_JA_INFORMADO_RECOLETADO" | "DADO_OBRIGATORIO_NAO_COLETADO" | "FLUXO_VENDA_NAO_SEGUIDO" | "MOTIVO_ENCERRAMENTO_INCOMPATIVEL" | "SLA_RESPOSTA_ALTO" | "LEAD_QUENTE_SEM_FOLLOWUP" | "LEAD_ORIGEM_INCONSISTENTE" | "LEAD_QUALIFICACAO_INCONSISTENTE" | "AUTOMACAO_CONFLITANTE" | "DADO_SENSIVEL_SOLICITADO" | "URGENCIA_NAO_ENCAMINHADA" | "NF_NAO_ENVIADA" | "COBRANCA_NAO_ENVIADA";
|
|
@@ -12353,10 +12454,12 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
12353
12454
|
criterion: string;
|
|
12354
12455
|
note?: string | undefined;
|
|
12355
12456
|
}[] | undefined;
|
|
12457
|
+
client_id?: string | undefined;
|
|
12356
12458
|
}, {
|
|
12357
12459
|
verdict: "agree" | "disagree";
|
|
12358
12460
|
false_alert_fingerprints: string[];
|
|
12359
12461
|
reviewer_login_id: string;
|
|
12462
|
+
source?: "nexus" | "mcp" | undefined;
|
|
12360
12463
|
note?: string | undefined;
|
|
12361
12464
|
missed_alerts?: {
|
|
12362
12465
|
code: "AGENDAMENTO_INFORMADO_NAO_REGISTRADO" | "AGENDAMENTO_DIVERGENTE" | "AGENDAMENTO_SOBREPOSTO" | "PACIENTE_NAO_VINCULADO" | "CONTRADICAO_PREMISSA_ANTERIOR" | "ORIENTACAO_CLINICA_INDEVIDA" | "POLITICA_VIOLADA" | "ULTIMA_MENSAGEM_SEM_RESPOSTA" | "PERGUNTA_NAO_RESPONDIDA" | "PROMESSA_NAO_CUMPRIDA" | "IDENTIDADE_ERRADA" | "DADO_JA_INFORMADO_RECOLETADO" | "DADO_OBRIGATORIO_NAO_COLETADO" | "FLUXO_VENDA_NAO_SEGUIDO" | "MOTIVO_ENCERRAMENTO_INCOMPATIVEL" | "SLA_RESPOSTA_ALTO" | "LEAD_QUENTE_SEM_FOLLOWUP" | "LEAD_ORIGEM_INCONSISTENTE" | "LEAD_QUALIFICACAO_INCONSISTENTE" | "AUTOMACAO_CONFLITANTE" | "DADO_SENSIVEL_SOLICITADO" | "URGENCIA_NAO_ENCAMINHADA" | "NF_NAO_ENVIADA" | "COBRANCA_NAO_ENVIADA";
|
|
@@ -12370,6 +12473,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
12370
12473
|
note?: string | undefined;
|
|
12371
12474
|
}[] | undefined;
|
|
12372
12475
|
reviewed_at?: unknown;
|
|
12476
|
+
client_id?: string | undefined;
|
|
12373
12477
|
}>>;
|
|
12374
12478
|
suppressed_alert_fingerprints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12375
12479
|
deleted_by_login_id: z.ZodOptional<z.ZodString>;
|
|
@@ -12657,3 +12761,604 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
|
|
|
12657
12761
|
}[] | undefined;
|
|
12658
12762
|
}>>;
|
|
12659
12763
|
}, z.ZodTypeAny, "passthrough">>;
|
|
12764
|
+
export declare const zCsqDryRunRequestSchema: z.ZodObject<{
|
|
12765
|
+
tenant: z.ZodEffects<z.ZodString, string, string>;
|
|
12766
|
+
ticket_id: z.ZodEffects<z.ZodString, string, string>;
|
|
12767
|
+
channel_id: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
12768
|
+
lead_id: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
12769
|
+
connection_id: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
12770
|
+
force_review: z.ZodOptional<z.ZodBoolean>;
|
|
12771
|
+
requested_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
12772
|
+
login_id: z.ZodString;
|
|
12773
|
+
client_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12774
|
+
}, "strip", z.ZodTypeAny, {
|
|
12775
|
+
login_id: string;
|
|
12776
|
+
client_id?: string | null | undefined;
|
|
12777
|
+
}, {
|
|
12778
|
+
login_id: string;
|
|
12779
|
+
client_id?: string | null | undefined;
|
|
12780
|
+
}>>>;
|
|
12781
|
+
}, "strict", z.ZodTypeAny, {
|
|
12782
|
+
tenant: string;
|
|
12783
|
+
ticket_id: string;
|
|
12784
|
+
lead_id?: string | null | undefined;
|
|
12785
|
+
channel_id?: string | null | undefined;
|
|
12786
|
+
requested_by?: {
|
|
12787
|
+
login_id: string;
|
|
12788
|
+
client_id?: string | null | undefined;
|
|
12789
|
+
} | null | undefined;
|
|
12790
|
+
connection_id?: string | null | undefined;
|
|
12791
|
+
force_review?: boolean | undefined;
|
|
12792
|
+
}, {
|
|
12793
|
+
tenant: string;
|
|
12794
|
+
ticket_id: string;
|
|
12795
|
+
lead_id?: string | null | undefined;
|
|
12796
|
+
channel_id?: string | null | undefined;
|
|
12797
|
+
requested_by?: {
|
|
12798
|
+
login_id: string;
|
|
12799
|
+
client_id?: string | null | undefined;
|
|
12800
|
+
} | null | undefined;
|
|
12801
|
+
connection_id?: string | null | undefined;
|
|
12802
|
+
force_review?: boolean | undefined;
|
|
12803
|
+
}>;
|
|
12804
|
+
export declare const zCsqDryRunResultSchema: z.ZodObject<{
|
|
12805
|
+
outcome: z.ZodString;
|
|
12806
|
+
detail: z.ZodNullable<z.ZodString>;
|
|
12807
|
+
evaluation_id: z.ZodNullable<z.ZodString>;
|
|
12808
|
+
lead_id: z.ZodNullable<z.ZodString>;
|
|
12809
|
+
channel_id: z.ZodString;
|
|
12810
|
+
report: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
12811
|
+
detector: z.ZodNullable<z.ZodObject<{
|
|
12812
|
+
mode: z.ZodEnum<["off", "shadow", "on"]>;
|
|
12813
|
+
outcome: z.ZodEnum<["no_signal", "ok", "failed", "skipped"]>;
|
|
12814
|
+
signals: z.ZodNumber;
|
|
12815
|
+
excerpt_messages: z.ZodNumber;
|
|
12816
|
+
events: z.ZodNumber;
|
|
12817
|
+
claims_detector: z.ZodNumber;
|
|
12818
|
+
claims_judge: z.ZodNumber;
|
|
12819
|
+
only_detector: z.ZodNumber;
|
|
12820
|
+
only_judge: z.ZodNumber;
|
|
12821
|
+
superseded_by_detector: z.ZodNumber;
|
|
12822
|
+
time_mismatch: z.ZodOptional<z.ZodNumber>;
|
|
12823
|
+
event_list: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12824
|
+
kind: z.ZodEnum<["slot_offered", "slot_accepted", "appointment_confirmed", "reschedule_requested", "appointment_cancelled"]>;
|
|
12825
|
+
date: z.ZodOptional<z.ZodString>;
|
|
12826
|
+
time: z.ZodOptional<z.ZodString>;
|
|
12827
|
+
professional: z.ZodOptional<z.ZodString>;
|
|
12828
|
+
patient_name: z.ZodOptional<z.ZodString>;
|
|
12829
|
+
modality: z.ZodOptional<z.ZodString>;
|
|
12830
|
+
actor: z.ZodEnum<["attendant", "lead", "hubia", "automation"]>;
|
|
12831
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
12832
|
+
message_id: z.ZodString;
|
|
12833
|
+
ticket_id: z.ZodString;
|
|
12834
|
+
ts: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
12835
|
+
excerpt: z.ZodString;
|
|
12836
|
+
}, "strip", z.ZodTypeAny, {
|
|
12837
|
+
message_id: string;
|
|
12838
|
+
ticket_id: string;
|
|
12839
|
+
ts: Date;
|
|
12840
|
+
excerpt: string;
|
|
12841
|
+
}, {
|
|
12842
|
+
message_id: string;
|
|
12843
|
+
ticket_id: string;
|
|
12844
|
+
excerpt: string;
|
|
12845
|
+
ts?: unknown;
|
|
12846
|
+
}>, "many">;
|
|
12847
|
+
supersedes: z.ZodOptional<z.ZodString>;
|
|
12848
|
+
}, "strip", z.ZodTypeAny, {
|
|
12849
|
+
kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
|
|
12850
|
+
actor: "automation" | "lead" | "hubia" | "attendant";
|
|
12851
|
+
evidence: {
|
|
12852
|
+
message_id: string;
|
|
12853
|
+
ticket_id: string;
|
|
12854
|
+
ts: Date;
|
|
12855
|
+
excerpt: string;
|
|
12856
|
+
}[];
|
|
12857
|
+
date?: string | undefined;
|
|
12858
|
+
time?: string | undefined;
|
|
12859
|
+
professional?: string | undefined;
|
|
12860
|
+
patient_name?: string | undefined;
|
|
12861
|
+
modality?: string | undefined;
|
|
12862
|
+
supersedes?: string | undefined;
|
|
12863
|
+
}, {
|
|
12864
|
+
kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
|
|
12865
|
+
actor: "automation" | "lead" | "hubia" | "attendant";
|
|
12866
|
+
evidence: {
|
|
12867
|
+
message_id: string;
|
|
12868
|
+
ticket_id: string;
|
|
12869
|
+
excerpt: string;
|
|
12870
|
+
ts?: unknown;
|
|
12871
|
+
}[];
|
|
12872
|
+
date?: string | undefined;
|
|
12873
|
+
time?: string | undefined;
|
|
12874
|
+
professional?: string | undefined;
|
|
12875
|
+
patient_name?: string | undefined;
|
|
12876
|
+
modality?: string | undefined;
|
|
12877
|
+
supersedes?: string | undefined;
|
|
12878
|
+
}>, "many">>;
|
|
12879
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
12880
|
+
provider: z.ZodString;
|
|
12881
|
+
model: z.ZodString;
|
|
12882
|
+
connection_id: z.ZodNullable<z.ZodString>;
|
|
12883
|
+
connection_source: z.ZodEnum<["extractor", "judge"]>;
|
|
12884
|
+
input_tokens: z.ZodNumber;
|
|
12885
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
12886
|
+
output_tokens: z.ZodNumber;
|
|
12887
|
+
rounds: z.ZodNumber;
|
|
12888
|
+
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
12889
|
+
duration_ms: z.ZodNumber;
|
|
12890
|
+
}, "strip", z.ZodTypeAny, {
|
|
12891
|
+
duration_ms: number;
|
|
12892
|
+
provider: string;
|
|
12893
|
+
model: string;
|
|
12894
|
+
cost_usd_est: number | null;
|
|
12895
|
+
connection_id: string | null;
|
|
12896
|
+
connection_source: "judge" | "extractor";
|
|
12897
|
+
input_tokens: number;
|
|
12898
|
+
output_tokens: number;
|
|
12899
|
+
rounds: number;
|
|
12900
|
+
cache_read_tokens?: number | undefined;
|
|
12901
|
+
}, {
|
|
12902
|
+
duration_ms: number;
|
|
12903
|
+
provider: string;
|
|
12904
|
+
model: string;
|
|
12905
|
+
cost_usd_est: number | null;
|
|
12906
|
+
connection_id: string | null;
|
|
12907
|
+
connection_source: "judge" | "extractor";
|
|
12908
|
+
input_tokens: number;
|
|
12909
|
+
output_tokens: number;
|
|
12910
|
+
rounds: number;
|
|
12911
|
+
cache_read_tokens?: number | undefined;
|
|
12912
|
+
}>>>;
|
|
12913
|
+
error: z.ZodOptional<z.ZodString>;
|
|
12914
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
12915
|
+
mode: z.ZodEnum<["off", "shadow", "on"]>;
|
|
12916
|
+
outcome: z.ZodEnum<["no_signal", "ok", "failed", "skipped"]>;
|
|
12917
|
+
signals: z.ZodNumber;
|
|
12918
|
+
excerpt_messages: z.ZodNumber;
|
|
12919
|
+
events: z.ZodNumber;
|
|
12920
|
+
claims_detector: z.ZodNumber;
|
|
12921
|
+
claims_judge: z.ZodNumber;
|
|
12922
|
+
only_detector: z.ZodNumber;
|
|
12923
|
+
only_judge: z.ZodNumber;
|
|
12924
|
+
superseded_by_detector: z.ZodNumber;
|
|
12925
|
+
time_mismatch: z.ZodOptional<z.ZodNumber>;
|
|
12926
|
+
event_list: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12927
|
+
kind: z.ZodEnum<["slot_offered", "slot_accepted", "appointment_confirmed", "reschedule_requested", "appointment_cancelled"]>;
|
|
12928
|
+
date: z.ZodOptional<z.ZodString>;
|
|
12929
|
+
time: z.ZodOptional<z.ZodString>;
|
|
12930
|
+
professional: z.ZodOptional<z.ZodString>;
|
|
12931
|
+
patient_name: z.ZodOptional<z.ZodString>;
|
|
12932
|
+
modality: z.ZodOptional<z.ZodString>;
|
|
12933
|
+
actor: z.ZodEnum<["attendant", "lead", "hubia", "automation"]>;
|
|
12934
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
12935
|
+
message_id: z.ZodString;
|
|
12936
|
+
ticket_id: z.ZodString;
|
|
12937
|
+
ts: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
12938
|
+
excerpt: z.ZodString;
|
|
12939
|
+
}, "strip", z.ZodTypeAny, {
|
|
12940
|
+
message_id: string;
|
|
12941
|
+
ticket_id: string;
|
|
12942
|
+
ts: Date;
|
|
12943
|
+
excerpt: string;
|
|
12944
|
+
}, {
|
|
12945
|
+
message_id: string;
|
|
12946
|
+
ticket_id: string;
|
|
12947
|
+
excerpt: string;
|
|
12948
|
+
ts?: unknown;
|
|
12949
|
+
}>, "many">;
|
|
12950
|
+
supersedes: z.ZodOptional<z.ZodString>;
|
|
12951
|
+
}, "strip", z.ZodTypeAny, {
|
|
12952
|
+
kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
|
|
12953
|
+
actor: "automation" | "lead" | "hubia" | "attendant";
|
|
12954
|
+
evidence: {
|
|
12955
|
+
message_id: string;
|
|
12956
|
+
ticket_id: string;
|
|
12957
|
+
ts: Date;
|
|
12958
|
+
excerpt: string;
|
|
12959
|
+
}[];
|
|
12960
|
+
date?: string | undefined;
|
|
12961
|
+
time?: string | undefined;
|
|
12962
|
+
professional?: string | undefined;
|
|
12963
|
+
patient_name?: string | undefined;
|
|
12964
|
+
modality?: string | undefined;
|
|
12965
|
+
supersedes?: string | undefined;
|
|
12966
|
+
}, {
|
|
12967
|
+
kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
|
|
12968
|
+
actor: "automation" | "lead" | "hubia" | "attendant";
|
|
12969
|
+
evidence: {
|
|
12970
|
+
message_id: string;
|
|
12971
|
+
ticket_id: string;
|
|
12972
|
+
excerpt: string;
|
|
12973
|
+
ts?: unknown;
|
|
12974
|
+
}[];
|
|
12975
|
+
date?: string | undefined;
|
|
12976
|
+
time?: string | undefined;
|
|
12977
|
+
professional?: string | undefined;
|
|
12978
|
+
patient_name?: string | undefined;
|
|
12979
|
+
modality?: string | undefined;
|
|
12980
|
+
supersedes?: string | undefined;
|
|
12981
|
+
}>, "many">>;
|
|
12982
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
12983
|
+
provider: z.ZodString;
|
|
12984
|
+
model: z.ZodString;
|
|
12985
|
+
connection_id: z.ZodNullable<z.ZodString>;
|
|
12986
|
+
connection_source: z.ZodEnum<["extractor", "judge"]>;
|
|
12987
|
+
input_tokens: z.ZodNumber;
|
|
12988
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
12989
|
+
output_tokens: z.ZodNumber;
|
|
12990
|
+
rounds: z.ZodNumber;
|
|
12991
|
+
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
12992
|
+
duration_ms: z.ZodNumber;
|
|
12993
|
+
}, "strip", z.ZodTypeAny, {
|
|
12994
|
+
duration_ms: number;
|
|
12995
|
+
provider: string;
|
|
12996
|
+
model: string;
|
|
12997
|
+
cost_usd_est: number | null;
|
|
12998
|
+
connection_id: string | null;
|
|
12999
|
+
connection_source: "judge" | "extractor";
|
|
13000
|
+
input_tokens: number;
|
|
13001
|
+
output_tokens: number;
|
|
13002
|
+
rounds: number;
|
|
13003
|
+
cache_read_tokens?: number | undefined;
|
|
13004
|
+
}, {
|
|
13005
|
+
duration_ms: number;
|
|
13006
|
+
provider: string;
|
|
13007
|
+
model: string;
|
|
13008
|
+
cost_usd_est: number | null;
|
|
13009
|
+
connection_id: string | null;
|
|
13010
|
+
connection_source: "judge" | "extractor";
|
|
13011
|
+
input_tokens: number;
|
|
13012
|
+
output_tokens: number;
|
|
13013
|
+
rounds: number;
|
|
13014
|
+
cache_read_tokens?: number | undefined;
|
|
13015
|
+
}>>>;
|
|
13016
|
+
error: z.ZodOptional<z.ZodString>;
|
|
13017
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
13018
|
+
mode: z.ZodEnum<["off", "shadow", "on"]>;
|
|
13019
|
+
outcome: z.ZodEnum<["no_signal", "ok", "failed", "skipped"]>;
|
|
13020
|
+
signals: z.ZodNumber;
|
|
13021
|
+
excerpt_messages: z.ZodNumber;
|
|
13022
|
+
events: z.ZodNumber;
|
|
13023
|
+
claims_detector: z.ZodNumber;
|
|
13024
|
+
claims_judge: z.ZodNumber;
|
|
13025
|
+
only_detector: z.ZodNumber;
|
|
13026
|
+
only_judge: z.ZodNumber;
|
|
13027
|
+
superseded_by_detector: z.ZodNumber;
|
|
13028
|
+
time_mismatch: z.ZodOptional<z.ZodNumber>;
|
|
13029
|
+
event_list: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13030
|
+
kind: z.ZodEnum<["slot_offered", "slot_accepted", "appointment_confirmed", "reschedule_requested", "appointment_cancelled"]>;
|
|
13031
|
+
date: z.ZodOptional<z.ZodString>;
|
|
13032
|
+
time: z.ZodOptional<z.ZodString>;
|
|
13033
|
+
professional: z.ZodOptional<z.ZodString>;
|
|
13034
|
+
patient_name: z.ZodOptional<z.ZodString>;
|
|
13035
|
+
modality: z.ZodOptional<z.ZodString>;
|
|
13036
|
+
actor: z.ZodEnum<["attendant", "lead", "hubia", "automation"]>;
|
|
13037
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
13038
|
+
message_id: z.ZodString;
|
|
13039
|
+
ticket_id: z.ZodString;
|
|
13040
|
+
ts: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
13041
|
+
excerpt: z.ZodString;
|
|
13042
|
+
}, "strip", z.ZodTypeAny, {
|
|
13043
|
+
message_id: string;
|
|
13044
|
+
ticket_id: string;
|
|
13045
|
+
ts: Date;
|
|
13046
|
+
excerpt: string;
|
|
13047
|
+
}, {
|
|
13048
|
+
message_id: string;
|
|
13049
|
+
ticket_id: string;
|
|
13050
|
+
excerpt: string;
|
|
13051
|
+
ts?: unknown;
|
|
13052
|
+
}>, "many">;
|
|
13053
|
+
supersedes: z.ZodOptional<z.ZodString>;
|
|
13054
|
+
}, "strip", z.ZodTypeAny, {
|
|
13055
|
+
kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
|
|
13056
|
+
actor: "automation" | "lead" | "hubia" | "attendant";
|
|
13057
|
+
evidence: {
|
|
13058
|
+
message_id: string;
|
|
13059
|
+
ticket_id: string;
|
|
13060
|
+
ts: Date;
|
|
13061
|
+
excerpt: string;
|
|
13062
|
+
}[];
|
|
13063
|
+
date?: string | undefined;
|
|
13064
|
+
time?: string | undefined;
|
|
13065
|
+
professional?: string | undefined;
|
|
13066
|
+
patient_name?: string | undefined;
|
|
13067
|
+
modality?: string | undefined;
|
|
13068
|
+
supersedes?: string | undefined;
|
|
13069
|
+
}, {
|
|
13070
|
+
kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
|
|
13071
|
+
actor: "automation" | "lead" | "hubia" | "attendant";
|
|
13072
|
+
evidence: {
|
|
13073
|
+
message_id: string;
|
|
13074
|
+
ticket_id: string;
|
|
13075
|
+
excerpt: string;
|
|
13076
|
+
ts?: unknown;
|
|
13077
|
+
}[];
|
|
13078
|
+
date?: string | undefined;
|
|
13079
|
+
time?: string | undefined;
|
|
13080
|
+
professional?: string | undefined;
|
|
13081
|
+
patient_name?: string | undefined;
|
|
13082
|
+
modality?: string | undefined;
|
|
13083
|
+
supersedes?: string | undefined;
|
|
13084
|
+
}>, "many">>;
|
|
13085
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
13086
|
+
provider: z.ZodString;
|
|
13087
|
+
model: z.ZodString;
|
|
13088
|
+
connection_id: z.ZodNullable<z.ZodString>;
|
|
13089
|
+
connection_source: z.ZodEnum<["extractor", "judge"]>;
|
|
13090
|
+
input_tokens: z.ZodNumber;
|
|
13091
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
13092
|
+
output_tokens: z.ZodNumber;
|
|
13093
|
+
rounds: z.ZodNumber;
|
|
13094
|
+
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
13095
|
+
duration_ms: z.ZodNumber;
|
|
13096
|
+
}, "strip", z.ZodTypeAny, {
|
|
13097
|
+
duration_ms: number;
|
|
13098
|
+
provider: string;
|
|
13099
|
+
model: string;
|
|
13100
|
+
cost_usd_est: number | null;
|
|
13101
|
+
connection_id: string | null;
|
|
13102
|
+
connection_source: "judge" | "extractor";
|
|
13103
|
+
input_tokens: number;
|
|
13104
|
+
output_tokens: number;
|
|
13105
|
+
rounds: number;
|
|
13106
|
+
cache_read_tokens?: number | undefined;
|
|
13107
|
+
}, {
|
|
13108
|
+
duration_ms: number;
|
|
13109
|
+
provider: string;
|
|
13110
|
+
model: string;
|
|
13111
|
+
cost_usd_est: number | null;
|
|
13112
|
+
connection_id: string | null;
|
|
13113
|
+
connection_source: "judge" | "extractor";
|
|
13114
|
+
input_tokens: number;
|
|
13115
|
+
output_tokens: number;
|
|
13116
|
+
rounds: number;
|
|
13117
|
+
cache_read_tokens?: number | undefined;
|
|
13118
|
+
}>>>;
|
|
13119
|
+
error: z.ZodOptional<z.ZodString>;
|
|
13120
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
13121
|
+
model: z.ZodNullable<z.ZodString>;
|
|
13122
|
+
llm_provider: z.ZodNullable<z.ZodString>;
|
|
13123
|
+
llm_connection_id: z.ZodNullable<z.ZodString>;
|
|
13124
|
+
llm_connection_source: z.ZodNullable<z.ZodEnum<["binding", "tenant", "legacy_channel", "platform_default", "constant", "kill_switch"]>>;
|
|
13125
|
+
triage_mode: z.ZodNullable<z.ZodEnum<["skip_llm", "full_review"]>>;
|
|
13126
|
+
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
13127
|
+
duration_ms: z.ZodNumber;
|
|
13128
|
+
}, "strip", z.ZodTypeAny, {
|
|
13129
|
+
duration_ms: number;
|
|
13130
|
+
lead_id: string | null;
|
|
13131
|
+
outcome: string;
|
|
13132
|
+
channel_id: string;
|
|
13133
|
+
detector: z.objectOutputType<{
|
|
13134
|
+
mode: z.ZodEnum<["off", "shadow", "on"]>;
|
|
13135
|
+
outcome: z.ZodEnum<["no_signal", "ok", "failed", "skipped"]>;
|
|
13136
|
+
signals: z.ZodNumber;
|
|
13137
|
+
excerpt_messages: z.ZodNumber;
|
|
13138
|
+
events: z.ZodNumber;
|
|
13139
|
+
claims_detector: z.ZodNumber;
|
|
13140
|
+
claims_judge: z.ZodNumber;
|
|
13141
|
+
only_detector: z.ZodNumber;
|
|
13142
|
+
only_judge: z.ZodNumber;
|
|
13143
|
+
superseded_by_detector: z.ZodNumber;
|
|
13144
|
+
time_mismatch: z.ZodOptional<z.ZodNumber>;
|
|
13145
|
+
event_list: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13146
|
+
kind: z.ZodEnum<["slot_offered", "slot_accepted", "appointment_confirmed", "reschedule_requested", "appointment_cancelled"]>;
|
|
13147
|
+
date: z.ZodOptional<z.ZodString>;
|
|
13148
|
+
time: z.ZodOptional<z.ZodString>;
|
|
13149
|
+
professional: z.ZodOptional<z.ZodString>;
|
|
13150
|
+
patient_name: z.ZodOptional<z.ZodString>;
|
|
13151
|
+
modality: z.ZodOptional<z.ZodString>;
|
|
13152
|
+
actor: z.ZodEnum<["attendant", "lead", "hubia", "automation"]>;
|
|
13153
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
13154
|
+
message_id: z.ZodString;
|
|
13155
|
+
ticket_id: z.ZodString;
|
|
13156
|
+
ts: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
13157
|
+
excerpt: z.ZodString;
|
|
13158
|
+
}, "strip", z.ZodTypeAny, {
|
|
13159
|
+
message_id: string;
|
|
13160
|
+
ticket_id: string;
|
|
13161
|
+
ts: Date;
|
|
13162
|
+
excerpt: string;
|
|
13163
|
+
}, {
|
|
13164
|
+
message_id: string;
|
|
13165
|
+
ticket_id: string;
|
|
13166
|
+
excerpt: string;
|
|
13167
|
+
ts?: unknown;
|
|
13168
|
+
}>, "many">;
|
|
13169
|
+
supersedes: z.ZodOptional<z.ZodString>;
|
|
13170
|
+
}, "strip", z.ZodTypeAny, {
|
|
13171
|
+
kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
|
|
13172
|
+
actor: "automation" | "lead" | "hubia" | "attendant";
|
|
13173
|
+
evidence: {
|
|
13174
|
+
message_id: string;
|
|
13175
|
+
ticket_id: string;
|
|
13176
|
+
ts: Date;
|
|
13177
|
+
excerpt: string;
|
|
13178
|
+
}[];
|
|
13179
|
+
date?: string | undefined;
|
|
13180
|
+
time?: string | undefined;
|
|
13181
|
+
professional?: string | undefined;
|
|
13182
|
+
patient_name?: string | undefined;
|
|
13183
|
+
modality?: string | undefined;
|
|
13184
|
+
supersedes?: string | undefined;
|
|
13185
|
+
}, {
|
|
13186
|
+
kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
|
|
13187
|
+
actor: "automation" | "lead" | "hubia" | "attendant";
|
|
13188
|
+
evidence: {
|
|
13189
|
+
message_id: string;
|
|
13190
|
+
ticket_id: string;
|
|
13191
|
+
excerpt: string;
|
|
13192
|
+
ts?: unknown;
|
|
13193
|
+
}[];
|
|
13194
|
+
date?: string | undefined;
|
|
13195
|
+
time?: string | undefined;
|
|
13196
|
+
professional?: string | undefined;
|
|
13197
|
+
patient_name?: string | undefined;
|
|
13198
|
+
modality?: string | undefined;
|
|
13199
|
+
supersedes?: string | undefined;
|
|
13200
|
+
}>, "many">>;
|
|
13201
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
13202
|
+
provider: z.ZodString;
|
|
13203
|
+
model: z.ZodString;
|
|
13204
|
+
connection_id: z.ZodNullable<z.ZodString>;
|
|
13205
|
+
connection_source: z.ZodEnum<["extractor", "judge"]>;
|
|
13206
|
+
input_tokens: z.ZodNumber;
|
|
13207
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
13208
|
+
output_tokens: z.ZodNumber;
|
|
13209
|
+
rounds: z.ZodNumber;
|
|
13210
|
+
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
13211
|
+
duration_ms: z.ZodNumber;
|
|
13212
|
+
}, "strip", z.ZodTypeAny, {
|
|
13213
|
+
duration_ms: number;
|
|
13214
|
+
provider: string;
|
|
13215
|
+
model: string;
|
|
13216
|
+
cost_usd_est: number | null;
|
|
13217
|
+
connection_id: string | null;
|
|
13218
|
+
connection_source: "judge" | "extractor";
|
|
13219
|
+
input_tokens: number;
|
|
13220
|
+
output_tokens: number;
|
|
13221
|
+
rounds: number;
|
|
13222
|
+
cache_read_tokens?: number | undefined;
|
|
13223
|
+
}, {
|
|
13224
|
+
duration_ms: number;
|
|
13225
|
+
provider: string;
|
|
13226
|
+
model: string;
|
|
13227
|
+
cost_usd_est: number | null;
|
|
13228
|
+
connection_id: string | null;
|
|
13229
|
+
connection_source: "judge" | "extractor";
|
|
13230
|
+
input_tokens: number;
|
|
13231
|
+
output_tokens: number;
|
|
13232
|
+
rounds: number;
|
|
13233
|
+
cache_read_tokens?: number | undefined;
|
|
13234
|
+
}>>>;
|
|
13235
|
+
error: z.ZodOptional<z.ZodString>;
|
|
13236
|
+
}, z.ZodTypeAny, "passthrough"> | null;
|
|
13237
|
+
evaluation_id: string | null;
|
|
13238
|
+
model: string | null;
|
|
13239
|
+
cost_usd_est: number | null;
|
|
13240
|
+
llm_provider: string | null;
|
|
13241
|
+
llm_connection_id: string | null;
|
|
13242
|
+
llm_connection_source: "tenant" | "binding" | "legacy_channel" | "platform_default" | "constant" | "kill_switch" | null;
|
|
13243
|
+
report: Record<string, unknown> | null;
|
|
13244
|
+
detail: string | null;
|
|
13245
|
+
triage_mode: "skip_llm" | "full_review" | null;
|
|
13246
|
+
}, {
|
|
13247
|
+
duration_ms: number;
|
|
13248
|
+
lead_id: string | null;
|
|
13249
|
+
outcome: string;
|
|
13250
|
+
channel_id: string;
|
|
13251
|
+
detector: z.objectInputType<{
|
|
13252
|
+
mode: z.ZodEnum<["off", "shadow", "on"]>;
|
|
13253
|
+
outcome: z.ZodEnum<["no_signal", "ok", "failed", "skipped"]>;
|
|
13254
|
+
signals: z.ZodNumber;
|
|
13255
|
+
excerpt_messages: z.ZodNumber;
|
|
13256
|
+
events: z.ZodNumber;
|
|
13257
|
+
claims_detector: z.ZodNumber;
|
|
13258
|
+
claims_judge: z.ZodNumber;
|
|
13259
|
+
only_detector: z.ZodNumber;
|
|
13260
|
+
only_judge: z.ZodNumber;
|
|
13261
|
+
superseded_by_detector: z.ZodNumber;
|
|
13262
|
+
time_mismatch: z.ZodOptional<z.ZodNumber>;
|
|
13263
|
+
event_list: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13264
|
+
kind: z.ZodEnum<["slot_offered", "slot_accepted", "appointment_confirmed", "reschedule_requested", "appointment_cancelled"]>;
|
|
13265
|
+
date: z.ZodOptional<z.ZodString>;
|
|
13266
|
+
time: z.ZodOptional<z.ZodString>;
|
|
13267
|
+
professional: z.ZodOptional<z.ZodString>;
|
|
13268
|
+
patient_name: z.ZodOptional<z.ZodString>;
|
|
13269
|
+
modality: z.ZodOptional<z.ZodString>;
|
|
13270
|
+
actor: z.ZodEnum<["attendant", "lead", "hubia", "automation"]>;
|
|
13271
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
13272
|
+
message_id: z.ZodString;
|
|
13273
|
+
ticket_id: z.ZodString;
|
|
13274
|
+
ts: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
13275
|
+
excerpt: z.ZodString;
|
|
13276
|
+
}, "strip", z.ZodTypeAny, {
|
|
13277
|
+
message_id: string;
|
|
13278
|
+
ticket_id: string;
|
|
13279
|
+
ts: Date;
|
|
13280
|
+
excerpt: string;
|
|
13281
|
+
}, {
|
|
13282
|
+
message_id: string;
|
|
13283
|
+
ticket_id: string;
|
|
13284
|
+
excerpt: string;
|
|
13285
|
+
ts?: unknown;
|
|
13286
|
+
}>, "many">;
|
|
13287
|
+
supersedes: z.ZodOptional<z.ZodString>;
|
|
13288
|
+
}, "strip", z.ZodTypeAny, {
|
|
13289
|
+
kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
|
|
13290
|
+
actor: "automation" | "lead" | "hubia" | "attendant";
|
|
13291
|
+
evidence: {
|
|
13292
|
+
message_id: string;
|
|
13293
|
+
ticket_id: string;
|
|
13294
|
+
ts: Date;
|
|
13295
|
+
excerpt: string;
|
|
13296
|
+
}[];
|
|
13297
|
+
date?: string | undefined;
|
|
13298
|
+
time?: string | undefined;
|
|
13299
|
+
professional?: string | undefined;
|
|
13300
|
+
patient_name?: string | undefined;
|
|
13301
|
+
modality?: string | undefined;
|
|
13302
|
+
supersedes?: string | undefined;
|
|
13303
|
+
}, {
|
|
13304
|
+
kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
|
|
13305
|
+
actor: "automation" | "lead" | "hubia" | "attendant";
|
|
13306
|
+
evidence: {
|
|
13307
|
+
message_id: string;
|
|
13308
|
+
ticket_id: string;
|
|
13309
|
+
excerpt: string;
|
|
13310
|
+
ts?: unknown;
|
|
13311
|
+
}[];
|
|
13312
|
+
date?: string | undefined;
|
|
13313
|
+
time?: string | undefined;
|
|
13314
|
+
professional?: string | undefined;
|
|
13315
|
+
patient_name?: string | undefined;
|
|
13316
|
+
modality?: string | undefined;
|
|
13317
|
+
supersedes?: string | undefined;
|
|
13318
|
+
}>, "many">>;
|
|
13319
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
13320
|
+
provider: z.ZodString;
|
|
13321
|
+
model: z.ZodString;
|
|
13322
|
+
connection_id: z.ZodNullable<z.ZodString>;
|
|
13323
|
+
connection_source: z.ZodEnum<["extractor", "judge"]>;
|
|
13324
|
+
input_tokens: z.ZodNumber;
|
|
13325
|
+
cache_read_tokens: z.ZodOptional<z.ZodNumber>;
|
|
13326
|
+
output_tokens: z.ZodNumber;
|
|
13327
|
+
rounds: z.ZodNumber;
|
|
13328
|
+
cost_usd_est: z.ZodNullable<z.ZodNumber>;
|
|
13329
|
+
duration_ms: z.ZodNumber;
|
|
13330
|
+
}, "strip", z.ZodTypeAny, {
|
|
13331
|
+
duration_ms: number;
|
|
13332
|
+
provider: string;
|
|
13333
|
+
model: string;
|
|
13334
|
+
cost_usd_est: number | null;
|
|
13335
|
+
connection_id: string | null;
|
|
13336
|
+
connection_source: "judge" | "extractor";
|
|
13337
|
+
input_tokens: number;
|
|
13338
|
+
output_tokens: number;
|
|
13339
|
+
rounds: number;
|
|
13340
|
+
cache_read_tokens?: number | undefined;
|
|
13341
|
+
}, {
|
|
13342
|
+
duration_ms: number;
|
|
13343
|
+
provider: string;
|
|
13344
|
+
model: string;
|
|
13345
|
+
cost_usd_est: number | null;
|
|
13346
|
+
connection_id: string | null;
|
|
13347
|
+
connection_source: "judge" | "extractor";
|
|
13348
|
+
input_tokens: number;
|
|
13349
|
+
output_tokens: number;
|
|
13350
|
+
rounds: number;
|
|
13351
|
+
cache_read_tokens?: number | undefined;
|
|
13352
|
+
}>>>;
|
|
13353
|
+
error: z.ZodOptional<z.ZodString>;
|
|
13354
|
+
}, z.ZodTypeAny, "passthrough"> | null;
|
|
13355
|
+
evaluation_id: string | null;
|
|
13356
|
+
model: string | null;
|
|
13357
|
+
cost_usd_est: number | null;
|
|
13358
|
+
llm_provider: string | null;
|
|
13359
|
+
llm_connection_id: string | null;
|
|
13360
|
+
llm_connection_source: "tenant" | "binding" | "legacy_channel" | "platform_default" | "constant" | "kill_switch" | null;
|
|
13361
|
+
report: Record<string, unknown> | null;
|
|
13362
|
+
detail: string | null;
|
|
13363
|
+
triage_mode: "skip_llm" | "full_review" | null;
|
|
13364
|
+
}>;
|