evo360-types 1.3.647 → 1.3.654

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.
@@ -73,6 +73,26 @@ export declare const zCsqAlertSchema: z.ZodObject<{
73
73
  resolved_note: z.ZodOptional<z.ZodString>;
74
74
  appointment_id: z.ZodOptional<z.ZodString>;
75
75
  calendar_id: z.ZodOptional<z.ZodString>;
76
+ /** feat-206 F6a: claim que gerou o alerta de agenda (rechecagem tardia). */
77
+ appointment_claim: z.ZodOptional<z.ZodObject<{
78
+ date: z.ZodString;
79
+ time: z.ZodOptional<z.ZodString>;
80
+ professional: z.ZodOptional<z.ZodString>;
81
+ patient_name: z.ZodOptional<z.ZodString>;
82
+ modality: z.ZodOptional<z.ZodString>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ date: string;
85
+ time?: string | undefined;
86
+ professional?: string | undefined;
87
+ patient_name?: string | undefined;
88
+ modality?: string | undefined;
89
+ }, {
90
+ date: string;
91
+ time?: string | undefined;
92
+ professional?: string | undefined;
93
+ patient_name?: string | undefined;
94
+ modality?: string | undefined;
95
+ }>>;
76
96
  first_seen_ticket_id: z.ZodString;
77
97
  created_at: z.ZodEffects<z.ZodDate, Date, unknown>;
78
98
  }, "strip", z.ZodTypeAny, {
@@ -100,6 +120,13 @@ export declare const zCsqAlertSchema: z.ZodObject<{
100
120
  resolved_in_ticket?: string | undefined;
101
121
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
102
122
  resolved_note?: string | undefined;
123
+ appointment_claim?: {
124
+ date: string;
125
+ time?: string | undefined;
126
+ professional?: string | undefined;
127
+ patient_name?: string | undefined;
128
+ modality?: string | undefined;
129
+ } | undefined;
103
130
  }, {
104
131
  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";
105
132
  status: "open" | "resolved";
@@ -125,6 +152,13 @@ export declare const zCsqAlertSchema: z.ZodObject<{
125
152
  resolved_in_ticket?: string | undefined;
126
153
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
127
154
  resolved_note?: string | undefined;
155
+ appointment_claim?: {
156
+ date: string;
157
+ time?: string | undefined;
158
+ professional?: string | undefined;
159
+ patient_name?: string | undefined;
160
+ modality?: string | undefined;
161
+ } | undefined;
128
162
  }>;
129
163
  export declare const zCsqIndicatorsSetSchema: z.ZodObject<{
130
164
  frt_min: z.ZodNullable<z.ZodNumber>;
@@ -1160,6 +1194,8 @@ export declare const zCsqClaimAppointmentInformedSchema: z.ZodObject<{
1160
1194
  modality: z.ZodOptional<z.ZodString>;
1161
1195
  /** Nome do PACIENTE informado na conversa (pode diferir do lead: mae/filho). */
1162
1196
  patient_name: z.ZodOptional<z.ZodString>;
1197
+ /** feat-206 F6: cancelado ou substituido depois, na mesma jornada. */
1198
+ superseded: z.ZodOptional<z.ZodBoolean>;
1163
1199
  evidence: z.ZodArray<z.ZodObject<{
1164
1200
  message_id: z.ZodString;
1165
1201
  ticket_id: z.ZodString;
@@ -1187,8 +1223,9 @@ export declare const zCsqClaimAppointmentInformedSchema: z.ZodObject<{
1187
1223
  }[];
1188
1224
  time?: string | undefined;
1189
1225
  professional?: string | undefined;
1190
- modality?: string | undefined;
1191
1226
  patient_name?: string | undefined;
1227
+ modality?: string | undefined;
1228
+ superseded?: boolean | undefined;
1192
1229
  }, {
1193
1230
  type: "appointment_informed";
1194
1231
  date: string;
@@ -1200,8 +1237,9 @@ export declare const zCsqClaimAppointmentInformedSchema: z.ZodObject<{
1200
1237
  }[];
1201
1238
  time?: string | undefined;
1202
1239
  professional?: string | undefined;
1203
- modality?: string | undefined;
1204
1240
  patient_name?: string | undefined;
1241
+ modality?: string | undefined;
1242
+ superseded?: boolean | undefined;
1205
1243
  }>;
1206
1244
  export declare const zCsqClaimPromiseSchema: z.ZodObject<{
1207
1245
  type: z.ZodLiteral<"promise">;
@@ -1536,6 +1574,8 @@ export declare const zCsqClaimSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1536
1574
  modality: z.ZodOptional<z.ZodString>;
1537
1575
  /** Nome do PACIENTE informado na conversa (pode diferir do lead: mae/filho). */
1538
1576
  patient_name: z.ZodOptional<z.ZodString>;
1577
+ /** feat-206 F6: cancelado ou substituido depois, na mesma jornada. */
1578
+ superseded: z.ZodOptional<z.ZodBoolean>;
1539
1579
  evidence: z.ZodArray<z.ZodObject<{
1540
1580
  message_id: z.ZodString;
1541
1581
  ticket_id: z.ZodString;
@@ -1563,8 +1603,9 @@ export declare const zCsqClaimSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1563
1603
  }[];
1564
1604
  time?: string | undefined;
1565
1605
  professional?: string | undefined;
1566
- modality?: string | undefined;
1567
1606
  patient_name?: string | undefined;
1607
+ modality?: string | undefined;
1608
+ superseded?: boolean | undefined;
1568
1609
  }, {
1569
1610
  type: "appointment_informed";
1570
1611
  date: string;
@@ -1576,8 +1617,9 @@ export declare const zCsqClaimSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1576
1617
  }[];
1577
1618
  time?: string | undefined;
1578
1619
  professional?: string | undefined;
1579
- modality?: string | undefined;
1580
1620
  patient_name?: string | undefined;
1621
+ modality?: string | undefined;
1622
+ superseded?: boolean | undefined;
1581
1623
  }>, z.ZodObject<{
1582
1624
  type: z.ZodLiteral<"promise">;
1583
1625
  what: z.ZodString;
@@ -1897,15 +1939,16 @@ export declare const zCsqClaimTypeSchema: z.ZodEnum<["appointment_informed", "pr
1897
1939
  /** Linha da tabela "o que foi dito x o que consta" (report-spec §2.5). */
1898
1940
  export declare const zCsqCrossCheckSchema: z.ZodObject<{
1899
1941
  claim_type: z.ZodEnum<["appointment_informed", "promise", "data_collected", "required_data", "outcome", "question_requires_answer", "first_concrete_offer", "patient_status", "price_informed"]>;
1900
- result: z.ZodEnum<["match", "mismatch", "missing", "inconclusive"]>;
1942
+ result: z.ZodEnum<["match", "mismatch", "missing", "inconclusive", "cancelled_after"]>;
1901
1943
  expected: z.ZodString;
1902
1944
  found: z.ZodNullable<z.ZodString>;
1903
1945
  alert_code: z.ZodOptional<z.ZodEnum<["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"]>>;
1904
1946
  note: z.ZodOptional<z.ZodString>;
1905
1947
  appointment_id: z.ZodOptional<z.ZodString>;
1906
1948
  calendar_id: z.ZodOptional<z.ZodString>;
1949
+ matched_by: z.ZodOptional<z.ZodEnum<["linked", "phone", "name", "name_fuzzy"]>>;
1907
1950
  }, "strip", z.ZodTypeAny, {
1908
- result: "match" | "inconclusive" | "mismatch" | "missing";
1951
+ result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
1909
1952
  expected: string;
1910
1953
  claim_type: "promise" | "appointment_informed" | "data_collected" | "required_data" | "outcome" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
1911
1954
  found: string | null;
@@ -1913,8 +1956,9 @@ export declare const zCsqCrossCheckSchema: z.ZodObject<{
1913
1956
  note?: string | undefined;
1914
1957
  appointment_id?: string | undefined;
1915
1958
  alert_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" | undefined;
1959
+ matched_by?: "name" | "phone" | "linked" | "name_fuzzy" | undefined;
1916
1960
  }, {
1917
- result: "match" | "inconclusive" | "mismatch" | "missing";
1961
+ result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
1918
1962
  expected: string;
1919
1963
  claim_type: "promise" | "appointment_informed" | "data_collected" | "required_data" | "outcome" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
1920
1964
  found: string | null;
@@ -1922,6 +1966,7 @@ export declare const zCsqCrossCheckSchema: z.ZodObject<{
1922
1966
  note?: string | undefined;
1923
1967
  appointment_id?: string | undefined;
1924
1968
  alert_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" | undefined;
1969
+ matched_by?: "name" | "phone" | "linked" | "name_fuzzy" | undefined;
1925
1970
  }>;
1926
1971
  export declare const zCsqCriterionScoreSchema: z.ZodObject<{
1927
1972
  pillar: z.ZodEnum<["coerencia_historico", "roteiro_conversao", "acuracidade", "responsividade", "cordialidade_linguagem"]>;
@@ -2247,16 +2292,16 @@ export declare const zCsqReviewSchema: z.ZodObject<{
2247
2292
  reviewed_at?: unknown;
2248
2293
  }>;
2249
2294
  export declare const zCsqTriageModeSchema: z.ZodEnum<["skip_llm", "full_review"]>;
2250
- export declare const zCsqTriageReasonSchema: z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>;
2295
+ 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"]>;
2251
2296
  export declare const zCsqTriageDecisionSchema: z.ZodObject<{
2252
2297
  mode: z.ZodEnum<["skip_llm", "full_review"]>;
2253
- reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">;
2298
+ reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">;
2254
2299
  }, "strip", z.ZodTypeAny, {
2255
2300
  mode: "skip_llm" | "full_review";
2256
- reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
2301
+ reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[];
2257
2302
  }, {
2258
2303
  mode: "skip_llm" | "full_review";
2259
- reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
2304
+ reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[];
2260
2305
  }>;
2261
2306
  export declare const zCsqPromptBlockUsageSchema: z.ZodObject<{
2262
2307
  name: z.ZodString;
@@ -2281,7 +2326,7 @@ export declare const zCsqTrailEntrySchema: z.ZodObject<{
2281
2326
  alerts_new: z.ZodNumber;
2282
2327
  alerts_resolved: z.ZodNumber;
2283
2328
  judge: z.ZodOptional<z.ZodEnum<["judged", "skipped"]>>;
2284
- triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
2329
+ triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">>;
2285
2330
  }, "strip", z.ZodTypeAny, {
2286
2331
  status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
2287
2332
  ticket_id: string;
@@ -2292,7 +2337,7 @@ export declare const zCsqTrailEntrySchema: z.ZodObject<{
2292
2337
  alerts_new: number;
2293
2338
  alerts_resolved: number;
2294
2339
  judge?: "skipped" | "judged" | undefined;
2295
- triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
2340
+ triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[] | undefined;
2296
2341
  }, {
2297
2342
  status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
2298
2343
  ticket_id: string;
@@ -2303,7 +2348,7 @@ export declare const zCsqTrailEntrySchema: z.ZodObject<{
2303
2348
  evaluated_at?: unknown;
2304
2349
  closed_at?: unknown;
2305
2350
  judge?: "skipped" | "judged" | undefined;
2306
- triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
2351
+ triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[] | undefined;
2307
2352
  }>;
2308
2353
  /** Resumo denormalizado gravado em `ticket.csq`. */
2309
2354
  export declare const zCsqTicketSummarySchema: z.ZodObject<{
@@ -3077,6 +3122,8 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3077
3122
  modality: z.ZodOptional<z.ZodString>;
3078
3123
  /** Nome do PACIENTE informado na conversa (pode diferir do lead: mae/filho). */
3079
3124
  patient_name: z.ZodOptional<z.ZodString>;
3125
+ /** feat-206 F6: cancelado ou substituido depois, na mesma jornada. */
3126
+ superseded: z.ZodOptional<z.ZodBoolean>;
3080
3127
  evidence: z.ZodArray<z.ZodObject<{
3081
3128
  message_id: z.ZodString;
3082
3129
  ticket_id: z.ZodString;
@@ -3104,8 +3151,9 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3104
3151
  }[];
3105
3152
  time?: string | undefined;
3106
3153
  professional?: string | undefined;
3107
- modality?: string | undefined;
3108
3154
  patient_name?: string | undefined;
3155
+ modality?: string | undefined;
3156
+ superseded?: boolean | undefined;
3109
3157
  }, {
3110
3158
  type: "appointment_informed";
3111
3159
  date: string;
@@ -3117,8 +3165,9 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3117
3165
  }[];
3118
3166
  time?: string | undefined;
3119
3167
  professional?: string | undefined;
3120
- modality?: string | undefined;
3121
3168
  patient_name?: string | undefined;
3169
+ modality?: string | undefined;
3170
+ superseded?: boolean | undefined;
3122
3171
  }>, z.ZodObject<{
3123
3172
  type: z.ZodLiteral<"promise">;
3124
3173
  what: z.ZodString;
@@ -3513,6 +3562,26 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3513
3562
  resolved_note: z.ZodOptional<z.ZodString>;
3514
3563
  appointment_id: z.ZodOptional<z.ZodString>;
3515
3564
  calendar_id: z.ZodOptional<z.ZodString>;
3565
+ /** feat-206 F6a: claim que gerou o alerta de agenda (rechecagem tardia). */
3566
+ appointment_claim: z.ZodOptional<z.ZodObject<{
3567
+ date: z.ZodString;
3568
+ time: z.ZodOptional<z.ZodString>;
3569
+ professional: z.ZodOptional<z.ZodString>;
3570
+ patient_name: z.ZodOptional<z.ZodString>;
3571
+ modality: z.ZodOptional<z.ZodString>;
3572
+ }, "strip", z.ZodTypeAny, {
3573
+ date: string;
3574
+ time?: string | undefined;
3575
+ professional?: string | undefined;
3576
+ patient_name?: string | undefined;
3577
+ modality?: string | undefined;
3578
+ }, {
3579
+ date: string;
3580
+ time?: string | undefined;
3581
+ professional?: string | undefined;
3582
+ patient_name?: string | undefined;
3583
+ modality?: string | undefined;
3584
+ }>>;
3516
3585
  first_seen_ticket_id: z.ZodString;
3517
3586
  created_at: z.ZodEffects<z.ZodDate, Date, unknown>;
3518
3587
  }, "strip", z.ZodTypeAny, {
@@ -3540,6 +3609,13 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3540
3609
  resolved_in_ticket?: string | undefined;
3541
3610
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
3542
3611
  resolved_note?: string | undefined;
3612
+ appointment_claim?: {
3613
+ date: string;
3614
+ time?: string | undefined;
3615
+ professional?: string | undefined;
3616
+ patient_name?: string | undefined;
3617
+ modality?: string | undefined;
3618
+ } | undefined;
3543
3619
  }, {
3544
3620
  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";
3545
3621
  status: "open" | "resolved";
@@ -3565,6 +3641,13 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3565
3641
  resolved_in_ticket?: string | undefined;
3566
3642
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
3567
3643
  resolved_note?: string | undefined;
3644
+ appointment_claim?: {
3645
+ date: string;
3646
+ time?: string | undefined;
3647
+ professional?: string | undefined;
3648
+ patient_name?: string | undefined;
3649
+ modality?: string | undefined;
3650
+ } | undefined;
3568
3651
  }>, "many">;
3569
3652
  /** Fingerprints de alertas anteriores resolvidos neste atendimento. */
3570
3653
  resolved_alert_ids: z.ZodArray<z.ZodString, "many">;
@@ -3718,8 +3801,9 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3718
3801
  }[];
3719
3802
  time?: string | undefined;
3720
3803
  professional?: string | undefined;
3721
- modality?: string | undefined;
3722
3804
  patient_name?: string | undefined;
3805
+ modality?: string | undefined;
3806
+ superseded?: boolean | undefined;
3723
3807
  } | {
3724
3808
  type: "promise";
3725
3809
  evidence: {
@@ -3836,6 +3920,13 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3836
3920
  resolved_in_ticket?: string | undefined;
3837
3921
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
3838
3922
  resolved_note?: string | undefined;
3923
+ appointment_claim?: {
3924
+ date: string;
3925
+ time?: string | undefined;
3926
+ professional?: string | undefined;
3927
+ patient_name?: string | undefined;
3928
+ modality?: string | undefined;
3929
+ } | undefined;
3839
3930
  }[];
3840
3931
  highlights: string[];
3841
3932
  improvements: string[];
@@ -3974,8 +4065,9 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3974
4065
  }[];
3975
4066
  time?: string | undefined;
3976
4067
  professional?: string | undefined;
3977
- modality?: string | undefined;
3978
4068
  patient_name?: string | undefined;
4069
+ modality?: string | undefined;
4070
+ superseded?: boolean | undefined;
3979
4071
  } | {
3980
4072
  type: "promise";
3981
4073
  evidence: {
@@ -4092,6 +4184,13 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
4092
4184
  resolved_in_ticket?: string | undefined;
4093
4185
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
4094
4186
  resolved_note?: string | undefined;
4187
+ appointment_claim?: {
4188
+ date: string;
4189
+ time?: string | undefined;
4190
+ professional?: string | undefined;
4191
+ patient_name?: string | undefined;
4192
+ modality?: string | undefined;
4193
+ } | undefined;
4095
4194
  }[];
4096
4195
  highlights: string[];
4097
4196
  improvements: string[];
@@ -4119,28 +4218,34 @@ export declare const zCsqAppointmentFactSchema: z.ZodObject<{
4119
4218
  professional_name: z.ZodOptional<z.ZodString>;
4120
4219
  modality: z.ZodOptional<z.ZodString>;
4121
4220
  created_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
4221
+ removed: z.ZodOptional<z.ZodEnum<["deleted", "cancelled"]>>;
4222
+ removed_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
4122
4223
  }, "strip", z.ZodTypeAny, {
4123
4224
  id: string;
4124
4225
  calendar_id: string;
4125
4226
  start_at: Date;
4126
4227
  status?: string | undefined;
4127
4228
  created_at?: Date | undefined;
4229
+ removed?: "cancelled" | "deleted" | undefined;
4128
4230
  patient_id?: string | undefined;
4129
4231
  modality?: string | undefined;
4130
4232
  end_at?: Date | undefined;
4131
4233
  status_base?: string | undefined;
4132
4234
  professional_name?: string | undefined;
4235
+ removed_at?: Date | undefined;
4133
4236
  }, {
4134
4237
  id: string;
4135
4238
  calendar_id: string;
4136
4239
  status?: string | undefined;
4137
4240
  created_at?: unknown;
4241
+ removed?: "cancelled" | "deleted" | undefined;
4138
4242
  patient_id?: string | undefined;
4139
4243
  modality?: string | undefined;
4140
4244
  start_at?: unknown;
4141
4245
  end_at?: unknown;
4142
4246
  status_base?: string | undefined;
4143
4247
  professional_name?: string | undefined;
4248
+ removed_at?: unknown;
4144
4249
  }>;
4145
4250
  export declare const zCsqOverlapAppointmentFactSchema: z.ZodObject<{
4146
4251
  id: z.ZodString;
@@ -4318,28 +4423,34 @@ export declare const zCsqSystemFactsSchema: z.ZodObject<{
4318
4423
  professional_name: z.ZodOptional<z.ZodString>;
4319
4424
  modality: z.ZodOptional<z.ZodString>;
4320
4425
  created_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
4426
+ removed: z.ZodOptional<z.ZodEnum<["deleted", "cancelled"]>>;
4427
+ removed_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
4321
4428
  }, "strip", z.ZodTypeAny, {
4322
4429
  id: string;
4323
4430
  calendar_id: string;
4324
4431
  start_at: Date;
4325
4432
  status?: string | undefined;
4326
4433
  created_at?: Date | undefined;
4434
+ removed?: "cancelled" | "deleted" | undefined;
4327
4435
  patient_id?: string | undefined;
4328
4436
  modality?: string | undefined;
4329
4437
  end_at?: Date | undefined;
4330
4438
  status_base?: string | undefined;
4331
4439
  professional_name?: string | undefined;
4440
+ removed_at?: Date | undefined;
4332
4441
  }, {
4333
4442
  id: string;
4334
4443
  calendar_id: string;
4335
4444
  status?: string | undefined;
4336
4445
  created_at?: unknown;
4446
+ removed?: "cancelled" | "deleted" | undefined;
4337
4447
  patient_id?: string | undefined;
4338
4448
  modality?: string | undefined;
4339
4449
  start_at?: unknown;
4340
4450
  end_at?: unknown;
4341
4451
  status_base?: string | undefined;
4342
4452
  professional_name?: string | undefined;
4453
+ removed_at?: unknown;
4343
4454
  }>, "many">;
4344
4455
  overlaps: z.ZodArray<z.ZodObject<{
4345
4456
  professional_name: z.ZodOptional<z.ZodString>;
@@ -4500,11 +4611,13 @@ export declare const zCsqSystemFactsSchema: z.ZodObject<{
4500
4611
  start_at: Date;
4501
4612
  status?: string | undefined;
4502
4613
  created_at?: Date | undefined;
4614
+ removed?: "cancelled" | "deleted" | undefined;
4503
4615
  patient_id?: string | undefined;
4504
4616
  modality?: string | undefined;
4505
4617
  end_at?: Date | undefined;
4506
4618
  status_base?: string | undefined;
4507
4619
  professional_name?: string | undefined;
4620
+ removed_at?: Date | undefined;
4508
4621
  }[];
4509
4622
  tags: string[];
4510
4623
  capture_data: Record<string, unknown> | null;
@@ -4560,12 +4673,14 @@ export declare const zCsqSystemFactsSchema: z.ZodObject<{
4560
4673
  calendar_id: string;
4561
4674
  status?: string | undefined;
4562
4675
  created_at?: unknown;
4676
+ removed?: "cancelled" | "deleted" | undefined;
4563
4677
  patient_id?: string | undefined;
4564
4678
  modality?: string | undefined;
4565
4679
  start_at?: unknown;
4566
4680
  end_at?: unknown;
4567
4681
  status_base?: string | undefined;
4568
4682
  professional_name?: string | undefined;
4683
+ removed_at?: unknown;
4569
4684
  }[];
4570
4685
  tags: string[];
4571
4686
  capture_data: Record<string, unknown> | null;
@@ -5284,28 +5399,34 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
5284
5399
  professional_name: z.ZodOptional<z.ZodString>;
5285
5400
  modality: z.ZodOptional<z.ZodString>;
5286
5401
  created_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
5402
+ removed: z.ZodOptional<z.ZodEnum<["deleted", "cancelled"]>>;
5403
+ removed_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
5287
5404
  }, "strip", z.ZodTypeAny, {
5288
5405
  id: string;
5289
5406
  calendar_id: string;
5290
5407
  start_at: Date;
5291
5408
  status?: string | undefined;
5292
5409
  created_at?: Date | undefined;
5410
+ removed?: "cancelled" | "deleted" | undefined;
5293
5411
  patient_id?: string | undefined;
5294
5412
  modality?: string | undefined;
5295
5413
  end_at?: Date | undefined;
5296
5414
  status_base?: string | undefined;
5297
5415
  professional_name?: string | undefined;
5416
+ removed_at?: Date | undefined;
5298
5417
  }, {
5299
5418
  id: string;
5300
5419
  calendar_id: string;
5301
5420
  status?: string | undefined;
5302
5421
  created_at?: unknown;
5422
+ removed?: "cancelled" | "deleted" | undefined;
5303
5423
  patient_id?: string | undefined;
5304
5424
  modality?: string | undefined;
5305
5425
  start_at?: unknown;
5306
5426
  end_at?: unknown;
5307
5427
  status_base?: string | undefined;
5308
5428
  professional_name?: string | undefined;
5429
+ removed_at?: unknown;
5309
5430
  }>, "many">;
5310
5431
  overlaps: z.ZodArray<z.ZodObject<{
5311
5432
  professional_name: z.ZodOptional<z.ZodString>;
@@ -5466,11 +5587,13 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
5466
5587
  start_at: Date;
5467
5588
  status?: string | undefined;
5468
5589
  created_at?: Date | undefined;
5590
+ removed?: "cancelled" | "deleted" | undefined;
5469
5591
  patient_id?: string | undefined;
5470
5592
  modality?: string | undefined;
5471
5593
  end_at?: Date | undefined;
5472
5594
  status_base?: string | undefined;
5473
5595
  professional_name?: string | undefined;
5596
+ removed_at?: Date | undefined;
5474
5597
  }[];
5475
5598
  tags: string[];
5476
5599
  capture_data: Record<string, unknown> | null;
@@ -5526,12 +5649,14 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
5526
5649
  calendar_id: string;
5527
5650
  status?: string | undefined;
5528
5651
  created_at?: unknown;
5652
+ removed?: "cancelled" | "deleted" | undefined;
5529
5653
  patient_id?: string | undefined;
5530
5654
  modality?: string | undefined;
5531
5655
  start_at?: unknown;
5532
5656
  end_at?: unknown;
5533
5657
  status_base?: string | undefined;
5534
5658
  professional_name?: string | undefined;
5659
+ removed_at?: unknown;
5535
5660
  }[];
5536
5661
  tags: string[];
5537
5662
  capture_data: Record<string, unknown> | null;
@@ -6233,6 +6358,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6233
6358
  modality: z.ZodOptional<z.ZodString>;
6234
6359
  /** Nome do PACIENTE informado na conversa (pode diferir do lead: mae/filho). */
6235
6360
  patient_name: z.ZodOptional<z.ZodString>;
6361
+ /** feat-206 F6: cancelado ou substituido depois, na mesma jornada. */
6362
+ superseded: z.ZodOptional<z.ZodBoolean>;
6236
6363
  evidence: z.ZodArray<z.ZodObject<{
6237
6364
  message_id: z.ZodString;
6238
6365
  ticket_id: z.ZodString;
@@ -6260,8 +6387,9 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6260
6387
  }[];
6261
6388
  time?: string | undefined;
6262
6389
  professional?: string | undefined;
6263
- modality?: string | undefined;
6264
6390
  patient_name?: string | undefined;
6391
+ modality?: string | undefined;
6392
+ superseded?: boolean | undefined;
6265
6393
  }, {
6266
6394
  type: "appointment_informed";
6267
6395
  date: string;
@@ -6273,8 +6401,9 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6273
6401
  }[];
6274
6402
  time?: string | undefined;
6275
6403
  professional?: string | undefined;
6276
- modality?: string | undefined;
6277
6404
  patient_name?: string | undefined;
6405
+ modality?: string | undefined;
6406
+ superseded?: boolean | undefined;
6278
6407
  }>, z.ZodObject<{
6279
6408
  type: z.ZodLiteral<"promise">;
6280
6409
  what: z.ZodString;
@@ -6592,15 +6721,16 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6592
6721
  }>]>, "many">;
6593
6722
  cross_checks: z.ZodArray<z.ZodObject<{
6594
6723
  claim_type: z.ZodEnum<["appointment_informed", "promise", "data_collected", "required_data", "outcome", "question_requires_answer", "first_concrete_offer", "patient_status", "price_informed"]>;
6595
- result: z.ZodEnum<["match", "mismatch", "missing", "inconclusive"]>;
6724
+ result: z.ZodEnum<["match", "mismatch", "missing", "inconclusive", "cancelled_after"]>;
6596
6725
  expected: z.ZodString;
6597
6726
  found: z.ZodNullable<z.ZodString>;
6598
6727
  alert_code: z.ZodOptional<z.ZodEnum<["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"]>>;
6599
6728
  note: z.ZodOptional<z.ZodString>;
6600
6729
  appointment_id: z.ZodOptional<z.ZodString>;
6601
6730
  calendar_id: z.ZodOptional<z.ZodString>;
6731
+ matched_by: z.ZodOptional<z.ZodEnum<["linked", "phone", "name", "name_fuzzy"]>>;
6602
6732
  }, "strip", z.ZodTypeAny, {
6603
- result: "match" | "inconclusive" | "mismatch" | "missing";
6733
+ result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
6604
6734
  expected: string;
6605
6735
  claim_type: "promise" | "appointment_informed" | "data_collected" | "required_data" | "outcome" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
6606
6736
  found: string | null;
@@ -6608,8 +6738,9 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6608
6738
  note?: string | undefined;
6609
6739
  appointment_id?: string | undefined;
6610
6740
  alert_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" | undefined;
6741
+ matched_by?: "name" | "phone" | "linked" | "name_fuzzy" | undefined;
6611
6742
  }, {
6612
- result: "match" | "inconclusive" | "mismatch" | "missing";
6743
+ result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
6613
6744
  expected: string;
6614
6745
  claim_type: "promise" | "appointment_informed" | "data_collected" | "required_data" | "outcome" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
6615
6746
  found: string | null;
@@ -6617,6 +6748,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6617
6748
  note?: string | undefined;
6618
6749
  appointment_id?: string | undefined;
6619
6750
  alert_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" | undefined;
6751
+ matched_by?: "name" | "phone" | "linked" | "name_fuzzy" | undefined;
6620
6752
  }>, "many">;
6621
6753
  criteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
6622
6754
  pillar: z.ZodEnum<["coerencia_historico", "roteiro_conversao", "acuracidade", "responsividade", "cordialidade_linguagem"]>;
@@ -6774,6 +6906,26 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6774
6906
  resolved_note: z.ZodOptional<z.ZodString>;
6775
6907
  appointment_id: z.ZodOptional<z.ZodString>;
6776
6908
  calendar_id: z.ZodOptional<z.ZodString>;
6909
+ /** feat-206 F6a: claim que gerou o alerta de agenda (rechecagem tardia). */
6910
+ appointment_claim: z.ZodOptional<z.ZodObject<{
6911
+ date: z.ZodString;
6912
+ time: z.ZodOptional<z.ZodString>;
6913
+ professional: z.ZodOptional<z.ZodString>;
6914
+ patient_name: z.ZodOptional<z.ZodString>;
6915
+ modality: z.ZodOptional<z.ZodString>;
6916
+ }, "strip", z.ZodTypeAny, {
6917
+ date: string;
6918
+ time?: string | undefined;
6919
+ professional?: string | undefined;
6920
+ patient_name?: string | undefined;
6921
+ modality?: string | undefined;
6922
+ }, {
6923
+ date: string;
6924
+ time?: string | undefined;
6925
+ professional?: string | undefined;
6926
+ patient_name?: string | undefined;
6927
+ modality?: string | undefined;
6928
+ }>>;
6777
6929
  first_seen_ticket_id: z.ZodString;
6778
6930
  created_at: z.ZodEffects<z.ZodDate, Date, unknown>;
6779
6931
  }, "strip", z.ZodTypeAny, {
@@ -6801,6 +6953,13 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6801
6953
  resolved_in_ticket?: string | undefined;
6802
6954
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
6803
6955
  resolved_note?: string | undefined;
6956
+ appointment_claim?: {
6957
+ date: string;
6958
+ time?: string | undefined;
6959
+ professional?: string | undefined;
6960
+ patient_name?: string | undefined;
6961
+ modality?: string | undefined;
6962
+ } | undefined;
6804
6963
  }, {
6805
6964
  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";
6806
6965
  status: "open" | "resolved";
@@ -6826,6 +6985,13 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6826
6985
  resolved_in_ticket?: string | undefined;
6827
6986
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
6828
6987
  resolved_note?: string | undefined;
6988
+ appointment_claim?: {
6989
+ date: string;
6990
+ time?: string | undefined;
6991
+ professional?: string | undefined;
6992
+ patient_name?: string | undefined;
6993
+ modality?: string | undefined;
6994
+ } | undefined;
6829
6995
  }>, "many">;
6830
6996
  counts: z.ZodObject<{
6831
6997
  alerts_open: z.ZodNumber;
@@ -7044,7 +7210,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7044
7210
  alerts_new: z.ZodNumber;
7045
7211
  alerts_resolved: z.ZodNumber;
7046
7212
  judge: z.ZodOptional<z.ZodEnum<["judged", "skipped"]>>;
7047
- triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
7213
+ triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">>;
7048
7214
  }, "strip", z.ZodTypeAny, {
7049
7215
  status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
7050
7216
  ticket_id: string;
@@ -7055,7 +7221,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7055
7221
  alerts_new: number;
7056
7222
  alerts_resolved: number;
7057
7223
  judge?: "skipped" | "judged" | undefined;
7058
- triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
7224
+ triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[] | undefined;
7059
7225
  }, {
7060
7226
  status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
7061
7227
  ticket_id: string;
@@ -7066,20 +7232,20 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7066
7232
  evaluated_at?: unknown;
7067
7233
  closed_at?: unknown;
7068
7234
  judge?: "skipped" | "judged" | undefined;
7069
- triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
7235
+ triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[] | undefined;
7070
7236
  }>, "many">;
7071
7237
  judge_error: z.ZodOptional<z.ZodString>;
7072
7238
  triage: z.ZodOptional<z.ZodObject<{
7073
7239
  mode: z.ZodEnum<["skip_llm", "full_review"]>;
7074
- reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">;
7240
+ reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">;
7075
7241
  }, "strip", z.ZodTypeAny, {
7076
7242
  mode: "skip_llm" | "full_review";
7077
- reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
7243
+ reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[];
7078
7244
  }, {
7079
7245
  mode: "skip_llm" | "full_review";
7080
- reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
7246
+ reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[];
7081
7247
  }>>;
7082
- judge_skipped_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
7248
+ judge_skipped_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">>;
7083
7249
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
7084
7250
  id: z.ZodString;
7085
7251
  ref: z.ZodAny;
@@ -7497,28 +7663,34 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7497
7663
  professional_name: z.ZodOptional<z.ZodString>;
7498
7664
  modality: z.ZodOptional<z.ZodString>;
7499
7665
  created_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
7666
+ removed: z.ZodOptional<z.ZodEnum<["deleted", "cancelled"]>>;
7667
+ removed_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
7500
7668
  }, "strip", z.ZodTypeAny, {
7501
7669
  id: string;
7502
7670
  calendar_id: string;
7503
7671
  start_at: Date;
7504
7672
  status?: string | undefined;
7505
7673
  created_at?: Date | undefined;
7674
+ removed?: "cancelled" | "deleted" | undefined;
7506
7675
  patient_id?: string | undefined;
7507
7676
  modality?: string | undefined;
7508
7677
  end_at?: Date | undefined;
7509
7678
  status_base?: string | undefined;
7510
7679
  professional_name?: string | undefined;
7680
+ removed_at?: Date | undefined;
7511
7681
  }, {
7512
7682
  id: string;
7513
7683
  calendar_id: string;
7514
7684
  status?: string | undefined;
7515
7685
  created_at?: unknown;
7686
+ removed?: "cancelled" | "deleted" | undefined;
7516
7687
  patient_id?: string | undefined;
7517
7688
  modality?: string | undefined;
7518
7689
  start_at?: unknown;
7519
7690
  end_at?: unknown;
7520
7691
  status_base?: string | undefined;
7521
7692
  professional_name?: string | undefined;
7693
+ removed_at?: unknown;
7522
7694
  }>, "many">;
7523
7695
  overlaps: z.ZodArray<z.ZodObject<{
7524
7696
  professional_name: z.ZodOptional<z.ZodString>;
@@ -7679,11 +7851,13 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7679
7851
  start_at: Date;
7680
7852
  status?: string | undefined;
7681
7853
  created_at?: Date | undefined;
7854
+ removed?: "cancelled" | "deleted" | undefined;
7682
7855
  patient_id?: string | undefined;
7683
7856
  modality?: string | undefined;
7684
7857
  end_at?: Date | undefined;
7685
7858
  status_base?: string | undefined;
7686
7859
  professional_name?: string | undefined;
7860
+ removed_at?: Date | undefined;
7687
7861
  }[];
7688
7862
  tags: string[];
7689
7863
  capture_data: Record<string, unknown> | null;
@@ -7739,12 +7913,14 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7739
7913
  calendar_id: string;
7740
7914
  status?: string | undefined;
7741
7915
  created_at?: unknown;
7916
+ removed?: "cancelled" | "deleted" | undefined;
7742
7917
  patient_id?: string | undefined;
7743
7918
  modality?: string | undefined;
7744
7919
  start_at?: unknown;
7745
7920
  end_at?: unknown;
7746
7921
  status_base?: string | undefined;
7747
7922
  professional_name?: string | undefined;
7923
+ removed_at?: unknown;
7748
7924
  }[];
7749
7925
  tags: string[];
7750
7926
  capture_data: Record<string, unknown> | null;
@@ -8446,6 +8622,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8446
8622
  modality: z.ZodOptional<z.ZodString>;
8447
8623
  /** Nome do PACIENTE informado na conversa (pode diferir do lead: mae/filho). */
8448
8624
  patient_name: z.ZodOptional<z.ZodString>;
8625
+ /** feat-206 F6: cancelado ou substituido depois, na mesma jornada. */
8626
+ superseded: z.ZodOptional<z.ZodBoolean>;
8449
8627
  evidence: z.ZodArray<z.ZodObject<{
8450
8628
  message_id: z.ZodString;
8451
8629
  ticket_id: z.ZodString;
@@ -8473,8 +8651,9 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8473
8651
  }[];
8474
8652
  time?: string | undefined;
8475
8653
  professional?: string | undefined;
8476
- modality?: string | undefined;
8477
8654
  patient_name?: string | undefined;
8655
+ modality?: string | undefined;
8656
+ superseded?: boolean | undefined;
8478
8657
  }, {
8479
8658
  type: "appointment_informed";
8480
8659
  date: string;
@@ -8486,8 +8665,9 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8486
8665
  }[];
8487
8666
  time?: string | undefined;
8488
8667
  professional?: string | undefined;
8489
- modality?: string | undefined;
8490
8668
  patient_name?: string | undefined;
8669
+ modality?: string | undefined;
8670
+ superseded?: boolean | undefined;
8491
8671
  }>, z.ZodObject<{
8492
8672
  type: z.ZodLiteral<"promise">;
8493
8673
  what: z.ZodString;
@@ -8805,15 +8985,16 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8805
8985
  }>]>, "many">;
