@integraciones_doc24/sdk 1.16.9 → 1.16.11

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 (46) hide show
  1. package/README.md +203 -203
  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 +76 -76
  8. package/lib/baseSdk/user.d.ts +112 -112
  9. package/lib/baseSdk/user.js +136 -136
  10. package/lib/index.d.ts +396 -388
  11. package/lib/index.js +22 -22
  12. package/lib/request/index.d.ts +3 -3
  13. package/lib/request/index.js +26 -26
  14. package/lib/request/token.d.ts +2 -2
  15. package/lib/request/token.js +34 -34
  16. package/lib/request/validation.d.ts +10 -10
  17. package/lib/request/validation.js +28 -28
  18. package/lib/schemas.d.ts +2129 -2069
  19. package/lib/schemas.js +474 -472
  20. package/lib/types.d.ts +153 -153
  21. package/lib/types.js +2 -2
  22. package/lib/userSdk/binah.d.ts +21 -21
  23. package/lib/userSdk/binah.js +20 -20
  24. package/lib/userSdk/chat.d.ts +57 -57
  25. package/lib/userSdk/chat.js +98 -98
  26. package/lib/userSdk/external.d.ts +34 -34
  27. package/lib/userSdk/external.js +72 -72
  28. package/lib/userSdk/index.d.ts +2 -2
  29. package/lib/userSdk/index.js +33 -33
  30. package/lib/userSdk/patients.d.ts +53 -53
  31. package/lib/userSdk/patients.js +80 -80
  32. package/lib/userSdk/schedule.d.ts +51 -49
  33. package/lib/userSdk/schedule.js +83 -83
  34. package/lib/userSdk/specialties.d.ts +18 -16
  35. package/lib/userSdk/specialties.js +47 -45
  36. package/lib/userSdk/videoVisit.d.ts +115 -115
  37. package/lib/userSdk/videoVisit.js +155 -155
  38. package/lib/utils.d.ts +2 -2
  39. package/lib/utils.js +16 -16
  40. package/lib/webhook/index.d.ts +2 -2
  41. package/lib/webhook/index.js +56 -56
  42. package/lib/webhook/responses.d.ts +35 -35
  43. package/lib/webhook/responses.js +42 -42
  44. package/lib/webhook/token.d.ts +2 -2
  45. package/lib/webhook/token.js +23 -23
  46. package/package.json +36 -36
