@integraciones_doc24/sdk 1.16.8 → 1.16.10

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