8806
8986
  cross_checks: z.ZodArray<z.ZodObject<{
8807
8987
  claim_type: z.ZodEnum<["appointment_informed", "promise", "data_collected", "required_data", "outcome", "question_requires_answer", "first_concrete_offer", "patient_status", "price_informed"]>;
8808
- result: z.ZodEnum<["match", "mismatch", "missing", "inconclusive"]>;
8988
+ result: z.ZodEnum<["match", "mismatch", "missing", "inconclusive", "cancelled_after"]>;
8809
8989
  expected: z.ZodString;
8810
8990
  found: z.ZodNullable<z.ZodString>;
8811
8991
  alert_code: z.ZodOptional<z.ZodEnum<["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"]>>;
8812
8992
  note: z.ZodOptional<z.ZodString>;
8813
8993
  appointment_id: z.ZodOptional<z.ZodString>;
8814
8994
  calendar_id: z.ZodOptional<z.ZodString>;
8995
+ matched_by: z.ZodOptional<z.ZodEnum<["linked", "phone", "name", "name_fuzzy"]>>;
8815
8996
  }, "strip", z.ZodTypeAny, {
8816
- result: "match" | "inconclusive" | "mismatch" | "missing";
8997
+ result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
8817
8998
  expected: string;
8818
8999
  claim_type: "promise" | "appointment_informed" | "data_collected" | "required_data" | "outcome" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
8819
9000
  found: string | null;
@@ -8821,8 +9002,9 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8821
9002
  note?: string | undefined;
8822
9003
  appointment_id?: string | undefined;
8823
9004
  alert_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" | undefined;
9005
+ matched_by?: "name" | "phone" | "linked" | "name_fuzzy" | undefined;
8824
9006
  }, {
8825
- result: "match" | "inconclusive" | "mismatch" | "missing";
9007
+ result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
8826
9008
  expected: string;
8827
9009
  claim_type: "promise" | "appointment_informed" | "data_collected" | "required_data" | "outcome" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
8828
9010
  found: string | null;
@@ -8830,6 +9012,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8830
9012
  note?: string | undefined;
8831
9013
  appointment_id?: string | undefined;
8832
9014
  alert_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" | undefined;
9015
+ matched_by?: "name" | "phone" | "linked" | "name_fuzzy" | undefined;
8833
9016
  }>, "many">;
