evo360-types 1.3.764 → 1.3.766

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.
@@ -0,0 +1,3260 @@
1
+ import { z } from "zod";
2
+ export declare const zAttachmentSourceKindSchema: z.ZodNativeEnum<{
3
+ readonly PatientUpload: "patient_upload";
4
+ readonly AppointmentUpload: "appointment_upload";
5
+ readonly ChatMessage: "chat_message";
6
+ readonly EmailMessage: "email_message";
7
+ readonly HistoryImport: "history_import";
8
+ readonly PlatformGenerated: "platform_generated";
9
+ }>;
10
+ export declare const zAttachmentDirectionSchema: z.ZodNativeEnum<{
11
+ readonly Inbound: "inbound";
12
+ readonly Outbound: "outbound";
13
+ }>;
14
+ export declare const zAttachmentClassificationSourceSchema: z.ZodNativeEnum<{
15
+ readonly Human: "human";
16
+ readonly Hubia: "hubia";
17
+ readonly None: "none";
18
+ }>;
19
+ export declare const zAttachmentMediaKindSchema: z.ZodNativeEnum<{
20
+ readonly Image: "image";
21
+ readonly Document: "document";
22
+ readonly Audio: "audio";
23
+ readonly Video: "video";
24
+ readonly Other: "other";
25
+ }>;
26
+ export declare const zAttachmentSubjectTypeSchema: z.ZodEnum<["med_patient", "crm_lead", "med_appointment", "chat_contact"]>;
27
+ export declare const zAttachmentIndexReasonSchema: z.ZodNativeEnum<{
28
+ readonly Message: "message";
29
+ readonly Reindex: "reindex";
30
+ }>;
31
+ export declare const zAttachmentActorSchema: z.ZodObject<{
32
+ userId: z.ZodString;
33
+ displayName: z.ZodString;
34
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
35
+ userId: z.ZodString;
36
+ displayName: z.ZodString;
37
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
38
+ userId: z.ZodString;
39
+ displayName: z.ZodString;
40
+ }, z.ZodTypeAny, "passthrough">>;
41
+ /** `direction` é obrigatório (inbound|outbound) quando a fonte é mensagem (Q9). */
42
+ export declare const zAttachmentSourceSchema: z.ZodEffects<z.ZodObject<{
43
+ kind: z.ZodNativeEnum<{
44
+ readonly PatientUpload: "patient_upload";
45
+ readonly AppointmentUpload: "appointment_upload";
46
+ readonly ChatMessage: "chat_message";
47
+ readonly EmailMessage: "email_message";
48
+ readonly HistoryImport: "history_import";
49
+ readonly PlatformGenerated: "platform_generated";
50
+ }>;
51
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
59
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
60
+ readonly Inbound: "inbound";
61
+ readonly Outbound: "outbound";
62
+ }>>>;
63
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
64
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
67
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
68
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
70
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ }, z.ZodTypeAny, "passthrough">>>>;
73
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
74
+ userId: z.ZodString;
75
+ displayName: z.ZodString;
76
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
77
+ userId: z.ZodString;
78
+ displayName: z.ZodString;
79
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
80
+ userId: z.ZodString;
81
+ displayName: z.ZodString;
82
+ }, z.ZodTypeAny, "passthrough">>>>;
83
+ occurred_at: z.ZodDate;
84
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
85
+ kind: z.ZodNativeEnum<{
86
+ readonly PatientUpload: "patient_upload";
87
+ readonly AppointmentUpload: "appointment_upload";
88
+ readonly ChatMessage: "chat_message";
89
+ readonly EmailMessage: "email_message";
90
+ readonly HistoryImport: "history_import";
91
+ readonly PlatformGenerated: "platform_generated";
92
+ }>;
93
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
101
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
102
+ readonly Inbound: "inbound";
103
+ readonly Outbound: "outbound";
104
+ }>>>;
105
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
106
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
109
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
112
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
+ }, z.ZodTypeAny, "passthrough">>>>;
115
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
116
+ userId: z.ZodString;
117
+ displayName: z.ZodString;
118
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
119
+ userId: z.ZodString;
120
+ displayName: z.ZodString;
121
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
122
+ userId: z.ZodString;
123
+ displayName: z.ZodString;
124
+ }, z.ZodTypeAny, "passthrough">>>>;
125
+ occurred_at: z.ZodDate;
126
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
127
+ kind: z.ZodNativeEnum<{
128
+ readonly PatientUpload: "patient_upload";
129
+ readonly AppointmentUpload: "appointment_upload";
130
+ readonly ChatMessage: "chat_message";
131
+ readonly EmailMessage: "email_message";
132
+ readonly HistoryImport: "history_import";
133
+ readonly PlatformGenerated: "platform_generated";
134
+ }>;
135
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
137
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
139
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
140
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
142
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
143
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
144
+ readonly Inbound: "inbound";
145
+ readonly Outbound: "outbound";
146
+ }>>>;
147
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
148
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
149
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
150
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
151
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
152
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
153
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
154
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
155
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
+ }, z.ZodTypeAny, "passthrough">>>>;
157
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
158
+ userId: z.ZodString;
159
+ displayName: z.ZodString;
160
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
161
+ userId: z.ZodString;
162
+ displayName: z.ZodString;
163
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
164
+ userId: z.ZodString;
165
+ displayName: z.ZodString;
166
+ }, z.ZodTypeAny, "passthrough">>>>;
167
+ occurred_at: z.ZodDate;
168
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
169
+ kind: z.ZodNativeEnum<{
170
+ readonly PatientUpload: "patient_upload";
171
+ readonly AppointmentUpload: "appointment_upload";
172
+ readonly ChatMessage: "chat_message";
173
+ readonly EmailMessage: "email_message";
174
+ readonly HistoryImport: "history_import";
175
+ readonly PlatformGenerated: "platform_generated";
176
+ }>;
177
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
178
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
185
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
186
+ readonly Inbound: "inbound";
187
+ readonly Outbound: "outbound";
188
+ }>>>;
189
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
190
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
191
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
192
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
193
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
194
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
195
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
196
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
+ }, z.ZodTypeAny, "passthrough">>>>;
199
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
200
+ userId: z.ZodString;
201
+ displayName: z.ZodString;
202
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
203
+ userId: z.ZodString;
204
+ displayName: z.ZodString;
205
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
206
+ userId: z.ZodString;
207
+ displayName: z.ZodString;
208
+ }, z.ZodTypeAny, "passthrough">>>>;
209
+ occurred_at: z.ZodDate;
210
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
211
+ kind: z.ZodNativeEnum<{
212
+ readonly PatientUpload: "patient_upload";
213
+ readonly AppointmentUpload: "appointment_upload";
214
+ readonly ChatMessage: "chat_message";
215
+ readonly EmailMessage: "email_message";
216
+ readonly HistoryImport: "history_import";
217
+ readonly PlatformGenerated: "platform_generated";
218
+ }>;
219
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
222
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
223
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
224
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
225
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
226
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
227
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
228
+ readonly Inbound: "inbound";
229
+ readonly Outbound: "outbound";
230
+ }>>>;
231
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
232
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
233
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
235
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
237
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
238
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
239
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
240
+ }, z.ZodTypeAny, "passthrough">>>>;
241
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
242
+ userId: z.ZodString;
243
+ displayName: z.ZodString;
244
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
245
+ userId: z.ZodString;
246
+ displayName: z.ZodString;
247
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
248
+ userId: z.ZodString;
249
+ displayName: z.ZodString;
250
+ }, z.ZodTypeAny, "passthrough">>>>;
251
+ occurred_at: z.ZodDate;
252
+ }, z.ZodTypeAny, "passthrough">>;
253
+ /** Bloqueado pode vir sem `gcs_uri` (só `quarantine_uri`); não bloqueado exige `gcs_uri`. */
254
+ export declare const zAttachmentFileSchema: z.ZodEffects<z.ZodObject<{
255
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
256
+ filename: z.ZodString;
257
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
+ content_type: z.ZodString;
259
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
260
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
261
+ blocked: z.ZodOptional<z.ZodBoolean>;
262
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
263
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
264
+ media_kind: z.ZodNativeEnum<{
265
+ readonly Image: "image";
266
+ readonly Document: "document";
267
+ readonly Audio: "audio";
268
+ readonly Video: "video";
269
+ readonly Other: "other";
270
+ }>;
271
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
272
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
273
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
274
+ filename: z.ZodString;
275
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
276
+ content_type: z.ZodString;
277
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
278
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
279
+ blocked: z.ZodOptional<z.ZodBoolean>;
280
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
281
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
282
+ media_kind: z.ZodNativeEnum<{
283
+ readonly Image: "image";
284
+ readonly Document: "document";
285
+ readonly Audio: "audio";
286
+ readonly Video: "video";
287
+ readonly Other: "other";
288
+ }>;
289
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
290
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
291
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
292
+ filename: z.ZodString;
293
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
294
+ content_type: z.ZodString;
295
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
296
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
297
+ blocked: z.ZodOptional<z.ZodBoolean>;
298
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
299
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
300
+ media_kind: z.ZodNativeEnum<{
301
+ readonly Image: "image";
302
+ readonly Document: "document";
303
+ readonly Audio: "audio";
304
+ readonly Video: "video";
305
+ readonly Other: "other";
306
+ }>;
307
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
308
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
309
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
310
+ filename: z.ZodString;
311
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
312
+ content_type: z.ZodString;
313
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
314
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
315
+ blocked: z.ZodOptional<z.ZodBoolean>;
316
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
318
+ media_kind: z.ZodNativeEnum<{
319
+ readonly Image: "image";
320
+ readonly Document: "document";
321
+ readonly Audio: "audio";
322
+ readonly Video: "video";
323
+ readonly Other: "other";
324
+ }>;
325
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
326
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
327
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
328
+ filename: z.ZodString;
329
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
330
+ content_type: z.ZodString;
331
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
332
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
333
+ blocked: z.ZodOptional<z.ZodBoolean>;
334
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
335
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
336
+ media_kind: z.ZodNativeEnum<{
337
+ readonly Image: "image";
338
+ readonly Document: "document";
339
+ readonly Audio: "audio";
340
+ readonly Video: "video";
341
+ readonly Other: "other";
342
+ }>;
343
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
344
+ }, z.ZodTypeAny, "passthrough">>;
345
+ export declare const zAttachmentAiSuggestionSchema: z.ZodObject<{
346
+ kind: z.ZodString;
347
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
348
+ summary: z.ZodString;
349
+ confidence: z.ZodNumber;
350
+ prompt_version: z.ZodString;
351
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
352
+ classified_at: z.ZodDate;
353
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
354
+ kind: z.ZodString;
355
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
356
+ summary: z.ZodString;
357
+ confidence: z.ZodNumber;
358
+ prompt_version: z.ZodString;
359
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
360
+ classified_at: z.ZodDate;
361
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
362
+ kind: z.ZodString;
363
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
364
+ summary: z.ZodString;
365
+ confidence: z.ZodNumber;
366
+ prompt_version: z.ZodString;
367
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
368
+ classified_at: z.ZodDate;
369
+ }, z.ZodTypeAny, "passthrough">>;
370
+ export declare const zAttachmentClassificationSchema: z.ZodObject<{
371
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
372
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
373
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
374
+ source: z.ZodNativeEnum<{
375
+ readonly Human: "human";
376
+ readonly Hubia: "hubia";
377
+ readonly None: "none";
378
+ }>;
379
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
380
+ userId: z.ZodString;
381
+ displayName: z.ZodString;
382
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
383
+ userId: z.ZodString;
384
+ displayName: z.ZodString;
385
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
386
+ userId: z.ZodString;
387
+ displayName: z.ZodString;
388
+ }, z.ZodTypeAny, "passthrough">>>>;
389
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
390
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
391
+ kind: z.ZodString;
392
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
393
+ summary: z.ZodString;
394
+ confidence: z.ZodNumber;
395
+ prompt_version: z.ZodString;
396
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
397
+ classified_at: z.ZodDate;
398
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
399
+ kind: z.ZodString;
400
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
401
+ summary: z.ZodString;
402
+ confidence: z.ZodNumber;
403
+ prompt_version: z.ZodString;
404
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
405
+ classified_at: z.ZodDate;
406
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
407
+ kind: z.ZodString;
408
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
409
+ summary: z.ZodString;
410
+ confidence: z.ZodNumber;
411
+ prompt_version: z.ZodString;
412
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
413
+ classified_at: z.ZodDate;
414
+ }, z.ZodTypeAny, "passthrough">>>>;
415
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
416
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
417
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
418
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
419
+ source: z.ZodNativeEnum<{
420
+ readonly Human: "human";
421
+ readonly Hubia: "hubia";
422
+ readonly None: "none";
423
+ }>;
424
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
425
+ userId: z.ZodString;
426
+ displayName: z.ZodString;
427
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
428
+ userId: z.ZodString;
429
+ displayName: z.ZodString;
430
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
431
+ userId: z.ZodString;
432
+ displayName: z.ZodString;
433
+ }, z.ZodTypeAny, "passthrough">>>>;
434
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
435
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
436
+ kind: z.ZodString;
437
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
438
+ summary: z.ZodString;
439
+ confidence: z.ZodNumber;
440
+ prompt_version: z.ZodString;
441
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
442
+ classified_at: z.ZodDate;
443
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
444
+ kind: z.ZodString;
445
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
446
+ summary: z.ZodString;
447
+ confidence: z.ZodNumber;
448
+ prompt_version: z.ZodString;
449
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
450
+ classified_at: z.ZodDate;
451
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
452
+ kind: z.ZodString;
453
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
454
+ summary: z.ZodString;
455
+ confidence: z.ZodNumber;
456
+ prompt_version: z.ZodString;
457
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
458
+ classified_at: z.ZodDate;
459
+ }, z.ZodTypeAny, "passthrough">>>>;
460
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
461
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
462
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
463
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
464
+ source: z.ZodNativeEnum<{
465
+ readonly Human: "human";
466
+ readonly Hubia: "hubia";
467
+ readonly None: "none";
468
+ }>;
469
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
470
+ userId: z.ZodString;
471
+ displayName: z.ZodString;
472
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
473
+ userId: z.ZodString;
474
+ displayName: z.ZodString;
475
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
476
+ userId: z.ZodString;
477
+ displayName: z.ZodString;
478
+ }, z.ZodTypeAny, "passthrough">>>>;
479
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
480
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
481
+ kind: z.ZodString;
482
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
483
+ summary: z.ZodString;
484
+ confidence: z.ZodNumber;
485
+ prompt_version: z.ZodString;
486
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
487
+ classified_at: z.ZodDate;
488
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
489
+ kind: z.ZodString;
490
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
491
+ summary: z.ZodString;
492
+ confidence: z.ZodNumber;
493
+ prompt_version: z.ZodString;
494
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
495
+ classified_at: z.ZodDate;
496
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
497
+ kind: z.ZodString;
498
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
499
+ summary: z.ZodString;
500
+ confidence: z.ZodNumber;
501
+ prompt_version: z.ZodString;
502
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
503
+ classified_at: z.ZodDate;
504
+ }, z.ZodTypeAny, "passthrough">>>>;
505
+ }, z.ZodTypeAny, "passthrough">>;
506
+ /** Link do anexo: o `type` precisa ser de `ATTACHMENT_SUBJECT_TYPES`. */
507
+ export declare const zAttachmentExternalLinkSchema: z.ZodEffects<z.ZodObject<{
508
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
509
+ id: z.ZodString;
510
+ label: z.ZodOptional<z.ZodString>;
511
+ ref: z.ZodOptional<z.ZodAny>;
512
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
513
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
514
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
515
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
516
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
517
+ }, "strip", z.ZodTypeAny, {
518
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
519
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
520
+ }, {
521
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
522
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
523
+ }>>>;
524
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
525
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
526
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
527
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
528
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
529
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
530
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
531
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
532
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
533
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
534
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
535
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
536
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
537
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
538
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
539
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
540
+ id: z.ZodString;
541
+ label: z.ZodOptional<z.ZodString>;
542
+ ref: z.ZodOptional<z.ZodAny>;
543
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
544
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
545
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
546
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
547
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
548
+ }, "strip", z.ZodTypeAny, {
549
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
550
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
551
+ }, {
552
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
553
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
554
+ }>>>;
555
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
556
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
557
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
558
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
559
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
560
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
561
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
562
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
563
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
564
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
565
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
566
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
567
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
568
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
569
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
570
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
571
+ id: z.ZodString;
572
+ label: z.ZodOptional<z.ZodString>;
573
+ ref: z.ZodOptional<z.ZodAny>;
574
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
575
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
576
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
577
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
578
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
579
+ }, "strip", z.ZodTypeAny, {
580
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
581
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
582
+ }, {
583
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
584
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
585
+ }>>>;
586
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
587
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
588
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
589
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
590
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
591
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
592
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
593
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
594
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
595
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
596
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
597
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
598
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
599
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
600
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
601
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
602
+ id: z.ZodString;
603
+ label: z.ZodOptional<z.ZodString>;
604
+ ref: z.ZodOptional<z.ZodAny>;
605
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
606
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
607
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
608
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
609
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
610
+ }, "strip", z.ZodTypeAny, {
611
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
612
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
613
+ }, {
614
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
615
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
616
+ }>>>;
617
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
618
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
619
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
620
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
621
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
622
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
623
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
624
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
625
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
626
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
627
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
628
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
629
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
630
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
631
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
632
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
633
+ id: z.ZodString;
634
+ label: z.ZodOptional<z.ZodString>;
635
+ ref: z.ZodOptional<z.ZodAny>;
636
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
637
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
638
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
639
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
640
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
641
+ }, "strip", z.ZodTypeAny, {
642
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
643
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
644
+ }, {
645
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
646
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
647
+ }>>>;
648
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
649
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
650
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
651
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
652
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
653
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
654
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
655
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
656
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
657
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
658
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
659
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
660
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
661
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
662
+ }, z.ZodTypeAny, "passthrough">>;
663
+ export declare const zAttachmentPrimarySubjectSchema: z.ZodObject<{
664
+ type: z.ZodEnum<["med_patient", "crm_lead", "med_appointment", "chat_contact"]>;
665
+ id: z.ZodString;
666
+ }, "strip", z.ZodTypeAny, {
667
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
668
+ id: string;
669
+ }, {
670
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
671
+ id: string;
672
+ }>;
673
+ export declare const zAttachmentLegacySchema: z.ZodObject<{
674
+ patient_id: z.ZodString;
675
+ migrated_at: z.ZodDate;
676
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
677
+ patient_id: z.ZodString;
678
+ migrated_at: z.ZodDate;
679
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
680
+ patient_id: z.ZodString;
681
+ migrated_at: z.ZodDate;
682
+ }, z.ZodTypeAny, "passthrough">>;
683
+ export declare const zAttachmentSchema: z.ZodObject<{
684
+ id: z.ZodString;
685
+ ref: z.ZodAny;
686
+ tenant: z.ZodString;
687
+ model_ver: z.ZodDefault<z.ZodNumber>;
688
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
689
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
690
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
691
+ } & {
692
+ externalLinks: z.ZodArray<z.ZodEffects<z.ZodObject<{
693
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
694
+ id: z.ZodString;
695
+ label: z.ZodOptional<z.ZodString>;
696
+ ref: z.ZodOptional<z.ZodAny>;
697
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
698
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
699
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
700
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
701
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
702
+ }, "strip", z.ZodTypeAny, {
703
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
704
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
705
+ }, {
706
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
707
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
708
+ }>>>;
709
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
710
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
711
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
712
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
713
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
714
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
715
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
716
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
717
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
718
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
719
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
720
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
721
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
722
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
723
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
724
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
725
+ id: z.ZodString;
726
+ label: z.ZodOptional<z.ZodString>;
727
+ ref: z.ZodOptional<z.ZodAny>;
728
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
729
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
730
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
731
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
732
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
733
+ }, "strip", z.ZodTypeAny, {
734
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
735
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
736
+ }, {
737
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
738
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
739
+ }>>>;
740
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
741
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
742
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
743
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
744
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
745
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
746
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
747
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
748
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
749
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
750
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
751
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
752
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
753
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
754
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
755
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
756
+ id: z.ZodString;
757
+ label: z.ZodOptional<z.ZodString>;
758
+ ref: z.ZodOptional<z.ZodAny>;
759
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
760
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
761
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
762
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
763
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
764
+ }, "strip", z.ZodTypeAny, {
765
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
766
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
767
+ }, {
768
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
769
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
770
+ }>>>;
771
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
772
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
773
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
774
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
775
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
776
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
777
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
778
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
779
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
780
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
781
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
782
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
783
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
784
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
785
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
786
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
787
+ id: z.ZodString;
788
+ label: z.ZodOptional<z.ZodString>;
789
+ ref: z.ZodOptional<z.ZodAny>;
790
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
791
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
792
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
793
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
794
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
795
+ }, "strip", z.ZodTypeAny, {
796
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
797
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
798
+ }, {
799
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
800
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
801
+ }>>>;
802
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
803
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
804
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
805
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
806
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
807
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
808
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
809
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
810
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
811
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
812
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
813
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
814
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
815
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
816
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
817
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
818
+ id: z.ZodString;
819
+ label: z.ZodOptional<z.ZodString>;
820
+ ref: z.ZodOptional<z.ZodAny>;
821
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
822
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
823
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
824
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
825
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
826
+ }, "strip", z.ZodTypeAny, {
827
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
828
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
829
+ }, {
830
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
831
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
832
+ }>>>;
833
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
834
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
835
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
836
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
837
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
838
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
839
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
840
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
841
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
842
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
843
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
844
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
845
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
846
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
847
+ }, z.ZodTypeAny, "passthrough">>, "many">;
848
+ externalLinkKeys: z.ZodArray<z.ZodString, "many">;
849
+ primary_subject: z.ZodObject<{
850
+ type: z.ZodEnum<["med_patient", "crm_lead", "med_appointment", "chat_contact"]>;
851
+ id: z.ZodString;
852
+ }, "strip", z.ZodTypeAny, {
853
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
854
+ id: string;
855
+ }, {
856
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
857
+ id: string;
858
+ }>;
859
+ source: z.ZodEffects<z.ZodObject<{
860
+ kind: z.ZodNativeEnum<{
861
+ readonly PatientUpload: "patient_upload";
862
+ readonly AppointmentUpload: "appointment_upload";
863
+ readonly ChatMessage: "chat_message";
864
+ readonly EmailMessage: "email_message";
865
+ readonly HistoryImport: "history_import";
866
+ readonly PlatformGenerated: "platform_generated";
867
+ }>;
868
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
869
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
870
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
871
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
872
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
873
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
874
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
875
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
876
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
877
+ readonly Inbound: "inbound";
878
+ readonly Outbound: "outbound";
879
+ }>>>;
880
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
881
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
882
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
883
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
884
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
885
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
886
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
887
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
888
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
889
+ }, z.ZodTypeAny, "passthrough">>>>;
890
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
891
+ userId: z.ZodString;
892
+ displayName: z.ZodString;
893
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
894
+ userId: z.ZodString;
895
+ displayName: z.ZodString;
896
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
897
+ userId: z.ZodString;
898
+ displayName: z.ZodString;
899
+ }, z.ZodTypeAny, "passthrough">>>>;
900
+ occurred_at: z.ZodDate;
901
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
902
+ kind: z.ZodNativeEnum<{
903
+ readonly PatientUpload: "patient_upload";
904
+ readonly AppointmentUpload: "appointment_upload";
905
+ readonly ChatMessage: "chat_message";
906
+ readonly EmailMessage: "email_message";
907
+ readonly HistoryImport: "history_import";
908
+ readonly PlatformGenerated: "platform_generated";
909
+ }>;
910
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
911
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
912
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
913
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
914
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
915
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
916
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
917
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
918
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
919
+ readonly Inbound: "inbound";
920
+ readonly Outbound: "outbound";
921
+ }>>>;
922
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
923
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
924
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
925
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
926
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
927
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
928
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
929
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
930
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
931
+ }, z.ZodTypeAny, "passthrough">>>>;
932
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
933
+ userId: z.ZodString;
934
+ displayName: z.ZodString;
935
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
936
+ userId: z.ZodString;
937
+ displayName: z.ZodString;
938
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
939
+ userId: z.ZodString;
940
+ displayName: z.ZodString;
941
+ }, z.ZodTypeAny, "passthrough">>>>;
942
+ occurred_at: z.ZodDate;
943
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
944
+ kind: z.ZodNativeEnum<{
945
+ readonly PatientUpload: "patient_upload";
946
+ readonly AppointmentUpload: "appointment_upload";
947
+ readonly ChatMessage: "chat_message";
948
+ readonly EmailMessage: "email_message";
949
+ readonly HistoryImport: "history_import";
950
+ readonly PlatformGenerated: "platform_generated";
951
+ }>;
952
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
953
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
954
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
955
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
956
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
957
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
958
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
959
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
960
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
961
+ readonly Inbound: "inbound";
962
+ readonly Outbound: "outbound";
963
+ }>>>;
964
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
965
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
966
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
967
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
968
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
969
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
970
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
971
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
972
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
973
+ }, z.ZodTypeAny, "passthrough">>>>;
974
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
975
+ userId: z.ZodString;
976
+ displayName: z.ZodString;
977
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
978
+ userId: z.ZodString;
979
+ displayName: z.ZodString;
980
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
981
+ userId: z.ZodString;
982
+ displayName: z.ZodString;
983
+ }, z.ZodTypeAny, "passthrough">>>>;
984
+ occurred_at: z.ZodDate;
985
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
986
+ kind: z.ZodNativeEnum<{
987
+ readonly PatientUpload: "patient_upload";
988
+ readonly AppointmentUpload: "appointment_upload";
989
+ readonly ChatMessage: "chat_message";
990
+ readonly EmailMessage: "email_message";
991
+ readonly HistoryImport: "history_import";
992
+ readonly PlatformGenerated: "platform_generated";
993
+ }>;
994
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
995
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
996
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
997
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
998
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
999
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1000
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1001
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1002
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
1003
+ readonly Inbound: "inbound";
1004
+ readonly Outbound: "outbound";
1005
+ }>>>;
1006
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1007
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1008
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1009
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1010
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1011
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1012
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1013
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1014
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1015
+ }, z.ZodTypeAny, "passthrough">>>>;
1016
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1017
+ userId: z.ZodString;
1018
+ displayName: z.ZodString;
1019
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1020
+ userId: z.ZodString;
1021
+ displayName: z.ZodString;
1022
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1023
+ userId: z.ZodString;
1024
+ displayName: z.ZodString;
1025
+ }, z.ZodTypeAny, "passthrough">>>>;
1026
+ occurred_at: z.ZodDate;
1027
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1028
+ kind: z.ZodNativeEnum<{
1029
+ readonly PatientUpload: "patient_upload";
1030
+ readonly AppointmentUpload: "appointment_upload";
1031
+ readonly ChatMessage: "chat_message";
1032
+ readonly EmailMessage: "email_message";
1033
+ readonly HistoryImport: "history_import";
1034
+ readonly PlatformGenerated: "platform_generated";
1035
+ }>;
1036
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1037
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1038
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1039
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1040
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1041
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1042
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1043
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1044
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
1045
+ readonly Inbound: "inbound";
1046
+ readonly Outbound: "outbound";
1047
+ }>>>;
1048
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1049
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1050
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1051
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1052
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1053
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1054
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1055
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1056
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1057
+ }, z.ZodTypeAny, "passthrough">>>>;
1058
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1059
+ userId: z.ZodString;
1060
+ displayName: z.ZodString;
1061
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1062
+ userId: z.ZodString;
1063
+ displayName: z.ZodString;
1064
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1065
+ userId: z.ZodString;
1066
+ displayName: z.ZodString;
1067
+ }, z.ZodTypeAny, "passthrough">>>>;
1068
+ occurred_at: z.ZodDate;
1069
+ }, z.ZodTypeAny, "passthrough">>;
1070
+ file: z.ZodEffects<z.ZodObject<{
1071
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1072
+ filename: z.ZodString;
1073
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1074
+ content_type: z.ZodString;
1075
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1076
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1077
+ blocked: z.ZodOptional<z.ZodBoolean>;
1078
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1079
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1080
+ media_kind: z.ZodNativeEnum<{
1081
+ readonly Image: "image";
1082
+ readonly Document: "document";
1083
+ readonly Audio: "audio";
1084
+ readonly Video: "video";
1085
+ readonly Other: "other";
1086
+ }>;
1087
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1088
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1089
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1090
+ filename: z.ZodString;
1091
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1092
+ content_type: z.ZodString;
1093
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1094
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1095
+ blocked: z.ZodOptional<z.ZodBoolean>;
1096
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1097
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1098
+ media_kind: z.ZodNativeEnum<{
1099
+ readonly Image: "image";
1100
+ readonly Document: "document";
1101
+ readonly Audio: "audio";
1102
+ readonly Video: "video";
1103
+ readonly Other: "other";
1104
+ }>;
1105
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1106
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1107
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1108
+ filename: z.ZodString;
1109
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1110
+ content_type: z.ZodString;
1111
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1112
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1113
+ blocked: z.ZodOptional<z.ZodBoolean>;
1114
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1115
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1116
+ media_kind: z.ZodNativeEnum<{
1117
+ readonly Image: "image";
1118
+ readonly Document: "document";
1119
+ readonly Audio: "audio";
1120
+ readonly Video: "video";
1121
+ readonly Other: "other";
1122
+ }>;
1123
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1124
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
1125
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1126
+ filename: z.ZodString;
1127
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1128
+ content_type: z.ZodString;
1129
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1130
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1131
+ blocked: z.ZodOptional<z.ZodBoolean>;
1132
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1133
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1134
+ media_kind: z.ZodNativeEnum<{
1135
+ readonly Image: "image";
1136
+ readonly Document: "document";
1137
+ readonly Audio: "audio";
1138
+ readonly Video: "video";
1139
+ readonly Other: "other";
1140
+ }>;
1141
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1142
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1143
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1144
+ filename: z.ZodString;
1145
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1146
+ content_type: z.ZodString;
1147
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1148
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1149
+ blocked: z.ZodOptional<z.ZodBoolean>;
1150
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1151
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1152
+ media_kind: z.ZodNativeEnum<{
1153
+ readonly Image: "image";
1154
+ readonly Document: "document";
1155
+ readonly Audio: "audio";
1156
+ readonly Video: "video";
1157
+ readonly Other: "other";
1158
+ }>;
1159
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1160
+ }, z.ZodTypeAny, "passthrough">>;
1161
+ classification: z.ZodObject<{
1162
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1163
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
1164
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1165
+ source: z.ZodNativeEnum<{
1166
+ readonly Human: "human";
1167
+ readonly Hubia: "hubia";
1168
+ readonly None: "none";
1169
+ }>;
1170
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1171
+ userId: z.ZodString;
1172
+ displayName: z.ZodString;
1173
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1174
+ userId: z.ZodString;
1175
+ displayName: z.ZodString;
1176
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1177
+ userId: z.ZodString;
1178
+ displayName: z.ZodString;
1179
+ }, z.ZodTypeAny, "passthrough">>>>;
1180
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1181
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1182
+ kind: z.ZodString;
1183
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1184
+ summary: z.ZodString;
1185
+ confidence: z.ZodNumber;
1186
+ prompt_version: z.ZodString;
1187
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1188
+ classified_at: z.ZodDate;
1189
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1190
+ kind: z.ZodString;
1191
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1192
+ summary: z.ZodString;
1193
+ confidence: z.ZodNumber;
1194
+ prompt_version: z.ZodString;
1195
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1196
+ classified_at: z.ZodDate;
1197
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1198
+ kind: z.ZodString;
1199
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1200
+ summary: z.ZodString;
1201
+ confidence: z.ZodNumber;
1202
+ prompt_version: z.ZodString;
1203
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1204
+ classified_at: z.ZodDate;
1205
+ }, z.ZodTypeAny, "passthrough">>>>;
1206
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1207
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1208
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
1209
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1210
+ source: z.ZodNativeEnum<{
1211
+ readonly Human: "human";
1212
+ readonly Hubia: "hubia";
1213
+ readonly None: "none";
1214
+ }>;
1215
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1216
+ userId: z.ZodString;
1217
+ displayName: z.ZodString;
1218
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1219
+ userId: z.ZodString;
1220
+ displayName: z.ZodString;
1221
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1222
+ userId: z.ZodString;
1223
+ displayName: z.ZodString;
1224
+ }, z.ZodTypeAny, "passthrough">>>>;
1225
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1226
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1227
+ kind: z.ZodString;
1228
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1229
+ summary: z.ZodString;
1230
+ confidence: z.ZodNumber;
1231
+ prompt_version: z.ZodString;
1232
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1233
+ classified_at: z.ZodDate;
1234
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1235
+ kind: z.ZodString;
1236
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1237
+ summary: z.ZodString;
1238
+ confidence: z.ZodNumber;
1239
+ prompt_version: z.ZodString;
1240
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1241
+ classified_at: z.ZodDate;
1242
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1243
+ kind: z.ZodString;
1244
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1245
+ summary: z.ZodString;
1246
+ confidence: z.ZodNumber;
1247
+ prompt_version: z.ZodString;
1248
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1249
+ classified_at: z.ZodDate;
1250
+ }, z.ZodTypeAny, "passthrough">>>>;
1251
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1252
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1253
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
1254
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1255
+ source: z.ZodNativeEnum<{
1256
+ readonly Human: "human";
1257
+ readonly Hubia: "hubia";
1258
+ readonly None: "none";
1259
+ }>;
1260
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1261
+ userId: z.ZodString;
1262
+ displayName: z.ZodString;
1263
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1264
+ userId: z.ZodString;
1265
+ displayName: z.ZodString;
1266
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1267
+ userId: z.ZodString;
1268
+ displayName: z.ZodString;
1269
+ }, z.ZodTypeAny, "passthrough">>>>;
1270
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1271
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1272
+ kind: z.ZodString;
1273
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1274
+ summary: z.ZodString;
1275
+ confidence: z.ZodNumber;
1276
+ prompt_version: z.ZodString;
1277
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1278
+ classified_at: z.ZodDate;
1279
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1280
+ kind: z.ZodString;
1281
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1282
+ summary: z.ZodString;
1283
+ confidence: z.ZodNumber;
1284
+ prompt_version: z.ZodString;
1285
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1286
+ classified_at: z.ZodDate;
1287
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1288
+ kind: z.ZodString;
1289
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1290
+ summary: z.ZodString;
1291
+ confidence: z.ZodNumber;
1292
+ prompt_version: z.ZodString;
1293
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1294
+ classified_at: z.ZodDate;
1295
+ }, z.ZodTypeAny, "passthrough">>>>;
1296
+ }, z.ZodTypeAny, "passthrough">>;
1297
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1298
+ name: z.ZodString;
1299
+ color: z.ZodOptional<z.ZodString>;
1300
+ hidden: z.ZodBoolean;
1301
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1302
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1303
+ }, "strip", z.ZodTypeAny, {
1304
+ name: string;
1305
+ hidden: boolean;
1306
+ base?: boolean | undefined;
1307
+ color?: string | undefined;
1308
+ category?: string | null | undefined;
1309
+ }, {
1310
+ name: string;
1311
+ hidden: boolean;
1312
+ base?: boolean | undefined;
1313
+ color?: string | undefined;
1314
+ category?: string | null | undefined;
1315
+ }>, "many">>>;
1316
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1317
+ legacy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1318
+ patient_id: z.ZodString;
1319
+ migrated_at: z.ZodDate;
1320
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1321
+ patient_id: z.ZodString;
1322
+ migrated_at: z.ZodDate;
1323
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1324
+ patient_id: z.ZodString;
1325
+ migrated_at: z.ZodDate;
1326
+ }, z.ZodTypeAny, "passthrough">>>>;
1327
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1328
+ userId: z.ZodString;
1329
+ displayName: z.ZodString;
1330
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1331
+ userId: z.ZodString;
1332
+ displayName: z.ZodString;
1333
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1334
+ userId: z.ZodString;
1335
+ displayName: z.ZodString;
1336
+ }, z.ZodTypeAny, "passthrough">>>>;
1337
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1338
+ id: z.ZodString;
1339
+ ref: z.ZodAny;
1340
+ tenant: z.ZodString;
1341
+ model_ver: z.ZodDefault<z.ZodNumber>;
1342
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1343
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1344
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1345
+ } & {
1346
+ externalLinks: z.ZodArray<z.ZodEffects<z.ZodObject<{
1347
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
1348
+ id: z.ZodString;
1349
+ label: z.ZodOptional<z.ZodString>;
1350
+ ref: z.ZodOptional<z.ZodAny>;
1351
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
1352
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
1353
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1354
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
1355
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
1356
+ }, "strip", z.ZodTypeAny, {
1357
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
1358
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
1359
+ }, {
1360
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
1361
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
1362
+ }>>>;
1363
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
1364
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1365
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
1366
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1367
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1368
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
1369
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1370
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
1371
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1372
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1373
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1374
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1375
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1376
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1377
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1378
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
1379
+ id: z.ZodString;
1380
+ label: z.ZodOptional<z.ZodString>;
1381
+ ref: z.ZodOptional<z.ZodAny>;
1382
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
1383
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
1384
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1385
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
1386
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
1387
+ }, "strip", z.ZodTypeAny, {
1388
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
1389
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
1390
+ }, {
1391
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
1392
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
1393
+ }>>>;
1394
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
1395
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1396
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
1397
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1398
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1399
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
1400
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1401
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
1402
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1403
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1404
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1405
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1406
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1407
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1408
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1409
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
1410
+ id: z.ZodString;
1411
+ label: z.ZodOptional<z.ZodString>;
1412
+ ref: z.ZodOptional<z.ZodAny>;
1413
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
1414
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
1415
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1416
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
1417
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
1418
+ }, "strip", z.ZodTypeAny, {
1419
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
1420
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
1421
+ }, {
1422
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
1423
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
1424
+ }>>>;
1425
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
1426
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1427
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
1428
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1429
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1430
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
1431
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1432
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
1433
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1434
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1435
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1436
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1437
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1438
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1439
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
1440
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
1441
+ id: z.ZodString;
1442
+ label: z.ZodOptional<z.ZodString>;
1443
+ ref: z.ZodOptional<z.ZodAny>;
1444
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
1445
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
1446
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1447
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
1448
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
1449
+ }, "strip", z.ZodTypeAny, {
1450
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
1451
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
1452
+ }, {
1453
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
1454
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
1455
+ }>>>;
1456
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
1457
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1458
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
1459
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1460
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1461
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
1462
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1463
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
1464
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1465
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1466
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1467
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1468
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1469
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1470
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1471
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
1472
+ id: z.ZodString;
1473
+ label: z.ZodOptional<z.ZodString>;
1474
+ ref: z.ZodOptional<z.ZodAny>;
1475
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
1476
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
1477
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1478
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
1479
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
1480
+ }, "strip", z.ZodTypeAny, {
1481
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
1482
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
1483
+ }, {
1484
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
1485
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
1486
+ }>>>;
1487
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
1488
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1489
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
1490
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1491
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1492
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
1493
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1494
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
1495
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1496
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1497
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
1498
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1499
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1500
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1501
+ }, z.ZodTypeAny, "passthrough">>, "many">;
1502
+ externalLinkKeys: z.ZodArray<z.ZodString, "many">;
1503
+ primary_subject: z.ZodObject<{
1504
+ type: z.ZodEnum<["med_patient", "crm_lead", "med_appointment", "chat_contact"]>;
1505
+ id: z.ZodString;
1506
+ }, "strip", z.ZodTypeAny, {
1507
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
1508
+ id: string;
1509
+ }, {
1510
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
1511
+ id: string;
1512
+ }>;
1513
+ source: z.ZodEffects<z.ZodObject<{
1514
+ kind: z.ZodNativeEnum<{
1515
+ readonly PatientUpload: "patient_upload";
1516
+ readonly AppointmentUpload: "appointment_upload";
1517
+ readonly ChatMessage: "chat_message";
1518
+ readonly EmailMessage: "email_message";
1519
+ readonly HistoryImport: "history_import";
1520
+ readonly PlatformGenerated: "platform_generated";
1521
+ }>;
1522
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1523
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1524
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1525
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1526
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1527
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1528
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1529
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1530
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
1531
+ readonly Inbound: "inbound";
1532
+ readonly Outbound: "outbound";
1533
+ }>>>;
1534
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1535
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1536
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1537
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1538
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1539
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1540
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1541
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1542
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1543
+ }, z.ZodTypeAny, "passthrough">>>>;
1544
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1545
+ userId: z.ZodString;
1546
+ displayName: z.ZodString;
1547
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1548
+ userId: z.ZodString;
1549
+ displayName: z.ZodString;
1550
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1551
+ userId: z.ZodString;
1552
+ displayName: z.ZodString;
1553
+ }, z.ZodTypeAny, "passthrough">>>>;
1554
+ occurred_at: z.ZodDate;
1555
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1556
+ kind: z.ZodNativeEnum<{
1557
+ readonly PatientUpload: "patient_upload";
1558
+ readonly AppointmentUpload: "appointment_upload";
1559
+ readonly ChatMessage: "chat_message";
1560
+ readonly EmailMessage: "email_message";
1561
+ readonly HistoryImport: "history_import";
1562
+ readonly PlatformGenerated: "platform_generated";
1563
+ }>;
1564
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1565
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1566
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1567
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1568
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1569
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1570
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1571
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1572
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
1573
+ readonly Inbound: "inbound";
1574
+ readonly Outbound: "outbound";
1575
+ }>>>;
1576
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1577
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1578
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1579
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1580
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1581
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1582
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1583
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1584
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1585
+ }, z.ZodTypeAny, "passthrough">>>>;
1586
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1587
+ userId: z.ZodString;
1588
+ displayName: z.ZodString;
1589
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1590
+ userId: z.ZodString;
1591
+ displayName: z.ZodString;
1592
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1593
+ userId: z.ZodString;
1594
+ displayName: z.ZodString;
1595
+ }, z.ZodTypeAny, "passthrough">>>>;
1596
+ occurred_at: z.ZodDate;
1597
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1598
+ kind: z.ZodNativeEnum<{
1599
+ readonly PatientUpload: "patient_upload";
1600
+ readonly AppointmentUpload: "appointment_upload";
1601
+ readonly ChatMessage: "chat_message";
1602
+ readonly EmailMessage: "email_message";
1603
+ readonly HistoryImport: "history_import";
1604
+ readonly PlatformGenerated: "platform_generated";
1605
+ }>;
1606
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1607
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1608
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1609
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1610
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1611
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1612
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1613
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1614
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
1615
+ readonly Inbound: "inbound";
1616
+ readonly Outbound: "outbound";
1617
+ }>>>;
1618
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1619
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1620
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1621
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1622
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1623
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1624
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1625
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1626
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1627
+ }, z.ZodTypeAny, "passthrough">>>>;
1628
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1629
+ userId: z.ZodString;
1630
+ displayName: z.ZodString;
1631
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1632
+ userId: z.ZodString;
1633
+ displayName: z.ZodString;
1634
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1635
+ userId: z.ZodString;
1636
+ displayName: z.ZodString;
1637
+ }, z.ZodTypeAny, "passthrough">>>>;
1638
+ occurred_at: z.ZodDate;
1639
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
1640
+ kind: z.ZodNativeEnum<{
1641
+ readonly PatientUpload: "patient_upload";
1642
+ readonly AppointmentUpload: "appointment_upload";
1643
+ readonly ChatMessage: "chat_message";
1644
+ readonly EmailMessage: "email_message";
1645
+ readonly HistoryImport: "history_import";
1646
+ readonly PlatformGenerated: "platform_generated";
1647
+ }>;
1648
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1649
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1650
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1651
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1652
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1653
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1654
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1655
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1656
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
1657
+ readonly Inbound: "inbound";
1658
+ readonly Outbound: "outbound";
1659
+ }>>>;
1660
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1661
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1662
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1663
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1664
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1665
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1666
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1667
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1668
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1669
+ }, z.ZodTypeAny, "passthrough">>>>;
1670
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1671
+ userId: z.ZodString;
1672
+ displayName: z.ZodString;
1673
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1674
+ userId: z.ZodString;
1675
+ displayName: z.ZodString;
1676
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1677
+ userId: z.ZodString;
1678
+ displayName: z.ZodString;
1679
+ }, z.ZodTypeAny, "passthrough">>>>;
1680
+ occurred_at: z.ZodDate;
1681
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1682
+ kind: z.ZodNativeEnum<{
1683
+ readonly PatientUpload: "patient_upload";
1684
+ readonly AppointmentUpload: "appointment_upload";
1685
+ readonly ChatMessage: "chat_message";
1686
+ readonly EmailMessage: "email_message";
1687
+ readonly HistoryImport: "history_import";
1688
+ readonly PlatformGenerated: "platform_generated";
1689
+ }>;
1690
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1691
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1692
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1693
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1694
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1695
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1696
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1697
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1698
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
1699
+ readonly Inbound: "inbound";
1700
+ readonly Outbound: "outbound";
1701
+ }>>>;
1702
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1703
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1704
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1705
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1706
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1707
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1708
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1709
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1710
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1711
+ }, z.ZodTypeAny, "passthrough">>>>;
1712
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1713
+ userId: z.ZodString;
1714
+ displayName: z.ZodString;
1715
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1716
+ userId: z.ZodString;
1717
+ displayName: z.ZodString;
1718
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1719
+ userId: z.ZodString;
1720
+ displayName: z.ZodString;
1721
+ }, z.ZodTypeAny, "passthrough">>>>;
1722
+ occurred_at: z.ZodDate;
1723
+ }, z.ZodTypeAny, "passthrough">>;
1724
+ file: z.ZodEffects<z.ZodObject<{
1725
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1726
+ filename: z.ZodString;
1727
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1728
+ content_type: z.ZodString;
1729
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1730
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1731
+ blocked: z.ZodOptional<z.ZodBoolean>;
1732
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1733
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1734
+ media_kind: z.ZodNativeEnum<{
1735
+ readonly Image: "image";
1736
+ readonly Document: "document";
1737
+ readonly Audio: "audio";
1738
+ readonly Video: "video";
1739
+ readonly Other: "other";
1740
+ }>;
1741
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1742
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1743
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1744
+ filename: z.ZodString;
1745
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1746
+ content_type: z.ZodString;
1747
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1748
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1749
+ blocked: z.ZodOptional<z.ZodBoolean>;
1750
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1751
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1752
+ media_kind: z.ZodNativeEnum<{
1753
+ readonly Image: "image";
1754
+ readonly Document: "document";
1755
+ readonly Audio: "audio";
1756
+ readonly Video: "video";
1757
+ readonly Other: "other";
1758
+ }>;
1759
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1760
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1761
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1762
+ filename: z.ZodString;
1763
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1764
+ content_type: z.ZodString;
1765
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1766
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1767
+ blocked: z.ZodOptional<z.ZodBoolean>;
1768
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1769
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1770
+ media_kind: z.ZodNativeEnum<{
1771
+ readonly Image: "image";
1772
+ readonly Document: "document";
1773
+ readonly Audio: "audio";
1774
+ readonly Video: "video";
1775
+ readonly Other: "other";
1776
+ }>;
1777
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1778
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
1779
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1780
+ filename: z.ZodString;
1781
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1782
+ content_type: z.ZodString;
1783
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1784
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1785
+ blocked: z.ZodOptional<z.ZodBoolean>;
1786
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1787
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1788
+ media_kind: z.ZodNativeEnum<{
1789
+ readonly Image: "image";
1790
+ readonly Document: "document";
1791
+ readonly Audio: "audio";
1792
+ readonly Video: "video";
1793
+ readonly Other: "other";
1794
+ }>;
1795
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1796
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1797
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1798
+ filename: z.ZodString;
1799
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1800
+ content_type: z.ZodString;
1801
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1802
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1803
+ blocked: z.ZodOptional<z.ZodBoolean>;
1804
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1805
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1806
+ media_kind: z.ZodNativeEnum<{
1807
+ readonly Image: "image";
1808
+ readonly Document: "document";
1809
+ readonly Audio: "audio";
1810
+ readonly Video: "video";
1811
+ readonly Other: "other";
1812
+ }>;
1813
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1814
+ }, z.ZodTypeAny, "passthrough">>;
1815
+ classification: z.ZodObject<{
1816
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1817
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
1818
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1819
+ source: z.ZodNativeEnum<{
1820
+ readonly Human: "human";
1821
+ readonly Hubia: "hubia";
1822
+ readonly None: "none";
1823
+ }>;
1824
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1825
+ userId: z.ZodString;
1826
+ displayName: z.ZodString;
1827
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1828
+ userId: z.ZodString;
1829
+ displayName: z.ZodString;
1830
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1831
+ userId: z.ZodString;
1832
+ displayName: z.ZodString;
1833
+ }, z.ZodTypeAny, "passthrough">>>>;
1834
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1835
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1836
+ kind: z.ZodString;
1837
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1838
+ summary: z.ZodString;
1839
+ confidence: z.ZodNumber;
1840
+ prompt_version: z.ZodString;
1841
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1842
+ classified_at: z.ZodDate;
1843
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1844
+ kind: z.ZodString;
1845
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1846
+ summary: z.ZodString;
1847
+ confidence: z.ZodNumber;
1848
+ prompt_version: z.ZodString;
1849
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1850
+ classified_at: z.ZodDate;
1851
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1852
+ kind: z.ZodString;
1853
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1854
+ summary: z.ZodString;
1855
+ confidence: z.ZodNumber;
1856
+ prompt_version: z.ZodString;
1857
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1858
+ classified_at: z.ZodDate;
1859
+ }, z.ZodTypeAny, "passthrough">>>>;
1860
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1861
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1862
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
1863
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1864
+ source: z.ZodNativeEnum<{
1865
+ readonly Human: "human";
1866
+ readonly Hubia: "hubia";
1867
+ readonly None: "none";
1868
+ }>;
1869
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1870
+ userId: z.ZodString;
1871
+ displayName: z.ZodString;
1872
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1873
+ userId: z.ZodString;
1874
+ displayName: z.ZodString;
1875
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1876
+ userId: z.ZodString;
1877
+ displayName: z.ZodString;
1878
+ }, z.ZodTypeAny, "passthrough">>>>;
1879
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1880
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1881
+ kind: z.ZodString;
1882
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1883
+ summary: z.ZodString;
1884
+ confidence: z.ZodNumber;
1885
+ prompt_version: z.ZodString;
1886
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1887
+ classified_at: z.ZodDate;
1888
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1889
+ kind: z.ZodString;
1890
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1891
+ summary: z.ZodString;
1892
+ confidence: z.ZodNumber;
1893
+ prompt_version: z.ZodString;
1894
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1895
+ classified_at: z.ZodDate;
1896
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1897
+ kind: z.ZodString;
1898
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1899
+ summary: z.ZodString;
1900
+ confidence: z.ZodNumber;
1901
+ prompt_version: z.ZodString;
1902
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1903
+ classified_at: z.ZodDate;
1904
+ }, z.ZodTypeAny, "passthrough">>>>;
1905
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1906
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1907
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
1908
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1909
+ source: z.ZodNativeEnum<{
1910
+ readonly Human: "human";
1911
+ readonly Hubia: "hubia";
1912
+ readonly None: "none";
1913
+ }>;
1914
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1915
+ userId: z.ZodString;
1916
+ displayName: z.ZodString;
1917
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1918
+ userId: z.ZodString;
1919
+ displayName: z.ZodString;
1920
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1921
+ userId: z.ZodString;
1922
+ displayName: z.ZodString;
1923
+ }, z.ZodTypeAny, "passthrough">>>>;
1924
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1925
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1926
+ kind: z.ZodString;
1927
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1928
+ summary: z.ZodString;
1929
+ confidence: z.ZodNumber;
1930
+ prompt_version: z.ZodString;
1931
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1932
+ classified_at: z.ZodDate;
1933
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1934
+ kind: z.ZodString;
1935
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1936
+ summary: z.ZodString;
1937
+ confidence: z.ZodNumber;
1938
+ prompt_version: z.ZodString;
1939
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1940
+ classified_at: z.ZodDate;
1941
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1942
+ kind: z.ZodString;
1943
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1944
+ summary: z.ZodString;
1945
+ confidence: z.ZodNumber;
1946
+ prompt_version: z.ZodString;
1947
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
1948
+ classified_at: z.ZodDate;
1949
+ }, z.ZodTypeAny, "passthrough">>>>;
1950
+ }, z.ZodTypeAny, "passthrough">>;
1951
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1952
+ name: z.ZodString;
1953
+ color: z.ZodOptional<z.ZodString>;
1954
+ hidden: z.ZodBoolean;
1955
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1956
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1957
+ }, "strip", z.ZodTypeAny, {
1958
+ name: string;
1959
+ hidden: boolean;
1960
+ base?: boolean | undefined;
1961
+ color?: string | undefined;
1962
+ category?: string | null | undefined;
1963
+ }, {
1964
+ name: string;
1965
+ hidden: boolean;
1966
+ base?: boolean | undefined;
1967
+ color?: string | undefined;
1968
+ category?: string | null | undefined;
1969
+ }>, "many">>>;
1970
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1971
+ legacy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1972
+ patient_id: z.ZodString;
1973
+ migrated_at: z.ZodDate;
1974
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1975
+ patient_id: z.ZodString;
1976
+ migrated_at: z.ZodDate;
1977
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1978
+ patient_id: z.ZodString;
1979
+ migrated_at: z.ZodDate;
1980
+ }, z.ZodTypeAny, "passthrough">>>>;
1981
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1982
+ userId: z.ZodString;
1983
+ displayName: z.ZodString;
1984
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1985
+ userId: z.ZodString;
1986
+ displayName: z.ZodString;
1987
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1988
+ userId: z.ZodString;
1989
+ displayName: z.ZodString;
1990
+ }, z.ZodTypeAny, "passthrough">>>>;
1991
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1992
+ id: z.ZodString;
1993
+ ref: z.ZodAny;
1994
+ tenant: z.ZodString;
1995
+ model_ver: z.ZodDefault<z.ZodNumber>;
1996
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1997
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1998
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1999
+ } & {
2000
+ externalLinks: z.ZodArray<z.ZodEffects<z.ZodObject<{
2001
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2002
+ id: z.ZodString;
2003
+ label: z.ZodOptional<z.ZodString>;
2004
+ ref: z.ZodOptional<z.ZodAny>;
2005
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2006
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2007
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2008
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2009
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2010
+ }, "strip", z.ZodTypeAny, {
2011
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2012
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2013
+ }, {
2014
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2015
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2016
+ }>>>;
2017
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2018
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2019
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2020
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2021
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2022
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2023
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2024
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2025
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2026
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2027
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2028
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2029
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2030
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2031
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2032
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2033
+ id: z.ZodString;
2034
+ label: z.ZodOptional<z.ZodString>;
2035
+ ref: z.ZodOptional<z.ZodAny>;
2036
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2037
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2038
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2039
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2040
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2041
+ }, "strip", z.ZodTypeAny, {
2042
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2043
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2044
+ }, {
2045
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2046
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2047
+ }>>>;
2048
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2049
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2050
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2051
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2052
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2053
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2054
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2055
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2056
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2057
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2058
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2059
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2060
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2061
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2062
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2063
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2064
+ id: z.ZodString;
2065
+ label: z.ZodOptional<z.ZodString>;
2066
+ ref: z.ZodOptional<z.ZodAny>;
2067
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2068
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2069
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2070
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2071
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2072
+ }, "strip", z.ZodTypeAny, {
2073
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2074
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2075
+ }, {
2076
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2077
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2078
+ }>>>;
2079
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2080
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2081
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2082
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2083
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2084
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2085
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2086
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2087
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2088
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2089
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2090
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2091
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2092
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2093
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
2094
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2095
+ id: z.ZodString;
2096
+ label: z.ZodOptional<z.ZodString>;
2097
+ ref: z.ZodOptional<z.ZodAny>;
2098
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2099
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2100
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2101
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2102
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2103
+ }, "strip", z.ZodTypeAny, {
2104
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2105
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2106
+ }, {
2107
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2108
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2109
+ }>>>;
2110
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2111
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2112
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2113
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2114
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2115
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2116
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2117
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2118
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2119
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2120
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2121
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2122
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2123
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2124
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2125
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2126
+ id: z.ZodString;
2127
+ label: z.ZodOptional<z.ZodString>;
2128
+ ref: z.ZodOptional<z.ZodAny>;
2129
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2130
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2131
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2132
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2133
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2134
+ }, "strip", z.ZodTypeAny, {
2135
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2136
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2137
+ }, {
2138
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2139
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2140
+ }>>>;
2141
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2142
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2143
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2144
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2145
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2146
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2147
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2148
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2149
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2150
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2151
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2152
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2153
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2154
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2155
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2156
+ externalLinkKeys: z.ZodArray<z.ZodString, "many">;
2157
+ primary_subject: z.ZodObject<{
2158
+ type: z.ZodEnum<["med_patient", "crm_lead", "med_appointment", "chat_contact"]>;
2159
+ id: z.ZodString;
2160
+ }, "strip", z.ZodTypeAny, {
2161
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
2162
+ id: string;
2163
+ }, {
2164
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
2165
+ id: string;
2166
+ }>;
2167
+ source: z.ZodEffects<z.ZodObject<{
2168
+ kind: z.ZodNativeEnum<{
2169
+ readonly PatientUpload: "patient_upload";
2170
+ readonly AppointmentUpload: "appointment_upload";
2171
+ readonly ChatMessage: "chat_message";
2172
+ readonly EmailMessage: "email_message";
2173
+ readonly HistoryImport: "history_import";
2174
+ readonly PlatformGenerated: "platform_generated";
2175
+ }>;
2176
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2177
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2178
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2179
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2180
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2181
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2182
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2183
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2184
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
2185
+ readonly Inbound: "inbound";
2186
+ readonly Outbound: "outbound";
2187
+ }>>>;
2188
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2189
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2190
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2191
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2192
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2193
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2194
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2195
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2196
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2197
+ }, z.ZodTypeAny, "passthrough">>>>;
2198
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2199
+ userId: z.ZodString;
2200
+ displayName: z.ZodString;
2201
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2202
+ userId: z.ZodString;
2203
+ displayName: z.ZodString;
2204
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2205
+ userId: z.ZodString;
2206
+ displayName: z.ZodString;
2207
+ }, z.ZodTypeAny, "passthrough">>>>;
2208
+ occurred_at: z.ZodDate;
2209
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2210
+ kind: z.ZodNativeEnum<{
2211
+ readonly PatientUpload: "patient_upload";
2212
+ readonly AppointmentUpload: "appointment_upload";
2213
+ readonly ChatMessage: "chat_message";
2214
+ readonly EmailMessage: "email_message";
2215
+ readonly HistoryImport: "history_import";
2216
+ readonly PlatformGenerated: "platform_generated";
2217
+ }>;
2218
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2219
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2220
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2221
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2222
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2223
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2224
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2225
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2226
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
2227
+ readonly Inbound: "inbound";
2228
+ readonly Outbound: "outbound";
2229
+ }>>>;
2230
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2231
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2232
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2233
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2234
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2235
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2236
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2237
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2238
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2239
+ }, z.ZodTypeAny, "passthrough">>>>;
2240
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2241
+ userId: z.ZodString;
2242
+ displayName: z.ZodString;
2243
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2244
+ userId: z.ZodString;
2245
+ displayName: z.ZodString;
2246
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2247
+ userId: z.ZodString;
2248
+ displayName: z.ZodString;
2249
+ }, z.ZodTypeAny, "passthrough">>>>;
2250
+ occurred_at: z.ZodDate;
2251
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2252
+ kind: z.ZodNativeEnum<{
2253
+ readonly PatientUpload: "patient_upload";
2254
+ readonly AppointmentUpload: "appointment_upload";
2255
+ readonly ChatMessage: "chat_message";
2256
+ readonly EmailMessage: "email_message";
2257
+ readonly HistoryImport: "history_import";
2258
+ readonly PlatformGenerated: "platform_generated";
2259
+ }>;
2260
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2261
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2262
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2263
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2264
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2265
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2266
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2267
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2268
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
2269
+ readonly Inbound: "inbound";
2270
+ readonly Outbound: "outbound";
2271
+ }>>>;
2272
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2273
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2274
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2275
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2276
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2277
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2278
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2279
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2280
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2281
+ }, z.ZodTypeAny, "passthrough">>>>;
2282
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2283
+ userId: z.ZodString;
2284
+ displayName: z.ZodString;
2285
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2286
+ userId: z.ZodString;
2287
+ displayName: z.ZodString;
2288
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2289
+ userId: z.ZodString;
2290
+ displayName: z.ZodString;
2291
+ }, z.ZodTypeAny, "passthrough">>>>;
2292
+ occurred_at: z.ZodDate;
2293
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
2294
+ kind: z.ZodNativeEnum<{
2295
+ readonly PatientUpload: "patient_upload";
2296
+ readonly AppointmentUpload: "appointment_upload";
2297
+ readonly ChatMessage: "chat_message";
2298
+ readonly EmailMessage: "email_message";
2299
+ readonly HistoryImport: "history_import";
2300
+ readonly PlatformGenerated: "platform_generated";
2301
+ }>;
2302
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2303
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2304
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2305
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2306
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2307
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2308
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2309
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2310
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
2311
+ readonly Inbound: "inbound";
2312
+ readonly Outbound: "outbound";
2313
+ }>>>;
2314
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2315
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2316
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2317
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2318
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2319
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2320
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2321
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2322
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2323
+ }, z.ZodTypeAny, "passthrough">>>>;
2324
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2325
+ userId: z.ZodString;
2326
+ displayName: z.ZodString;
2327
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2328
+ userId: z.ZodString;
2329
+ displayName: z.ZodString;
2330
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2331
+ userId: z.ZodString;
2332
+ displayName: z.ZodString;
2333
+ }, z.ZodTypeAny, "passthrough">>>>;
2334
+ occurred_at: z.ZodDate;
2335
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2336
+ kind: z.ZodNativeEnum<{
2337
+ readonly PatientUpload: "patient_upload";
2338
+ readonly AppointmentUpload: "appointment_upload";
2339
+ readonly ChatMessage: "chat_message";
2340
+ readonly EmailMessage: "email_message";
2341
+ readonly HistoryImport: "history_import";
2342
+ readonly PlatformGenerated: "platform_generated";
2343
+ }>;
2344
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2345
+ channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2346
+ channel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2347
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2348
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2349
+ message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2350
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2351
+ message_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2352
+ direction: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
2353
+ readonly Inbound: "inbound";
2354
+ readonly Outbound: "outbound";
2355
+ }>>>;
2356
+ email: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2357
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2358
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2359
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2360
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2361
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2362
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2363
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2364
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2365
+ }, z.ZodTypeAny, "passthrough">>>>;
2366
+ uploaded_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2367
+ userId: z.ZodString;
2368
+ displayName: z.ZodString;
2369
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2370
+ userId: z.ZodString;
2371
+ displayName: z.ZodString;
2372
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2373
+ userId: z.ZodString;
2374
+ displayName: z.ZodString;
2375
+ }, z.ZodTypeAny, "passthrough">>>>;
2376
+ occurred_at: z.ZodDate;
2377
+ }, z.ZodTypeAny, "passthrough">>;
2378
+ file: z.ZodEffects<z.ZodObject<{
2379
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2380
+ filename: z.ZodString;
2381
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2382
+ content_type: z.ZodString;
2383
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2384
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2385
+ blocked: z.ZodOptional<z.ZodBoolean>;
2386
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2387
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2388
+ media_kind: z.ZodNativeEnum<{
2389
+ readonly Image: "image";
2390
+ readonly Document: "document";
2391
+ readonly Audio: "audio";
2392
+ readonly Video: "video";
2393
+ readonly Other: "other";
2394
+ }>;
2395
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2396
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2397
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2398
+ filename: z.ZodString;
2399
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2400
+ content_type: z.ZodString;
2401
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2402
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2403
+ blocked: z.ZodOptional<z.ZodBoolean>;
2404
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2405
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2406
+ media_kind: z.ZodNativeEnum<{
2407
+ readonly Image: "image";
2408
+ readonly Document: "document";
2409
+ readonly Audio: "audio";
2410
+ readonly Video: "video";
2411
+ readonly Other: "other";
2412
+ }>;
2413
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2414
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2415
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2416
+ filename: z.ZodString;
2417
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2418
+ content_type: z.ZodString;
2419
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2420
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2421
+ blocked: z.ZodOptional<z.ZodBoolean>;
2422
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2423
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2424
+ media_kind: z.ZodNativeEnum<{
2425
+ readonly Image: "image";
2426
+ readonly Document: "document";
2427
+ readonly Audio: "audio";
2428
+ readonly Video: "video";
2429
+ readonly Other: "other";
2430
+ }>;
2431
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2432
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
2433
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2434
+ filename: z.ZodString;
2435
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2436
+ content_type: z.ZodString;
2437
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2438
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2439
+ blocked: z.ZodOptional<z.ZodBoolean>;
2440
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2441
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2442
+ media_kind: z.ZodNativeEnum<{
2443
+ readonly Image: "image";
2444
+ readonly Document: "document";
2445
+ readonly Audio: "audio";
2446
+ readonly Video: "video";
2447
+ readonly Other: "other";
2448
+ }>;
2449
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2450
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2451
+ gcs_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2452
+ filename: z.ZodString;
2453
+ original_filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2454
+ content_type: z.ZodString;
2455
+ size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2456
+ sha256: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2457
+ blocked: z.ZodOptional<z.ZodBoolean>;
2458
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2459
+ quarantine_uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2460
+ media_kind: z.ZodNativeEnum<{
2461
+ readonly Image: "image";
2462
+ readonly Document: "document";
2463
+ readonly Audio: "audio";
2464
+ readonly Video: "video";
2465
+ readonly Other: "other";
2466
+ }>;
2467
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2468
+ }, z.ZodTypeAny, "passthrough">>;
2469
+ classification: z.ZodObject<{
2470
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2471
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
2472
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2473
+ source: z.ZodNativeEnum<{
2474
+ readonly Human: "human";
2475
+ readonly Hubia: "hubia";
2476
+ readonly None: "none";
2477
+ }>;
2478
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2479
+ userId: z.ZodString;
2480
+ displayName: z.ZodString;
2481
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2482
+ userId: z.ZodString;
2483
+ displayName: z.ZodString;
2484
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2485
+ userId: z.ZodString;
2486
+ displayName: z.ZodString;
2487
+ }, z.ZodTypeAny, "passthrough">>>>;
2488
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2489
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2490
+ kind: z.ZodString;
2491
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2492
+ summary: z.ZodString;
2493
+ confidence: z.ZodNumber;
2494
+ prompt_version: z.ZodString;
2495
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
2496
+ classified_at: z.ZodDate;
2497
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2498
+ kind: z.ZodString;
2499
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2500
+ summary: z.ZodString;
2501
+ confidence: z.ZodNumber;
2502
+ prompt_version: z.ZodString;
2503
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
2504
+ classified_at: z.ZodDate;
2505
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2506
+ kind: z.ZodString;
2507
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2508
+ summary: z.ZodString;
2509
+ confidence: z.ZodNumber;
2510
+ prompt_version: z.ZodString;
2511
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
2512
+ classified_at: z.ZodDate;
2513
+ }, z.ZodTypeAny, "passthrough">>>>;
2514
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2515
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2516
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
2517
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2518
+ source: z.ZodNativeEnum<{
2519
+ readonly Human: "human";
2520
+ readonly Hubia: "hubia";
2521
+ readonly None: "none";
2522
+ }>;
2523
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2524
+ userId: z.ZodString;
2525
+ displayName: z.ZodString;
2526
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2527
+ userId: z.ZodString;
2528
+ displayName: z.ZodString;
2529
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2530
+ userId: z.ZodString;
2531
+ displayName: z.ZodString;
2532
+ }, z.ZodTypeAny, "passthrough">>>>;
2533
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2534
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2535
+ kind: z.ZodString;
2536
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2537
+ summary: z.ZodString;
2538
+ confidence: z.ZodNumber;
2539
+ prompt_version: z.ZodString;
2540
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
2541
+ classified_at: z.ZodDate;
2542
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2543
+ kind: z.ZodString;
2544
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2545
+ summary: z.ZodString;
2546
+ confidence: z.ZodNumber;
2547
+ prompt_version: z.ZodString;
2548
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
2549
+ classified_at: z.ZodDate;
2550
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2551
+ kind: z.ZodString;
2552
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2553
+ summary: z.ZodString;
2554
+ confidence: z.ZodNumber;
2555
+ prompt_version: z.ZodString;
2556
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
2557
+ classified_at: z.ZodDate;
2558
+ }, z.ZodTypeAny, "passthrough">>>>;
2559
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2560
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2561
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
2562
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2563
+ source: z.ZodNativeEnum<{
2564
+ readonly Human: "human";
2565
+ readonly Hubia: "hubia";
2566
+ readonly None: "none";
2567
+ }>;
2568
+ reviewed_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2569
+ userId: z.ZodString;
2570
+ displayName: z.ZodString;
2571
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2572
+ userId: z.ZodString;
2573
+ displayName: z.ZodString;
2574
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2575
+ userId: z.ZodString;
2576
+ displayName: z.ZodString;
2577
+ }, z.ZodTypeAny, "passthrough">>>>;
2578
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2579
+ ai: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2580
+ kind: z.ZodString;
2581
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2582
+ summary: z.ZodString;
2583
+ confidence: z.ZodNumber;
2584
+ prompt_version: z.ZodString;
2585
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
2586
+ classified_at: z.ZodDate;
2587
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2588
+ kind: z.ZodString;
2589
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2590
+ summary: z.ZodString;
2591
+ confidence: z.ZodNumber;
2592
+ prompt_version: z.ZodString;
2593
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
2594
+ classified_at: z.ZodDate;
2595
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2596
+ kind: z.ZodString;
2597
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2598
+ summary: z.ZodString;
2599
+ confidence: z.ZodNumber;
2600
+ prompt_version: z.ZodString;
2601
+ suggested_base_category: z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
2602
+ classified_at: z.ZodDate;
2603
+ }, z.ZodTypeAny, "passthrough">>>>;
2604
+ }, z.ZodTypeAny, "passthrough">>;
2605
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2606
+ name: z.ZodString;
2607
+ color: z.ZodOptional<z.ZodString>;
2608
+ hidden: z.ZodBoolean;
2609
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2610
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2611
+ }, "strip", z.ZodTypeAny, {
2612
+ name: string;
2613
+ hidden: boolean;
2614
+ base?: boolean | undefined;
2615
+ color?: string | undefined;
2616
+ category?: string | null | undefined;
2617
+ }, {
2618
+ name: string;
2619
+ hidden: boolean;
2620
+ base?: boolean | undefined;
2621
+ color?: string | undefined;
2622
+ category?: string | null | undefined;
2623
+ }>, "many">>>;
2624
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2625
+ legacy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2626
+ patient_id: z.ZodString;
2627
+ migrated_at: z.ZodDate;
2628
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2629
+ patient_id: z.ZodString;
2630
+ migrated_at: z.ZodDate;
2631
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2632
+ patient_id: z.ZodString;
2633
+ migrated_at: z.ZodDate;
2634
+ }, z.ZodTypeAny, "passthrough">>>>;
2635
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2636
+ userId: z.ZodString;
2637
+ displayName: z.ZodString;
2638
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2639
+ userId: z.ZodString;
2640
+ displayName: z.ZodString;
2641
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2642
+ userId: z.ZodString;
2643
+ displayName: z.ZodString;
2644
+ }, z.ZodTypeAny, "passthrough">>>>;
2645
+ }, z.ZodTypeAny, "passthrough">>;
2646
+ export declare const zAttachmentIndexEventSchema: z.ZodObject<{
2647
+ tenant: z.ZodString;
2648
+ thread_id: z.ZodString;
2649
+ message_id: z.ZodString;
2650
+ direction: z.ZodEnum<["in", "out"]>;
2651
+ provider: z.ZodString;
2652
+ channel_id: z.ZodString;
2653
+ channel_type: z.ZodString;
2654
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2655
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2656
+ lead_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2657
+ external_links: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2658
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2659
+ id: z.ZodString;
2660
+ label: z.ZodOptional<z.ZodString>;
2661
+ ref: z.ZodOptional<z.ZodAny>;
2662
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2663
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2664
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2665
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2666
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2667
+ }, "strip", z.ZodTypeAny, {
2668
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2669
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2670
+ }, {
2671
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2672
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2673
+ }>>>;
2674
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2675
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2676
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2677
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2678
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2679
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2680
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2681
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2682
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2683
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2684
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2685
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2686
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2687
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2688
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2689
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2690
+ id: z.ZodString;
2691
+ label: z.ZodOptional<z.ZodString>;
2692
+ ref: z.ZodOptional<z.ZodAny>;
2693
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2694
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2695
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2696
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2697
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2698
+ }, "strip", z.ZodTypeAny, {
2699
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2700
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2701
+ }, {
2702
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2703
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2704
+ }>>>;
2705
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2706
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2707
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2708
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2709
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2710
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2711
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2712
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2713
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2714
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2715
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2716
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2717
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2718
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2719
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2720
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2721
+ id: z.ZodString;
2722
+ label: z.ZodOptional<z.ZodString>;
2723
+ ref: z.ZodOptional<z.ZodAny>;
2724
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2725
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2726
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2727
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2728
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2729
+ }, "strip", z.ZodTypeAny, {
2730
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2731
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2732
+ }, {
2733
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2734
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2735
+ }>>>;
2736
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2737
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2738
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2739
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2740
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2741
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2742
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2743
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2744
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2745
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2746
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2747
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2748
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2749
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2750
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
2751
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2752
+ userId: z.ZodString;
2753
+ displayName: z.ZodString;
2754
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2755
+ userId: z.ZodString;
2756
+ displayName: z.ZodString;
2757
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2758
+ userId: z.ZodString;
2759
+ displayName: z.ZodString;
2760
+ }, z.ZodTypeAny, "passthrough">>>>;
2761
+ occurred_at: z.ZodDate;
2762
+ trace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2763
+ reason: z.ZodDefault<z.ZodNativeEnum<{
2764
+ readonly Message: "message";
2765
+ readonly Reindex: "reindex";
2766
+ }>>;
2767
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2768
+ tenant: z.ZodString;
2769
+ thread_id: z.ZodString;
2770
+ message_id: z.ZodString;
2771
+ direction: z.ZodEnum<["in", "out"]>;
2772
+ provider: z.ZodString;
2773
+ channel_id: z.ZodString;
2774
+ channel_type: z.ZodString;
2775
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2776
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2777
+ lead_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2778
+ external_links: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2779
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2780
+ id: z.ZodString;
2781
+ label: z.ZodOptional<z.ZodString>;
2782
+ ref: z.ZodOptional<z.ZodAny>;
2783
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2784
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2785
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2786
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2787
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2788
+ }, "strip", z.ZodTypeAny, {
2789
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2790
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2791
+ }, {
2792
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2793
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2794
+ }>>>;
2795
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2796
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2797
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2798
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2799
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2800
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2801
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2802
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2803
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2804
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2805
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2806
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2807
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2808
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2809
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2810
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2811
+ id: z.ZodString;
2812
+ label: z.ZodOptional<z.ZodString>;
2813
+ ref: z.ZodOptional<z.ZodAny>;
2814
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2815
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2816
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2817
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2818
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2819
+ }, "strip", z.ZodTypeAny, {
2820
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2821
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2822
+ }, {
2823
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2824
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2825
+ }>>>;
2826
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2827
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2828
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2829
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2830
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2831
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2832
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2833
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2834
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2835
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2836
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2837
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2838
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2839
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2840
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2841
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2842
+ id: z.ZodString;
2843
+ label: z.ZodOptional<z.ZodString>;
2844
+ ref: z.ZodOptional<z.ZodAny>;
2845
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2846
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2847
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2848
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2849
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2850
+ }, "strip", z.ZodTypeAny, {
2851
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2852
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2853
+ }, {
2854
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2855
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2856
+ }>>>;
2857
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2858
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2859
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2860
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2861
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2862
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2863
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2864
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2865
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2866
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2867
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2868
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2869
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2870
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2871
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
2872
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2873
+ userId: z.ZodString;
2874
+ displayName: z.ZodString;
2875
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2876
+ userId: z.ZodString;
2877
+ displayName: z.ZodString;
2878
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2879
+ userId: z.ZodString;
2880
+ displayName: z.ZodString;
2881
+ }, z.ZodTypeAny, "passthrough">>>>;
2882
+ occurred_at: z.ZodDate;
2883
+ trace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2884
+ reason: z.ZodDefault<z.ZodNativeEnum<{
2885
+ readonly Message: "message";
2886
+ readonly Reindex: "reindex";
2887
+ }>>;
2888
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2889
+ tenant: z.ZodString;
2890
+ thread_id: z.ZodString;
2891
+ message_id: z.ZodString;
2892
+ direction: z.ZodEnum<["in", "out"]>;
2893
+ provider: z.ZodString;
2894
+ channel_id: z.ZodString;
2895
+ channel_type: z.ZodString;
2896
+ ticket_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2897
+ department_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2898
+ lead_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2899
+ external_links: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2900
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2901
+ id: z.ZodString;
2902
+ label: z.ZodOptional<z.ZodString>;
2903
+ ref: z.ZodOptional<z.ZodAny>;
2904
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2905
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2906
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2907
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2908
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2909
+ }, "strip", z.ZodTypeAny, {
2910
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2911
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2912
+ }, {
2913
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2914
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2915
+ }>>>;
2916
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2917
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2918
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2919
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2920
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2921
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2922
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2923
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2924
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2925
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2926
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2927
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2928
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2929
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2930
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2931
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2932
+ id: z.ZodString;
2933
+ label: z.ZodOptional<z.ZodString>;
2934
+ ref: z.ZodOptional<z.ZodAny>;
2935
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2936
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2937
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2938
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2939
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2940
+ }, "strip", z.ZodTypeAny, {
2941
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2942
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2943
+ }, {
2944
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2945
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2946
+ }>>>;
2947
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2948
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2949
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2950
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2951
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2952
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2953
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2954
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2955
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2956
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2957
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2958
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2959
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2960
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2961
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2962
+ type: z.ZodType<"crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar", z.ZodTypeDef, "crm_lead" | "med_patient" | "med_professional" | "med_appointment" | "chat_contact" | "evo_task" | "campaign" | "nex_billing" | "nex_contract" | "nex_customer" | "teleconsultation" | "med_calendar">;
2963
+ id: z.ZodString;
2964
+ label: z.ZodOptional<z.ZodString>;
2965
+ ref: z.ZodOptional<z.ZodAny>;
2966
+ owner: z.ZodOptional<z.ZodEnum<["nexus"]>>;
2967
+ kind: z.ZodOptional<z.ZodEnum<["identity", "representation"]>>;
2968
+ relation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2969
+ pair: z.ZodEnum<["parent_child", "spouse", "guardian_dependent", "family", "company_employee", "third_party_company", "other"]>;
2970
+ other_role: z.ZodEnum<["parent", "child", "spouse", "guardian", "dependent", "family", "company", "employee", "third_party", "represented", "other"]>;
2971
+ }, "strip", z.ZodTypeAny, {
2972
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2973
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2974
+ }, {
2975
+ pair: "parent_child" | "spouse" | "guardian_dependent" | "family" | "company_employee" | "third_party_company" | "other";
2976
+ other_role: "spouse" | "family" | "other" | "parent" | "child" | "guardian" | "dependent" | "company" | "employee" | "third_party" | "represented";
2977
+ }>>>;
2978
+ status: z.ZodOptional<z.ZodEnum<["suggested", "confirmed", "rejected"]>>;
2979
+ evidence_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2980
+ created_source: z.ZodOptional<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>;
2981
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2982
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2983
+ last_observed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2984
+ last_observed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2985
+ confirmed_source: z.ZodOptional<z.ZodNullable<z.ZodType<"ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication", z.ZodTypeDef, "ui_appointment" | "ui_manual" | "ui_family" | "sync_inferred" | "reminder_inferred" | "send_inferred" | "lead_autocreate" | "inherited" | "merge" | "legacy" | "family_discovery" | "name_rule" | "hubia" | "appointment_replication">>>;
2986
+ confirmed_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2987
+ confirmed_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2988
+ rejected_by: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
2989
+ rejected_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2990
+ rejection_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2991
+ evidence_summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2992
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
2993
+ created_by: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2994
+ userId: z.ZodString;
2995
+ displayName: z.ZodString;
2996
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2997
+ userId: z.ZodString;
2998
+ displayName: z.ZodString;
2999
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3000
+ userId: z.ZodString;
3001
+ displayName: z.ZodString;
3002
+ }, z.ZodTypeAny, "passthrough">>>>;
3003
+ occurred_at: z.ZodDate;
3004
+ trace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3005
+ reason: z.ZodDefault<z.ZodNativeEnum<{
3006
+ readonly Message: "message";
3007
+ readonly Reindex: "reindex";
3008
+ }>>;
3009
+ }, z.ZodTypeAny, "passthrough">>;
3010
+ export declare const zAttachmentListQuerySchema: z.ZodEffects<z.ZodObject<{
3011
+ subject: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3012
+ /** Aceita array ou string separada por vírgula (query string). */
3013
+ message_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
3014
+ family: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
3015
+ /** Interno (Q5): não expor na tela nem no service do FE. */
3016
+ family_depth: z.ZodOptional<z.ZodNumber>;
3017
+ patient: z.ZodOptional<z.ZodString>;
3018
+ direction: z.ZodOptional<z.ZodNativeEnum<{
3019
+ readonly Inbound: "inbound";
3020
+ readonly Outbound: "outbound";
3021
+ }>>;
3022
+ base_category: z.ZodOptional<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>;
3023
+ blocked: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
3024
+ media_kind: z.ZodOptional<z.ZodNativeEnum<{
3025
+ readonly Image: "image";
3026
+ readonly Document: "document";
3027
+ readonly Audio: "audio";
3028
+ readonly Video: "video";
3029
+ readonly Other: "other";
3030
+ }>>;
3031
+ source_kind: z.ZodOptional<z.ZodNativeEnum<{
3032
+ readonly PatientUpload: "patient_upload";
3033
+ readonly AppointmentUpload: "appointment_upload";
3034
+ readonly ChatMessage: "chat_message";
3035
+ readonly EmailMessage: "email_message";
3036
+ readonly HistoryImport: "history_import";
3037
+ readonly PlatformGenerated: "platform_generated";
3038
+ }>>;
3039
+ tag: z.ZodOptional<z.ZodString>;
3040
+ limit: z.ZodOptional<z.ZodNumber>;
3041
+ cursor: z.ZodOptional<z.ZodString>;
3042
+ }, "strip", z.ZodTypeAny, {
3043
+ family?: boolean | undefined;
3044
+ patient?: string | undefined;
3045
+ blocked?: boolean | undefined;
3046
+ base_category?: "other" | "identification_document" | "insurance_card" | "medical_exam" | "prescription" | "medical_report" | "payment_receipt" | "invoice" | "referral_letter" | "consent_form" | "authorization_form" | "sick_leave_certificate" | "treatment_plan" | "clinical_image" | "anamnesis_form" | "patient_form" | "insurance_authorization" | "lab_result" | "imaging_exam" | "surgical_document" | "discharge_summary" | "medication_list" | "vaccination_record" | "legal_document" | "administrative_document" | undefined;
3047
+ cursor?: string | undefined;
3048
+ direction?: "inbound" | "outbound" | undefined;
3049
+ message_ids?: string[] | undefined;
3050
+ subject?: string | undefined;
3051
+ media_kind?: "other" | "image" | "video" | "document" | "audio" | undefined;
3052
+ family_depth?: number | undefined;
3053
+ source_kind?: "history_import" | "patient_upload" | "appointment_upload" | "chat_message" | "email_message" | "platform_generated" | undefined;
3054
+ tag?: string | undefined;
3055
+ limit?: number | undefined;
3056
+ }, {
3057
+ family?: unknown;
3058
+ patient?: string | undefined;
3059
+ blocked?: unknown;
3060
+ base_category?: "other" | "identification_document" | "insurance_card" | "medical_exam" | "prescription" | "medical_report" | "payment_receipt" | "invoice" | "referral_letter" | "consent_form" | "authorization_form" | "sick_leave_certificate" | "treatment_plan" | "clinical_image" | "anamnesis_form" | "patient_form" | "insurance_authorization" | "lab_result" | "imaging_exam" | "surgical_document" | "discharge_summary" | "medication_list" | "vaccination_record" | "legal_document" | "administrative_document" | undefined;
3061
+ cursor?: string | undefined;
3062
+ direction?: "inbound" | "outbound" | undefined;
3063
+ message_ids?: unknown;
3064
+ subject?: string | undefined;
3065
+ media_kind?: "other" | "image" | "video" | "document" | "audio" | undefined;
3066
+ family_depth?: number | undefined;
3067
+ source_kind?: "history_import" | "patient_upload" | "appointment_upload" | "chat_message" | "email_message" | "platform_generated" | undefined;
3068
+ tag?: string | undefined;
3069
+ limit?: number | undefined;
3070
+ }>, {
3071
+ family?: boolean | undefined;
3072
+ patient?: string | undefined;
3073
+ blocked?: boolean | undefined;
3074
+ base_category?: "other" | "identification_document" | "insurance_card" | "medical_exam" | "prescription" | "medical_report" | "payment_receipt" | "invoice" | "referral_letter" | "consent_form" | "authorization_form" | "sick_leave_certificate" | "treatment_plan" | "clinical_image" | "anamnesis_form" | "patient_form" | "insurance_authorization" | "lab_result" | "imaging_exam" | "surgical_document" | "discharge_summary" | "medication_list" | "vaccination_record" | "legal_document" | "administrative_document" | undefined;
3075
+ cursor?: string | undefined;
3076
+ direction?: "inbound" | "outbound" | undefined;
3077
+ message_ids?: string[] | undefined;
3078
+ subject?: string | undefined;
3079
+ media_kind?: "other" | "image" | "video" | "document" | "audio" | undefined;
3080
+ family_depth?: number | undefined;
3081
+ source_kind?: "history_import" | "patient_upload" | "appointment_upload" | "chat_message" | "email_message" | "platform_generated" | undefined;
3082
+ tag?: string | undefined;
3083
+ limit?: number | undefined;
3084
+ }, {
3085
+ family?: unknown;
3086
+ patient?: string | undefined;
3087
+ blocked?: unknown;
3088
+ base_category?: "other" | "identification_document" | "insurance_card" | "medical_exam" | "prescription" | "medical_report" | "payment_receipt" | "invoice" | "referral_letter" | "consent_form" | "authorization_form" | "sick_leave_certificate" | "treatment_plan" | "clinical_image" | "anamnesis_form" | "patient_form" | "insurance_authorization" | "lab_result" | "imaging_exam" | "surgical_document" | "discharge_summary" | "medication_list" | "vaccination_record" | "legal_document" | "administrative_document" | undefined;
3089
+ cursor?: string | undefined;
3090
+ direction?: "inbound" | "outbound" | undefined;
3091
+ message_ids?: unknown;
3092
+ subject?: string | undefined;
3093
+ media_kind?: "other" | "image" | "video" | "document" | "audio" | undefined;
3094
+ family_depth?: number | undefined;
3095
+ source_kind?: "history_import" | "patient_upload" | "appointment_upload" | "chat_message" | "email_message" | "platform_generated" | undefined;
3096
+ tag?: string | undefined;
3097
+ limit?: number | undefined;
3098
+ }>;
3099
+ export declare const zAttachmentSubjectRefSchema: z.ZodObject<{
3100
+ type: z.ZodEnum<["med_patient", "crm_lead", "med_appointment", "chat_contact"]>;
3101
+ id: z.ZodString;
3102
+ label: z.ZodOptional<z.ZodString>;
3103
+ }, "strict", z.ZodTypeAny, {
3104
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3105
+ id: string;
3106
+ label?: string | undefined;
3107
+ }, {
3108
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3109
+ id: string;
3110
+ label?: string | undefined;
3111
+ }>;
3112
+ export declare const zAttachmentPatchBodySchema: z.ZodEffects<z.ZodObject<{
3113
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3114
+ base_category: z.ZodOptional<z.ZodNullable<z.ZodEnum<["identification_document", "insurance_card", "medical_exam", "prescription", "medical_report", "payment_receipt", "invoice", "referral_letter", "consent_form", "authorization_form", "sick_leave_certificate", "treatment_plan", "clinical_image", "anamnesis_form", "patient_form", "insurance_authorization", "lab_result", "imaging_exam", "surgical_document", "discharge_summary", "medication_list", "vaccination_record", "legal_document", "administrative_document", "other"]>>>;
3115
+ category_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3116
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3117
+ tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
3118
+ name: z.ZodString;
3119
+ color: z.ZodOptional<z.ZodString>;
3120
+ hidden: z.ZodBoolean;
3121
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3122
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3123
+ }, "strip", z.ZodTypeAny, {
3124
+ name: string;
3125
+ hidden: boolean;
3126
+ base?: boolean | undefined;
3127
+ color?: string | undefined;
3128
+ category?: string | null | undefined;
3129
+ }, {
3130
+ name: string;
3131
+ hidden: boolean;
3132
+ base?: boolean | undefined;
3133
+ color?: string | undefined;
3134
+ category?: string | null | undefined;
3135
+ }>, "many">>;
3136
+ add_links: z.ZodOptional<z.ZodArray<z.ZodObject<{
3137
+ type: z.ZodEnum<["med_patient", "crm_lead", "med_appointment", "chat_contact"]>;
3138
+ id: z.ZodString;
3139
+ label: z.ZodOptional<z.ZodString>;
3140
+ }, "strict", z.ZodTypeAny, {
3141
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3142
+ id: string;
3143
+ label?: string | undefined;
3144
+ }, {
3145
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3146
+ id: string;
3147
+ label?: string | undefined;
3148
+ }>, "many">>;
3149
+ remove_links: z.ZodOptional<z.ZodArray<z.ZodObject<{
3150
+ type: z.ZodEnum<["med_patient", "crm_lead", "med_appointment", "chat_contact"]>;
3151
+ id: z.ZodString;
3152
+ label: z.ZodOptional<z.ZodString>;
3153
+ }, "strict", z.ZodTypeAny, {
3154
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3155
+ id: string;
3156
+ label?: string | undefined;
3157
+ }, {
3158
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3159
+ id: string;
3160
+ label?: string | undefined;
3161
+ }>, "many">>;
3162
+ }, "strict", z.ZodTypeAny, {
3163
+ description?: string | null | undefined;
3164
+ category?: string | null | undefined;
3165
+ tags?: {
3166
+ name: string;
3167
+ hidden: boolean;
3168
+ base?: boolean | undefined;
3169
+ color?: string | undefined;
3170
+ category?: string | null | undefined;
3171
+ }[] | undefined;
3172
+ base_category?: "other" | "identification_document" | "insurance_card" | "medical_exam" | "prescription" | "medical_report" | "payment_receipt" | "invoice" | "referral_letter" | "consent_form" | "authorization_form" | "sick_leave_certificate" | "treatment_plan" | "clinical_image" | "anamnesis_form" | "patient_form" | "insurance_authorization" | "lab_result" | "imaging_exam" | "surgical_document" | "discharge_summary" | "medication_list" | "vaccination_record" | "legal_document" | "administrative_document" | null | undefined;
3173
+ category_color?: string | null | undefined;
3174
+ add_links?: {
3175
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3176
+ id: string;
3177
+ label?: string | undefined;
3178
+ }[] | undefined;
3179
+ remove_links?: {
3180
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3181
+ id: string;
3182
+ label?: string | undefined;
3183
+ }[] | undefined;
3184
+ }, {
3185
+ description?: string | null | undefined;
3186
+ category?: string | null | undefined;
3187
+ tags?: {
3188
+ name: string;
3189
+ hidden: boolean;
3190
+ base?: boolean | undefined;
3191
+ color?: string | undefined;
3192
+ category?: string | null | undefined;
3193
+ }[] | undefined;
3194
+ base_category?: "other" | "identification_document" | "insurance_card" | "medical_exam" | "prescription" | "medical_report" | "payment_receipt" | "invoice" | "referral_letter" | "consent_form" | "authorization_form" | "sick_leave_certificate" | "treatment_plan" | "clinical_image" | "anamnesis_form" | "patient_form" | "insurance_authorization" | "lab_result" | "imaging_exam" | "surgical_document" | "discharge_summary" | "medication_list" | "vaccination_record" | "legal_document" | "administrative_document" | null | undefined;
3195
+ category_color?: string | null | undefined;
3196
+ add_links?: {
3197
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3198
+ id: string;
3199
+ label?: string | undefined;
3200
+ }[] | undefined;
3201
+ remove_links?: {
3202
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3203
+ id: string;
3204
+ label?: string | undefined;
3205
+ }[] | undefined;
3206
+ }>, {
3207
+ description?: string | null | undefined;
3208
+ category?: string | null | undefined;
3209
+ tags?: {
3210
+ name: string;
3211
+ hidden: boolean;
3212
+ base?: boolean | undefined;
3213
+ color?: string | undefined;
3214
+ category?: string | null | undefined;
3215
+ }[] | undefined;
3216
+ base_category?: "other" | "identification_document" | "insurance_card" | "medical_exam" | "prescription" | "medical_report" | "payment_receipt" | "invoice" | "referral_letter" | "consent_form" | "authorization_form" | "sick_leave_certificate" | "treatment_plan" | "clinical_image" | "anamnesis_form" | "patient_form" | "insurance_authorization" | "lab_result" | "imaging_exam" | "surgical_document" | "discharge_summary" | "medication_list" | "vaccination_record" | "legal_document" | "administrative_document" | null | undefined;
3217
+ category_color?: string | null | undefined;
3218
+ add_links?: {
3219
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3220
+ id: string;
3221
+ label?: string | undefined;
3222
+ }[] | undefined;
3223
+ remove_links?: {
3224
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3225
+ id: string;
3226
+ label?: string | undefined;
3227
+ }[] | undefined;
3228
+ }, {
3229
+ description?: string | null | undefined;
3230
+ category?: string | null | undefined;
3231
+ tags?: {
3232
+ name: string;
3233
+ hidden: boolean;
3234
+ base?: boolean | undefined;
3235
+ color?: string | undefined;
3236
+ category?: string | null | undefined;
3237
+ }[] | undefined;
3238
+ base_category?: "other" | "identification_document" | "insurance_card" | "medical_exam" | "prescription" | "medical_report" | "payment_receipt" | "invoice" | "referral_letter" | "consent_form" | "authorization_form" | "sick_leave_certificate" | "treatment_plan" | "clinical_image" | "anamnesis_form" | "patient_form" | "insurance_authorization" | "lab_result" | "imaging_exam" | "surgical_document" | "discharge_summary" | "medication_list" | "vaccination_record" | "legal_document" | "administrative_document" | null | undefined;
3239
+ category_color?: string | null | undefined;
3240
+ add_links?: {
3241
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3242
+ id: string;
3243
+ label?: string | undefined;
3244
+ }[] | undefined;
3245
+ remove_links?: {
3246
+ type: "crm_lead" | "med_patient" | "med_appointment" | "chat_contact";
3247
+ id: string;
3248
+ label?: string | undefined;
3249
+ }[] | undefined;
3250
+ }>;
3251
+ export declare const zAttachmentReindexBodySchema: z.ZodObject<{
3252
+ thread_id: z.ZodString;
3253
+ message_id: z.ZodOptional<z.ZodString>;
3254
+ }, "strict", z.ZodTypeAny, {
3255
+ thread_id: string;
3256
+ message_id?: string | undefined;
3257
+ }, {
3258
+ thread_id: string;
3259
+ message_id?: string | undefined;
3260
+ }>;