package/lib/schemas.js CHANGED
@@ -1,472 +1,474 @@
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
- });
24
- const patient = basePersonData;
25
- const user = basePersonData.extend({
26
- phone: zod_1.string().optional(),
27
- email: zod_1.string(),
28
- });
29
- const specialtyMode = zod_1.enum(['appointment', 'chat', 'instant']);
30
- const specialty = zod_1.object({
31
- id: zod_1.number(),
32
- description: zod_1.string(),
33
- });
34
- const scheduleAvailabilityFilter = zod_1.object({
35
- specialtyId: zod_1.number().optional(),
36
- professionalId: zod_1.number().optional(),
37
- language: zod_1.string().optional(),
38
- userTimeZone: zod_1.string().optional(),
39
- });
40
- const availableAppointment = zod_1.object({
41
- id: zod_1.number().or(zod_1.string()),
42
- date: zod_1.date(),
43
- clinicId: zod_1.number(),
44
- professional: zod_1.object({
45
- id: zod_1.number(),
46
- fullName: zod_1.string(),
47
- logoUrl: zod_1.string(),
48
- }),
49
- cost: zod_1.string(),
50
- specialty: specialty,
51
- type: specialtyMode,
52
- atentions: zod_1.number(),
53
- ranking: zod_1.unknown(),
54
- length: zod_1.number().nullish(),
55
- consultation_value: zod_1.string().optional().nullish(),
56
- });
57
- const appointment = zod_1.object({
58
- id: zod_1.number(),
59
- professionalId: zod_1.number(),
60
- date: zod_1.date(),
61
- });
62
- const availableScheduleClinics = zod_1.object({
63
- specialties: specialty.array(),
64
- specialtiesER: specialty.array(),
65
- professionals: zod_1.object({
66
- id: zod_1.number(),
67
- fullName: zod_1.string(),
68
- clinicId: zod_1.number(),
69
- specialties: specialty.array(),
70
- }).array(),
71
- });
72
- const baseScheduleParameters = zod_1.object({
73
- patientId: zod_1.number(),
74
- specialtyId: zod_1.number(),
75
- language: zod_1.string(),
76
- details: zod_1.string(),
77
- extraInfo: zod_1.any(),
78
- });
79
- const appointmentScheduleParameters = baseScheduleParameters.extend({
80
- type: zod_1.literal('appointment'),
81
- appointmentId: zod_1.number().or(zod_1.string()),
82
- });
83
- const instantScheduleParameters = baseScheduleParameters.extend({
84
- type: zod_1.literal('instant'),
85
- });
86
- const chatroomAvailabilityFilter = zod_1.object({
87
- limit: zod_1.number().optional(),
88
- offset: zod_1.number().optional(),
89
- });
90
- const chatParameters = zod_1.object({
91
- patientId: zod_1.number(),
92
- chatroomId: zod_1.number(),
93
- language: zod_1.string(),
94
- specialtyId: zod_1.number(),
95
- });
96
- const availableChatroom = zod_1.object({
97
- id: zod_1.number(),
98
- professional: zod_1.object({
99
- id: zod_1.number(),
100
- fullName: zod_1.string(),
101
- logoUrl: zod_1.string(),
102
- }),
103
- specialty: zod_1.object({ id: zod_1.number(), description: zod_1.string() }),
104
- });
105
- const chatDetails = zod_1.object({
106
- id: zod_1.number(),
107
- chatRoomId: zod_1.number(),
108
- startDate: zod_1.date(),
109
- lastEventDate: zod_1.date(),
110
- closureDate: zod_1.date().nullable(),
111
- patient: zod_1.object({
112
- id: zod_1.number(),
113
- firstName: zod_1.string(),
114
- lastName: zod_1.string(),
115
- }),
116
- patientLastPost: zod_1.date().nullable(),
117
- professional: zod_1.object({
118
- id: zod_1.number(),
119
- fullName: zod_1.string(),
120
- logoUrl: zod_1.string(),
121
- }),
122
- professionalLastPost: zod_1.date().nullable(),
123
- specialty: zod_1.object({ id: zod_1.number(), description: zod_1.string() }),
124
- status: zod_1.string(),
125
- paymentStatus: zod_1.string(),
126
- });
127
- const chatPost = zod_1.object({
128
- id: zod_1.number(),
129
- userType: zod_1.enum(['patient', 'professional']),
130
- message: zod_1.string(),
131
- date: zod_1.date(),
132
- });
133
- const enrollmentParams = zod_1.object({
134
- firstName: zod_1.string(),
135
- lastName: zod_1.string(),
136
- gender: gender,
137
- identificationNumber: zod_1.string(),
138
- birthdate: zod_1.date(),
139
- email: zod_1.string().email(),
140
- plan: zod_1.string(),
141
- startDate: zod_1.date(),
142
- });
143
- const diagnosticaHistoryAppointment = zod_1.object({
144
- date: zod_1.date(),
145
- location: zod_1.string(),
146
- exams: zod_1.string().array(),
147
- deepLink: zod_1.string().url(),
148
- });
149
- const diagnosticaPatient = zod_1.object({
150
- firstName: zod_1.string(),
151
- lastName: zod_1.string(),
152
- birthday: zod_1.date(),
153
- identificationType: zod_1.literal('DNI'),
154
- identificationValue: zod_1.string(),
155
- gender: gender,
156
- });
157
- const diagnosticaUser = diagnosticaPatient.merge(zod_1.object({
158
- phone: zod_1.string(),
159
- email: zod_1.string().email(),
160
- language: zod_1.string(),
161
- }));
162
- const diagnosticaDeepLinkResponse = zod_1.object({
163
- forwardingRequired: zod_1.literal(true),
164
- deepLink: zod_1.string().url(),
165
- }).or(zod_1.object({ forwardingRequired: zod_1.literal(false) }));
166
- const videoVisit = zod_1.object({
167
- id: zod_1.number().nullable(),
168
- creationDate: zod_1.date(),
169
- patientId: zod_1.number(),
170
- user: zod_1.object({
171
- id: zod_1.number(),
172
- email: zod_1.string().nullable(),
173
- phone: zod_1.string().nullable(),
174
- }),
175
- vcToken: zod_1.string(),
176
- appointment: zod_1.object({
177
- id: zod_1.number(),
178
- date: zod_1.date(),
179
- }).optional(),
180
- videoVisit: zod_1.object({
181
- id: zod_1.number(),
182
- status: zod_1.string(),
183
- }).optional(),
184
- paymentStatus: zod_1.string().optional(),
185
- atentionId: zod_1.number().optional(),
186
- waitingTime: zod_1.string().optional(),
187
- });
188
- const historicalVideoVisit = videoVisit.extend({
189
- specialty: zod_1.string(),
190
- professional: zod_1.string(),
191
- });
192
- const coverageInfo = zod_1.object({
193
- financerId: zod_1.number().nullable(),
194
- defaultAffiliationId: zod_1.number().nullable(),
195
- plan: zod_1.string().nullable(),
196
- identificationNumber: zod_1.string(),
197
- credentialNumber: zod_1.string().nullable(),
198
- lastName: zod_1.string().nullable(),
199
- firstName: zod_1.string().nullable(),
200
- birthdate: zod_1.date(),
201
- financerPlanId: zod_1.number().nullable(),
202
- gender,
203
- brand: zod_1.number().nullable(),
204
- holderIdentificationNumber: zod_1.string().nullable(),
205
- copaymentValue: zod_1.number().nullable(),
206
- mobilePhone: zod_1.string().nullable(),
207
- company: zod_1.string().nullable(),
208
- email: zod_1.string().email().nullable(),
209
- dischargeDate: zod_1.date().nullable(),
210
- leavingDate: zod_1.date().nullable(),
211
- identificacion_tributaria: zod_1.string().nullable(),
212
- deregistrationDate: zod_1.date().nullable(),
213
- authorizationCode: zod_1.string().nullable(),
214
- authorizationCodeExpiration: zod_1.date().nullable(),
215
- }).nullable();
216
- const sendVerificationCodeParams = zod_1.object({
217
- identificationType: zod_1.number(),
218
- identificationValue: zod_1.string(),
219
- channel: zod_1.enum(['1', '2']),
220
- });
221
- const verificationCodeParams = zod_1.object({
222
- channel: zod_1.enum(['1', '2']).optional(),
223
- code: zod_1.string().optional(),
224
- });
225
- const declareUserParams = zod_1.object({
226
- user,
227
- }).and(verificationCodeParams);
228
- const declarePatientParams = zod_1.object({
229
- patient,
230
- }).and(verificationCodeParams);
231
- const declarePatientResponse = zod_1.object({
232
- userInfo: zod_1.object({
233
- firstName: zod_1.string(),
234
- lastName: zod_1.string(),
235
- email: zod_1.string(),
236
- phone: zod_1.string(),
237
- }),
238
- askCode: zod_1.literal(true),
239
- }).or(zod_1.object({
240
- askCode: zod_1.literal(false),
241
- patientId: zod_1.number().nullable(),
242
- }));
243
- const declareUserResponse = zod_1.object({
244
- userInfo: zod_1.object({
245
- email: zod_1.string(),
246
- phone: zod_1.string(),
247
- }),
248
- askCode: zod_1.literal(true),
249
- }).or(zod_1.object({
250
- askCode: zod_1.literal(false),
251
- patientId: zod_1.number().nullable(),
252
- userId: zod_1.number(),
253
- }));
254
- const externalLoginParams = zod_1.object({
255
- user: zod_1.string(),
256
- password: zod_1.string(),
257
- });
258
- const externalLoginResponse = zod_1.object({
259
- firstName: zod_1.string(),
260
- lastName: zod_1.string(),
261
- countryId: zod_1.string(),
262
- birthday: zod_1.date(),
263
- identificationNumber: zod_1.string(),
264
- gender,
265
- email: zod_1.string().email(),
266
- phone: zod_1.string(),
267
- });
268
- const emailOrPhone = zod_1.union([
269
- zod_1.object({ email: zod_1.string(), phone: zod_1.string() }),
270
- zod_1.object({ email: zod_1.string(), phone: zod_1.undefined() }),
271
- zod_1.object({ email: zod_1.undefined(), phone: zod_1.string() }),
272
- ]).refine((data) => data.email || data.phone, 'Either phone or email is required');
273
- const preExternalEnrollmentParams = zod_1.object({
274
- identificationNumber: zod_1.string(),
275
- birthdate: zod_1.date(),
276
- }).and(emailOrPhone);
277
- const emailOrPhoneCode = zod_1.union([
278
- zod_1.object({ emailCode: zod_1.string(), phoneCode: zod_1.string() }),
279
- zod_1.object({ emailCode: zod_1.string(), phoneCode: zod_1.undefined() }),
280
- zod_1.object({ emailCode: zod_1.undefined(), phoneCode: zod_1.string() }),
281
- ]).refine((data) => data.emailCode || data.phoneCode, 'Either phone code or email code is required');
282
- const externalEnrollmentParams = preExternalEnrollmentParams
283
- .and(zod_1.object({ password: zod_1.string() }))
284
- .and(emailOrPhoneCode);
285
- const sendExternalVerificationCodeParams = zod_1.object({
286
- identificationNumber: zod_1.string(),
287
- birthdate: zod_1.date(),
288
- channel: zod_1.enum(['1', '2']),
289
- });
290
- const verifyExternalVerificationCodeParams = sendExternalVerificationCodeParams.extend({ code: zod_1.string() });
291
- const externalResetPasswordParams = zod_1.object({
292
- identificationNumber: zod_1.string(),
293
- birthdate: zod_1.date(),
294
- password: zod_1.string(),
295
- }).and(emailOrPhoneCode);
296
- const externalPatient = zod_1.object({
297
- birthdate: zod_1.date(),
298
- identificationType: zod_1.literal('DNI'),
299
- identificationValue: zod_1.string(),
300
- gender: gender,
301
- });
302
- const externalAppointment = zod_1.object({
303
- id: zod_1.number(),
304
- patientIdentification: zod_1.string().optional(),
305
- patientName: zod_1.string(),
306
- birthdate: zod_1.date(),
307
- appointment: zod_1.string(),
308
- clinic: zod_1.string(),
309
- professionalName: zod_1.string(),
310
- date: zod_1.date(),
311
- specialty: zod_1.string(),
312
- modality: zod_1.string(),
313
- });
314
- const binahWellnessGetLinkParams = zod_1.object({
315
- socket: zod_1.object({
316
- device: zod_1.string(),
317
- provider: zod_1.string(),
318
- socketUrl: zod_1.string(),
319
- callbackUrl: zod_1.string(),
320
- socketAuthToken: zod_1.string(),
321
- }),
322
- patientId: zod_1.number(),
323
- });
324
- const binahWellnessResponse = zod_1.object({
325
- data: zod_1.object({
326
- info: zod_1.object({
327
- link: zod_1.string().url(),
328
- }),
329
- timestamp: zod_1.string(),
330
- }),
331
- signature: zod_1.string(),
332
- });
333
- exports.doc24Schemas = {
334
- sdkCredentials,
335
- sdkParams: zod_1.object({ url: zod_1.string(), credentials: sdkCredentials }),
336
- user,
337
- patient,
338
- specialtyMode,
339
- specialty,
340
- scheduleAvailabilityFilter,
341
- availableAppointment,
342
- availableScheduleClinics,
343
- scheduleFilter: zod_1.object({
344
- professionalId: zod_1.number().optional(),
345
- offset: zod_1.number().optional(),
346
- limit: zod_1.number().optional(),
347
- weekDay: zod_1.number().optional(),
348
- date: zod_1.date().optional(),
349
- startHour: zod_1.string().optional(),
350
- finishHour: zod_1.string().optional(),
351
- language: zod_1.string().optional(),
352
- userTimeZone: zod_1.string().optional(),
353
- }),
354
- professionalsBySpecialtyFilter: zod_1.object({
355
- professionalId: zod_1.number().optional().nullable(),
356
- specialtyId: zod_1.number().optional().nullable(),
357
- offset: zod_1.number().optional().nullable(),
358
- limit: zod_1.number().optional().nullable(),
359
- language: zod_1.string().optional().nullable(),
360
- }),
361
- scheduleParameters: zod_1.union([
362
- appointmentScheduleParameters,
363
- instantScheduleParameters,
364
- ]),
365
- videoVisit,
366
- historicalVideoVisit,
367
- videoVisitDetails: zod_1.object({
368
- id: zod_1.number(),
369
- status: zod_1.string(),
370
- paymentStatus: zod_1.string(),
371
- professional: zod_1.object({
372
- id: zod_1.number(),
373
- fullName: zod_1.string(),
374
- }).optional(),
375
- patient: zod_1.object({
376
- fullName: zod_1.string(),
377
- firstAccessDate: zod_1.date(),
378
- lastAccessDate: zod_1.date(),
379
- }),
380
- finishDate: zod_1.date().nullable(),
381
- retries: zod_1.number(),
382
- language: zod_1.string(),
383
- appointment: zod_1.object({ id: zod_1.number(), date: zod_1.date() }).nullable(),
384
- report: zod_1.object({
385
- motive: zod_1.string().nullable(),
386
- actualDesease: zod_1.string().nullable(),
387
- indications: zod_1.string().nullable(),
388
- alertSigns: zod_1.string().nullable(),
389
- extendedMotive: zod_1.string().nullable(),
390
- diagnose: zod_1.array(zod_1.object({ description: zod_1.string(), code: zod_1.string() })),
391
- }),
392
- pdf: zod_1.object({
393
- atention: zod_1.string().optional(),
394
- labs: zod_1.string().optional(),
395
- otherExams: zod_1.string().optional(),
396
- images: zod_1.string().optional(),
397
- medication: zod_1.array(zod_1.any()),
398
- }),
399
- files: zod_1.array(zod_1.object({ name: zod_1.string(), url: zod_1.string().url() })),
400
- }),
401
- activeVideoVisitData: zod_1.object({
402
- consultationId: zod_1.number(),
403
- patientId: zod_1.number(),
404
- vcToken: zod_1.string(),
405
- }),
406
- professional: zod_1.object({
407
- id: zod_1.number(),
408
- firstName: zod_1.string(),
409
- lastName: zod_1.string(),
410
- birthdate: zod_1.date(),
411
- gender,
412
- email: zod_1.string(),
413
- phone: zod_1.string().nullable(),
414
- logoUrl: zod_1.string(),
415
- matriculation: zod_1.array(zod_1.object({ number: zod_1.string(), type: zod_1.string() })),
416
- specialties: zod_1.array(specialty),
417
- degree: zod_1.string(),
418
- languages: zod_1.array(zod_1.string()),
419
- resume: zod_1.object({
420
- link: zod_1.string(),
421
- brief: zod_1.string(),
422
- }),
423
- consultation_value: zod_1.string().optional().nullish(),
424
- hasAvailability: zod_1.boolean().optional(),
425
- status: zod_1.enum(['active', 'deactivated']).optional(),
426
- }),
427
- professionalsListItem: zod_1.object({
428
- id: zod_1.number(),
429
- fullName: zod_1.string(),
430
- consultation_value: zod_1.number().or(zod_1.string()).optional().nullish(),
431
- logoUrl: zod_1.string().optional(),
432
- primer_turno: zod_1.string().optional(),
433
- degree: zod_1.string().optional(),
434
- brief: zod_1.string().optional(),
435
- }),
436
- appointment,
437
- chatroomAvailabilityFilter,
438
- chatParameters,
439
- availableChatroom,
440
- chatDetails,
441
- chatPost,
442
- enrollmentParams,
443
- diagnosticaPatientFilter: zod_1.object({
444
- gender,
445
- identificationType: zod_1.literal('DNI'),
446
- identificationValue: zod_1.string(),
447
- }),
448
- diagnosticaHistoryAppointment,
449
- diagnosticaUser,
450
- diagnosticaPatient,
451
- diagnosticaDeepLinkResponse,
452
- coverageInfo,
453
- sendVerificationCodeParams,
454
- declareUserParams,
455
- declareUserResponse,
456
- declarePatientParams,
457
- declarePatientResponse,
458
- verificationCodeParams,
459
- externalLoginParams,
460
- externalLoginResponse,
461
- preExternalEnrollmentParams,
462
- externalEnrollmentParams,
463
- sendExternalVerificationCodeParams,
464
- verifyExternalVerificationCodeParams,
465
- externalResetPasswordParams,
466
- externalPatient,
467
- externalAppointment,
468
- binahWellnessResponse,
469
- binahWellnessGetLinkParams,
470
- emailOrPhone,
471
- emailOrPhoneCode,
472
- };
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
+ });
24
+ const patient = basePersonData;
25
+ const user = basePersonData.extend({
26
+ phone: zod_1.string().optional(),
27
+ email: zod_1.string(),
28
+ });
29
+ const specialtyMode = zod_1.enum(['appointment', 'chat', 'instant']);
30
+ const specialty = zod_1.object({
31
+ id: zod_1.number(),
32
+ description: zod_1.string(),
33
+ start_age: zod_1.number().or(zod_1.string()).nullish(),
34
+ end_age: zod_1.number().or(zod_1.string()).nullish(),
35
+ });
36
+ const scheduleAvailabilityFilter = zod_1.object({
37
+ specialtyId: zod_1.number().optional(),
38
+ professionalId: zod_1.number().optional(),
39
+ language: zod_1.string().optional(),
40
+ userTimeZone: zod_1.string().optional(),
41
+ });
42
+ const availableAppointment = zod_1.object({
43
+ id: zod_1.number().or(zod_1.string()),
44
+ date: zod_1.date(),
45
+ clinicId: zod_1.number(),
46
+ professional: zod_1.object({
47
+ id: zod_1.number(),
48
+ fullName: zod_1.string(),
49
+ logoUrl: zod_1.string(),
50
+ }),
51
+ cost: zod_1.string(),
52
+ specialty: specialty,
53
+ type: specialtyMode,
54
+ atentions: zod_1.number(),
55
+ ranking: zod_1.unknown(),
56
+ length: zod_1.number().nullish(),
57
+ consultation_value: zod_1.string().optional().nullish(),
58
+ });
59
+ const appointment = zod_1.object({
60
+ id: zod_1.number(),
61
+ professionalId: zod_1.number(),
62
+ date: zod_1.date(),
63
+ });
64
+ const availableScheduleClinics = zod_1.object({
65
+ specialties: specialty.array(),
66
+ specialtiesER: specialty.array(),
67
+ professionals: zod_1.object({
68
+ id: zod_1.number(),
69
+ fullName: zod_1.string(),
70
+ clinicId: zod_1.number(),
71
+ specialties: specialty.array(),
72
+ }).array(),
73
+ });
74
+ const baseScheduleParameters = zod_1.object({
75
+ patientId: zod_1.number(),
76
+ specialtyId: zod_1.number(),
77
+ language: zod_1.string(),
78
+ details: zod_1.string(),
79
+ extraInfo: zod_1.any(),
80
+ });
81
+ const appointmentScheduleParameters = baseScheduleParameters.extend({
82
+ type: zod_1.literal('appointment'),
83
+ appointmentId: zod_1.number().or(zod_1.string()),
84
+ });
85
+ const instantScheduleParameters = baseScheduleParameters.extend({
86
+ type: zod_1.literal('instant'),
87
+ });
88
+ const chatroomAvailabilityFilter = zod_1.object({
89
+ limit: zod_1.number().optional(),
90
+ offset: zod_1.number().optional(),
91
+ });
92
+ const chatParameters = zod_1.object({
93
+ patientId: zod_1.number(),
94
+ chatroomId: zod_1.number(),
95
+ language: zod_1.string(),
96
+ specialtyId: zod_1.number(),
97
+ });
98
+ const availableChatroom = zod_1.object({
99
+ id: zod_1.number(),
100
+ professional: zod_1.object({
101
+ id: zod_1.number(),
102
+ fullName: zod_1.string(),
103
+ logoUrl: zod_1.string(),
104
+ }),
105
+ specialty: zod_1.object({ id: zod_1.number(), description: zod_1.string() }),
106
+ });
107
+ const chatDetails = zod_1.object({
108
+ id: zod_1.number(),
109
+ chatRoomId: zod_1.number(),
110
+ startDate: zod_1.date(),
111
+ lastEventDate: zod_1.date(),
112
+ closureDate: zod_1.date().nullable(),
113
+ patient: zod_1.object({
114
+ id: zod_1.number(),
115
+ firstName: zod_1.string(),
116
+ lastName: zod_1.string(),
117
+ }),
118
+ patientLastPost: zod_1.date().nullable(),
119
+ professional: zod_1.object({
120
+ id: zod_1.number(),
121
+ fullName: zod_1.string(),
122
+ logoUrl: zod_1.string(),
123
+ }),
124
+ professionalLastPost: zod_1.date().nullable(),
125
+ specialty: zod_1.object({ id: zod_1.number(), description: zod_1.string() }),
126
+ status: zod_1.string(),
127
+ paymentStatus: zod_1.string(),
128
+ });
129
+ const chatPost = zod_1.object({
130
+ id: zod_1.number(),
131
+ userType: zod_1.enum(['patient', 'professional']),
132
+ message: zod_1.string(),
133
+ date: zod_1.date(),
134
+ });
135
+ const enrollmentParams = zod_1.object({
136
+ firstName: zod_1.string(),
137
+ lastName: zod_1.string(),
138
+ gender: gender,
139
+ identificationNumber: zod_1.string(),
140
+ birthdate: zod_1.date(),
141
+ email: zod_1.string().email(),
142
+ plan: zod_1.string(),
143
+ startDate: zod_1.date(),
144
+ });
145
+ const diagnosticaHistoryAppointment = zod_1.object({
146
+ date: zod_1.date(),
147
+ location: zod_1.string(),
148
+ exams: zod_1.string().array(),
149
+ deepLink: zod_1.string().url(),
150
+ });
151
+ const diagnosticaPatient = zod_1.object({
152
+ firstName: zod_1.string(),
153
+ lastName: zod_1.string(),
154
+ birthday: zod_1.date(),
155
+ identificationType: zod_1.literal('DNI'),
156
+ identificationValue: zod_1.string(),
157
+ gender: gender,
158
+ });
159
+ const diagnosticaUser = diagnosticaPatient.merge(zod_1.object({
160
+ phone: zod_1.string(),
161
+ email: zod_1.string().email(),
162
+ language: zod_1.string(),
163
+ }));
164
+ const diagnosticaDeepLinkResponse = zod_1.object({
165
+ forwardingRequired: zod_1.literal(true),
166
+ deepLink: zod_1.string().url(),
167
+ }).or(zod_1.object({ forwardingRequired: zod_1.literal(false) }));
168
+ const videoVisit = zod_1.object({
169
+ id: zod_1.number().nullable(),
170
+ creationDate: zod_1.date(),
171
+ patientId: zod_1.number(),
172
+ user: zod_1.object({
173
+ id: zod_1.number(),
174
+ email: zod_1.string().nullable(),
175
+ phone: zod_1.string().nullable(),
176
+ }),
177
+ vcToken: zod_1.string(),
178
+ appointment: zod_1.object({
179
+ id: zod_1.number(),
180
+ date: zod_1.date(),
181
+ }).optional(),
182
+ videoVisit: zod_1.object({
183
+ id: zod_1.number(),
184
+ status: zod_1.string(),
185
+ }).optional(),
186
+ paymentStatus: zod_1.string().optional(),
187
+ atentionId: zod_1.number().optional(),
188
+ waitingTime: zod_1.string().optional(),
189
+ });
190
+ const historicalVideoVisit = videoVisit.extend({
191
+ specialty: zod_1.string(),
192
+ professional: zod_1.string(),
193
+ });
194
+ const coverageInfo = zod_1.object({
195
+ financerId: zod_1.number().nullable(),
196
+ defaultAffiliationId: zod_1.number().nullable(),
197
+ plan: zod_1.string().nullable(),
198
+ identificationNumber: zod_1.string(),
199
+ credentialNumber: zod_1.string().nullable(),
200
+ lastName: zod_1.string().nullable(),
201
+ firstName: zod_1.string().nullable(),
202
+ birthdate: zod_1.date(),
203
+ financerPlanId: zod_1.number().nullable(),
204
+ gender,
205
+ brand: zod_1.number().nullable(),
206
+ holderIdentificationNumber: zod_1.string().nullable(),
207
+ copaymentValue: zod_1.number().nullable(),
208
+ mobilePhone: zod_1.string().nullable(),
209
+ company: zod_1.string().nullable(),
210
+ email: zod_1.string().email().nullable(),
211
+ dischargeDate: zod_1.date().nullable(),
212
+ leavingDate: zod_1.date().nullable(),
213
+ identificacion_tributaria: zod_1.string().nullable(),
214
+ deregistrationDate: zod_1.date().nullable(),
215
+ authorizationCode: zod_1.string().nullable(),
216
+ authorizationCodeExpiration: zod_1.date().nullable(),
217
+ }).nullable();
218
+ const sendVerificationCodeParams = zod_1.object({
219
+ identificationType: zod_1.number(),
220
+ identificationValue: zod_1.string(),
221
+ channel: zod_1.enum(['1', '2']),
222
+ });
223
+ const verificationCodeParams = zod_1.object({
224
+ channel: zod_1.enum(['1', '2']).optional(),
225
+ code: zod_1.string().optional(),
226
+ });
227
+ const declareUserParams = zod_1.object({
228
+ user,
229
+ }).and(verificationCodeParams);
230
+ const declarePatientParams = zod_1.object({
231
+ patient,
232
+ }).and(verificationCodeParams);
233
+ const declarePatientResponse = zod_1.object({
234
+ userInfo: zod_1.object({
235
+ firstName: zod_1.string(),
236
+ lastName: zod_1.string(),
237
+ email: zod_1.string(),
238
+ phone: zod_1.string(),
239
+ }),
240
+ askCode: zod_1.literal(true),
241
+ }).or(zod_1.object({
242
+ askCode: zod_1.literal(false),
243
+ patientId: zod_1.number().nullable(),
244
+ }));
245
+ const declareUserResponse = zod_1.object({
246
+ userInfo: zod_1.object({
247
+ email: zod_1.string(),
248
+ phone: zod_1.string(),
249
+ }),
250
+ askCode: zod_1.literal(true),
251
+ }).or(zod_1.object({
252
+ askCode: zod_1.literal(false),
253
+ patientId: zod_1.number().nullable(),
254
+ userId: zod_1.number(),
255
+ }));
256
+ const externalLoginParams = zod_1.object({
257
+ user: zod_1.string(),
258
+ password: zod_1.string(),
259
+ });
260
+ const externalLoginResponse = zod_1.object({
261
+ firstName: zod_1.string(),
262
+ lastName: zod_1.string(),
263
+ countryId: zod_1.string(),
264
+ birthday: zod_1.date(),
265
+ identificationNumber: zod_1.string(),
266
+ gender,
267
+ email: zod_1.string().email(),
268
+ phone: zod_1.string(),
269
+ });
270
+ const emailOrPhone = zod_1.union([
271
+ zod_1.object({ email: zod_1.string(), phone: zod_1.string() }),
272
+ zod_1.object({ email: zod_1.string(), phone: zod_1.undefined() }),
273
+ zod_1.object({ email: zod_1.undefined(), phone: zod_1.string() }),
274
+ ]).refine((data) => data.email || data.phone, 'Either phone or email is required');
275
+ const preExternalEnrollmentParams = zod_1.object({
276
+ identificationNumber: zod_1.string(),
277
+ birthdate: zod_1.date(),
278
+ }).and(emailOrPhone);
279
+ const emailOrPhoneCode = zod_1.union([
280
+ zod_1.object({ emailCode: zod_1.string(), phoneCode: zod_1.string() }),
281
+ zod_1.object({ emailCode: zod_1.string(), phoneCode: zod_1.undefined() }),
282
+ zod_1.object({ emailCode: zod_1.undefined(), phoneCode: zod_1.string() }),
283
+ ]).refine((data) => data.emailCode || data.phoneCode, 'Either phone code or email code is required');
284
+ const externalEnrollmentParams = preExternalEnrollmentParams
285
+ .and(zod_1.object({ password: zod_1.string() }))
286
+ .and(emailOrPhoneCode);
287
+ const sendExternalVerificationCodeParams = zod_1.object({
288
+ identificationNumber: zod_1.string(),
289
+ birthdate: zod_1.date(),
290
+ channel: zod_1.enum(['1', '2']),
291
+ });
292
+ const verifyExternalVerificationCodeParams = sendExternalVerificationCodeParams.extend({ code: zod_1.string() });
293
+ const externalResetPasswordParams = zod_1.object({
294
+ identificationNumber: zod_1.string(),
295
+ birthdate: zod_1.date(),
296
+ password: zod_1.string(),
297
+ }).and(emailOrPhoneCode);
298
+ const externalPatient = zod_1.object({
299
+ birthdate: zod_1.date(),
300
+ identificationType: zod_1.literal('DNI'),
301
+ identificationValue: zod_1.string(),
302
+ gender: gender,
303
+ });
304
+ const externalAppointment = zod_1.object({
305
+ id: zod_1.number(),
306
+ patientIdentification: zod_1.string().optional(),
307
+ patientName: zod_1.string(),
308
+ birthdate: zod_1.date(),
309
+ appointment: zod_1.string(),
310
+ clinic: zod_1.string(),
311
+ professionalName: zod_1.string(),
312
+ date: zod_1.date(),
313
+ specialty: zod_1.string(),
314
+ modality: zod_1.string(),
315
+ });
316
+ const binahWellnessGetLinkParams = zod_1.object({
317
+ socket: zod_1.object({
318
+ device: zod_1.string(),
319
+ provider: zod_1.string(),
320
+ socketUrl: zod_1.string(),
321
+ callbackUrl: zod_1.string(),
322
+ socketAuthToken: zod_1.string(),
323
+ }),
324
+ patientId: zod_1.number(),
325
+ });
326
+ const binahWellnessResponse = zod_1.object({
327
+ data: zod_1.object({
328
+ info: zod_1.object({
329
+ link: zod_1.string().url(),
330
+ }),
331
+ timestamp: zod_1.string(),
332
+ }),
333
+ signature: zod_1.string(),
334
+ });
335
+ exports.doc24Schemas = {
336
+ sdkCredentials,
337
+ sdkParams: zod_1.object({ url: zod_1.string(), credentials: sdkCredentials }),
338
+ user,
339
+ patient,
340
+ specialtyMode,
341
+ specialty,
342
+ scheduleAvailabilityFilter,
343
+ availableAppointment,
344
+ availableScheduleClinics,
345
+ scheduleFilter: zod_1.object({
346
+ professionalId: zod_1.number().optional(),
347
+ offset: zod_1.number().optional(),
348
+ limit: zod_1.number().optional(),
349
+ weekDay: zod_1.number().optional(),
350
+ date: zod_1.date().optional(),
351
+ startHour: zod_1.string().optional(),
352
+ finishHour: zod_1.string().optional(),
353
+ language: zod_1.string().optional(),
354
+ userTimeZone: zod_1.string().optional(),
355
+ }),
356
+ professionalsBySpecialtyFilter: zod_1.object({
357
+ professionalId: zod_1.number().optional().nullable(),
358
+ specialtyId: zod_1.number().optional().nullable(),
359
+ offset: zod_1.number().optional().nullable(),
360
+ limit: zod_1.number().optional().nullable(),
361
+ language: zod_1.string().optional().nullable(),
362
+ }),
363
+ scheduleParameters: zod_1.union([
364
+ appointmentScheduleParameters,
365
+ instantScheduleParameters,
366
+ ]),
367
+ videoVisit,
368
+ historicalVideoVisit,
369
+ videoVisitDetails: zod_1.object({
370
+ id: zod_1.number(),
371
+ status: zod_1.string(),
372
+ paymentStatus: zod_1.string(),
373
+ professional: zod_1.object({
374
+ id: zod_1.number(),
375
+ fullName: zod_1.string(),
376
+ }).optional(),
377
+ patient: zod_1.object({
378
+ fullName: zod_1.string(),
379
+ firstAccessDate: zod_1.date(),
380
+ lastAccessDate: zod_1.date(),
381
+ }),
382
+ finishDate: zod_1.date().nullable(),
383
+ retries: zod_1.number(),
384
+ language: zod_1.string(),
385
+ appointment: zod_1.object({ id: zod_1.number(), date: zod_1.date() }).nullable(),
386
+ report: zod_1.object({
387
+ motive: zod_1.string().nullable(),
388
+ actualDesease: zod_1.string().nullable(),
389
+ indications: zod_1.string().nullable(),
390
+ alertSigns: zod_1.string().nullable(),
391
+ extendedMotive: zod_1.string().nullable(),
392
+ diagnose: zod_1.array(zod_1.object({ description: zod_1.string(), code: zod_1.string() })),
393
+ }),
394
+ pdf: zod_1.object({
395
+ atention: zod_1.string().optional(),
396
+ labs: zod_1.string().optional(),
397
+ otherExams: zod_1.string().optional(),
398
+ images: zod_1.string().optional(),
399
+ medication: zod_1.array(zod_1.any()),
400
+ }),
401
+ files: zod_1.array(zod_1.object({ name: zod_1.string(), url: zod_1.string().url() })),
402
+ }),
403
+ activeVideoVisitData: zod_1.object({
404
+ consultationId: zod_1.number(),
405
+ patientId: zod_1.number(),
406
+ vcToken: zod_1.string(),
407
+ }),
408
+ professional: zod_1.object({
409
+ id: zod_1.number(),
410
+ firstName: zod_1.string(),
411
+ lastName: zod_1.string(),
412
+ birthdate: zod_1.date(),
413
+ gender,
414
+ email: zod_1.string(),
415
+ phone: zod_1.string().nullable(),
416
+ logoUrl: zod_1.string(),
417
+ matriculation: zod_1.array(zod_1.object({ number: zod_1.string(), type: zod_1.string() })),
418
+ specialties: zod_1.array(specialty),
419
+ degree: zod_1.string(),
420
+ languages: zod_1.array(zod_1.string()),
421
+ resume: zod_1.object({
422
+ link: zod_1.string(),
423
+ brief: zod_1.string().optional(),
424
+ }),
425
+ consultation_value: zod_1.string().optional().nullish(),
426
+ hasAvailability: zod_1.boolean().optional(),
427
+ status: zod_1.enum(['active', 'deactivated']).optional(),
428
+ }),
429
+ professionalsListItem: zod_1.object({
430
+ id: zod_1.number(),
431
+ fullName: zod_1.string(),
432
+ consultation_value: zod_1.number().or(zod_1.string()).optional().nullish(),
433
+ logoUrl: zod_1.string().optional(),
434
+ primer_turno: zod_1.string().optional(),
435
+ degree: zod_1.string().optional(),
436
+ brief: zod_1.string().optional(),
437
+ }),
438
+ appointment,
439
+ chatroomAvailabilityFilter,
440
+ chatParameters,
441
+ availableChatroom,
442
+ chatDetails,
443
+ chatPost,
444
+ enrollmentParams,
445
+ diagnosticaPatientFilter: zod_1.object({
446
+ gender,
447
+ identificationType: zod_1.literal('DNI'),
448
+ identificationValue: zod_1.string(),
449
+ }),
450
+ diagnosticaHistoryAppointment,
451
+ diagnosticaUser,
452
+ diagnosticaPatient,
453
+ diagnosticaDeepLinkResponse,
454
+ coverageInfo,
455
+ sendVerificationCodeParams,
456
+ declareUserParams,
457
+ declareUserResponse,
458
+ declarePatientParams,
459
+ declarePatientResponse,
460
+ verificationCodeParams,
461
+ externalLoginParams,
462
+ externalLoginResponse,
463
+ preExternalEnrollmentParams,
464
+ externalEnrollmentParams,
465
+ sendExternalVerificationCodeParams,
466
+ verifyExternalVerificationCodeParams,
467
+ externalResetPasswordParams,
468
+ externalPatient,
469
+ externalAppointment,
470
+ binahWellnessResponse,
471
+ binahWellnessGetLinkParams,
472
+ emailOrPhone,
473
+ emailOrPhoneCode,
474
+ };