8834
9017
  criteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
8835
9018
  pillar: z.ZodEnum<["coerencia_historico", "roteiro_conversao", "acuracidade", "responsividade", "cordialidade_linguagem"]>;
@@ -8987,6 +9170,26 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8987
9170
  resolved_note: z.ZodOptional<z.ZodString>;
8988
9171
  appointment_id: z.ZodOptional<z.ZodString>;
8989
9172
  calendar_id: z.ZodOptional<z.ZodString>;
9173
+ /** feat-206 F6a: claim que gerou o alerta de agenda (rechecagem tardia). */
9174
+ appointment_claim: z.ZodOptional<z.ZodObject<{
9175
+ date: z.ZodString;
9176
+ time: z.ZodOptional<z.ZodString>;
9177
+ professional: z.ZodOptional<z.ZodString>;
9178
+ patient_name: z.ZodOptional<z.ZodString>;
9179
+ modality: z.ZodOptional<z.ZodString>;
9180
+ }, "strip", z.ZodTypeAny, {
9181
+ date: string;
9182
+ time?: string | undefined;
9183
+ professional?: string | undefined;
9184
+ patient_name?: string | undefined;
9185
+ modality?: string | undefined;
9186
+ }, {
9187
+ date: string;
9188
+ time?: string | undefined;
9189
+ professional?: string | undefined;
9190
+ patient_name?: string | undefined;
9191
+ modality?: string | undefined;
9192
+ }>>;
8990
9193
  first_seen_ticket_id: z.ZodString;
