@integraciones_doc24/sdk 1.16.40 → 1.16.42

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.
Files changed (50) hide show
  1. package/README.md +21 -0
  2. package/lib/baseSdk/diagnostica.d.ts +54 -54
  3. package/lib/baseSdk/diagnostica.js +82 -82
  4. package/lib/baseSdk/external.d.ts +177 -177
  5. package/lib/baseSdk/external.js +96 -96
  6. package/lib/baseSdk/index.d.ts +2 -2
  7. package/lib/baseSdk/index.js +80 -80
  8. package/lib/baseSdk/integrationError.d.ts +16 -16
  9. package/lib/baseSdk/integrationError.js +33 -33
  10. package/lib/baseSdk/user.d.ts +115 -115
  11. package/lib/baseSdk/user.js +136 -136
  12. package/lib/index.d.ts +417 -416
  13. package/lib/index.js +24 -22
  14. package/lib/request/index.d.ts +4 -4
  15. package/lib/request/index.js +32 -32
  16. package/lib/request/token.d.ts +2 -2
  17. package/lib/request/token.js +34 -34
  18. package/lib/request/validation.d.ts +10 -10
  19. package/lib/request/validation.js +28 -28
  20. package/lib/schemas.d.ts +2930 -2813
  21. package/lib/schemas.js +640 -601
  22. package/lib/types.d.ts +183 -178
  23. package/lib/types.js +2 -2
  24. package/lib/userSdk/binah.d.ts +21 -21
  25. package/lib/userSdk/binah.js +20 -20
  26. package/lib/userSdk/chat.d.ts +57 -57
  27. package/lib/userSdk/chat.js +98 -98
  28. package/lib/userSdk/eligibility.d.ts +29 -0
  29. package/lib/userSdk/eligibility.js +81 -0
  30. package/lib/userSdk/external.d.ts +34 -34
  31. package/lib/userSdk/external.js +72 -72
  32. package/lib/userSdk/index.d.ts +2 -2
  33. package/lib/userSdk/index.js +36 -33
  34. package/lib/userSdk/patients.d.ts +62 -62
  35. package/lib/userSdk/patients.js +93 -93
  36. package/lib/userSdk/schedule.d.ts +59 -59
  37. package/lib/userSdk/schedule.js +90 -90
  38. package/lib/userSdk/specialties.d.ts +19 -19
  39. package/lib/userSdk/specialties.js +48 -48
  40. package/lib/userSdk/videoVisit.d.ts +229 -225
  41. package/lib/userSdk/videoVisit.js +288 -283
  42. package/lib/utils.d.ts +4 -4
  43. package/lib/utils.js +68 -68
  44. package/lib/webhook/index.d.ts +2 -2
  45. package/lib/webhook/index.js +67 -67
  46. package/lib/webhook/responses.d.ts +35 -35
  47. package/lib/webhook/responses.js +42 -42
  48. package/lib/webhook/token.d.ts +2 -2
  49. package/lib/webhook/token.js +23 -23
  50. package/package.json +37 -37
