evo360-types 1.3.54 → 1.3.55

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,639 @@
1
+ import { z } from "zod";
2
+ export declare const zPaymentStatusSchema: z.ZodEnum<["paid", "partial", "pending", "not_informed"]>;
3
+ export declare const zAppointmentStatusSchema: z.ZodEnum<["scheduled", "confirmed", "completed", "pre_checkin", "waiting", "no_show", "cancelled", "extra_slot", "in_progress", "rescheduled"]>;
4
+ export declare const zAppointmentModeSchema: z.ZodEnum<["telemedicine", "in_person"]>;
5
+ export declare const zAppointmentTypeSchema: z.ZodEnum<["blocked", "consultation", "procedure", "follow_up"]>;
6
+ export declare const zAddressSchema: z.ZodObject<{
7
+ address_name: z.ZodOptional<z.ZodString>;
8
+ address_line1: z.ZodOptional<z.ZodString>;
9
+ address_line2: z.ZodOptional<z.ZodString>;
10
+ address_city: z.ZodOptional<z.ZodString>;
11
+ address_state: z.ZodOptional<z.ZodString>;
12
+ address_zip: z.ZodOptional<z.ZodString>;
13
+ address_country: z.ZodOptional<z.ZodString>;
14
+ address_neighborhood: z.ZodOptional<z.ZodString>;
15
+ address_maps_url: z.ZodOptional<z.ZodString>;
16
+ address_notes: z.ZodOptional<z.ZodString>;
17
+ address_geo: z.ZodOptional<z.ZodAny>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ address_line1?: string | undefined;
20
+ address_line2?: string | undefined;
21
+ address_city?: string | undefined;
22
+ address_state?: string | undefined;
23
+ address_zip?: string | undefined;
24
+ address_country?: string | undefined;
25
+ address_neighborhood?: string | undefined;
26
+ address_maps_url?: string | undefined;
27
+ address_notes?: string | undefined;
28
+ address_geo?: any;
29
+ address_name?: string | undefined;
30
+ }, {
31
+ address_line1?: string | undefined;
32
+ address_line2?: string | undefined;
33
+ address_city?: string | undefined;
34
+ address_state?: string | undefined;
35
+ address_zip?: string | undefined;
36
+ address_country?: string | undefined;
37
+ address_neighborhood?: string | undefined;
38
+ address_maps_url?: string | undefined;
39
+ address_notes?: string | undefined;
40
+ address_geo?: any;
41
+ address_name?: string | undefined;
42
+ }>;
43
+ export declare const zPatientSchema: z.ZodObject<{
44
+ id: z.ZodNullable<z.ZodNumber>;
45
+ name: z.ZodNullable<z.ZodString>;
46
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
47
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
48
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
49
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
50
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
51
+ external_id: z.ZodOptional<z.ZodString>;
52
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
53
+ id: z.ZodNullable<z.ZodNumber>;
54
+ name: z.ZodNullable<z.ZodString>;
55
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
56
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
57
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
58
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
59
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
60
+ external_id: z.ZodOptional<z.ZodString>;
61
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
62
+ id: z.ZodNullable<z.ZodNumber>;
63
+ name: z.ZodNullable<z.ZodString>;
64
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
65
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
66
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
67
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
68
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
69
+ external_id: z.ZodOptional<z.ZodString>;
70
+ }, z.ZodTypeAny, "passthrough">>;
71
+ export declare const zProfessionalSchema: z.ZodObject<{
72
+ id: z.ZodNumber;
73
+ name: z.ZodString;
74
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
75
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
76
+ external_id: z.ZodOptional<z.ZodString>;
77
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
78
+ id: z.ZodNumber;
79
+ name: z.ZodString;
80
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
81
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
82
+ external_id: z.ZodOptional<z.ZodString>;
83
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
84
+ id: z.ZodNumber;
85
+ name: z.ZodString;
86
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
87
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
88
+ external_id: z.ZodOptional<z.ZodString>;
89
+ }, z.ZodTypeAny, "passthrough">>;
90
+ export declare const zInsuranceSchema: z.ZodObject<{
91
+ name: z.ZodString;
92
+ external_id: z.ZodOptional<z.ZodString>;
93
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
94
+ name: z.ZodString;
95
+ external_id: z.ZodOptional<z.ZodString>;
96
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
97
+ name: z.ZodString;
98
+ external_id: z.ZodOptional<z.ZodString>;
99
+ }, z.ZodTypeAny, "passthrough">>;
100
+ export declare const zPaymentSchema: z.ZodObject<{
101
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
102
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
103
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
104
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
105
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
106
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
107
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
108
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
109
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
110
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
111
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
112
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
113
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
114
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
115
+ }, z.ZodTypeAny, "passthrough">>;
116
+ export declare const zProcedureSchema: z.ZodObject<{
117
+ id: z.ZodOptional<z.ZodNumber>;
118
+ name: z.ZodString;
119
+ description: z.ZodOptional<z.ZodString>;
120
+ duration: z.ZodOptional<z.ZodNumber>;
121
+ price: z.ZodOptional<z.ZodNumber>;
122
+ }, "strip", z.ZodTypeAny, {
123
+ name: string;
124
+ id?: number | undefined;
125
+ description?: string | undefined;
126
+ duration?: number | undefined;
127
+ price?: number | undefined;
128
+ }, {
129
+ name: string;
130
+ id?: number | undefined;
131
+ description?: string | undefined;
132
+ duration?: number | undefined;
133
+ price?: number | undefined;
134
+ }>;
135
+ export declare const zAppointmentSchema: z.ZodObject<z.objectUtil.extendShape<{
136
+ id: z.ZodString;
137
+ ref: z.ZodAny;
138
+ tenant: z.ZodString;
139
+ model_ver: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
140
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
141
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
142
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
143
+ }, {
144
+ calendarId: z.ZodNumber;
145
+ startDate: z.ZodString;
146
+ endDate: z.ZodString;
147
+ status: z.ZodEnum<["scheduled", "confirmed", "completed", "pre_checkin", "waiting", "no_show", "cancelled", "extra_slot", "in_progress", "rescheduled"]>;
148
+ notes: z.ZodOptional<z.ZodString>;
149
+ appointmentMode: z.ZodEnum<["telemedicine", "in_person"]>;
150
+ appointmentType: z.ZodEnum<["blocked", "consultation", "procedure", "follow_up"]>;
151
+ specialty: z.ZodOptional<z.ZodString>;
152
+ address: z.ZodOptional<z.ZodObject<{
153
+ address_name: z.ZodOptional<z.ZodString>;
154
+ address_line1: z.ZodOptional<z.ZodString>;
155
+ address_line2: z.ZodOptional<z.ZodString>;
156
+ address_city: z.ZodOptional<z.ZodString>;
157
+ address_state: z.ZodOptional<z.ZodString>;
158
+ address_zip: z.ZodOptional<z.ZodString>;
159
+ address_country: z.ZodOptional<z.ZodString>;
160
+ address_neighborhood: z.ZodOptional<z.ZodString>;
161
+ address_maps_url: z.ZodOptional<z.ZodString>;
162
+ address_notes: z.ZodOptional<z.ZodString>;
163
+ address_geo: z.ZodOptional<z.ZodAny>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ address_line1?: string | undefined;
166
+ address_line2?: string | undefined;
167
+ address_city?: string | undefined;
168
+ address_state?: string | undefined;
169
+ address_zip?: string | undefined;
170
+ address_country?: string | undefined;
171
+ address_neighborhood?: string | undefined;
172
+ address_maps_url?: string | undefined;
173
+ address_notes?: string | undefined;
174
+ address_geo?: any;
175
+ address_name?: string | undefined;
176
+ }, {
177
+ address_line1?: string | undefined;
178
+ address_line2?: string | undefined;
179
+ address_city?: string | undefined;
180
+ address_state?: string | undefined;
181
+ address_zip?: string | undefined;
182
+ address_country?: string | undefined;
183
+ address_neighborhood?: string | undefined;
184
+ address_maps_url?: string | undefined;
185
+ address_notes?: string | undefined;
186
+ address_geo?: any;
187
+ address_name?: string | undefined;
188
+ }>>;
189
+ procedures: z.ZodOptional<z.ZodArray<z.ZodObject<{
190
+ id: z.ZodOptional<z.ZodNumber>;
191
+ name: z.ZodString;
192
+ description: z.ZodOptional<z.ZodString>;
193
+ duration: z.ZodOptional<z.ZodNumber>;
194
+ price: z.ZodOptional<z.ZodNumber>;
195
+ }, "strip", z.ZodTypeAny, {
196
+ name: string;
197
+ id?: number | undefined;
198
+ description?: string | undefined;
199
+ duration?: number | undefined;
200
+ price?: number | undefined;
201
+ }, {
202
+ name: string;
203
+ id?: number | undefined;
204
+ description?: string | undefined;
205
+ duration?: number | undefined;
206
+ price?: number | undefined;
207
+ }>, "many">>;
208
+ patient: z.ZodObject<{
209
+ id: z.ZodNullable<z.ZodNumber>;
210
+ name: z.ZodNullable<z.ZodString>;
211
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
212
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
213
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
214
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
215
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
216
+ external_id: z.ZodOptional<z.ZodString>;
217
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
218
+ id: z.ZodNullable<z.ZodNumber>;
219
+ name: z.ZodNullable<z.ZodString>;
220
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
221
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
222
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
223
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
224
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
225
+ external_id: z.ZodOptional<z.ZodString>;
226
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
227
+ id: z.ZodNullable<z.ZodNumber>;
228
+ name: z.ZodNullable<z.ZodString>;
229
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
230
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
231
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
232
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
233
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
234
+ external_id: z.ZodOptional<z.ZodString>;
235
+ }, z.ZodTypeAny, "passthrough">>;
236
+ professional: z.ZodOptional<z.ZodObject<{
237
+ id: z.ZodNumber;
238
+ name: z.ZodString;
239
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
240
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
241
+ external_id: z.ZodOptional<z.ZodString>;
242
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
243
+ id: z.ZodNumber;
244
+ name: z.ZodString;
245
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
246
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
247
+ external_id: z.ZodOptional<z.ZodString>;
248
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
249
+ id: z.ZodNumber;
250
+ name: z.ZodString;
251
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
252
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
253
+ external_id: z.ZodOptional<z.ZodString>;
254
+ }, z.ZodTypeAny, "passthrough">>>;
255
+ insurance: z.ZodOptional<z.ZodObject<{
256
+ name: z.ZodString;
257
+ external_id: z.ZodOptional<z.ZodString>;
258
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
259
+ name: z.ZodString;
260
+ external_id: z.ZodOptional<z.ZodString>;
261
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
262
+ name: z.ZodString;
263
+ external_id: z.ZodOptional<z.ZodString>;
264
+ }, z.ZodTypeAny, "passthrough">>>;
265
+ payment: z.ZodOptional<z.ZodObject<{
266
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
267
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
268
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
269
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
270
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
271
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
272
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
273
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
274
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
275
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
276
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
277
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
278
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
279
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
280
+ }, z.ZodTypeAny, "passthrough">>>;
281
+ isDraft: z.ZodBoolean;
282
+ draftExpirationMinutes: z.ZodOptional<z.ZodNumber>;
283
+ rescheduleCount: z.ZodDefault<z.ZodNumber>;
284
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
285
+ name: z.ZodString;
286
+ color: z.ZodOptional<z.ZodString>;
287
+ hidden: z.ZodBoolean;
288
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
289
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ name: string;
292
+ hidden: boolean;
293
+ base?: boolean | undefined;
294
+ color?: string | undefined;
295
+ category?: string | null | undefined;
296
+ }, {
297
+ name: string;
298
+ hidden: boolean;
299
+ base?: boolean | undefined;
300
+ color?: string | undefined;
301
+ category?: string | null | undefined;
302
+ }>, "many">>>;
303
+ }>, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<{
304
+ id: z.ZodString;
305
+ ref: z.ZodAny;
306
+ tenant: z.ZodString;
307
+ model_ver: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
308
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
309
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
310
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
311
+ }, {
312
+ calendarId: z.ZodNumber;
313
+ startDate: z.ZodString;
314
+ endDate: z.ZodString;
315
+ status: z.ZodEnum<["scheduled", "confirmed", "completed", "pre_checkin", "waiting", "no_show", "cancelled", "extra_slot", "in_progress", "rescheduled"]>;
316
+ notes: z.ZodOptional<z.ZodString>;
317
+ appointmentMode: z.ZodEnum<["telemedicine", "in_person"]>;
318
+ appointmentType: z.ZodEnum<["blocked", "consultation", "procedure", "follow_up"]>;
319
+ specialty: z.ZodOptional<z.ZodString>;
320
+ address: z.ZodOptional<z.ZodObject<{
321
+ address_name: z.ZodOptional<z.ZodString>;
322
+ address_line1: z.ZodOptional<z.ZodString>;
323
+ address_line2: z.ZodOptional<z.ZodString>;
324
+ address_city: z.ZodOptional<z.ZodString>;
325
+ address_state: z.ZodOptional<z.ZodString>;
326
+ address_zip: z.ZodOptional<z.ZodString>;
327
+ address_country: z.ZodOptional<z.ZodString>;
328
+ address_neighborhood: z.ZodOptional<z.ZodString>;
329
+ address_maps_url: z.ZodOptional<z.ZodString>;
330
+ address_notes: z.ZodOptional<z.ZodString>;
331
+ address_geo: z.ZodOptional<z.ZodAny>;
332
+ }, "strip", z.ZodTypeAny, {
333
+ address_line1?: string | undefined;
334
+ address_line2?: string | undefined;
335
+ address_city?: string | undefined;
336
+ address_state?: string | undefined;
337
+ address_zip?: string | undefined;
338
+ address_country?: string | undefined;
339
+ address_neighborhood?: string | undefined;
340
+ address_maps_url?: string | undefined;
341
+ address_notes?: string | undefined;
342
+ address_geo?: any;
343
+ address_name?: string | undefined;
344
+ }, {
345
+ address_line1?: string | undefined;
346
+ address_line2?: string | undefined;
347
+ address_city?: string | undefined;
348
+ address_state?: string | undefined;
349
+ address_zip?: string | undefined;
350
+ address_country?: string | undefined;
351
+ address_neighborhood?: string | undefined;
352
+ address_maps_url?: string | undefined;
353
+ address_notes?: string | undefined;
354
+ address_geo?: any;
355
+ address_name?: string | undefined;
356
+ }>>;
357
+ procedures: z.ZodOptional<z.ZodArray<z.ZodObject<{
358
+ id: z.ZodOptional<z.ZodNumber>;
359
+ name: z.ZodString;
360
+ description: z.ZodOptional<z.ZodString>;
361
+ duration: z.ZodOptional<z.ZodNumber>;
362
+ price: z.ZodOptional<z.ZodNumber>;
363
+ }, "strip", z.ZodTypeAny, {
364
+ name: string;
365
+ id?: number | undefined;
366
+ description?: string | undefined;
367
+ duration?: number | undefined;
368
+ price?: number | undefined;
369
+ }, {
370
+ name: string;
371
+ id?: number | undefined;
372
+ description?: string | undefined;
373
+ duration?: number | undefined;
374
+ price?: number | undefined;
375
+ }>, "many">>;
376
+ patient: z.ZodObject<{
377
+ id: z.ZodNullable<z.ZodNumber>;
378
+ name: z.ZodNullable<z.ZodString>;
379
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
380
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
381
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
382
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
383
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
384
+ external_id: z.ZodOptional<z.ZodString>;
385
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
386
+ id: z.ZodNullable<z.ZodNumber>;
387
+ name: z.ZodNullable<z.ZodString>;
388
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
389
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
390
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
391
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
392
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
393
+ external_id: z.ZodOptional<z.ZodString>;
394
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
395
+ id: z.ZodNullable<z.ZodNumber>;
396
+ name: z.ZodNullable<z.ZodString>;
397
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
398
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
399
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
400
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
401
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
402
+ external_id: z.ZodOptional<z.ZodString>;
403
+ }, z.ZodTypeAny, "passthrough">>;
404
+ professional: z.ZodOptional<z.ZodObject<{
405
+ id: z.ZodNumber;
406
+ name: z.ZodString;
407
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
408
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
409
+ external_id: z.ZodOptional<z.ZodString>;
410
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
411
+ id: z.ZodNumber;
412
+ name: z.ZodString;
413
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
414
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
415
+ external_id: z.ZodOptional<z.ZodString>;
416
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
417
+ id: z.ZodNumber;
418
+ name: z.ZodString;
419
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
420
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
421
+ external_id: z.ZodOptional<z.ZodString>;
422
+ }, z.ZodTypeAny, "passthrough">>>;
423
+ insurance: z.ZodOptional<z.ZodObject<{
424
+ name: z.ZodString;
425
+ external_id: z.ZodOptional<z.ZodString>;
426
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
427
+ name: z.ZodString;
428
+ external_id: z.ZodOptional<z.ZodString>;
429
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
430
+ name: z.ZodString;
431
+ external_id: z.ZodOptional<z.ZodString>;
432
+ }, z.ZodTypeAny, "passthrough">>>;
433
+ payment: z.ZodOptional<z.ZodObject<{
434
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
435
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
436
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
437
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
438
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
439
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
440
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
441
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
442
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
443
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
444
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
445
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
446
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
447
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
448
+ }, z.ZodTypeAny, "passthrough">>>;
449
+ isDraft: z.ZodBoolean;
450
+ draftExpirationMinutes: z.ZodOptional<z.ZodNumber>;
451
+ rescheduleCount: z.ZodDefault<z.ZodNumber>;
452
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
453
+ name: z.ZodString;
454
+ color: z.ZodOptional<z.ZodString>;
455
+ hidden: z.ZodBoolean;
456
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
457
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
458
+ }, "strip", z.ZodTypeAny, {
459
+ name: string;
460
+ hidden: boolean;
461
+ base?: boolean | undefined;
462
+ color?: string | undefined;
463
+ category?: string | null | undefined;
464
+ }, {
465
+ name: string;
466
+ hidden: boolean;
467
+ base?: boolean | undefined;
468
+ color?: string | undefined;
469
+ category?: string | null | undefined;
470
+ }>, "many">>>;
471
+ }>, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<{
472
+ id: z.ZodString;
473
+ ref: z.ZodAny;
474
+ tenant: z.ZodString;
475
+ model_ver: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
476
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
477
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
478
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
479
+ }, {
480
+ calendarId: z.ZodNumber;
481
+ startDate: z.ZodString;
482
+ endDate: z.ZodString;
483
+ status: z.ZodEnum<["scheduled", "confirmed", "completed", "pre_checkin", "waiting", "no_show", "cancelled", "extra_slot", "in_progress", "rescheduled"]>;
484
+ notes: z.ZodOptional<z.ZodString>;
485
+ appointmentMode: z.ZodEnum<["telemedicine", "in_person"]>;
486
+ appointmentType: z.ZodEnum<["blocked", "consultation", "procedure", "follow_up"]>;
487
+ specialty: z.ZodOptional<z.ZodString>;
488
+ address: z.ZodOptional<z.ZodObject<{
489
+ address_name: z.ZodOptional<z.ZodString>;
490
+ address_line1: z.ZodOptional<z.ZodString>;
491
+ address_line2: z.ZodOptional<z.ZodString>;
492
+ address_city: z.ZodOptional<z.ZodString>;
493
+ address_state: z.ZodOptional<z.ZodString>;
494
+ address_zip: z.ZodOptional<z.ZodString>;
495
+ address_country: z.ZodOptional<z.ZodString>;
496
+ address_neighborhood: z.ZodOptional<z.ZodString>;
497
+ address_maps_url: z.ZodOptional<z.ZodString>;
498
+ address_notes: z.ZodOptional<z.ZodString>;
499
+ address_geo: z.ZodOptional<z.ZodAny>;
500
+ }, "strip", z.ZodTypeAny, {
501
+ address_line1?: string | undefined;
502
+ address_line2?: string | undefined;
503
+ address_city?: string | undefined;
504
+ address_state?: string | undefined;
505
+ address_zip?: string | undefined;
506
+ address_country?: string | undefined;
507
+ address_neighborhood?: string | undefined;
508
+ address_maps_url?: string | undefined;
509
+ address_notes?: string | undefined;
510
+ address_geo?: any;
511
+ address_name?: string | undefined;
512
+ }, {
513
+ address_line1?: string | undefined;
514
+ address_line2?: string | undefined;
515
+ address_city?: string | undefined;
516
+ address_state?: string | undefined;
517
+ address_zip?: string | undefined;
518
+ address_country?: string | undefined;
519
+ address_neighborhood?: string | undefined;
520
+ address_maps_url?: string | undefined;
521
+ address_notes?: string | undefined;
522
+ address_geo?: any;
523
+ address_name?: string | undefined;
524
+ }>>;
525
+ procedures: z.ZodOptional<z.ZodArray<z.ZodObject<{
526
+ id: z.ZodOptional<z.ZodNumber>;
527
+ name: z.ZodString;
528
+ description: z.ZodOptional<z.ZodString>;
529
+ duration: z.ZodOptional<z.ZodNumber>;
530
+ price: z.ZodOptional<z.ZodNumber>;
531
+ }, "strip", z.ZodTypeAny, {
532
+ name: string;
533
+ id?: number | undefined;
534
+ description?: string | undefined;
535
+ duration?: number | undefined;
536
+ price?: number | undefined;
537
+ }, {
538
+ name: string;
539
+ id?: number | undefined;
540
+ description?: string | undefined;
541
+ duration?: number | undefined;
542
+ price?: number | undefined;
543
+ }>, "many">>;
544
+ patient: z.ZodObject<{
545
+ id: z.ZodNullable<z.ZodNumber>;
546
+ name: z.ZodNullable<z.ZodString>;
547
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
548
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
549
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
550
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
551
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
552
+ external_id: z.ZodOptional<z.ZodString>;
553
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
554
+ id: z.ZodNullable<z.ZodNumber>;
555
+ name: z.ZodNullable<z.ZodString>;
556
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
557
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
558
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
559
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
560
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
561
+ external_id: z.ZodOptional<z.ZodString>;
562
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
563
+ id: z.ZodNullable<z.ZodNumber>;
564
+ name: z.ZodNullable<z.ZodString>;
565
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
566
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
567
+ birthDate: z.ZodDefault<z.ZodOptional<z.ZodString>>;
568
+ phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
569
+ wabaPhone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
570
+ external_id: z.ZodOptional<z.ZodString>;
571
+ }, z.ZodTypeAny, "passthrough">>;
572
+ professional: z.ZodOptional<z.ZodObject<{
573
+ id: z.ZodNumber;
574
+ name: z.ZodString;
575
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
576
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
577
+ external_id: z.ZodOptional<z.ZodString>;
578
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
579
+ id: z.ZodNumber;
580
+ name: z.ZodString;
581
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
582
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
583
+ external_id: z.ZodOptional<z.ZodString>;
584
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
585
+ id: z.ZodNumber;
586
+ name: z.ZodString;
587
+ email: z.ZodDefault<z.ZodOptional<z.ZodString>>;
588
+ gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
589
+ external_id: z.ZodOptional<z.ZodString>;
590
+ }, z.ZodTypeAny, "passthrough">>>;
591
+ insurance: z.ZodOptional<z.ZodObject<{
592
+ name: z.ZodString;
593
+ external_id: z.ZodOptional<z.ZodString>;
594
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
595
+ name: z.ZodString;
596
+ external_id: z.ZodOptional<z.ZodString>;
597
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
598
+ name: z.ZodString;
599
+ external_id: z.ZodOptional<z.ZodString>;
600
+ }, z.ZodTypeAny, "passthrough">>>;
601
+ payment: z.ZodOptional<z.ZodObject<{
602
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
603
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
604
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
605
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
606
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
607
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
608
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
609
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
610
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
611
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
612
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
613
+ paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
614
+ due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
615
+ status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
616
+ }, z.ZodTypeAny, "passthrough">>>;
617
+ isDraft: z.ZodBoolean;
618
+ draftExpirationMinutes: z.ZodOptional<z.ZodNumber>;
619
+ rescheduleCount: z.ZodDefault<z.ZodNumber>;
620
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
621
+ name: z.ZodString;
622
+ color: z.ZodOptional<z.ZodString>;
623
+ hidden: z.ZodBoolean;
624
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
625
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
626
+ }, "strip", z.ZodTypeAny, {
627
+ name: string;
628
+ hidden: boolean;
629
+ base?: boolean | undefined;
630
+ color?: string | undefined;
631
+ category?: string | null | undefined;
632
+ }, {
633
+ name: string;
634
+ hidden: boolean;
635
+ base?: boolean | undefined;
636
+ color?: string | undefined;
637
+ category?: string | null | undefined;
638
+ }>, "many">>>;
639
+ }>, z.ZodTypeAny, "passthrough">>;
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zAppointmentSchema = exports.zProcedureSchema = exports.zPaymentSchema = exports.zInsuranceSchema = exports.zProfessionalSchema = exports.zPatientSchema = exports.zAddressSchema = exports.zAppointmentTypeSchema = exports.zAppointmentModeSchema = exports.zAppointmentStatusSchema = exports.zPaymentStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const zod_schemas_1 = require("../../shared/zod-schemas");
6
+ // Enums para validação
7
+ exports.zPaymentStatusSchema = zod_1.z.enum([
8
+ "paid",
9
+ "partial",
10
+ "pending",
11
+ "not_informed",
12
+ ]);
13
+ exports.zAppointmentStatusSchema = zod_1.z.enum([
14
+ "scheduled",
15
+ "confirmed",
16
+ "completed",
17
+ "pre_checkin",
18
+ "waiting",
19
+ "no_show",
20
+ "cancelled",
21
+ "extra_slot",
22
+ "in_progress",
23
+ "rescheduled",
24
+ ]);
25
+ exports.zAppointmentModeSchema = zod_1.z.enum(["telemedicine", "in_person"]);
26
+ exports.zAppointmentTypeSchema = zod_1.z.enum([
27
+ "blocked",
28
+ "consultation",
29
+ "procedure",
30
+ "follow_up",
31
+ ]);
32
+ // Schema para endereço
33
+ exports.zAddressSchema = zod_1.z.object({
34
+ address_name: zod_1.z.string().optional(),
35
+ address_line1: zod_1.z.string().optional(),
36
+ address_line2: zod_1.z.string().optional(),
37
+ address_city: zod_1.z.string().optional(),
38
+ address_state: zod_1.z.string().optional(),
39
+ address_zip: zod_1.z.string().optional(),
40
+ address_country: zod_1.z.string().optional(),
41
+ address_neighborhood: zod_1.z.string().optional(),
42
+ address_maps_url: zod_1.z.string().url().optional(),
43
+ address_notes: zod_1.z.string().optional(),
44
+ address_geo: zod_1.z.any().optional(), // IGeoPoint
45
+ });
46
+ // Schema para paciente
47
+ exports.zPatientSchema = zod_1.z
48
+ .object({
49
+ id: zod_1.z.number().nullable(),
50
+ name: zod_1.z.string().nullable(),
51
+ email: zod_1.z.string().email().optional().default(""),
52
+ gender: zod_1.z.string().optional().default(""),
53
+ birthDate: zod_1.z.string().optional().default(""),
54
+ phone: zod_1.z.string().optional().default(""),
55
+ wabaPhone: zod_1.z.string().optional().default(""),
56
+ external_id: zod_1.z.string().optional(),
57
+ })
58
+ .passthrough();
59
+ // Schema para profissional
60
+ exports.zProfessionalSchema = zod_1.z
61
+ .object({
62
+ id: zod_1.z.number(),
63
+ name: zod_1.z.string(),
64
+ email: zod_1.z.string().email().optional().default(""),
65
+ gender: zod_1.z.string().optional().default(""),
66
+ external_id: zod_1.z.string().optional(),
67
+ })
68
+ .passthrough();
69
+ // Schema para seguro
70
+ exports.zInsuranceSchema = zod_1.z
71
+ .object({
72
+ name: zod_1.z.string(),
73
+ external_id: zod_1.z.string().optional(),
74
+ })
75
+ .passthrough();
76
+ // Schema para pagamento
77
+ exports.zPaymentSchema = zod_1.z
78
+ .object({
79
+ total: zod_1.z.number().nullable().optional(),
80
+ paid: zod_1.z.number().nullable().optional(),
81
+ due: zod_1.z.number().nullable().optional(),
82
+ status: exports.zPaymentStatusSchema.optional(),
83
+ })
84
+ .passthrough();
85
+ // Schema para procedimento
86
+ exports.zProcedureSchema = zod_1.z.object({
87
+ id: zod_1.z.number().optional(),
88
+ name: zod_1.z.string(),
89
+ description: zod_1.z.string().optional(),
90
+ duration: zod_1.z.number().optional(), // em minutos
91
+ price: zod_1.z.number().optional(),
92
+ });
93
+ // Schema principal do Appointment
94
+ exports.zAppointmentSchema = zod_schemas_1.zFireDocSchema
95
+ .extend({
96
+ calendarId: zod_1.z.number(),
97
+ startDate: zod_1.z.string().datetime(), // ISO string
98
+ endDate: zod_1.z.string().datetime(), // ISO string
99
+ status: exports.zAppointmentStatusSchema,
100
+ notes: zod_1.z.string().optional(),
101
+ appointmentMode: exports.zAppointmentModeSchema,
102
+ appointmentType: exports.zAppointmentTypeSchema,
103
+ specialty: zod_1.z.string().optional(),
104
+ address: exports.zAddressSchema.optional(),
105
+ procedures: zod_1.z.array(exports.zProcedureSchema).optional(),
106
+ patient: exports.zPatientSchema,
107
+ professional: exports.zProfessionalSchema.optional(),
108
+ insurance: exports.zInsuranceSchema.optional(),
109
+ payment: exports.zPaymentSchema.optional(),
110
+ // Propriedades para controle de rascunho
111
+ isDraft: zod_1.z.boolean(),
112
+ draftExpirationMinutes: zod_1.z.number().optional(), // tempo em minutos para expiração do rascunho
113
+ // Controle de remarcações
114
+ rescheduleCount: zod_1.z.number().default(0), // quantidade de vezes que o agendamento foi remarcado
115
+ tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
116
+ })
117
+ .passthrough();
@@ -0,0 +1,128 @@
1
+ import { z } from "zod";
2
+ import { zFireDocSchema, zTagSchema } from "../../shared/zod-schemas";
3
+
4
+ // Enums para validação
5
+ export const zPaymentStatusSchema = z.enum([
6
+ "paid",
7
+ "partial",
8
+ "pending",
9
+ "not_informed",
10
+ ]);
11
+
12
+ export const zAppointmentStatusSchema = z.enum([
13
+ "scheduled",
14
+ "confirmed",
15
+ "completed",
16
+ "pre_checkin",
17
+ "waiting",
18
+ "no_show",
19
+ "cancelled",
20
+ "extra_slot",
21
+ "in_progress",
22
+ "rescheduled",
23
+ ]);
24
+
25
+ export const zAppointmentModeSchema = z.enum(["telemedicine", "in_person"]);
26
+
27
+ export const zAppointmentTypeSchema = z.enum([
28
+ "blocked",
29
+ "consultation",
30
+ "procedure",
31
+ "follow_up",
32
+ ]);
33
+
34
+ // Schema para endereço
35
+ export const zAddressSchema = z.object({
36
+ address_name: z.string().optional(),
37
+ address_line1: z.string().optional(),
38
+ address_line2: z.string().optional(),
39
+ address_city: z.string().optional(),
40
+ address_state: z.string().optional(),
41
+ address_zip: z.string().optional(),
42
+ address_country: z.string().optional(),
43
+ address_neighborhood: z.string().optional(),
44
+ address_maps_url: z.string().url().optional(),
45
+ address_notes: z.string().optional(),
46
+ address_geo: z.any().optional(), // IGeoPoint
47
+ });
48
+
49
+ // Schema para paciente
50
+ export const zPatientSchema = z
51
+ .object({
52
+ id: z.number().nullable(),
53
+ name: z.string().nullable(),
54
+ email: z.string().email().optional().default(""),
55
+ gender: z.string().optional().default(""),
56
+ birthDate: z.string().optional().default(""),
57
+ phone: z.string().optional().default(""),
58
+ wabaPhone: z.string().optional().default(""),
59
+ external_id: z.string().optional(),
60
+ })
61
+ .passthrough();
62
+
63
+ // Schema para profissional
64
+ export const zProfessionalSchema = z
65
+ .object({
66
+ id: z.number(),
67
+ name: z.string(),
68
+ email: z.string().email().optional().default(""),
69
+ gender: z.string().optional().default(""),
70
+ external_id: z.string().optional(),
71
+ })
72
+ .passthrough();
73
+
74
+ // Schema para seguro
75
+ export const zInsuranceSchema = z
76
+ .object({
77
+ name: z.string(),
78
+ external_id: z.string().optional(),
79
+ })
80
+ .passthrough();
81
+
82
+ // Schema para pagamento
83
+ export const zPaymentSchema = z
84
+ .object({
85
+ total: z.number().nullable().optional(),
86
+ paid: z.number().nullable().optional(),
87
+ due: z.number().nullable().optional(),
88
+ status: zPaymentStatusSchema.optional(),
89
+ })
90
+ .passthrough();
91
+
92
+ // Schema para procedimento
93
+ export const zProcedureSchema = z.object({
94
+ id: z.number().optional(),
95
+ name: z.string(),
96
+ description: z.string().optional(),
97
+ duration: z.number().optional(), // em minutos
98
+ price: z.number().optional(),
99
+ });
100
+
101
+ // Schema principal do Appointment
102
+ export const zAppointmentSchema = zFireDocSchema
103
+ .extend({
104
+ calendarId: z.number(),
105
+ startDate: z.string().datetime(), // ISO string
106
+ endDate: z.string().datetime(), // ISO string
107
+ status: zAppointmentStatusSchema,
108
+ notes: z.string().optional(),
109
+ appointmentMode: zAppointmentModeSchema,
110
+ appointmentType: zAppointmentTypeSchema,
111
+ specialty: z.string().optional(),
112
+ address: zAddressSchema.optional(),
113
+ procedures: z.array(zProcedureSchema).optional(),
114
+ patient: zPatientSchema,
115
+ professional: zProfessionalSchema.optional(),
116
+ insurance: zInsuranceSchema.optional(),
117
+ payment: zPaymentSchema.optional(),
118
+
119
+ // Propriedades para controle de rascunho
120
+ isDraft: z.boolean(),
121
+ draftExpirationMinutes: z.number().optional(), // tempo em minutos para expiração do rascunho
122
+
123
+ // Controle de remarcações
124
+ rescheduleCount: z.number().default(0), // quantidade de vezes que o agendamento foi remarcado
125
+
126
+ tags: z.array(zTagSchema).nullable().optional(),
127
+ })
128
+ .passthrough();
@@ -338,6 +338,9 @@ export declare const zOfficeSchema: z.ZodObject<z.objectUtil.extendShape<{
338
338
  address_state: z.ZodDefault<z.ZodOptional<z.ZodString>>;
339
339
  address_zip: z.ZodDefault<z.ZodOptional<z.ZodString>>;
340
340
  address_country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
341
+ address_neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
342
+ address_maps_url: z.ZodDefault<z.ZodOptional<z.ZodString>>;
343
+ address_notes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
341
344
  address_geo: z.ZodOptional<z.ZodAny>;
342
345
  employee_counters: z.ZodOptional<z.ZodAny>;
343
346
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -381,6 +384,9 @@ export declare const zOfficeSchema: z.ZodObject<z.objectUtil.extendShape<{
381
384
  address_state: z.ZodDefault<z.ZodOptional<z.ZodString>>;
382
385
  address_zip: z.ZodDefault<z.ZodOptional<z.ZodString>>;
383
386
  address_country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
387
+ address_neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
388
+ address_maps_url: z.ZodDefault<z.ZodOptional<z.ZodString>>;
389
+ address_notes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
384
390
  address_geo: z.ZodOptional<z.ZodAny>;
385
391
  employee_counters: z.ZodOptional<z.ZodAny>;
386
392
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -424,6 +430,9 @@ export declare const zOfficeSchema: z.ZodObject<z.objectUtil.extendShape<{
424
430
  address_state: z.ZodDefault<z.ZodOptional<z.ZodString>>;
425
431
  address_zip: z.ZodDefault<z.ZodOptional<z.ZodString>>;
426
432
  address_country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
433
+ address_neighborhood: z.ZodDefault<z.ZodOptional<z.ZodString>>;
434
+ address_maps_url: z.ZodDefault<z.ZodOptional<z.ZodString>>;
435
+ address_notes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
427
436
  address_geo: z.ZodOptional<z.ZodAny>;
428
437
  employee_counters: z.ZodOptional<z.ZodAny>;
429
438
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -103,6 +103,9 @@ exports.zOfficeSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchem
103
103
  address_state: zod_1.z.string().max(255).optional().default(""),
104
104
  address_zip: zod_1.z.string().max(255).optional().default(""),
105
105
  address_country: zod_1.z.string().max(255).optional().default(""),
106
+ address_neighborhood: zod_1.z.string().max(255).optional().default(""),
107
+ address_maps_url: zod_1.z.string().url().optional().default(""),
108
+ address_notes: zod_1.z.string().max(1024).optional().default(""),
106
109
  address_geo: zod_1.z.any().optional(),
107
110
  employee_counters: zod_1.z.any().optional(),
108
111
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
@@ -106,6 +106,9 @@ export const zOfficeSchema = zFireDocSchema // Extend from FireDocSchema
106
106
  address_state: z.string().max(255).optional().default(""),
107
107
  address_zip: z.string().max(255).optional().default(""),
108
108
  address_country: z.string().max(255).optional().default(""),
109
+ address_neighborhood: z.string().max(255).optional().default(""),
110
+ address_maps_url: z.string().url().optional().default(""),
111
+ address_notes: z.string().max(1024).optional().default(""),
109
112
  address_geo: z.any().optional(),
110
113
  employee_counters: z.any().optional(),
111
114
  tags: z.array(zTagSchema).nullable().optional(),
@@ -0,0 +1,105 @@
1
+ import type { IFireDoc, IGeoPoint, ITag } from "../../shared";
2
+ export declare const PaymentStatusEnum: {
3
+ readonly Paid: "paid";
4
+ readonly Partial: "partial";
5
+ readonly Pending: "pending";
6
+ readonly NotInformed: "not_informed";
7
+ };
8
+ export type PaymentStatus = (typeof PaymentStatusEnum)[keyof typeof PaymentStatusEnum];
9
+ export declare const AppointmentStatusEnum: {
10
+ readonly Scheduled: "scheduled";
11
+ readonly Confirmed: "confirmed";
12
+ readonly Completed: "completed";
13
+ readonly PreCheckin: "pre_checkin";
14
+ readonly Waiting: "waiting";
15
+ readonly NoShow: "no_show";
16
+ readonly Cancelled: "cancelled";
17
+ readonly ExtraSlot: "extra_slot";
18
+ readonly InProgress: "in_progress";
19
+ readonly Rescheduled: "rescheduled";
20
+ };
21
+ export type AppointmentStatus = (typeof AppointmentStatusEnum)[keyof typeof AppointmentStatusEnum];
22
+ export declare const AppointmentModeEnum: {
23
+ readonly Telemedicine: "telemedicine";
24
+ readonly InPerson: "in_person";
25
+ };
26
+ export type AppointmentMode = (typeof AppointmentModeEnum)[keyof typeof AppointmentModeEnum];
27
+ export declare const AppointmentTypeEnum: {
28
+ readonly Blocked: "blocked";
29
+ readonly Consultation: "consultation";
30
+ readonly Procedure: "procedure";
31
+ readonly FollowUp: "follow_up";
32
+ };
33
+ export type AppointmentType = (typeof AppointmentTypeEnum)[keyof typeof AppointmentTypeEnum];
34
+ export interface Address {
35
+ address_name?: string;
36
+ address_line1?: string;
37
+ address_line2?: string;
38
+ address_city?: string;
39
+ address_state?: string;
40
+ address_zip?: string;
41
+ address_country?: string;
42
+ address_neighborhood?: string;
43
+ address_maps_url?: string;
44
+ address_notes?: string;
45
+ address_geo?: IGeoPoint;
46
+ }
47
+ export interface Patient {
48
+ id: number | null;
49
+ name: string | null;
50
+ email: string;
51
+ gender: string;
52
+ birthDate: string;
53
+ phone: string;
54
+ wabaPhone: string;
55
+ external_id?: string;
56
+ [key: string]: unknown;
57
+ }
58
+ export interface Professional {
59
+ id: number;
60
+ name: string;
61
+ email: string;
62
+ gender: string;
63
+ external_id?: string;
64
+ [key: string]: unknown;
65
+ }
66
+ export interface Insurance {
67
+ name: string;
68
+ external_id?: string;
69
+ [key: string]: unknown;
70
+ }
71
+ export interface Payment {
72
+ total?: number | null;
73
+ paid?: number | null;
74
+ due?: number | null;
75
+ status?: PaymentStatus;
76
+ [key: string]: unknown;
77
+ }
78
+ export interface Procedure {
79
+ id?: number;
80
+ name: string;
81
+ description?: string;
82
+ duration?: number;
83
+ price?: number;
84
+ }
85
+ export interface Appointment extends IFireDoc {
86
+ calendarId: number;
87
+ startDate: string;
88
+ endDate: string;
89
+ status: AppointmentStatus;
90
+ notes?: string;
91
+ appointmentMode: AppointmentMode;
92
+ appointmentType: AppointmentType;
93
+ specialty?: string;
94
+ address?: Address;
95
+ procedures?: Procedure[];
96
+ patient: Patient;
97
+ professional?: Professional;
98
+ insurance?: Insurance;
99
+ payment?: Payment;
100
+ isDraft: boolean;
101
+ draftExpirationMinutes?: number;
102
+ rescheduleCount: number;
103
+ tags?: ITag[] | null;
104
+ [key: string]: unknown;
105
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppointmentTypeEnum = exports.AppointmentModeEnum = exports.AppointmentStatusEnum = exports.PaymentStatusEnum = void 0;
4
+ // Enums para status de pagamento
5
+ exports.PaymentStatusEnum = {
6
+ Paid: "paid",
7
+ Partial: "partial",
8
+ Pending: "pending",
9
+ NotInformed: "not_informed",
10
+ };
11
+ // Enums para status do agendamento
12
+ exports.AppointmentStatusEnum = {
13
+ Scheduled: "scheduled",
14
+ Confirmed: "confirmed",
15
+ Completed: "completed",
16
+ PreCheckin: "pre_checkin",
17
+ Waiting: "waiting",
18
+ NoShow: "no_show",
19
+ Cancelled: "cancelled",
20
+ ExtraSlot: "extra_slot",
21
+ InProgress: "in_progress",
22
+ Rescheduled: "rescheduled",
23
+ };
24
+ // Enums para modo do agendamento
25
+ exports.AppointmentModeEnum = {
26
+ Telemedicine: "telemedicine",
27
+ InPerson: "in_person",
28
+ };
29
+ // Enums para tipo do agendamento
30
+ exports.AppointmentTypeEnum = {
31
+ Blocked: "blocked",
32
+ Consultation: "consultation",
33
+ Procedure: "procedure",
34
+ FollowUp: "follow_up",
35
+ };
@@ -0,0 +1,139 @@
1
+ import type { IFireDoc, IGeoPoint, ITag } from "../../shared";
2
+ // Enums para status de pagamento
3
+ export const PaymentStatusEnum = {
4
+ Paid: "paid",
5
+ Partial: "partial",
6
+ Pending: "pending",
7
+ NotInformed: "not_informed",
8
+ } as const;
9
+
10
+ export type PaymentStatus =
11
+ (typeof PaymentStatusEnum)[keyof typeof PaymentStatusEnum];
12
+
13
+ // Enums para status do agendamento
14
+ export const AppointmentStatusEnum = {
15
+ Scheduled: "scheduled",
16
+ Confirmed: "confirmed",
17
+ Completed: "completed",
18
+ PreCheckin: "pre_checkin",
19
+ Waiting: "waiting",
20
+ NoShow: "no_show",
21
+ Cancelled: "cancelled",
22
+ ExtraSlot: "extra_slot",
23
+ InProgress: "in_progress",
24
+ Rescheduled: "rescheduled",
25
+ } as const;
26
+
27
+ export type AppointmentStatus =
28
+ (typeof AppointmentStatusEnum)[keyof typeof AppointmentStatusEnum];
29
+
30
+ // Enums para modo do agendamento
31
+ export const AppointmentModeEnum = {
32
+ Telemedicine: "telemedicine",
33
+ InPerson: "in_person",
34
+ } as const;
35
+
36
+ export type AppointmentMode =
37
+ (typeof AppointmentModeEnum)[keyof typeof AppointmentModeEnum];
38
+
39
+ // Enums para tipo do agendamento
40
+ export const AppointmentTypeEnum = {
41
+ Blocked: "blocked",
42
+ Consultation: "consultation",
43
+ Procedure: "procedure",
44
+ FollowUp: "follow_up",
45
+ } as const;
46
+
47
+ export type AppointmentType =
48
+ (typeof AppointmentTypeEnum)[keyof typeof AppointmentTypeEnum];
49
+
50
+ // Interface para endereço
51
+ export interface Address {
52
+ address_name?: string;
53
+ address_line1?: string;
54
+ address_line2?: string;
55
+ address_city?: string;
56
+ address_state?: string;
57
+ address_zip?: string;
58
+ address_country?: string;
59
+ address_neighborhood?: string;
60
+ address_maps_url?: string;
61
+ address_notes?: string;
62
+ address_geo?: IGeoPoint;
63
+ }
64
+
65
+ // Interface para paciente
66
+ export interface Patient {
67
+ id: number | null;
68
+ name: string | null;
69
+ email: string;
70
+ gender: string;
71
+ birthDate: string;
72
+ phone: string;
73
+ wabaPhone: string;
74
+ external_id?: string;
75
+ [key: string]: unknown; // index signature
76
+ }
77
+
78
+ // Interface para profissional
79
+ export interface Professional {
80
+ id: number;
81
+ name: string;
82
+ email: string;
83
+ gender: string;
84
+ external_id?: string;
85
+ [key: string]: unknown; // index signature
86
+ }
87
+
88
+ // Interface para seguro
89
+ export interface Insurance {
90
+ name: string;
91
+ external_id?: string;
92
+ [key: string]: unknown; // index signature
93
+ }
94
+
95
+ // Interface para pagamento
96
+ export interface Payment {
97
+ total?: number | null;
98
+ paid?: number | null;
99
+ due?: number | null;
100
+ status?: PaymentStatus;
101
+ [key: string]: unknown;
102
+ }
103
+
104
+ // Interface para procedimento
105
+ export interface Procedure {
106
+ id?: number;
107
+ name: string;
108
+ description?: string;
109
+ duration?: number; // em minutos
110
+ price?: number;
111
+ }
112
+
113
+ // Interface principal do Appointment
114
+ export interface Appointment extends IFireDoc {
115
+ calendarId: number;
116
+ startDate: string; // ISO string
117
+ endDate: string; // ISO string
118
+ status: AppointmentStatus;
119
+ notes?: string;
120
+ appointmentMode: AppointmentMode;
121
+ appointmentType: AppointmentType;
122
+ specialty?: string;
123
+ address?: Address;
124
+ procedures?: Procedure[];
125
+ patient: Patient;
126
+ professional?: Professional;
127
+ insurance?: Insurance;
128
+ payment?: Payment;
129
+
130
+ // Propriedades para controle de rascunho
131
+ isDraft: boolean;
132
+ draftExpirationMinutes?: number; // tempo em minutos para expiração do rascunho
133
+
134
+ // Controle de remarcações
135
+ rescheduleCount: number; // quantidade de vezes que o agendamento foi remarcado
136
+
137
+ tags?: ITag[] | null;
138
+ [key: string]: unknown; // index signature
139
+ }
@@ -102,6 +102,9 @@ export interface IOffice extends IFireDoc {
102
102
  address_state?: string;
103
103
  address_zip?: string;
104
104
  address_country?: string;
105
+ address_neighborhood?: string;
106
+ address_maps_url?: string;
107
+ address_notes?: string;
105
108
  address_geo?: IGeoPoint;
106
109
  readonly employee_counters?: IEmployeeCounters;
107
110
  tags?: ITag[] | null;
@@ -151,6 +151,9 @@ export interface IOffice extends IFireDoc {
151
151
  address_state?: string;
152
152
  address_zip?: string;
153
153
  address_country?: string;
154
+ address_neighborhood?: string;
155
+ address_maps_url?: string;
156
+ address_notes?: string;
154
157
  address_geo?: IGeoPoint;
155
158
  readonly employee_counters?: IEmployeeCounters;
156
159
  tags?: ITag[] | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.54",
3
+ "version": "1.3.55",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",