8991
9194
  created_at: z.ZodEffects<z.ZodDate, Date, unknown>;
8992
9195
  }, "strip", z.ZodTypeAny, {
@@ -9014,6 +9217,13 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9014
9217
  resolved_in_ticket?: string | undefined;
9015
9218
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
9016
9219
  resolved_note?: string | undefined;
9220
+ appointment_claim?: {
9221
+ date: string;
9222
+ time?: string | undefined;
9223
+ professional?: string | undefined;
9224
+ patient_name?: string | undefined;
9225
+ modality?: string | undefined;
9226
+ } | undefined;
9017
9227
  }, {
9018
9228
  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";
9019
9229
  status: "open" | "resolved";
@@ -9039,6 +9249,13 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9039
9249
  resolved_in_ticket?: string | undefined;
9040
9250
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
9041
9251
  resolved_note?: string | undefined;
9252
+ appointment_claim?: {
9253
+ date: string;
9254
+ time?: string | undefined;
9255
+ professional?: string | undefined;
9256
+ patient_name?: string | undefined;
9257
+ modality?: string | undefined;
9258
+ } | undefined;
9042
9259
  }>, "many">;
9043
9260
  counts: z.ZodObject<{
9044
9261
  alerts_open: z.ZodNumber;
@@ -9257,7 +9474,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9257
9474
  alerts_new: z.ZodNumber;
9258
9475
  alerts_resolved: z.ZodNumber;
9259
9476
  judge: z.ZodOptional<z.ZodEnum<["judged", "skipped"]>>;
9260
- triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
9477
+ triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">>;
9261
9478
  }, "strip", z.ZodTypeAny, {
9262
9479
  status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
9263
9480
  ticket_id: string;
@@ -9268,7 +9485,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9268
9485
  alerts_new: number;
9269
9486
  alerts_resolved: number;
9270
9487
  judge?: "skipped" | "judged" | undefined;
9271
- triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
9488
+ triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[] | undefined;
9272
9489
  }, {
9273
9490
  status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
9274
9491
  ticket_id: string;
@@ -9279,20 +9496,20 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9279
9496
  evaluated_at?: unknown;
9280
9497
  closed_at?: unknown;
9281
9498
  judge?: "skipped" | "judged" | undefined;
9282
- triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
9499
+ triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[] | undefined;
9283
9500
  }>, "many">;