package/lib/schemas.js CHANGED
@@ -1,601 +1,640 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.doc24Schemas = void 0;
4
- const zod_1 = require("zod");
5
- const gender = zod_1.enum(['m', 'f', 'o']).optional();
6
- // const identificationType = zEnum(['ndi', 'passport', 'credential']);
7
- const sdkCredentials = zod_1.object({ iss: zod_1.string(), key: zod_1.string() });
8
- const basePersonData = zod_1.object({
9
- firstName: zod_1.string(),
10
- lastName: zod_1.string(),
11
- identificationType: zod_1.number().optional(),
12
- identificationValue: zod_1.string().optional(),
13
- countryId: zod_1.string(),
14
- birthdate: zod_1.date(),
15
- gender,
16
- emergencyContact: zod_1.string().nullish(),
17
- emergencyContactPhone: zod_1.number().or(zod_1.string()).nullish(),
18
- credential: zod_1.string().nullish(),
19
- plan: zod_1.string().nullish(),
20
- affiliationStatus: zod_1.string().nullish(),
21
- localidad: zod_1.string().nullish(),
22
- codPostal: zod_1.string().nullish(),
23
- provincia: zod_1.string().nullish(),
24
- });
25
- const patient = basePersonData;
26
- // search-patient: when idPatient is sent, doc24 identifies the person by id
27
- // (instead of document + gender) and overwrites its data with this payload.
28
- const patientSearch = patient.extend({
29
- idPatient: zod_1.number().optional(),
30
- email: zod_1.string().optional(),
31
- });
32
- const user = basePersonData.extend({
33
- phone: zod_1.string().optional(),
34
- email: zod_1.string(),
35
- });
36
- const specialtyMode = zod_1.enum(['appointment', 'chat', 'instant']);
37
- const specialty = zod_1.object({
38
- id: zod_1.number(),
39
- description: zod_1.string(),
40
- start_age: zod_1.number().or(zod_1.string()).nullish(),
41
- end_age: zod_1.number().or(zod_1.string()).nullish(),
42
- authorization_code: zod_1.string().nullish(),
43
- });
44
- const scheduleAvailabilityFilter = zod_1.object({
45
- specialtyId: zod_1.number().optional(),
46
- professionalId: zod_1.number().optional(),
47
- language: zod_1.string().optional(),
48
- userTimeZone: zod_1.string().optional(),
49
- });
50
- const availableAppointment = zod_1.object({
51
- id: zod_1.number().or(zod_1.string()),
52
- date: zod_1.date(),
53
- clinicId: zod_1.number(),
54
- professional: zod_1.object({
55
- id: zod_1.number(),
56
- fullName: zod_1.string(),
57
- logoUrl: zod_1.string().nullish(),
58
- }),
59
- cost: zod_1.string(),
60
- specialty: specialty,
61
- type: specialtyMode,
62
- atentions: zod_1.number(),
63
- ranking: zod_1.unknown(),
64
- length: zod_1.number().nullish(),
65
- consultation_value: zod_1.string().optional().nullish(),
66
- inPerson: zod_1.boolean().nullish(),
67
- virtual: zod_1.boolean().nullish(),
68
- province: zod_1.string().nullish(),
69
- city: zod_1.string().nullish(),
70
- address: zod_1.string().nullish(),
71
- addressPhone: zod_1.string().nullish(),
72
- });
73
- const appointment = zod_1.object({
74
- id: zod_1.number(),
75
- professionalId: zod_1.number(),
76
- date: zod_1.date(),
77
- });
78
- const availableScheduleClinics = zod_1.object({
79
- specialties: specialty.array(),
80
- specialtiesER: specialty.array(),
81
- professionals: zod_1.object({
82
- id: zod_1.number(),
83
- fullName: zod_1.string(),
84
- clinicId: zod_1.number(),
85
- specialties: specialty.array(),
86
- }).array(),
87
- });
88
- const baseScheduleParameters = zod_1.object({
89
- patientId: zod_1.number(),
90
- specialtyId: zod_1.number(),
91
- language: zod_1.string(),
92
- details: zod_1.string(),
93
- extraInfo: zod_1.any(),
94
- });
95
- const appointmentScheduleParameters = baseScheduleParameters.extend({
96
- type: zod_1.literal('appointment'),
97
- appointmentId: zod_1.number().or(zod_1.string()),
98
- modality: zod_1.enum(['P', 'V']).optional(),
99
- });
100
- const instantScheduleParameters = baseScheduleParameters.extend({
101
- type: zod_1.literal('instant'),
102
- });
103
- const chatroomAvailabilityFilter = zod_1.object({
104
- limit: zod_1.number().optional(),
105
- offset: zod_1.number().optional(),
106
- });
107
- const chatParameters = zod_1.object({
108
- patientId: zod_1.number(),
109
- chatroomId: zod_1.number(),
110
- language: zod_1.string(),
111
- specialtyId: zod_1.number(),
112
- });
113
- const availableChatroom = zod_1.object({
114
- id: zod_1.number(),
115
- professional: zod_1.object({
116
- id: zod_1.number(),
117
- fullName: zod_1.string(),
118
- logoUrl: zod_1.string().nullish(),
119
- }),
120
- specialty: zod_1.object({ id: zod_1.number(), description: zod_1.string() }),
121
- });
122
- const chatDetails = zod_1.object({
123
- id: zod_1.number(),
124
- chatRoomId: zod_1.number(),
125
- startDate: zod_1.date(),
126
- lastEventDate: zod_1.date(),
127
- closureDate: zod_1.date().nullable(),
128
- patient: zod_1.object({
129
- id: zod_1.number(),
130
- firstName: zod_1.string(),
131
- lastName: zod_1.string(),
132
- }),
133
- patientLastPost: zod_1.date().nullable(),
134
- professional: zod_1.object({
135
- id: zod_1.number(),
136
- fullName: zod_1.string(),
137
- logoUrl: zod_1.string().nullish(),
138
- }),
139
- professionalLastPost: zod_1.date().nullable(),
140
- specialty: zod_1.object({ id: zod_1.number(), description: zod_1.string() }),
141
- status: zod_1.string(),
142
- paymentStatus: zod_1.string(),
143
- });
144
- const chatPost = zod_1.object({
145
- id: zod_1.number(),
146
- userType: zod_1.enum(['patient', 'professional']),
147
- message: zod_1.string(),
148
- date: zod_1.date(),
149
- });
150
- const enrollmentParams = zod_1.object({
151
- firstName: zod_1.string(),
152
- lastName: zod_1.string(),
153
- gender: gender,
154
- identificationNumber: zod_1.string(),
155
- birthdate: zod_1.date(),
156
- email: zod_1.string().email(),
157
- plan: zod_1.string(),
158
- startDate: zod_1.date(),
159
- });
160
- const diagnosticaHistoryAppointment = zod_1.object({
161
- date: zod_1.date(),
162
- location: zod_1.string(),
163
- exams: zod_1.string().array(),
164
- deepLink: zod_1.string().url(),
165
- });
166
- const diagnosticaPatient = zod_1.object({
167
- firstName: zod_1.string(),
168
- lastName: zod_1.string(),
169
- birthday: zod_1.date(),
170
- identificationType: zod_1.literal('DNI'),
171
- identificationValue: zod_1.string(),
172
- gender: gender,
173
- });
174
- const diagnosticaUser = diagnosticaPatient.merge(zod_1.object({
175
- phone: zod_1.string(),
176
- email: zod_1.string().email(),
177
- language: zod_1.string(),
178
- }));
179
- const diagnosticaDeepLinkResponse = zod_1.object({
180
- forwardingRequired: zod_1.literal(true),
181
- deepLink: zod_1.string().url(),
182
- }).or(zod_1.object({ forwardingRequired: zod_1.literal(false) }));
183
- // Files the patient attached from the waiting room (upload-file-consultation).
184
- // Separate from `files`, which are the attention's own documents.
185
- const attachedFile = zod_1.object({
186
- fileId: zod_1.number(),
187
- fileName: zod_1.string().nullable(),
188
- fileUrl: zod_1.string().url(),
189
- fileType: zod_1.enum(['IMG', 'FILE']),
190
- uploadDate: zod_1.date(),
191
- });
192
- const videoVisit = zod_1.object({
193
- id: zod_1.number().nullable(),
194
- creationDate: zod_1.date(),
195
- patientId: zod_1.number(),
196
- user: zod_1.object({
197
- id: zod_1.number(),
198
- email: zod_1.string().nullable(),
199
- phone: zod_1.string().nullable(),
200
- }),
201
- vcToken: zod_1.string(),
202
- appointment: zod_1.object({
203
- id: zod_1.number(),
204
- date: zod_1.date(),
205
- }).optional(),
206
- videoVisit: zod_1.object({
207
- id: zod_1.number(),
208
- status: zod_1.string(),
209
- }).optional(),
210
- paymentStatus: zod_1.string().optional(),
211
- atentionId: zod_1.number().optional(),
212
- waitingTime: zod_1.string().optional(),
213
- address: zod_1.string().optional(),
214
- city: zod_1.string().optional(),
215
- province: zod_1.string().optional(),
216
- modality: zod_1.enum(['P', 'V']).optional(),
217
- attachedFiles: zod_1.array(attachedFile),
218
- });
219
- const historicalVideoVisit = videoVisit.extend({
220
- specialty: zod_1.string(),
221
- professional: zod_1.string(),
222
- medications: zod_1.boolean().optional(),
223
- practices: zod_1.boolean().optional(),
224
- });
225
- const coverageInfo = zod_1.object({
226
- financerId: zod_1.number().nullable(),
227
- defaultAffiliationId: zod_1.number().nullable(),
228
- plan: zod_1.string().nullable(),
229
- identificationNumber: zod_1.string(),
230
- credentialNumber: zod_1.string().nullable(),
231
- lastName: zod_1.string().nullable(),
232
- firstName: zod_1.string().nullable(),
233
- birthdate: zod_1.date(),
234
- financerPlanId: zod_1.number().nullable(),
235
- gender,
236
- brand: zod_1.number().nullable(),
237
- holderIdentificationNumber: zod_1.string().nullable(),
238
- copaymentValue: zod_1.number().nullable(),
239
- mobilePhone: zod_1.string().nullable(),
240
- company: zod_1.string().nullable(),
241
- email: zod_1.string().email().nullable(),
242
- dischargeDate: zod_1.date().nullable(),
243
- leavingDate: zod_1.date().nullable(),
244
- identificacion_tributaria: zod_1.string().nullable(),
245
- deregistrationDate: zod_1.date().nullable(),
246
- authorizationCode: zod_1.string().nullable(),
247
- authorizationCodeExpiration: zod_1.date().nullable(),
248
- }).nullable();
249
- const sendVerificationCodeParams = zod_1.object({
250
- identificationType: zod_1.number(),
251
- identificationValue: zod_1.string(),
252
- channel: zod_1.enum(['1', '2']),
253
- });
254
- const verificationCodeParams = zod_1.object({
255
- channel: zod_1.enum(['1', '2']).optional(),
256
- code: zod_1.string().optional(),
257
- });
258
- const declareUserParams = zod_1.object({
259
- user,
260
- }).and(verificationCodeParams);
261
- const declarePatientParams = zod_1.object({
262
- patient,
263
- }).and(verificationCodeParams);
264
- const declarePatientResponse = zod_1.object({
265
- userInfo: zod_1.object({
266
- firstName: zod_1.string(),
267
- lastName: zod_1.string(),
268
- email: zod_1.string(),
269
- phone: zod_1.string(),
270
- }),
271
- askCode: zod_1.literal(true),
272
- }).or(zod_1.object({
273
- askCode: zod_1.literal(false),
274
- patientId: zod_1.number().nullable(),
275
- }));
276
- const declareUserResponse = zod_1.object({
277
- userInfo: zod_1.object({
278
- email: zod_1.string(),
279
- phone: zod_1.string(),
280
- }),
281
- askCode: zod_1.literal(true),
282
- }).or(zod_1.object({
283
- askCode: zod_1.literal(false),
284
- patientId: zod_1.number().nullable(),
285
- userId: zod_1.number(),
286
- }));
287
- const externalLoginParams = zod_1.object({
288
- user: zod_1.string(),
289
- password: zod_1.string(),
290
- });
291
- const externalLoginResponse = zod_1.object({
292
- firstName: zod_1.string(),
293
- lastName: zod_1.string(),
294
- countryId: zod_1.string(),
295
- birthday: zod_1.date(),
296
- identificationNumber: zod_1.string(),
297
- gender,
298
- email: zod_1.string().email(),
299
- phone: zod_1.string(),
300
- });
301
- const emailOrPhone = zod_1.union([
302
- zod_1.object({ email: zod_1.string(), phone: zod_1.string() }),
303
- zod_1.object({ email: zod_1.string(), phone: zod_1.undefined() }),
304
- zod_1.object({ email: zod_1.undefined(), phone: zod_1.string() }),
305
- ]).refine((data) => data.email || data.phone, 'Either phone or email is required');
306
- const preExternalEnrollmentParams = zod_1.object({
307
- identificationNumber: zod_1.string(),
308
- birthdate: zod_1.date(),
309
- }).and(emailOrPhone);
310
- const emailOrPhoneCode = zod_1.union([
311
- zod_1.object({ emailCode: zod_1.string(), phoneCode: zod_1.string() }),
312
- zod_1.object({ emailCode: zod_1.string(), phoneCode: zod_1.undefined() }),
313
- zod_1.object({ emailCode: zod_1.undefined(), phoneCode: zod_1.string() }),
314
- ]).refine((data) => data.emailCode || data.phoneCode, 'Either phone code or email code is required');
315
- const externalEnrollmentParams = preExternalEnrollmentParams
316
- .and(zod_1.object({ password: zod_1.string() }))
317
- .and(emailOrPhoneCode);
318
- const sendExternalVerificationCodeParams = zod_1.object({
319
- identificationNumber: zod_1.string(),
320
- birthdate: zod_1.date(),
321
- channel: zod_1.enum(['1', '2']),
322
- });
323
- const verifyExternalVerificationCodeParams = sendExternalVerificationCodeParams.extend({ code: zod_1.string() });
324
- const externalResetPasswordParams = zod_1.object({
325
- identificationNumber: zod_1.string(),
326
- birthdate: zod_1.date(),
327
- password: zod_1.string(),
328
- }).and(emailOrPhoneCode);
329
- const externalPatient = zod_1.object({
330
- birthdate: zod_1.date(),
331
- identificationType: zod_1.literal('DNI'),
332
- identificationValue: zod_1.string(),
333
- gender: gender,
334
- });
335
- const externalAppointment = zod_1.object({
336
- id: zod_1.number(),
337
- patientIdentification: zod_1.string().optional(),
338
- patientName: zod_1.string(),
339
- birthdate: zod_1.date(),
340
- appointment: zod_1.string(),
341
- clinic: zod_1.string(),
342
- professionalName: zod_1.string(),
343
- date: zod_1.date(),
344
- specialty: zod_1.string(),
345
- modality: zod_1.string(),
346
- });
347
- const binahWellnessGetLinkParams = zod_1.object({
348
- socket: zod_1.object({
349
- device: zod_1.string(),
350
- provider: zod_1.string(),
351
- socketUrl: zod_1.string(),
352
- callbackUrl: zod_1.string(),
353
- socketAuthToken: zod_1.string(),
354
- }),
355
- patientId: zod_1.number(),
356
- });
357
- const binahWellnessResponse = zod_1.object({
358
- data: zod_1.object({
359
- info: zod_1.object({
360
- link: zod_1.string().url(),
361
- }),
362
- timestamp: zod_1.string(),
363
- }),
364
- signature: zod_1.string(),
365
- });
366
- const integrationErrorDetailsMaxBytes = 64 * 1024;
367
- const reportIntegrationErrorParams = zod_1.object({
368
- integration: zod_1.string().min(1),
369
- operation: zod_1.string().optional(),
370
- severity: zod_1.enum(['INFO', 'WARNING', 'ERROR', 'CRITICAL']).optional(),
371
- errorCode: zod_1.string().optional(),
372
- httpStatus: zod_1.number().int().optional(),
373
- params: zod_1.record(zod_1.unknown()),
374
- occurredAt: zod_1.date(),
375
- externalId: zod_1.string().optional(),
376
- details: zod_1.record(zod_1.unknown())
377
- .refine((d) => Buffer.byteLength(JSON.stringify(d), 'utf8') <=
378
- integrationErrorDetailsMaxBytes, { message: 'details must not exceed 64 KB' })
379
- .optional(),
380
- });
381
- const reportIntegrationErrorResponse = zod_1.object({
382
- errorId: zod_1.number(),
383
- });
384
- exports.doc24Schemas = {
385
- sdkCredentials,
386
- reportIntegrationErrorParams,
387
- reportIntegrationErrorResponse,
388
- sdkParams: zod_1.object({ url: zod_1.string(), credentials: sdkCredentials }),
389
- user,
390
- patient,
391
- patientSearch,
392
- specialtyMode,
393
- specialty,
394
- scheduleAvailabilityFilter,
395
- availableAppointment,
396
- availableScheduleClinics,
397
- scheduleFilter: zod_1.object({
398
- professionalId: zod_1.number().optional(),
399
- offset: zod_1.number().optional(),
400
- limit: zod_1.number().optional(),
401
- weekDay: zod_1.number().optional(),
402
- date: zod_1.date().optional(),
403
- startHour: zod_1.string().optional(),
404
- finishHour: zod_1.string().optional(),
405
- language: zod_1.string().optional(),
406
- userTimeZone: zod_1.string().optional(),
407
- showAppointmentConfiguration: zod_1.boolean().optional(),
408
- }),
409
- professionalsBySpecialtyFilter: zod_1.object({
410
- professionalId: zod_1.number().optional().nullable(),
411
- specialtyId: zod_1.number().optional().nullable(),
412
- offset: zod_1.number().optional().nullable(),
413
- limit: zod_1.number().optional().nullable(),
414
- language: zod_1.string().optional().nullable(),
415
- }),
416
- scheduleParameters: zod_1.union([
417
- appointmentScheduleParameters,
418
- instantScheduleParameters,
419
- ]),
420
- attachedFile,
421
- videoVisit,
422
- historicalVideoVisit,
423
- videoVisitDetails: zod_1.object({
424
- id: zod_1.number(),
425
- vcToken: zod_1.string().optional(),
426
- status: zod_1.string(),
427
- paymentStatus: zod_1.string(),
428
- professional: zod_1.object({
429
- id: zod_1.number(),
430
- fullName: zod_1.string(),
431
- }).optional(),
432
- patient: zod_1.object({
433
- fullName: zod_1.string(),
434
- firstAccessDate: zod_1.date(),
435
- lastAccessDate: zod_1.date(),
436
- }),
437
- finishDate: zod_1.date().nullable(),
438
- retries: zod_1.number(),
439
- language: zod_1.string(),
440
- appointment: zod_1.object({ id: zod_1.number(), date: zod_1.date() }).nullable(),
441
- report: zod_1.object({
442
- motive: zod_1.string().nullable(),
443
- actualDesease: zod_1.string().nullable(),
444
- indications: zod_1.string().nullable(),
445
- alertSigns: zod_1.string().nullable(),
446
- extendedMotive: zod_1.string().nullable(),
447
- diagnose: zod_1.array(zod_1.object({ description: zod_1.string(), code: zod_1.string() })),
448
- }),
449
- pdf: zod_1.object({
450
- atention: zod_1.string().optional(),
451
- labs: zod_1.string().optional(),
452
- otherExams: zod_1.string().optional(),
453
- images: zod_1.string().optional(),
454
- medication: zod_1.array(zod_1.any()),
455
- }),
456
- files: zod_1.array(zod_1.object({ name: zod_1.string(), url: zod_1.string().url() })),
457
- attachedFiles: zod_1.array(attachedFile),
458
- }),
459
- completeVideoVisitDetails: zod_1.object({
460
- id: zod_1.number(),
461
- status: zod_1.string(),
462
- paymentStatus: zod_1.string(),
463
- modality: zod_1.enum(['P', 'V']).optional(),
464
- address: zod_1.string().optional(),
465
- city: zod_1.string().optional(),
466
- province: zod_1.string().optional(),
467
- professional: zod_1.object({
468
- id: zod_1.number(),
469
- fullName: zod_1.string(),
470
- specialtyId: zod_1.number(),
471
- specialty: zod_1.string(),
472
- idPrestadorInterno: zod_1.string().nullish(),
473
- }).optional(),
474
- finishDate: zod_1.date().nullable(),
475
- retries: zod_1.number().nullish(),
476
- language: zod_1.string(),
477
- report: zod_1.object({
478
- motive: zod_1.string().nullable(),
479
- actualDesease: zod_1.string().nullable(),
480
- indications: zod_1.string().nullish(),
481
- alertSigns: zod_1.string().nullable(),
482
- extendedMotive: zod_1.string().nullable(),
483
- diagnose: zod_1.array(zod_1.object({ description: zod_1.string(), code: zod_1.string() })),
484
- medication: zod_1.array(zod_1.object({
485
- description: zod_1.string().nullish(),
486
- quantity: zod_1.number().nullish(),
487
- dose: zod_1.string().nullish(),
488
- farmalinkId: zod_1.number().nullish(),
489
- })),
490
- prescription: zod_1.object({
491
- link: zod_1.string().nullish(),
492
- codigo: zod_1.number().nullish(),
493
- }),
494
- inPersonRequired: zod_1.string().nullish(),
495
- referral: zod_1.object({
496
- status: zod_1.string().nullish(),
497
- specialtyId: zod_1.any(),
498
- inPersonRequired: zod_1.string().nullish(),
499
- comments: zod_1.string().nullish(),
500
- }),
501
- }),
502
- pdf: zod_1.object({
503
- atention: zod_1.any(),
504
- labs: zod_1.any(),
505
- otherExams: zod_1.any(),
506
- images: zod_1.any(),
507
- medication: zod_1.array(zod_1.any()),
508
- certificate: zod_1.array(zod_1.any()).or(zod_1.string()).nullish(),
509
- }),
510
- files: zod_1.array(zod_1.object({ name: zod_1.string(), url: zod_1.string().url() })),
511
- attachedFiles: zod_1.array(attachedFile),
512
- }),
513
- activeVideoVisitData: zod_1.object({
514
- consultationId: zod_1.number(),
515
- patientId: zod_1.number(),
516
- vcToken: zod_1.string(),
517
- }),
518
- professional: zod_1.object({
519
- id: zod_1.number(),
520
- firstName: zod_1.string(),
521
- lastName: zod_1.string(),
522
- birthdate: zod_1.date(),
523
- gender,
524
- email: zod_1.string(),
525
- phone: zod_1.string().nullable(),
526
- logoUrl: zod_1.string().nullish(),
527
- matriculation: zod_1.array(zod_1.object({ number: zod_1.string(), type: zod_1.string() })),
528
- specialties: zod_1.array(specialty),
529
- degree: zod_1.string(),
530
- languages: zod_1.array(zod_1.string()),
531
- resume: zod_1.object({
532
- link: zod_1.string(),
533
- brief: zod_1.string().nullish(),
534
- }),
535
- consultation_value: zod_1.string().optional().nullish(),
536
- hasAvailability: zod_1.boolean().optional(),
537
- status: zod_1.enum(['active', 'deactivated']).optional(),
538
- }),
539
- professionalsListItem: zod_1.object({
540
- id: zod_1.number(),
541
- fullName: zod_1.string(),
542
- consultation_value: zod_1.number().or(zod_1.string()).optional().nullish(),
543
- logoUrl: zod_1.string().nullish(),
544
- primer_turno: zod_1.string().optional(),
545
- degree: zod_1.string().optional(),
546
- brief: zod_1.string().nullish(),
547
- }),
548
- appointment,
549
- chatroomAvailabilityFilter,
550
- chatParameters,
551
- availableChatroom,
552
- chatDetails,
553
- chatPost,
554
- enrollmentParams,
555
- diagnosticaPatientFilter: zod_1.object({
556
- gender,
557
- identificationType: zod_1.literal('DNI'),
558
- identificationValue: zod_1.string(),
559
- }),
560
- diagnosticaHistoryAppointment,
561
- diagnosticaUser,
562
- diagnosticaPatient,
563
- diagnosticaDeepLinkResponse,
564
- coverageInfo,
565
- sendVerificationCodeParams,
566
- declareUserParams,
567
- declareUserResponse,
568
- declarePatientParams,
569
- declarePatientResponse,
570
- verificationCodeParams,
571
- externalLoginParams,
572
- externalLoginResponse,
573
- preExternalEnrollmentParams,
574
- externalEnrollmentParams,
575
- sendExternalVerificationCodeParams,
576
- verifyExternalVerificationCodeParams,
577
- externalResetPasswordParams,
578
- externalPatient,
579
- externalAppointment,
580
- binahWellnessResponse,
581
- binahWellnessGetLinkParams,
582
- emailOrPhone,
583
- emailOrPhoneCode,
584
- uploadFileConsultationParams: zod_1.object({
585
- vcToken: zod_1.string(),
586
- attachedFile: zod_1.string(),
587
- fileName: zod_1.string().optional(),
588
- }),
589
- uploadFileConsultationResponse: zod_1.object({
590
- fileId: zod_1.number().optional(),
591
- }),
592
- deleteFileConsultationParams: zod_1.object({
593
- vcToken: zod_1.string(),
594
- fileId: zod_1.number(),
595
- }),
596
- healthQuizParams: zod_1.object({
597
- patientId: zod_1.number(),
598
- quiz: zod_1.record(zod_1.any()),
599
- origen: zod_1.string(),
600
- }),
601
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.doc24Schemas = void 0;
4
+ const zod_1 = require("zod");
5
+ const gender = zod_1.enum(['m', 'f', 'o']).optional();
6
+ // const identificationType = zEnum(['ndi', 'passport', 'credential']);
7
+ const sdkCredentials = zod_1.object({ iss: zod_1.string(), key: zod_1.string() });
8
+ const basePersonData = zod_1.object({
9
+ firstName: zod_1.string(),
10
+ lastName: zod_1.string(),
11
+ identificationType: zod_1.number().optional(),
12
+ identificationValue: zod_1.string().optional(),
13
+ countryId: zod_1.string(),
14
+ birthdate: zod_1.date(),
15
+ gender,
16
+ emergencyContact: zod_1.string().nullish(),
17
+ emergencyContactPhone: zod_1.number().or(zod_1.string()).nullish(),
18
+ credential: zod_1.string().nullish(),
19
+ plan: zod_1.string().nullish(),
20
+ affiliationStatus: zod_1.string().nullish(),
21
+ localidad: zod_1.string().nullish(),
22
+ codPostal: zod_1.string().nullish(),
23
+ provincia: zod_1.string().nullish(),
24
+ });
25
+ const patient = basePersonData;
26
+ // search-patient: when idPatient is sent, doc24 identifies the person by id
27
+ // (instead of document + gender) and overwrites its data with this payload.
28
+ const patientSearch = patient.extend({
29
+ idPatient: zod_1.number().optional(),
30
+ email: zod_1.string().optional(),
31
+ });
32
+ const user = basePersonData.extend({
33
+ phone: zod_1.string().optional(),
34
+ email: zod_1.string(),
35
+ });
36
+ const specialtyMode = zod_1.enum(['appointment', 'chat', 'instant']);
37
+ const specialty = zod_1.object({
38
+ id: zod_1.number(),
39
+ description: zod_1.string(),
40
+ start_age: zod_1.number().or(zod_1.string()).nullish(),
41
+ end_age: zod_1.number().or(zod_1.string()).nullish(),
42
+ authorization_code: zod_1.string().nullish(),
43
+ });
44
+ const scheduleAvailabilityFilter = zod_1.object({
45
+ specialtyId: zod_1.number().optional(),
46
+ professionalId: zod_1.number().optional(),
47
+ language: zod_1.string().optional(),
48
+ userTimeZone: zod_1.string().optional(),
49
+ });
50
+ const availableAppointment = zod_1.object({
51
+ id: zod_1.number().or(zod_1.string()),
52
+ date: zod_1.date(),
53
+ clinicId: zod_1.number(),
54
+ professional: zod_1.object({
55
+ id: zod_1.number(),
56
+ fullName: zod_1.string(),
57
+ logoUrl: zod_1.string().nullish(),
58
+ }),
59
+ cost: zod_1.string(),
60
+ specialty: specialty,
61
+ type: specialtyMode,
62
+ atentions: zod_1.number(),
63
+ ranking: zod_1.unknown(),
64
+ length: zod_1.number().nullish(),
65
+ consultation_value: zod_1.string().optional().nullish(),
66
+ inPerson: zod_1.boolean().nullish(),
67
+ virtual: zod_1.boolean().nullish(),
68
+ province: zod_1.string().nullish(),
69
+ city: zod_1.string().nullish(),
70
+ address: zod_1.string().nullish(),
71
+ addressPhone: zod_1.string().nullish(),
72
+ });
73
+ const appointment = zod_1.object({
74
+ id: zod_1.number(),
75
+ professionalId: zod_1.number(),
76
+ date: zod_1.date(),
77
+ });
78
+ const availableScheduleClinics = zod_1.object({
79
+ specialties: specialty.array(),
80
+ specialtiesER: specialty.array(),
81
+ professionals: zod_1.object({
82
+ id: zod_1.number(),
83
+ fullName: zod_1.string(),
84
+ clinicId: zod_1.number(),
85
+ specialties: specialty.array(),
86
+ }).array(),
87
+ });
88
+ const baseScheduleParameters = zod_1.object({
89
+ patientId: zod_1.number(),
90
+ specialtyId: zod_1.number(),
91
+ language: zod_1.string(),
92
+ details: zod_1.string(),
93
+ extraInfo: zod_1.any(),
94
+ });
95
+ const appointmentScheduleParameters = baseScheduleParameters.extend({
96
+ type: zod_1.literal('appointment'),
97
+ appointmentId: zod_1.number().or(zod_1.string()),
98
+ modality: zod_1.enum(['P', 'V']).optional(),
99
+ });
100
+ const instantScheduleParameters = baseScheduleParameters.extend({
101
+ type: zod_1.literal('instant'),
102
+ });
103
+ const chatroomAvailabilityFilter = zod_1.object({
104
+ limit: zod_1.number().optional(),
105
+ offset: zod_1.number().optional(),
106
+ });
107
+ const chatParameters = zod_1.object({
108
+ patientId: zod_1.number(),
109
+ chatroomId: zod_1.number(),
110
+ language: zod_1.string(),
111
+ specialtyId: zod_1.number(),
112
+ });
113
+ const availableChatroom = zod_1.object({
114
+ id: zod_1.number(),
115
+ professional: zod_1.object({
116
+ id: zod_1.number(),
117
+ fullName: zod_1.string(),
118
+ logoUrl: zod_1.string().nullish(),
119
+ }),
120
+ specialty: zod_1.object({ id: zod_1.number(), description: zod_1.string() }),
121
+ });
122
+ const chatDetails = zod_1.object({
123
+ id: zod_1.number(),
124
+ chatRoomId: zod_1.number(),
125
+ startDate: zod_1.date(),
126
+ lastEventDate: zod_1.date(),
127
+ closureDate: zod_1.date().nullable(),
128
+ patient: zod_1.object({
129
+ id: zod_1.number(),
130
+ firstName: zod_1.string(),
131
+ lastName: zod_1.string(),
132
+ }),
133
+ patientLastPost: zod_1.date().nullable(),
134
+ professional: zod_1.object({
135
+ id: zod_1.number(),
136
+ fullName: zod_1.string(),
137
+ logoUrl: zod_1.string().nullish(),
138
+ }),
139
+ professionalLastPost: zod_1.date().nullable(),
140
+ specialty: zod_1.object({ id: zod_1.number(), description: zod_1.string() }),
141
+ status: zod_1.string(),
142
+ paymentStatus: zod_1.string(),
143
+ });
144
+ const chatPost = zod_1.object({
145
+ id: zod_1.number(),
146
+ userType: zod_1.enum(['patient', 'professional']),
147
+ message: zod_1.string(),
148
+ date: zod_1.date(),
149
+ });
150
+ const enrollmentParams = zod_1.object({
151
+ firstName: zod_1.string(),
152
+ lastName: zod_1.string(),
153
+ gender: gender,
154
+ identificationNumber: zod_1.string(),
155
+ birthdate: zod_1.date(),
156
+ email: zod_1.string().email(),
157
+ plan: zod_1.string(),
158
+ startDate: zod_1.date(),
159
+ });
160
+ const diagnosticaHistoryAppointment = zod_1.object({
161
+ date: zod_1.date(),
162
+ location: zod_1.string(),
163
+ exams: zod_1.string().array(),
164
+ deepLink: zod_1.string().url(),
165
+ });
166
+ const diagnosticaPatient = zod_1.object({
167
+ firstName: zod_1.string(),
168
+ lastName: zod_1.string(),
169
+ birthday: zod_1.date(),
170
+ identificationType: zod_1.literal('DNI'),
171
+ identificationValue: zod_1.string(),
172
+ gender: gender,
173
+ });
174
+ const diagnosticaUser = diagnosticaPatient.merge(zod_1.object({
175
+ phone: zod_1.string(),
176
+ email: zod_1.string().email(),
177
+ language: zod_1.string(),
178
+ }));
179
+ const diagnosticaDeepLinkResponse = zod_1.object({
180
+ forwardingRequired: zod_1.literal(true),
181
+ deepLink: zod_1.string().url(),
182
+ }).or(zod_1.object({ forwardingRequired: zod_1.literal(false) }));
183
+ // Files the patient attached from the waiting room (upload-file-consultation).
184
+ // Separate from `files`, which are the attention's own documents.
185
+ const attachedFile = zod_1.object({
186
+ fileId: zod_1.number(),
187
+ fileName: zod_1.string().nullable(),
188
+ fileUrl: zod_1.string().url(),
189
+ fileType: zod_1.enum(['IMG', 'FILE']),
190
+ uploadDate: zod_1.date(),
191
+ });
192
+ const videoVisit = zod_1.object({
193
+ id: zod_1.number().nullable(),
194
+ creationDate: zod_1.date(),
195
+ patientId: zod_1.number(),
196
+ user: zod_1.object({
197
+ id: zod_1.number(),
198
+ email: zod_1.string().nullable(),
199
+ phone: zod_1.string().nullable(),
200
+ }),
201
+ vcToken: zod_1.string(),
202
+ appointment: zod_1.object({
203
+ id: zod_1.number(),
204
+ date: zod_1.date(),
205
+ }).optional(),
206
+ videoVisit: zod_1.object({
207
+ id: zod_1.number(),
208
+ status: zod_1.string(),
209
+ }).optional(),
210
+ // Set by Doc24's nightly process (~01:00 -03), e.g. `NOSHOW`.
211
+ voidDate: zod_1.date().optional(),
212
+ voidDetails: zod_1.string().optional(),
213
+ paymentStatus: zod_1.string().optional(),
214
+ atentionId: zod_1.number().optional(),
215
+ waitingTime: zod_1.string().optional(),
216
+ address: zod_1.string().optional(),
217
+ city: zod_1.string().optional(),
218
+ province: zod_1.string().optional(),
219
+ modality: zod_1.enum(['P', 'V']).optional(),
220
+ attachedFiles: zod_1.array(attachedFile),
221
+ });
222
+ const historicalVideoVisit = videoVisit.extend({
223
+ specialty: zod_1.string(),
224
+ professional: zod_1.string(),
225
+ medications: zod_1.boolean().optional(),
226
+ practices: zod_1.boolean().optional(),
227
+ });
228
+ const coverageInfo = zod_1.object({
229
+ financerId: zod_1.number().nullable(),
230
+ defaultAffiliationId: zod_1.number().nullable(),
231
+ plan: zod_1.string().nullable(),
232
+ identificationNumber: zod_1.string(),
233
+ credentialNumber: zod_1.string().nullable(),
234
+ lastName: zod_1.string().nullable(),
235
+ firstName: zod_1.string().nullable(),
236
+ birthdate: zod_1.date(),
237
+ financerPlanId: zod_1.number().nullable(),
238
+ gender,
239
+ brand: zod_1.number().nullable(),
240
+ holderIdentificationNumber: zod_1.string().nullable(),
241
+ copaymentValue: zod_1.number().nullable(),
242
+ mobilePhone: zod_1.string().nullable(),
243
+ company: zod_1.string().nullable(),
244
+ email: zod_1.string().email().nullable(),
245
+ dischargeDate: zod_1.date().nullable(),
246
+ leavingDate: zod_1.date().nullable(),
247
+ identificacion_tributaria: zod_1.string().nullable(),
248
+ deregistrationDate: zod_1.date().nullable(),
249
+ authorizationCode: zod_1.string().nullable(),
250
+ authorizationCodeExpiration: zod_1.date().nullable(),
251
+ }).nullable();
252
+ const sendVerificationCodeParams = zod_1.object({
253
+ identificationType: zod_1.number(),
254
+ identificationValue: zod_1.string(),
255
+ channel: zod_1.enum(['1', '2']),
256
+ });
257
+ const verificationCodeParams = zod_1.object({
258
+ channel: zod_1.enum(['1', '2']).optional(),
259
+ code: zod_1.string().optional(),
260
+ });
261
+ const declareUserParams = zod_1.object({
262
+ user,
263
+ }).and(verificationCodeParams);
264
+ const declarePatientParams = zod_1.object({
265
+ patient,
266
+ }).and(verificationCodeParams);
267
+ const declarePatientResponse = zod_1.object({
268
+ userInfo: zod_1.object({
269
+ firstName: zod_1.string(),
270
+ lastName: zod_1.string(),
271
+ email: zod_1.string(),
272
+ phone: zod_1.string(),
273
+ }),
274
+ askCode: zod_1.literal(true),
275
+ }).or(zod_1.object({
276
+ askCode: zod_1.literal(false),
277
+ patientId: zod_1.number().nullable(),
278
+ }));
279
+ const declareUserResponse = zod_1.object({
280
+ userInfo: zod_1.object({
281
+ email: zod_1.string(),
282
+ phone: zod_1.string(),
283
+ }),
284
+ askCode: zod_1.literal(true),
285
+ }).or(zod_1.object({
286
+ askCode: zod_1.literal(false),
287
+ patientId: zod_1.number().nullable(),
288
+ userId: zod_1.number(),
289
+ }));
290
+ const externalLoginParams = zod_1.object({
291
+ user: zod_1.string(),
292
+ password: zod_1.string(),
293
+ });
294
+ const externalLoginResponse = zod_1.object({
295
+ firstName: zod_1.string(),
296
+ lastName: zod_1.string(),
297
+ countryId: zod_1.string(),
298
+ birthday: zod_1.date(),
299
+ identificationNumber: zod_1.string(),
300
+ gender,
301
+ email: zod_1.string().email(),
302
+ phone: zod_1.string(),
303
+ });
304
+ const emailOrPhone = zod_1.union([
305
+ zod_1.object({ email: zod_1.string(), phone: zod_1.string() }),
306
+ zod_1.object({ email: zod_1.string(), phone: zod_1.undefined() }),
307
+ zod_1.object({ email: zod_1.undefined(), phone: zod_1.string() }),
308
+ ]).refine((data) => data.email || data.phone, 'Either phone or email is required');
309
+ const preExternalEnrollmentParams = zod_1.object({
310
+ identificationNumber: zod_1.string(),
311
+ birthdate: zod_1.date(),
312
+ }).and(emailOrPhone);
313
+ const emailOrPhoneCode = zod_1.union([
314
+ zod_1.object({ emailCode: zod_1.string(), phoneCode: zod_1.string() }),
315
+ zod_1.object({ emailCode: zod_1.string(), phoneCode: zod_1.undefined() }),
316
+ zod_1.object({ emailCode: zod_1.undefined(), phoneCode: zod_1.string() }),
317
+ ]).refine((data) => data.emailCode || data.phoneCode, 'Either phone code or email code is required');
318
+ const externalEnrollmentParams = preExternalEnrollmentParams
319
+ .and(zod_1.object({ password: zod_1.string() }))
320
+ .and(emailOrPhoneCode);
321
+ const sendExternalVerificationCodeParams = zod_1.object({
322
+ identificationNumber: zod_1.string(),
323
+ birthdate: zod_1.date(),
324
+ channel: zod_1.enum(['1', '2']),
325
+ });
326
+ const verifyExternalVerificationCodeParams = sendExternalVerificationCodeParams.extend({ code: zod_1.string() });
327
+ const externalResetPasswordParams = zod_1.object({
328
+ identificationNumber: zod_1.string(),
329
+ birthdate: zod_1.date(),
330
+ password: zod_1.string(),
331
+ }).and(emailOrPhoneCode);
332
+ const externalPatient = zod_1.object({
333
+ birthdate: zod_1.date(),
334
+ identificationType: zod_1.literal('DNI'),
335
+ identificationValue: zod_1.string(),
336
+ gender: gender,
337
+ });
338
+ const externalAppointment = zod_1.object({
339
+ id: zod_1.number(),
340
+ patientIdentification: zod_1.string().optional(),
341
+ patientName: zod_1.string(),
342
+ birthdate: zod_1.date(),
343
+ appointment: zod_1.string(),
344
+ clinic: zod_1.string(),
345
+ professionalName: zod_1.string(),
346
+ date: zod_1.date(),
347
+ specialty: zod_1.string(),
348
+ modality: zod_1.string(),
349
+ });
350
+ const binahWellnessGetLinkParams = zod_1.object({
351
+ socket: zod_1.object({
352
+ device: zod_1.string(),
353
+ provider: zod_1.string(),
354
+ socketUrl: zod_1.string(),
355
+ callbackUrl: zod_1.string(),
356
+ socketAuthToken: zod_1.string(),
357
+ }),
358
+ patientId: zod_1.number(),
359
+ });
360
+ const binahWellnessResponse = zod_1.object({
361
+ data: zod_1.object({
362
+ info: zod_1.object({
363
+ link: zod_1.string().url(),
364
+ }),
365
+ timestamp: zod_1.string(),
366
+ }),
367
+ signature: zod_1.string(),
368
+ });
369
+ // WEH-1937: InSSSeP eligibility. Codes from InSSSeP Table 15.
370
+ const eligibilityIdentificationType = zod_1.enum(['3', '8']);
371
+ const eligibilityParams = zod_1.object({
372
+ patientId: zod_1.number().int().positive(),
373
+ // '3' = DNI, '8' = Credencial
374
+ identificationType: eligibilityIdentificationType,
375
+ identificationValue: zod_1.string().regex(/^\d+$/),
376
+ credentialToken: zod_1.string()
377
+ .regex(/^\d{1,3}$/)
378
+ .optional(),
379
+ credential: zod_1.string().min(1).optional(),
380
+ }).refine((params) => (params.credentialToken === undefined) ===
381
+ (params.credential === undefined), {
382
+ message: 'credentialToken and credential must be sent together',
383
+ path: ['credentialToken'],
384
+ });
385
+ const eligibilityAffiliate = zod_1.object({
386
+ name: zod_1.string().optional(),
387
+ holder: zod_1.string().optional(),
388
+ gender: zod_1.string().optional(),
389
+ age: zod_1.string().optional(),
390
+ affiliateNumber: zod_1.string().optional(),
391
+ plan: zod_1.string().optional(),
392
+ });
393
+ const eligibilityResponse = zod_1.object({
394
+ eligible: zod_1.boolean(),
395
+ code: zod_1.string(),
396
+ message: zod_1.string(),
397
+ affiliate: eligibilityAffiliate.nullable(),
398
+ notices: zod_1.array(zod_1.string()),
399
+ timestamp: zod_1.date(),
400
+ });
401
+ const integrationErrorDetailsMaxBytes = 64 * 1024;
402
+ const reportIntegrationErrorParams = zod_1.object({
403
+ integration: zod_1.string().min(1),
404
+ operation: zod_1.string().optional(),
405
+ severity: zod_1.enum(['INFO', 'WARNING', 'ERROR', 'CRITICAL']).optional(),
406
+ errorCode: zod_1.string().optional(),
407
+ httpStatus: zod_1.number().int().optional(),
408
+ params: zod_1.record(zod_1.unknown()),
409
+ occurredAt: zod_1.date(),
410
+ externalId: zod_1.string().optional(),
411
+ details: zod_1.record(zod_1.unknown())
412
+ .refine((d) => Buffer.byteLength(JSON.stringify(d), 'utf8') <=
413
+ integrationErrorDetailsMaxBytes, { message: 'details must not exceed 64 KB' })
414
+ .optional(),
415
+ });
416
+ const reportIntegrationErrorResponse = zod_1.object({
417
+ errorId: zod_1.number(),
418
+ });
419
+ exports.doc24Schemas = {
420
+ sdkCredentials,
421
+ reportIntegrationErrorParams,
422
+ reportIntegrationErrorResponse,
423
+ sdkParams: zod_1.object({ url: zod_1.string(), credentials: sdkCredentials }),
424
+ user,
425
+ patient,
426
+ patientSearch,
427
+ specialtyMode,
428
+ specialty,
429
+ scheduleAvailabilityFilter,
430
+ availableAppointment,
431
+ availableScheduleClinics,
432
+ scheduleFilter: zod_1.object({
433
+ professionalId: zod_1.number().optional(),
434
+ offset: zod_1.number().optional(),
435
+ limit: zod_1.number().optional(),
436
+ weekDay: zod_1.number().optional(),
437
+ date: zod_1.date().optional(),
438
+ startHour: zod_1.string().optional(),
439
+ finishHour: zod_1.string().optional(),
440
+ language: zod_1.string().optional(),
441
+ userTimeZone: zod_1.string().optional(),
442
+ showAppointmentConfiguration: zod_1.boolean().optional(),
443
+ }),
444
+ professionalsBySpecialtyFilter: zod_1.object({
445
+ professionalId: zod_1.number().optional().nullable(),
446
+ specialtyId: zod_1.number().optional().nullable(),
447
+ offset: zod_1.number().optional().nullable(),
448
+ limit: zod_1.number().optional().nullable(),
449
+ language: zod_1.string().optional().nullable(),
450
+ }),
451
+ scheduleParameters: zod_1.union([
452
+ appointmentScheduleParameters,
453
+ instantScheduleParameters,
454
+ ]),
455
+ attachedFile,
456
+ videoVisit,
457
+ historicalVideoVisit,
458
+ videoVisitDetails: zod_1.object({
459
+ id: zod_1.number(),
460
+ vcToken: zod_1.string().optional(),
461
+ status: zod_1.string(),
462
+ paymentStatus: zod_1.string(),
463
+ professional: zod_1.object({
464
+ id: zod_1.number(),
465
+ fullName: zod_1.string(),
466
+ }).optional(),
467
+ patient: zod_1.object({
468
+ fullName: zod_1.string(),
469
+ firstAccessDate: zod_1.date(),
470
+ lastAccessDate: zod_1.date(),
471
+ }),
472
+ finishDate: zod_1.date().nullable(),
473
+ retries: zod_1.number(),
474
+ language: zod_1.string(),
475
+ appointment: zod_1.object({ id: zod_1.number(), date: zod_1.date() }).nullable(),
476
+ report: zod_1.object({
477
+ motive: zod_1.string().nullable(),
478
+ actualDesease: zod_1.string().nullable(),
479
+ indications: zod_1.string().nullable(),
480
+ alertSigns: zod_1.string().nullable(),
481
+ extendedMotive: zod_1.string().nullable(),
482
+ diagnose: zod_1.array(zod_1.object({ description: zod_1.string(), code: zod_1.string() })),
483
+ }),
484
+ pdf: zod_1.object({
485
+ atention: zod_1.string().optional(),
486
+ labs: zod_1.string().optional(),
487
+ otherExams: zod_1.string().optional(),
488
+ images: zod_1.string().optional(),
489
+ medication: zod_1.array(zod_1.any()),
490
+ }),
491
+ files: zod_1.array(zod_1.object({ name: zod_1.string(), url: zod_1.string().url() })),
492
+ attachedFiles: zod_1.array(attachedFile),
493
+ }),
494
+ completeVideoVisitDetails: zod_1.object({
495
+ id: zod_1.number(),
496
+ status: zod_1.string(),
497
+ paymentStatus: zod_1.string(),
498
+ modality: zod_1.enum(['P', 'V']).optional(),
499
+ address: zod_1.string().optional(),
500
+ city: zod_1.string().optional(),
501
+ province: zod_1.string().optional(),
502
+ professional: zod_1.object({
503
+ id: zod_1.number(),
504
+ fullName: zod_1.string(),
505
+ specialtyId: zod_1.number(),
506
+ specialty: zod_1.string(),
507
+ idPrestadorInterno: zod_1.string().nullish(),
508
+ }).optional(),
509
+ finishDate: zod_1.date().nullable(),
510
+ retries: zod_1.number().nullish(),
511
+ language: zod_1.string(),
512
+ report: zod_1.object({
513
+ motive: zod_1.string().nullable(),
514
+ actualDesease: zod_1.string().nullable(),
515
+ indications: zod_1.string().nullish(),
516
+ alertSigns: zod_1.string().nullable(),
517
+ extendedMotive: zod_1.string().nullable(),
518
+ diagnose: zod_1.array(zod_1.object({ description: zod_1.string(), code: zod_1.string() })),
519
+ medication: zod_1.array(zod_1.object({
520
+ description: zod_1.string().nullish(),
521
+ quantity: zod_1.number().nullish(),
522
+ dose: zod_1.string().nullish(),
523
+ farmalinkId: zod_1.number().nullish(),
524
+ })),
525
+ prescription: zod_1.object({
526
+ link: zod_1.string().nullish(),
527
+ codigo: zod_1.number().nullish(),
528
+ }),
529
+ inPersonRequired: zod_1.string().nullish(),
530
+ referral: zod_1.object({
531
+ status: zod_1.string().nullish(),
532
+ specialtyId: zod_1.any(),
533
+ inPersonRequired: zod_1.string().nullish(),
534
+ comments: zod_1.string().nullish(),
535
+ }),
536
+ }),
537
+ pdf: zod_1.object({
538
+ atention: zod_1.any(),
539
+ labs: zod_1.any(),
540
+ otherExams: zod_1.any(),
541
+ images: zod_1.any(),
542
+ medication: zod_1.array(zod_1.any()),
543
+ certificate: zod_1.array(zod_1.any()).or(zod_1.string()).nullish(),
544
+ }),
545
+ files: zod_1.array(zod_1.object({ name: zod_1.string(), url: zod_1.string().url() })),
546
+ attachedFiles: zod_1.array(attachedFile),
547
+ }),
548
+ activeVideoVisitData: zod_1.object({
549
+ consultationId: zod_1.number(),
550
+ patientId: zod_1.number(),
551
+ vcToken: zod_1.string(),
552
+ }),
553
+ professional: zod_1.object({
554
+ id: zod_1.number(),
555
+ firstName: zod_1.string(),
556
+ lastName: zod_1.string(),
557
+ birthdate: zod_1.date(),
558
+ gender,
559
+ email: zod_1.string(),
560
+ phone: zod_1.string().nullable(),
561
+ logoUrl: zod_1.string().nullish(),
562
+ matriculation: zod_1.array(zod_1.object({ number: zod_1.string(), type: zod_1.string() })),
563
+ specialties: zod_1.array(specialty),
564
+ degree: zod_1.string(),
565
+ languages: zod_1.array(zod_1.string()),
566
+ resume: zod_1.object({
567
+ link: zod_1.string(),
568
+ brief: zod_1.string().nullish(),
569
+ }),
570
+ consultation_value: zod_1.string().optional().nullish(),
571
+ hasAvailability: zod_1.boolean().optional(),
572
+ status: zod_1.enum(['active', 'deactivated']).optional(),
573
+ }),
574
+ professionalsListItem: zod_1.object({
575
+ id: zod_1.number(),
576
+ fullName: zod_1.string(),
577
+ consultation_value: zod_1.number().or(zod_1.string()).optional().nullish(),
578
+ logoUrl: zod_1.string().nullish(),
579
+ primer_turno: zod_1.string().optional(),
580
+ degree: zod_1.string().optional(),
581
+ brief: zod_1.string().nullish(),
582
+ }),
583
+ appointment,
584
+ chatroomAvailabilityFilter,
585
+ chatParameters,
586
+ availableChatroom,
587
+ chatDetails,
588
+ chatPost,
589
+ enrollmentParams,
590
+ diagnosticaPatientFilter: zod_1.object({
591
+ gender,
592
+ identificationType: zod_1.literal('DNI'),
593
+ identificationValue: zod_1.string(),
594
+ }),
595
+ diagnosticaHistoryAppointment,
596
+ diagnosticaUser,
597
+ diagnosticaPatient,
598
+ diagnosticaDeepLinkResponse,
599
+ coverageInfo,
600
+ sendVerificationCodeParams,
601
+ declareUserParams,
602
+ declareUserResponse,
603
+ declarePatientParams,
604
+ declarePatientResponse,
605
+ verificationCodeParams,
606
+ externalLoginParams,
607
+ externalLoginResponse,
608
+ preExternalEnrollmentParams,
609
+ externalEnrollmentParams,
610
+ sendExternalVerificationCodeParams,
611
+ verifyExternalVerificationCodeParams,
612
+ externalResetPasswordParams,
613
+ externalPatient,
614
+ externalAppointment,
615
+ binahWellnessResponse,
616
+ binahWellnessGetLinkParams,
617
+ eligibilityIdentificationType,
618
+ eligibilityParams,
619
+ eligibilityAffiliate,
620
+ eligibilityResponse,
621
+ emailOrPhone,
622
+ emailOrPhoneCode,
623
+ uploadFileConsultationParams: zod_1.object({
624
+ vcToken: zod_1.string(),
625
+ attachedFile: zod_1.string(),
626
+ fileName: zod_1.string().optional(),
627
+ }),
628
+ uploadFileConsultationResponse: zod_1.object({
629
+ fileId: zod_1.number().optional(),
630
+ }),
631
+ deleteFileConsultationParams: zod_1.object({
632
+ vcToken: zod_1.string(),
633
+ fileId: zod_1.number(),
634
+ }),
635
+ healthQuizParams: zod_1.object({
636
+ patientId: zod_1.number(),
637
+ quiz: zod_1.record(zod_1.any()),
638
+ origen: zod_1.string(),
639
+ }),
640
+ };