evo360-types 1.3.602 → 1.3.606

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.
@@ -7,6 +7,8 @@ export declare const zCsqSeveritySchema: z.ZodEnum<["critica", "alta", "media",
7
7
  export declare const zCsqAlertSourceSchema: z.ZodEnum<["deterministic", "llm", "hybrid"]>;
8
8
  export declare const zCsqAlertScopeSchema: z.ZodEnum<["ticket", "journey"]>;
9
9
  export declare const zCsqAlertLifecycleSchema: z.ZodEnum<["open", "resolved"]>;
10
+ /** Motivo da resolucao de um alerta (lote 9). */
11
+ export declare const zCsqAlertResolvedReasonSchema: z.ZodEnum<["fact", "judge_resolved", "judge_dismissed", "code_guard", "recheck_ok", "supervisor_false_positive"]>;
10
12
  export declare const zCsqVerificationStateSchema: z.ZodEnum<["pending", "confirmed_ok", "confirmed", "inconclusive"]>;
11
13
  export declare const zCsqRunStatusSchema: z.ZodEnum<["running", "done", "failed", "quarantined"]>;
12
14
  export declare const zCsqPhaseSchema: z.ZodEnum<["f0", "f1"]>;
@@ -67,6 +69,8 @@ export declare const zCsqAlertSchema: z.ZodObject<{
67
69
  verification: z.ZodOptional<z.ZodEnum<["pending", "confirmed_ok", "confirmed", "inconclusive"]>>;
68
70
  recheck_after: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
69
71
  resolved_in_ticket: z.ZodOptional<z.ZodString>;
72
+ resolved_reason: z.ZodOptional<z.ZodEnum<["fact", "judge_resolved", "judge_dismissed", "code_guard", "recheck_ok", "supervisor_false_positive"]>>;
73
+ resolved_note: z.ZodOptional<z.ZodString>;
70
74
  appointment_id: z.ZodOptional<z.ZodString>;
71
75
  calendar_id: z.ZodOptional<z.ZodString>;
72
76
  first_seen_ticket_id: z.ZodString;
@@ -94,6 +98,8 @@ export declare const zCsqAlertSchema: z.ZodObject<{
94
98
  suggested_action?: string | undefined;
95
99
  recheck_after?: Date | undefined;
96
100
  resolved_in_ticket?: string | undefined;
101
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
102
+ resolved_note?: string | undefined;
97
103
  }, {
98
104
  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";
99
105
  status: "open" | "resolved";
@@ -117,6 +123,8 @@ export declare const zCsqAlertSchema: z.ZodObject<{
117
123
  suggested_action?: string | undefined;
118
124
  recheck_after?: unknown;
119
125
  resolved_in_ticket?: string | undefined;
126
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
127
+ resolved_note?: string | undefined;
120
128
  }>;
121
129
  export declare const zCsqIndicatorsSetSchema: z.ZodObject<{
122
130
  frt_min: z.ZodNullable<z.ZodNumber>;
@@ -2220,8 +2228,8 @@ export declare const zCsqTranscriptMessageSchema: z.ZodObject<{
2220
2228
  unattributed: z.ZodOptional<z.ZodBoolean>;
2221
2229
  }, "strip", z.ZodTypeAny, {
2222
2230
  type: string;
2223
- message_id: string;
2224
2231
  text: string;
2232
+ message_id: string;
2225
2233
  ticket_id: string;
2226
2234
  ts: Date;
2227
2235
  author_kind: "human" | "automation" | "lead" | "hubia" | "event" | "note";
@@ -2229,8 +2237,8 @@ export declare const zCsqTranscriptMessageSchema: z.ZodObject<{
2229
2237
  unattributed?: boolean | undefined;
2230
2238
  }, {
2231
2239
  type: string;
2232
- message_id: string;
2233
2240
  text: string;
2241
+ message_id: string;
2234
2242
  ticket_id: string;
2235
2243
  author_kind: "human" | "automation" | "lead" | "hubia" | "event" | "note";
2236
2244
  author_label: string;
@@ -2256,6 +2264,31 @@ export declare const zCsqLlmUsageSchema: z.ZodObject<{
2256
2264
  cache_creation_tokens?: number | undefined;
2257
2265
  rounds?: number | undefined;
2258
2266
  }>;
2267
+ /** Veredito do juiz sobre um achado automatico revalidavel (lote 9). */
2268
+ export declare const zCsqJudgeRevalidationSchema: z.ZodObject<{
2269
+ fingerprint: z.ZodString;
2270
+ verdict: z.ZodEnum<["confirm", "dismiss"]>;
2271
+ reason: z.ZodString;
2272
+ }, "strip", z.ZodTypeAny, {
2273
+ verdict: "confirm" | "dismiss";
2274
+ reason: string;
2275
+ fingerprint: string;
2276
+ }, {
2277
+ verdict: "confirm" | "dismiss";
2278
+ reason: string;
2279
+ fingerprint: string;
2280
+ }>;
2281
+ /** Alerta anterior resolvido pelo juiz, com o motivo (lote 9). */
2282
+ export declare const zCsqJudgeResolvedAlertSchema: z.ZodObject<{
2283
+ fingerprint: z.ZodString;
2284
+ reason: z.ZodString;
2285
+ }, "strip", z.ZodTypeAny, {
2286
+ reason: string;
2287
+ fingerprint: string;
2288
+ }, {
2289
+ reason: string;
2290
+ fingerprint: string;
2291
+ }>;
2259
2292
  /** Schema da tool `submit_csq_evaluation`. ESTRITO de proposito: e o contrato
2260
2293
  * de saida do LLM, nao um doc do Firestore — nada de passthrough aqui. */
2261
2294
  export declare const zCsqJudgeOutputSchema: z.ZodObject<{
@@ -3342,6 +3375,8 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3342
3375
  verification: z.ZodOptional<z.ZodEnum<["pending", "confirmed_ok", "confirmed", "inconclusive"]>>;
3343
3376
  recheck_after: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
3344
3377
  resolved_in_ticket: z.ZodOptional<z.ZodString>;
3378
+ resolved_reason: z.ZodOptional<z.ZodEnum<["fact", "judge_resolved", "judge_dismissed", "code_guard", "recheck_ok", "supervisor_false_positive"]>>;
3379
+ resolved_note: z.ZodOptional<z.ZodString>;
3345
3380
  appointment_id: z.ZodOptional<z.ZodString>;
3346
3381
  calendar_id: z.ZodOptional<z.ZodString>;
3347
3382
  first_seen_ticket_id: z.ZodString;
@@ -3369,6 +3404,8 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3369
3404
  suggested_action?: string | undefined;
3370
3405
  recheck_after?: Date | undefined;
3371
3406
  resolved_in_ticket?: string | undefined;
3407
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
3408
+ resolved_note?: string | undefined;
3372
3409
  }, {
3373
3410
  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";
3374
3411
  status: "open" | "resolved";
@@ -3392,9 +3429,34 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3392
3429
  suggested_action?: string | undefined;
3393
3430
  recheck_after?: unknown;
3394
3431
  resolved_in_ticket?: string | undefined;
3432
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
3433
+ resolved_note?: string | undefined;
3395
3434
  }>, "many">;
3396
3435
  /** Fingerprints de alertas anteriores resolvidos neste atendimento. */
3397
3436
  resolved_alert_ids: z.ZodArray<z.ZodString, "many">;
3437
+ resolved_alerts: z.ZodOptional<z.ZodArray<z.ZodObject<{
3438
+ fingerprint: z.ZodString;
3439
+ reason: z.ZodString;
3440
+ }, "strip", z.ZodTypeAny, {
3441
+ reason: string;
3442
+ fingerprint: string;
3443
+ }, {
3444
+ reason: string;
3445
+ fingerprint: string;
3446
+ }>, "many">>;
3447
+ revalidations: z.ZodOptional<z.ZodArray<z.ZodObject<{
3448
+ fingerprint: z.ZodString;
3449
+ verdict: z.ZodEnum<["confirm", "dismiss"]>;
3450
+ reason: z.ZodString;
3451
+ }, "strip", z.ZodTypeAny, {
3452
+ verdict: "confirm" | "dismiss";
3453
+ reason: string;
3454
+ fingerprint: string;
3455
+ }, {
3456
+ verdict: "confirm" | "dismiss";
3457
+ reason: string;
3458
+ fingerprint: string;
3459
+ }>, "many">>;
3398
3460
  highlights: z.ZodArray<z.ZodString, "many">;
3399
3461
  improvements: z.ZodArray<z.ZodString, "many">;
3400
3462
  confidence: z.ZodNumber;
@@ -3638,12 +3700,23 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3638
3700
  suggested_action?: string | undefined;
3639
3701
  recheck_after?: Date | undefined;
3640
3702
  resolved_in_ticket?: string | undefined;
3703
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
3704
+ resolved_note?: string | undefined;
3641
3705
  }[];
3642
3706
  highlights: string[];
3643
3707
  improvements: string[];
3644
3708
  confidence: number;
3645
3709
  resolved_alert_ids: string[];
3646
3710
  notes?: string | undefined;
3711
+ resolved_alerts?: {
3712
+ reason: string;
3713
+ fingerprint: string;
3714
+ }[] | undefined;
3715
+ revalidations?: {
3716
+ verdict: "confirm" | "dismiss";
3717
+ reason: string;
3718
+ fingerprint: string;
3719
+ }[] | undefined;
3647
3720
  }, {
3648
3721
  summary: string;
3649
3722
  lead_state: {
@@ -3883,12 +3956,23 @@ export declare const zCsqJudgeOutputSchema: z.ZodObject<{
3883
3956
  suggested_action?: string | undefined;
3884
3957
  recheck_after?: unknown;
3885
3958
  resolved_in_ticket?: string | undefined;
3959
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
3960
+ resolved_note?: string | undefined;
3886
3961
  }[];
3887
3962
  highlights: string[];
3888
3963
  improvements: string[];
3889
3964
  confidence: number;
3890
3965
  resolved_alert_ids: string[];
3891
3966
  notes?: string | undefined;
3967
+ resolved_alerts?: {
3968
+ reason: string;
3969
+ fingerprint: string;
3970
+ }[] | undefined;
3971
+ revalidations?: {
3972
+ verdict: "confirm" | "dismiss";
3973
+ reason: string;
3974
+ fingerprint: string;
3975
+ }[] | undefined;
3892
3976
  }>;
3893
3977
  export declare const zCsqAppointmentFactSchema: z.ZodObject<{
3894
3978
  id: z.ZodString;
@@ -3924,21 +4008,125 @@ export declare const zCsqAppointmentFactSchema: z.ZodObject<{
3924
4008
  status_base?: string | undefined;
3925
4009
  professional_name?: string | undefined;
3926
4010
  }>;
4011
+ export declare const zCsqOverlapAppointmentFactSchema: z.ZodObject<{
4012
+ id: z.ZodString;
4013
+ patient_id: z.ZodOptional<z.ZodString>;
4014
+ patient_name: z.ZodOptional<z.ZodString>;
4015
+ start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
4016
+ end_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
4017
+ professional_name: z.ZodOptional<z.ZodString>;
4018
+ is_lead: z.ZodBoolean;
4019
+ }, "strip", z.ZodTypeAny, {
4020
+ id: string;
4021
+ start_at: Date;
4022
+ is_lead: boolean;
4023
+ patient_id?: string | undefined;
4024
+ patient_name?: string | undefined;
4025
+ end_at?: Date | undefined;
4026
+ professional_name?: string | undefined;
4027
+ }, {
4028
+ id: string;
4029
+ is_lead: boolean;
4030
+ patient_id?: string | undefined;
4031
+ patient_name?: string | undefined;
4032
+ start_at?: unknown;
4033
+ end_at?: unknown;
4034
+ professional_name?: string | undefined;
4035
+ }>;
4036
+ export declare const zCsqOverlapFamilyHintsSchema: z.ZodObject<{
4037
+ same_surname: z.ZodBoolean;
4038
+ same_contact: z.ZodBoolean;
4039
+ same_lead: z.ZodBoolean;
4040
+ }, "strip", z.ZodTypeAny, {
4041
+ same_surname: boolean;
4042
+ same_contact: boolean;
4043
+ same_lead: boolean;
4044
+ }, {
4045
+ same_surname: boolean;
4046
+ same_contact: boolean;
4047
+ same_lead: boolean;
4048
+ }>;
3927
4049
  export declare const zCsqOverlapFactSchema: z.ZodObject<{
3928
4050
  professional_name: z.ZodOptional<z.ZodString>;
3929
4051
  appointment_ids: z.ZodArray<z.ZodString, "many">;
3930
4052
  start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
3931
4053
  end_at: z.ZodEffects<z.ZodDate, Date, unknown>;
4054
+ appointments: z.ZodOptional<z.ZodArray<z.ZodObject<{
4055
+ id: z.ZodString;
4056
+ patient_id: z.ZodOptional<z.ZodString>;
4057
+ patient_name: z.ZodOptional<z.ZodString>;
4058
+ start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
4059
+ end_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
4060
+ professional_name: z.ZodOptional<z.ZodString>;
4061
+ is_lead: z.ZodBoolean;
4062
+ }, "strip", z.ZodTypeAny, {
4063
+ id: string;
4064
+ start_at: Date;
4065
+ is_lead: boolean;
4066
+ patient_id?: string | undefined;
4067
+ patient_name?: string | undefined;
4068
+ end_at?: Date | undefined;
4069
+ professional_name?: string | undefined;
4070
+ }, {
4071
+ id: string;
4072
+ is_lead: boolean;
4073
+ patient_id?: string | undefined;
4074
+ patient_name?: string | undefined;
4075
+ start_at?: unknown;
4076
+ end_at?: unknown;
4077
+ professional_name?: string | undefined;
4078
+ }>, "many">>;
4079
+ family_hints: z.ZodOptional<z.ZodObject<{
4080
+ same_surname: z.ZodBoolean;
4081
+ same_contact: z.ZodBoolean;
4082
+ same_lead: z.ZodBoolean;
4083
+ }, "strip", z.ZodTypeAny, {
4084
+ same_surname: boolean;
4085
+ same_contact: boolean;
4086
+ same_lead: boolean;
4087
+ }, {
4088
+ same_surname: boolean;
4089
+ same_contact: boolean;
4090
+ same_lead: boolean;
4091
+ }>>;
3932
4092
  }, "strip", z.ZodTypeAny, {
3933
4093
  start_at: Date;
3934
4094
  end_at: Date;
3935
4095
  appointment_ids: string[];
4096
+ appointments?: {
4097
+ id: string;
4098
+ start_at: Date;
4099
+ is_lead: boolean;
4100
+ patient_id?: string | undefined;
4101
+ patient_name?: string | undefined;
4102
+ end_at?: Date | undefined;
4103
+ professional_name?: string | undefined;
4104
+ }[] | undefined;
3936
4105
  professional_name?: string | undefined;
4106
+ family_hints?: {
4107
+ same_surname: boolean;
4108
+ same_contact: boolean;
4109
+ same_lead: boolean;
4110
+ } | undefined;
3937
4111
  }, {
3938
4112
  appointment_ids: string[];
4113
+ appointments?: {
4114
+ id: string;
4115
+ is_lead: boolean;
4116
+ patient_id?: string | undefined;
4117
+ patient_name?: string | undefined;
4118
+ start_at?: unknown;
4119
+ end_at?: unknown;
4120
+ professional_name?: string | undefined;
4121
+ }[] | undefined;
3939
4122
  start_at?: unknown;
3940
4123
  end_at?: unknown;
3941
4124
  professional_name?: string | undefined;
4125
+ family_hints?: {
4126
+ same_surname: boolean;
4127
+ same_contact: boolean;
4128
+ same_lead: boolean;
4129
+ } | undefined;
3942
4130
  }>;
3943
4131
  export declare const zCsqPreviousTicketFactSchema: z.ZodObject<{
3944
4132
  ticket_id: z.ZodString;
@@ -4024,16 +4212,82 @@ export declare const zCsqSystemFactsSchema: z.ZodObject<{
4024
4212
  appointment_ids: z.ZodArray<z.ZodString, "many">;
4025
4213
  start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
4026
4214
  end_at: z.ZodEffects<z.ZodDate, Date, unknown>;
4215
+ appointments: z.ZodOptional<z.ZodArray<z.ZodObject<{
4216
+ id: z.ZodString;
4217
+ patient_id: z.ZodOptional<z.ZodString>;
4218
+ patient_name: z.ZodOptional<z.ZodString>;
4219
+ start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
4220
+ end_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
4221
+ professional_name: z.ZodOptional<z.ZodString>;
4222
+ is_lead: z.ZodBoolean;
4223
+ }, "strip", z.ZodTypeAny, {
4224
+ id: string;
4225
+ start_at: Date;
4226
+ is_lead: boolean;
4227
+ patient_id?: string | undefined;
4228
+ patient_name?: string | undefined;
4229
+ end_at?: Date | undefined;
4230
+ professional_name?: string | undefined;
4231
+ }, {
4232
+ id: string;
4233
+ is_lead: boolean;
4234
+ patient_id?: string | undefined;
4235
+ patient_name?: string | undefined;
4236
+ start_at?: unknown;
4237
+ end_at?: unknown;
4238
+ professional_name?: string | undefined;
4239
+ }>, "many">>;
4240
+ family_hints: z.ZodOptional<z.ZodObject<{
4241
+ same_surname: z.ZodBoolean;
4242
+ same_contact: z.ZodBoolean;
4243
+ same_lead: z.ZodBoolean;
4244
+ }, "strip", z.ZodTypeAny, {
4245
+ same_surname: boolean;
4246
+ same_contact: boolean;
4247
+ same_lead: boolean;
4248
+ }, {
4249
+ same_surname: boolean;
4250
+ same_contact: boolean;
4251
+ same_lead: boolean;
4252
+ }>>;
4027
4253
  }, "strip", z.ZodTypeAny, {
4028
4254
  start_at: Date;
4029
4255
  end_at: Date;
4030
4256
  appointment_ids: string[];
4257
+ appointments?: {
4258
+ id: string;
4259
+ start_at: Date;
4260
+ is_lead: boolean;
4261
+ patient_id?: string | undefined;
4262
+ patient_name?: string | undefined;
4263
+ end_at?: Date | undefined;
4264
+ professional_name?: string | undefined;
4265
+ }[] | undefined;
4031
4266
  professional_name?: string | undefined;
4267
+ family_hints?: {
4268
+ same_surname: boolean;
4269
+ same_contact: boolean;
4270
+ same_lead: boolean;
4271
+ } | undefined;
4032
4272
  }, {
4033
4273
  appointment_ids: string[];
4274
+ appointments?: {
4275
+ id: string;
4276
+ is_lead: boolean;
4277
+ patient_id?: string | undefined;
4278
+ patient_name?: string | undefined;
4279
+ start_at?: unknown;
4280
+ end_at?: unknown;
4281
+ professional_name?: string | undefined;
4282
+ }[] | undefined;
4034
4283
  start_at?: unknown;
4035
4284
  end_at?: unknown;
4036
4285
  professional_name?: string | undefined;
4286
+ family_hints?: {
4287
+ same_surname: boolean;
4288
+ same_contact: boolean;
4289
+ same_lead: boolean;
4290
+ } | undefined;
4037
4291
  }>, "many">;
4038
4292
  tags: z.ZodArray<z.ZodString, "many">;
4039
4293
  qualification: z.ZodNullable<z.ZodString>;
@@ -4119,6 +4373,7 @@ export declare const zCsqSystemFactsSchema: z.ZodObject<{
4119
4373
  professional_name?: string | undefined;
4120
4374
  }[];
4121
4375
  tags: string[];
4376
+ capture_data: Record<string, unknown> | null;
4122
4377
  invoices: {
4123
4378
  id: string;
4124
4379
  kind: "invoice" | "payment_link";
@@ -4140,10 +4395,23 @@ export declare const zCsqSystemFactsSchema: z.ZodObject<{
4140
4395
  start_at: Date;
4141
4396
  end_at: Date;
4142
4397
  appointment_ids: string[];
4398
+ appointments?: {
4399
+ id: string;
4400
+ start_at: Date;
4401
+ is_lead: boolean;
4402
+ patient_id?: string | undefined;
4403
+ patient_name?: string | undefined;
4404
+ end_at?: Date | undefined;
4405
+ professional_name?: string | undefined;
4406
+ }[] | undefined;
4143
4407
  professional_name?: string | undefined;
4408
+ family_hints?: {
4409
+ same_surname: boolean;
4410
+ same_contact: boolean;
4411
+ same_lead: boolean;
4412
+ } | undefined;
4144
4413
  }[];
4145
4414
  dist_channel: string | null;
4146
- capture_data: Record<string, unknown> | null;
4147
4415
  previous_tickets: {
4148
4416
  ticket_id: string;
4149
4417
  close_code?: string | undefined;
@@ -4166,6 +4434,7 @@ export declare const zCsqSystemFactsSchema: z.ZodObject<{
4166
4434
  professional_name?: string | undefined;
4167
4435
  }[];
4168
4436
  tags: string[];
4437
+ capture_data: Record<string, unknown> | null;
4169
4438
  invoices: {
4170
4439
  id: string;
4171
4440
  kind: "invoice" | "payment_link";
@@ -4185,12 +4454,25 @@ export declare const zCsqSystemFactsSchema: z.ZodObject<{
4185
4454
  }[];
4186
4455
  overlaps: {
4187
4456
  appointment_ids: string[];
4457
+ appointments?: {
4458
+ id: string;
4459
+ is_lead: boolean;
4460
+ patient_id?: string | undefined;
4461
+ patient_name?: string | undefined;
4462
+ start_at?: unknown;
4463
+ end_at?: unknown;
4464
+ professional_name?: string | undefined;
4465
+ }[] | undefined;
4188
4466
  start_at?: unknown;
4189
4467
  end_at?: unknown;
4190
4468
  professional_name?: string | undefined;
4469
+ family_hints?: {
4470
+ same_surname: boolean;
4471
+ same_contact: boolean;
4472
+ same_lead: boolean;
4473
+ } | undefined;
4191
4474
  }[];
4192
4475
  dist_channel: string | null;
4193
- capture_data: Record<string, unknown> | null;
4194
4476
  previous_tickets: {
4195
4477
  ticket_id: string;
4196
4478
  close_code?: string | undefined;
@@ -4896,16 +5178,82 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
4896
5178
  appointment_ids: z.ZodArray<z.ZodString, "many">;
4897
5179
  start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
4898
5180
  end_at: z.ZodEffects<z.ZodDate, Date, unknown>;
5181
+ appointments: z.ZodOptional<z.ZodArray<z.ZodObject<{
5182
+ id: z.ZodString;
5183
+ patient_id: z.ZodOptional<z.ZodString>;
5184
+ patient_name: z.ZodOptional<z.ZodString>;
5185
+ start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
5186
+ end_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
5187
+ professional_name: z.ZodOptional<z.ZodString>;
5188
+ is_lead: z.ZodBoolean;
5189
+ }, "strip", z.ZodTypeAny, {
5190
+ id: string;
5191
+ start_at: Date;
5192
+ is_lead: boolean;
5193
+ patient_id?: string | undefined;
5194
+ patient_name?: string | undefined;
5195
+ end_at?: Date | undefined;
5196
+ professional_name?: string | undefined;
5197
+ }, {
5198
+ id: string;
5199
+ is_lead: boolean;
5200
+ patient_id?: string | undefined;
5201
+ patient_name?: string | undefined;
5202
+ start_at?: unknown;
5203
+ end_at?: unknown;
5204
+ professional_name?: string | undefined;
5205
+ }>, "many">>;
5206
+ family_hints: z.ZodOptional<z.ZodObject<{
5207
+ same_surname: z.ZodBoolean;
5208
+ same_contact: z.ZodBoolean;
5209
+ same_lead: z.ZodBoolean;
5210
+ }, "strip", z.ZodTypeAny, {
5211
+ same_surname: boolean;
5212
+ same_contact: boolean;
5213
+ same_lead: boolean;
5214
+ }, {
5215
+ same_surname: boolean;
5216
+ same_contact: boolean;
5217
+ same_lead: boolean;
5218
+ }>>;
4899
5219
  }, "strip", z.ZodTypeAny, {
4900
5220
  start_at: Date;
4901
5221
  end_at: Date;
4902
5222
  appointment_ids: string[];
5223
+ appointments?: {
5224
+ id: string;
5225
+ start_at: Date;
5226
+ is_lead: boolean;
5227
+ patient_id?: string | undefined;
5228
+ patient_name?: string | undefined;
5229
+ end_at?: Date | undefined;
5230
+ professional_name?: string | undefined;
5231
+ }[] | undefined;
4903
5232
  professional_name?: string | undefined;
5233
+ family_hints?: {
5234
+ same_surname: boolean;
5235
+ same_contact: boolean;
5236
+ same_lead: boolean;
5237
+ } | undefined;
4904
5238
  }, {
4905
5239
  appointment_ids: string[];
5240
+ appointments?: {
5241
+ id: string;
5242
+ is_lead: boolean;
5243
+ patient_id?: string | undefined;
5244
+ patient_name?: string | undefined;
5245
+ start_at?: unknown;
5246
+ end_at?: unknown;
5247
+ professional_name?: string | undefined;
5248
+ }[] | undefined;
4906
5249
  start_at?: unknown;
4907
5250
  end_at?: unknown;
4908
5251
  professional_name?: string | undefined;
5252
+ family_hints?: {
5253
+ same_surname: boolean;
5254
+ same_contact: boolean;
5255
+ same_lead: boolean;
5256
+ } | undefined;
4909
5257
  }>, "many">;
4910
5258
  tags: z.ZodArray<z.ZodString, "many">;
4911
5259
  qualification: z.ZodNullable<z.ZodString>;
@@ -4991,6 +5339,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
4991
5339
  professional_name?: string | undefined;
4992
5340
  }[];
4993
5341
  tags: string[];
5342
+ capture_data: Record<string, unknown> | null;
4994
5343
  invoices: {
4995
5344
  id: string;
4996
5345
  kind: "invoice" | "payment_link";
@@ -5012,10 +5361,23 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
5012
5361
  start_at: Date;
5013
5362
  end_at: Date;
5014
5363
  appointment_ids: string[];
5364
+ appointments?: {
5365
+ id: string;
5366
+ start_at: Date;
5367
+ is_lead: boolean;
5368
+ patient_id?: string | undefined;
5369
+ patient_name?: string | undefined;
5370
+ end_at?: Date | undefined;
5371
+ professional_name?: string | undefined;
5372
+ }[] | undefined;
5015
5373
  professional_name?: string | undefined;
5374
+ family_hints?: {
5375
+ same_surname: boolean;
5376
+ same_contact: boolean;
5377
+ same_lead: boolean;
5378
+ } | undefined;
5016
5379
  }[];
5017
5380
  dist_channel: string | null;
5018
- capture_data: Record<string, unknown> | null;
5019
5381
  previous_tickets: {
5020
5382
  ticket_id: string;
5021
5383
  close_code?: string | undefined;
@@ -5038,6 +5400,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
5038
5400
  professional_name?: string | undefined;
5039
5401
  }[];
5040
5402
  tags: string[];
5403
+ capture_data: Record<string, unknown> | null;
5041
5404
  invoices: {
5042
5405
  id: string;
5043
5406
  kind: "invoice" | "payment_link";
@@ -5057,12 +5420,25 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
5057
5420
  }[];
5058
5421
  overlaps: {
5059
5422
  appointment_ids: string[];
5423
+ appointments?: {
5424
+ id: string;
5425
+ is_lead: boolean;
5426
+ patient_id?: string | undefined;
5427
+ patient_name?: string | undefined;
5428
+ start_at?: unknown;
5429
+ end_at?: unknown;
5430
+ professional_name?: string | undefined;
5431
+ }[] | undefined;
5060
5432
  start_at?: unknown;
5061
5433
  end_at?: unknown;
5062
5434
  professional_name?: string | undefined;
5435
+ family_hints?: {
5436
+ same_surname: boolean;
5437
+ same_contact: boolean;
5438
+ same_lead: boolean;
5439
+ } | undefined;
5063
5440
  }[];
5064
5441
  dist_channel: string | null;
5065
- capture_data: Record<string, unknown> | null;
5066
5442
  previous_tickets: {
5067
5443
  ticket_id: string;
5068
5444
  close_code?: string | undefined;
@@ -6260,6 +6636,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6260
6636
  verification: z.ZodOptional<z.ZodEnum<["pending", "confirmed_ok", "confirmed", "inconclusive"]>>;
6261
6637
  recheck_after: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
6262
6638
  resolved_in_ticket: z.ZodOptional<z.ZodString>;
6639
+ resolved_reason: z.ZodOptional<z.ZodEnum<["fact", "judge_resolved", "judge_dismissed", "code_guard", "recheck_ok", "supervisor_false_positive"]>>;
6640
+ resolved_note: z.ZodOptional<z.ZodString>;
6263
6641
  appointment_id: z.ZodOptional<z.ZodString>;
6264
6642
  calendar_id: z.ZodOptional<z.ZodString>;
6265
6643
  first_seen_ticket_id: z.ZodString;
@@ -6287,6 +6665,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6287
6665
  suggested_action?: string | undefined;
6288
6666
  recheck_after?: Date | undefined;
6289
6667
  resolved_in_ticket?: string | undefined;
6668
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
6669
+ resolved_note?: string | undefined;
6290
6670
  }, {
6291
6671
  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";
6292
6672
  status: "open" | "resolved";
@@ -6310,6 +6690,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6310
6690
  suggested_action?: string | undefined;
6311
6691
  recheck_after?: unknown;
6312
6692
  resolved_in_ticket?: string | undefined;
6693
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
6694
+ resolved_note?: string | undefined;
6313
6695
  }>, "many">;
6314
6696
  counts: z.ZodObject<{
6315
6697
  alerts_open: z.ZodNumber;
@@ -6414,6 +6796,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6414
6796
  note?: string | undefined;
6415
6797
  reviewed_at?: unknown;
6416
6798
  }>>;
6799
+ suppressed_alert_fingerprints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6417
6800
  deleted_by_login_id: z.ZodOptional<z.ZodString>;
6418
6801
  deleted_reason: z.ZodOptional<z.ZodString>;
6419
6802
  verification: z.ZodOptional<z.ZodEnum<["pending", "confirmed_ok", "confirmed", "inconclusive"]>>;
@@ -6917,16 +7300,82 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
6917
7300
  appointment_ids: z.ZodArray<z.ZodString, "many">;
6918
7301
  start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
6919
7302
  end_at: z.ZodEffects<z.ZodDate, Date, unknown>;
7303
+ appointments: z.ZodOptional<z.ZodArray<z.ZodObject<{
7304
+ id: z.ZodString;
7305
+ patient_id: z.ZodOptional<z.ZodString>;
7306
+ patient_name: z.ZodOptional<z.ZodString>;
7307
+ start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
7308
+ end_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
7309
+ professional_name: z.ZodOptional<z.ZodString>;
7310
+ is_lead: z.ZodBoolean;
7311
+ }, "strip", z.ZodTypeAny, {
7312
+ id: string;
7313
+ start_at: Date;
7314
+ is_lead: boolean;
7315
+ patient_id?: string | undefined;
7316
+ patient_name?: string | undefined;
7317
+ end_at?: Date | undefined;
7318
+ professional_name?: string | undefined;
7319
+ }, {
7320
+ id: string;
7321
+ is_lead: boolean;
7322
+ patient_id?: string | undefined;
7323
+ patient_name?: string | undefined;
7324
+ start_at?: unknown;
7325
+ end_at?: unknown;
7326
+ professional_name?: string | undefined;
7327
+ }>, "many">>;
7328
+ family_hints: z.ZodOptional<z.ZodObject<{
7329
+ same_surname: z.ZodBoolean;
7330
+ same_contact: z.ZodBoolean;
7331
+ same_lead: z.ZodBoolean;
7332
+ }, "strip", z.ZodTypeAny, {
7333
+ same_surname: boolean;
7334
+ same_contact: boolean;
7335
+ same_lead: boolean;
7336
+ }, {
7337
+ same_surname: boolean;
7338
+ same_contact: boolean;
7339
+ same_lead: boolean;
7340
+ }>>;
6920
7341
  }, "strip", z.ZodTypeAny, {
6921
7342
  start_at: Date;
6922
7343
  end_at: Date;
6923
7344
  appointment_ids: string[];
7345
+ appointments?: {
7346
+ id: string;
7347
+ start_at: Date;
7348
+ is_lead: boolean;
7349
+ patient_id?: string | undefined;
7350
+ patient_name?: string | undefined;
7351
+ end_at?: Date | undefined;
7352
+ professional_name?: string | undefined;
7353
+ }[] | undefined;
6924
7354
  professional_name?: string | undefined;
7355
+ family_hints?: {
7356
+ same_surname: boolean;
7357
+ same_contact: boolean;
7358
+ same_lead: boolean;
7359
+ } | undefined;
6925
7360
  }, {
6926
7361
  appointment_ids: string[];
7362
+ appointments?: {
7363
+ id: string;
7364
+ is_lead: boolean;
7365
+ patient_id?: string | undefined;
7366
+ patient_name?: string | undefined;
7367
+ start_at?: unknown;
7368
+ end_at?: unknown;
7369
+ professional_name?: string | undefined;
7370
+ }[] | undefined;
6927
7371
  start_at?: unknown;
6928
7372
  end_at?: unknown;
6929
7373
  professional_name?: string | undefined;
7374
+ family_hints?: {
7375
+ same_surname: boolean;
7376
+ same_contact: boolean;
7377
+ same_lead: boolean;
7378
+ } | undefined;
6930
7379
  }>, "many">;
6931
7380
  tags: z.ZodArray<z.ZodString, "many">;
6932
7381
  qualification: z.ZodNullable<z.ZodString>;
@@ -7012,6 +7461,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7012
7461
  professional_name?: string | undefined;
7013
7462
  }[];
7014
7463
  tags: string[];
7464
+ capture_data: Record<string, unknown> | null;
7015
7465
  invoices: {
7016
7466
  id: string;
7017
7467
  kind: "invoice" | "payment_link";
@@ -7033,10 +7483,23 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7033
7483
  start_at: Date;
7034
7484
  end_at: Date;
7035
7485
  appointment_ids: string[];
7486
+ appointments?: {
7487
+ id: string;
7488
+ start_at: Date;
7489
+ is_lead: boolean;
7490
+ patient_id?: string | undefined;
7491
+ patient_name?: string | undefined;
7492
+ end_at?: Date | undefined;
7493
+ professional_name?: string | undefined;
7494
+ }[] | undefined;
7036
7495
  professional_name?: string | undefined;
7496
+ family_hints?: {
7497
+ same_surname: boolean;
7498
+ same_contact: boolean;
7499
+ same_lead: boolean;
7500
+ } | undefined;
7037
7501
  }[];
7038
7502
  dist_channel: string | null;
7039
- capture_data: Record<string, unknown> | null;
7040
7503
  previous_tickets: {
7041
7504
  ticket_id: string;
7042
7505
  close_code?: string | undefined;
@@ -7059,6 +7522,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7059
7522
  professional_name?: string | undefined;
7060
7523
  }[];
7061
7524
  tags: string[];
7525
+ capture_data: Record<string, unknown> | null;
7062
7526
  invoices: {
7063
7527
  id: string;
7064
7528
  kind: "invoice" | "payment_link";
@@ -7078,12 +7542,25 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7078
7542
  }[];
7079
7543
  overlaps: {
7080
7544
  appointment_ids: string[];
7545
+ appointments?: {
7546
+ id: string;
7547
+ is_lead: boolean;
7548
+ patient_id?: string | undefined;
7549
+ patient_name?: string | undefined;
7550
+ start_at?: unknown;
7551
+ end_at?: unknown;
7552
+ professional_name?: string | undefined;
7553
+ }[] | undefined;
7081
7554
  start_at?: unknown;
7082
7555
  end_at?: unknown;
7083
7556
  professional_name?: string | undefined;
7557
+ family_hints?: {
7558
+ same_surname: boolean;
7559
+ same_contact: boolean;
7560
+ same_lead: boolean;
7561
+ } | undefined;
7084
7562
  }[];
7085
7563
  dist_channel: string | null;
7086
- capture_data: Record<string, unknown> | null;
7087
7564
  previous_tickets: {
7088
7565
  ticket_id: string;
7089
7566
  close_code?: string | undefined;
@@ -8281,6 +8758,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8281
8758
  verification: z.ZodOptional<z.ZodEnum<["pending", "confirmed_ok", "confirmed", "inconclusive"]>>;
8282
8759
  recheck_after: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
8283
8760
  resolved_in_ticket: z.ZodOptional<z.ZodString>;
8761
+ resolved_reason: z.ZodOptional<z.ZodEnum<["fact", "judge_resolved", "judge_dismissed", "code_guard", "recheck_ok", "supervisor_false_positive"]>>;
8762
+ resolved_note: z.ZodOptional<z.ZodString>;
8284
8763
  appointment_id: z.ZodOptional<z.ZodString>;
8285
8764
  calendar_id: z.ZodOptional<z.ZodString>;
8286
8765
  first_seen_ticket_id: z.ZodString;
@@ -8308,6 +8787,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8308
8787
  suggested_action?: string | undefined;
8309
8788
  recheck_after?: Date | undefined;
8310
8789
  resolved_in_ticket?: string | undefined;
8790
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
8791
+ resolved_note?: string | undefined;
8311
8792
  }, {
8312
8793
  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";
8313
8794
  status: "open" | "resolved";
@@ -8331,6 +8812,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8331
8812
  suggested_action?: string | undefined;
8332
8813
  recheck_after?: unknown;
8333
8814
  resolved_in_ticket?: string | undefined;
8815
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
8816
+ resolved_note?: string | undefined;
8334
8817
  }>, "many">;
8335
8818
  counts: z.ZodObject<{
8336
8819
  alerts_open: z.ZodNumber;
@@ -8435,6 +8918,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8435
8918
  note?: string | undefined;
8436
8919
  reviewed_at?: unknown;
8437
8920
  }>>;
8921
+ suppressed_alert_fingerprints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
8438
8922
  deleted_by_login_id: z.ZodOptional<z.ZodString>;
8439
8923
  deleted_reason: z.ZodOptional<z.ZodString>;
8440
8924
  verification: z.ZodOptional<z.ZodEnum<["pending", "confirmed_ok", "confirmed", "inconclusive"]>>;
@@ -8938,16 +9422,82 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
8938
9422
  appointment_ids: z.ZodArray<z.ZodString, "many">;
8939
9423
  start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
8940
9424
  end_at: z.ZodEffects<z.ZodDate, Date, unknown>;
9425
+ appointments: z.ZodOptional<z.ZodArray<z.ZodObject<{
9426
+ id: z.ZodString;
9427
+ patient_id: z.ZodOptional<z.ZodString>;
9428
+ patient_name: z.ZodOptional<z.ZodString>;
9429
+ start_at: z.ZodEffects<z.ZodDate, Date, unknown>;
9430
+ end_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
9431
+ professional_name: z.ZodOptional<z.ZodString>;
9432
+ is_lead: z.ZodBoolean;
9433
+ }, "strip", z.ZodTypeAny, {
9434
+ id: string;
9435
+ start_at: Date;
9436
+ is_lead: boolean;
9437
+ patient_id?: string | undefined;
9438
+ patient_name?: string | undefined;
9439
+ end_at?: Date | undefined;
9440
+ professional_name?: string | undefined;
9441
+ }, {
9442
+ id: string;
9443
+ is_lead: boolean;
9444
+ patient_id?: string | undefined;
9445
+ patient_name?: string | undefined;
9446
+ start_at?: unknown;
9447
+ end_at?: unknown;
9448
+ professional_name?: string | undefined;
9449
+ }>, "many">>;
9450
+ family_hints: z.ZodOptional<z.ZodObject<{
9451
+ same_surname: z.ZodBoolean;
9452
+ same_contact: z.ZodBoolean;
9453
+ same_lead: z.ZodBoolean;
9454
+ }, "strip", z.ZodTypeAny, {
9455
+ same_surname: boolean;
9456
+ same_contact: boolean;
9457
+ same_lead: boolean;
9458
+ }, {
9459
+ same_surname: boolean;
9460
+ same_contact: boolean;
9461
+ same_lead: boolean;
9462
+ }>>;
8941
9463
  }, "strip", z.ZodTypeAny, {
8942
9464
  start_at: Date;
8943
9465
  end_at: Date;
8944
9466
  appointment_ids: string[];
9467
+ appointments?: {
9468
+ id: string;
9469
+ start_at: Date;
9470
+ is_lead: boolean;
9471
+ patient_id?: string | undefined;
9472
+ patient_name?: string | undefined;
9473
+ end_at?: Date | undefined;
9474
+ professional_name?: string | undefined;
9475
+ }[] | undefined;
8945
9476
  professional_name?: string | undefined;
9477
+ family_hints?: {
9478
+ same_surname: boolean;
9479
+ same_contact: boolean;
9480
+ same_lead: boolean;
9481
+ } | undefined;
8946
9482
  }, {
8947
9483
  appointment_ids: string[];
9484
+ appointments?: {
9485
+ id: string;
9486
+ is_lead: boolean;
9487
+ patient_id?: string | undefined;
9488
+ patient_name?: string | undefined;
9489
+ start_at?: unknown;
9490
+ end_at?: unknown;
9491
+ professional_name?: string | undefined;
9492
+ }[] | undefined;
8948
9493
  start_at?: unknown;
8949
9494
  end_at?: unknown;
8950
9495
  professional_name?: string | undefined;
9496
+ family_hints?: {
9497
+ same_surname: boolean;
9498
+ same_contact: boolean;
9499
+ same_lead: boolean;
9500
+ } | undefined;
8951
9501
  }>, "many">;
8952
9502
  tags: z.ZodArray<z.ZodString, "many">;
8953
9503
  qualification: z.ZodNullable<z.ZodString>;
@@ -9033,6 +9583,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9033
9583
  professional_name?: string | undefined;
9034
9584
  }[];
9035
9585
  tags: string[];
9586
+ capture_data: Record<string, unknown> | null;
9036
9587
  invoices: {
9037
9588
  id: string;
9038
9589
  kind: "invoice" | "payment_link";
@@ -9054,10 +9605,23 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9054
9605
  start_at: Date;
9055
9606
  end_at: Date;
9056
9607
  appointment_ids: string[];
9608
+ appointments?: {
9609
+ id: string;
9610
+ start_at: Date;
9611
+ is_lead: boolean;
9612
+ patient_id?: string | undefined;
9613
+ patient_name?: string | undefined;
9614
+ end_at?: Date | undefined;
9615
+ professional_name?: string | undefined;
9616
+ }[] | undefined;
9057
9617
  professional_name?: string | undefined;
9618
+ family_hints?: {
9619
+ same_surname: boolean;
9620
+ same_contact: boolean;
9621
+ same_lead: boolean;
9622
+ } | undefined;
9058
9623
  }[];
9059
9624
  dist_channel: string | null;
9060
- capture_data: Record<string, unknown> | null;
9061
9625
  previous_tickets: {
9062
9626
  ticket_id: string;
9063
9627
  close_code?: string | undefined;
@@ -9080,6 +9644,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9080
9644
  professional_name?: string | undefined;
9081
9645
  }[];
9082
9646
  tags: string[];
9647
+ capture_data: Record<string, unknown> | null;
9083
9648
  invoices: {
9084
9649
  id: string;
9085
9650
  kind: "invoice" | "payment_link";
@@ -9099,12 +9664,25 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
9099
9664
  }[];
9100
9665
  overlaps: {
9101
9666
  appointment_ids: string[];
9667
+ appointments?: {
9668
+ id: string;
9669
+ is_lead: boolean;
9670
+ patient_id?: string | undefined;
9671
+ patient_name?: string | undefined;
9672
+ start_at?: unknown;
9673
+ end_at?: unknown;
9674
+ professional_name?: string | undefined;
9675
+ }[] | undefined;
9102
9676
  start_at?: unknown;
9103
9677
  end_at?: unknown;
9104
9678
  professional_name?: string | undefined;
9679
+ family_hints?: {
9680
+ same_surname: boolean;
9681
+ same_contact: boolean;
9682
+ same_lead: boolean;
9683
+ } | undefined;
9105
9684
  }[];
9106
9685
  dist_channel: string | null;
9107
- capture_data: Record<string, unknown> | null;
9108
9686
  previous_tickets: {
9109
9687
  ticket_id: string;
9110
9688
  close_code?: string | undefined;
@@ -10302,6 +10880,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10302
10880
  verification: z.ZodOptional<z.ZodEnum<["pending", "confirmed_ok", "confirmed", "inconclusive"]>>;
10303
10881
  recheck_after: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
10304
10882
  resolved_in_ticket: z.ZodOptional<z.ZodString>;
10883
+ resolved_reason: z.ZodOptional<z.ZodEnum<["fact", "judge_resolved", "judge_dismissed", "code_guard", "recheck_ok", "supervisor_false_positive"]>>;
10884
+ resolved_note: z.ZodOptional<z.ZodString>;
10305
10885
  appointment_id: z.ZodOptional<z.ZodString>;
10306
10886
  calendar_id: z.ZodOptional<z.ZodString>;
10307
10887
  first_seen_ticket_id: z.ZodString;
@@ -10329,6 +10909,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10329
10909
  suggested_action?: string | undefined;
10330
10910
  recheck_after?: Date | undefined;
10331
10911
  resolved_in_ticket?: string | undefined;
10912
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
10913
+ resolved_note?: string | undefined;
10332
10914
  }, {
10333
10915
  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";
10334
10916
  status: "open" | "resolved";
@@ -10352,6 +10934,8 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10352
10934
  suggested_action?: string | undefined;
10353
10935
  recheck_after?: unknown;
10354
10936
  resolved_in_ticket?: string | undefined;
10937
+ resolved_reason?: "fact" | "judge_resolved" | "judge_dismissed" | "code_guard" | "recheck_ok" | "supervisor_false_positive" | undefined;
10938
+ resolved_note?: string | undefined;
10355
10939
  }>, "many">;
10356
10940
  counts: z.ZodObject<{
10357
10941
  alerts_open: z.ZodNumber;
@@ -10456,6 +11040,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10456
11040
  note?: string | undefined;
10457
11041
  reviewed_at?: unknown;
10458
11042
  }>>;
11043
+ suppressed_alert_fingerprints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10459
11044
  deleted_by_login_id: z.ZodOptional<z.ZodString>;
10460
11045
  deleted_reason: z.ZodOptional<z.ZodString>;
10461
11046
  verification: z.ZodOptional<z.ZodEnum<["pending", "confirmed_ok", "confirmed", "inconclusive"]>>;