9284
9501
  judge_error: z.ZodOptional<z.ZodString>;
9285
9502
  triage: z.ZodOptional<z.ZodObject<{
9286
9503
  mode: z.ZodEnum<["skip_llm", "full_review"]>;
9287
- reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">;
9504
+ reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">;
9288
9505
  }, "strip", z.ZodTypeAny, {
9289
9506
  mode: "skip_llm" | "full_review";
9290
- reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
9507
+ reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[];
9291
9508
  }, {
9292
9509
  mode: "skip_llm" | "full_review";
9293
- reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
9510
+ reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[];
9294
9511
  }>>;
9295
- judge_skipped_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
9512
+ judge_skipped_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">>;
9296
9513
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9297
9514
  id: z.ZodString;
9298
9515
  ref: z.ZodAny;
@@ -9710,28 +9927,34 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9710
9927
  professional_name: z.ZodOptional<z.ZodString>;
9711
9928
  modality: z.ZodOptional<z.ZodString>;
9712
9929
  created_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
9930
+ removed: z.ZodOptional<z.ZodEnum<["deleted", "cancelled"]>>;
9931
+ removed_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
9713
9932
  }, "strip", z.ZodTypeAny, {
9714
9933
  id: string;
9715
9934
  calendar_id: string;
9716
9935
  start_at: Date;
9717
9936
  status?: string | undefined;
9718
9937
  created_at?: Date | undefined;
9938
+ removed?: "cancelled" | "deleted" | undefined;
9719
9939
  patient_id?: string | undefined;
9720
9940
  modality?: string | undefined;
9721
9941
  end_at?: Date | undefined;
9722
9942
  status_base?: string | undefined;
9723
9943
  professional_name?: string | undefined;
9944
+ removed_at?: Date | undefined;
9724
9945
  }, {
9725
9946
  id: string;
9726
9947
  calendar_id: string;
9727
9948
  status?: string | undefined;
9728
9949
  created_at?: unknown;
9950
+ removed?: "cancelled" | "deleted" | undefined;
9729
9951
  patient_id?: string | undefined;
9730
9952
  modality?: string | undefined;
9731
9953
  start_at?: unknown;
9732
9954
  end_at?: unknown;
9733
9955
  status_base?: string | undefined;
9734
9956
  professional_name?: string | undefined;
9957
+ removed_at?: unknown;
9735
9958
  }>, "many">;
9736
9959
  overlaps: z.ZodArray<z.ZodObject<{
9737
9960
  professional_name: z.ZodOptional<z.ZodString>;
@@ -9892,11 +10115,13 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9892
10115
  start_at: Date;
9893
10116
  status?: string | undefined;
9894
10117
  created_at?: Date | undefined;
10118
+ removed?: "cancelled" | "deleted" | undefined;
9895
10119
  patient_id?: string | undefined;
9896
10120
  modality?: string | undefined;
9897
10121
  end_at?: Date | undefined;
9898
10122
  status_base?: string | undefined;
9899
10123
  professional_name?: string | undefined;
10124
+ removed_at?: Date | undefined;
9900
10125
  }[];
9901
10126
  tags: string[];
9902
10127
  capture_data: Record<string, unknown> | null;
@@ -9952,12 +10177,14 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9952
10177
  calendar_id: string;
9953
10178
  status?: string | undefined;
9954
10179
  created_at?: unknown;
10180
+ removed?: "cancelled" | "deleted" | undefined;
9955
10181
  patient_id?: string | undefined;
9956
10182
  modality?: string | undefined;
9957
10183
  start_at?: unknown;
9958
10184
  end_at?: unknown;
9959
10185
  status_base?: string | undefined;
9960
10186
  professional_name?: string | undefined;
10187
+ removed_at?: unknown;
9961
10188
  }[];
9962
10189
  tags: string[];
9963
10190
  capture_data: Record<string, unknown> | null;
@@ -10659,6 +10886,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10659
10886
  modality: z.ZodOptional<z.ZodString>;
10660
10887
  /** Nome do PACIENTE informado na conversa (pode diferir do lead: mae/filho). */
10661
10888
  patient_name: z.ZodOptional<z.ZodString>;
10889
+ /** feat-206 F6: cancelado ou substituido depois, na mesma jornada. */
10890
+ superseded: z.ZodOptional<z.ZodBoolean>;
10662
10891
  evidence: z.ZodArray<z.ZodObject<{
10663
10892
  message_id: z.ZodString;
10664
10893
  ticket_id: z.ZodString;
@@ -10686,8 +10915,9 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10686
10915
  }[];
10687
10916
  time?: string | undefined;
10688
10917
  professional?: string | undefined;
10689
- modality?: string | undefined;
10690
10918
  patient_name?: string | undefined;
10919
+ modality?: string | undefined;
10920
+ superseded?: boolean | undefined;
10691
10921
  }, {
10692
10922
  type: "appointment_informed";
10693
10923
  date: string;
@@ -10699,8 +10929,9 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10699
10929
  }[];
10700
10930
  time?: string | undefined;
10701
10931
  professional?: string | undefined;
10702
- modality?: string | undefined;
10703
10932
  patient_name?: string | undefined;
10933
+ modality?: string | undefined;
10934
+ superseded?: boolean | undefined;
10704
10935
  }>, z.ZodObject<{
10705
10936
  type: z.ZodLiteral<"promise">;
10706
10937
  what: z.ZodString;
@@ -11018,15 +11249,16 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
11018
11249
  }>]>, "many">;
11019
11250
  cross_checks: z.ZodArray<z.ZodObject<{
11020
11251
  claim_type: z.ZodEnum<["appointment_informed", "promise", "data_collected", "required_data", "outcome", "question_requires_answer", "first_concrete_offer", "patient_status", "price_informed"]>;
11021
- result: z.ZodEnum<["match", "mismatch", "missing", "inconclusive"]>;
11252
+ result: z.ZodEnum<["match", "mismatch", "missing", "inconclusive", "cancelled_after"]>;
11022
11253
  expected: z.ZodString;
11023
11254
  found: z.ZodNullable<z.ZodString>;
11024
11255
  alert_code: z.ZodOptional<z.ZodEnum<["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"]>>;
11025
11256
  note: z.ZodOptional<z.ZodString>;
11026
11257
  appointment_id: z.ZodOptional<z.ZodString>;
11027
11258
  calendar_id: z.ZodOptional<z.ZodString>;
11259
+ matched_by: z.ZodOptional<z.ZodEnum<["linked", "phone", "name", "name_fuzzy"]>>;
11028
11260
  }, "strip", z.ZodTypeAny, {
11029
- result: "match" | "inconclusive" | "mismatch" | "missing";
11261
+ result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
11030
11262
  expected: string;
11031
11263
  claim_type: "promise" | "appointment_informed" | "data_collected" | "required_data" | "outcome" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
11032
11264
  found: string | null;
@@ -11034,8 +11266,9 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
11034
11266
  note?: string | undefined;
11035
11267
  appointment_id?: string | undefined;
11036
11268
  alert_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" | undefined;
11269
+ matched_by?: "name" | "phone" | "linked" | "name_fuzzy" | undefined;
11037
11270
  }, {
11038
- result: "match" | "inconclusive" | "mismatch" | "missing";
11271
+ result: "match" | "inconclusive" | "mismatch" | "missing" | "cancelled_after";
11039
11272
  expected: string;
11040
11273
  claim_type: "promise" | "appointment_informed" | "data_collected" | "required_data" | "outcome" | "question_requires_answer" | "first_concrete_offer" | "patient_status" | "price_informed";
11041
11274
  found: string | null;
@@ -11043,6 +11276,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
11043
11276
  note?: string | undefined;
11044
11277
  appointment_id?: string | undefined;
11045
11278
  alert_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" | undefined;
11279
+ matched_by?: "name" | "phone" | "linked" | "name_fuzzy" | undefined;
11046
11280
  }>, "many">;
11047
11281
  criteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
11048
11282
  pillar: z.ZodEnum<["coerencia_historico", "roteiro_conversao", "acuracidade", "responsividade", "cordialidade_linguagem"]>;
@@ -11200,6 +11434,26 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
11200
11434
  resolved_note: z.ZodOptional<z.ZodString>;
11201
11435
  appointment_id: z.ZodOptional<z.ZodString>;
11202
11436
  calendar_id: z.ZodOptional<z.ZodString>;
11437
+ /** feat-206 F6a: claim que gerou o alerta de agenda (rechecagem tardia). */
11438
+ appointment_claim: z.ZodOptional<z.ZodObject<{
11439
+ date: z.ZodString;
11440
+ time: z.ZodOptional<z.ZodString>;
11441
+ professional: z.ZodOptional<z.ZodString>;
11442
+ patient_name: z.ZodOptional<z.ZodString>;
11443
+ modality: z.ZodOptional<z.ZodString>;
11444
+ }, "strip", z.ZodTypeAny, {
11445
+ date: string;
11446
+ time?: string | undefined;
11447
+ professional?: string | undefined;
11448
+ patient_name?: string | undefined;
11449
+ modality?: string | undefined;
11450
+ }, {
11451
+ date: string;
11452
+ time?: string | undefined;
11453
+ professional?: string | undefined;
11454
+ patient_name?: string | undefined;
11455
+ modality?: string | undefined;
11456
+ }>>;
11203
11457
  first_seen_ticket_id: z.ZodString;
11204
11458
  created_at: z.ZodEffects<z.ZodDate, Date, unknown>;
11205
11459
  }, "strip", z.ZodTypeAny, {
@@ -11227,6 +11481,13 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
11227
11481
  resolved_in_ticket?: string | undefined;
11228
11482
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
11229
11483
  resolved_note?: string | undefined;
11484
+ appointment_claim?: {
11485
+ date: string;
11486
+ time?: string | undefined;
11487
+ professional?: string | undefined;
11488
+ patient_name?: string | undefined;
11489
+ modality?: string | undefined;
11490
+ } | undefined;
11230
11491
  }, {
11231
11492
  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";
11232
11493
  status: "open" | "resolved";
@@ -11252,6 +11513,13 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
11252
11513
  resolved_in_ticket?: string | undefined;
11253
11514
  resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
11254
11515
  resolved_note?: string | undefined;
11516
+ appointment_claim?: {
11517
+ date: string;
11518
+ time?: string | undefined;
11519
+ professional?: string | undefined;
11520
+ patient_name?: string | undefined;
11521
+ modality?: string | undefined;
11522
+ } | undefined;
11255
11523
  }>, "many">;
11256
11524
  counts: z.ZodObject<{
11257
11525
  alerts_open: z.ZodNumber;
@@ -11470,7 +11738,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
11470
11738
  alerts_new: z.ZodNumber;
11471
11739
  alerts_resolved: z.ZodNumber;
11472
11740
  judge: z.ZodOptional<z.ZodEnum<["judged", "skipped"]>>;
11473
- triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
11741
+ triage_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">>;
11474
11742
  }, "strip", z.ZodTypeAny, {
11475
11743
  status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
11476
11744
  ticket_id: string;
@@ -11481,7 +11749,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
11481
11749
  alerts_new: number;
11482
11750
  alerts_resolved: number;
11483
11751
  judge?: "skipped" | "judged" | undefined;
11484
- triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
11752
+ triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[] | undefined;
11485
11753
  }, {
11486
11754
  status: "Excelente" | "Bom" | "Regular" | "Ruim" | "Crítico" | "pending_judge";
11487
11755
  ticket_id: string;
@@ -11492,18 +11760,18 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
11492
11760
  evaluated_at?: unknown;
11493
11761
  closed_at?: unknown;
11494
11762
  judge?: "skipped" | "judged" | undefined;
11495
- triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[] | undefined;
11763
+ triage_reasons?: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[] | undefined;
11496
11764
  }>, "many">;
11497
11765
  judge_error: z.ZodOptional<z.ZodString>;
11498
11766
  triage: z.ZodOptional<z.ZodObject<{
11499
11767
  mode: z.ZodEnum<["skip_llm", "full_review"]>;
11500
- reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">;
11768
+ reasons: z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">;
11501
11769
  }, "strip", z.ZodTypeAny, {
11502
11770
  mode: "skip_llm" | "full_review";
11503
- reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
11771
+ reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[];
11504
11772
  }, {
11505
11773
  mode: "skip_llm" | "full_review";
11506
- reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "forced")[];
11774
+ reasons: ("document_only" | "spam_close" | "reopen_without_new_messages" | "automation_only" | "ack_only" | "no_attendant_message" | "attendant_ack_only" | "forced")[];
11507
11775
  }>>;
11508
- judge_skipped_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "forced"]>, "many">>;
11776
+ judge_skipped_reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<["document_only", "spam_close", "reopen_without_new_messages", "automation_only", "ack_only", "no_attendant_message", "attendant_ack_only", "forced"]>, "many">>;
11509
11777
  }, z.ZodTypeAny, "passthrough">>;