@integraciones_doc24/sdk 1.16.2 → 1.16.3

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 +91 -91
  9. package/lib/baseSdk/user.js +136 -136
  10. package/lib/index.d.ts +367 -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 +1917 -1878
  19. package/lib/schemas.js +454 -444
  20. package/lib/types.d.ts +152 -150
  21. package/lib/types.js +2 -2
  22. package/lib/userSdk/binah.d.ts +12 -0
  23. package/lib/userSdk/binah.js +17 -0
  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 -30
  30. package/lib/userSdk/patients.d.ts +39 -39
  31. package/lib/userSdk/patients.js +73 -73
  32. package/lib/userSdk/schedule.d.ts +49 -49
  33. package/lib/userSdk/schedule.js +83 -83
  34. package/lib/userSdk/specialties.d.ts +16 -16
  35. package/lib/userSdk/specialties.js +45 -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,444 +1,454 @@
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
- exports.doc24Schemas = {
308
- sdkCredentials,
309
- sdkParams: zod_1.object({ url: zod_1.string(), credentials: sdkCredentials }),
310
- user,
311
- patient,
312
- specialtyMode,
313
- specialty,
314
- scheduleAvailabilityFilter,
315
- availableAppointment,
316
- availableScheduleClinics,
317
- scheduleFilter: zod_1.object({
318
- professionalId: zod_1.number().optional(),
319
- offset: zod_1.number().optional(),
320
- limit: zod_1.number().optional(),
321
- weekDay: zod_1.number().optional(),
322
- date: zod_1.date().optional(),
323
- startHour: zod_1.string().optional(),
324
- finishHour: zod_1.string().optional(),
325
- language: zod_1.string().optional(),
326
- userTimeZone: zod_1.string().optional(),
327
- }),
328
- professionalsBySpecialtyFilter: zod_1.object({
329
- professionalId: zod_1.number().optional().nullable(),
330
- specialtyId: zod_1.number().optional().nullable(),
331
- offset: zod_1.number().optional().nullable(),
332
- limit: zod_1.number().optional().nullable(),
333
- language: zod_1.string().optional().nullable(),
334
- }),
335
- scheduleParameters: zod_1.union([
336
- appointmentScheduleParameters,
337
- instantScheduleParameters,
338
- ]),
339
- videoVisit,
340
- historicalVideoVisit,
341
- videoVisitDetails: zod_1.object({
342
- id: zod_1.number(),
343
- status: zod_1.string(),
344
- paymentStatus: zod_1.string(),
345
- professional: zod_1.object({
346
- id: zod_1.number(),
347
- fullName: zod_1.string(),
348
- }).optional(),
349
- patient: zod_1.object({
350
- fullName: zod_1.string(),
351
- firstAccessDate: zod_1.date(),
352
- lastAccessDate: zod_1.date(),
353
- }),
354
- finishDate: zod_1.date().nullable(),
355
- retries: zod_1.number(),
356
- language: zod_1.string(),
357
- appointment: zod_1.object({ id: zod_1.number(), date: zod_1.date() }).nullable(),
358
- report: zod_1.object({
359
- motive: zod_1.string().nullable(),
360
- actualDesease: zod_1.string().nullable(),
361
- indications: zod_1.string().nullable(),
362
- alertSigns: zod_1.string().nullable(),
363
- extendedMotive: zod_1.string().nullable(),
364
- diagnose: zod_1.array(zod_1.object({ description: zod_1.string(), code: zod_1.string() })),
365
- }),
366
- pdf: zod_1.object({
367
- atention: zod_1.string().optional(),
368
- labs: zod_1.string().optional(),
369
- otherExams: zod_1.string().optional(),
370
- images: zod_1.string().optional(),
371
- medication: zod_1.array(zod_1.any()),
372
- }),
373
- files: zod_1.array(zod_1.object({ name: zod_1.string(), url: zod_1.string().url() })),
374
- }),
375
- activeVideoVisitData: zod_1.object({
376
- consultationId: zod_1.number(),
377
- patientId: zod_1.number(),
378
- vcToken: zod_1.string(),
379
- }),
380
- professional: zod_1.object({
381
- id: zod_1.number(),
382
- firstName: zod_1.string(),
383
- lastName: zod_1.string(),
384
- birthdate: zod_1.date(),
385
- gender,
386
- email: zod_1.string(),
387
- phone: zod_1.string().nullable(),
388
- logoUrl: zod_1.string(),
389
- matriculation: zod_1.array(zod_1.object({ number: zod_1.string(), type: zod_1.string() })),
390
- specialties: zod_1.array(specialty),
391
- degree: zod_1.string(),
392
- languages: zod_1.array(zod_1.string()),
393
- resume: zod_1.object({
394
- link: zod_1.string(),
395
- brief: zod_1.string(),
396
- }),
397
- consultation_value: zod_1.string().optional().nullish(),
398
- hasAvailability: zod_1.boolean().optional(),
399
- status: zod_1.enum(['active', 'deactivated']).optional(),
400
- }),
401
- professionalsListItem: zod_1.object({
402
- id: zod_1.number(),
403
- fullName: zod_1.string(),
404
- consultation_value: zod_1.number().or(zod_1.string()).optional().nullish(),
405
- logoUrl: zod_1.string().optional(),
406
- primer_turno: zod_1.string().optional(),
407
- degree: zod_1.string().optional(),
408
- brief: zod_1.string().optional(),
409
- }),
410
- appointment,
411
- chatroomAvailabilityFilter,
412
- chatParameters,
413
- availableChatroom,
414
- chatDetails,
415
- chatPost,
416
- enrollmentParams,
417
- diagnosticaPatientFilter: zod_1.object({
418
- gender,
419
- identificationType: zod_1.literal('DNI'),
420
- identificationValue: zod_1.string(),
421
- }),
422
- diagnosticaHistoryAppointment,
423
- diagnosticaUser,
424
- diagnosticaPatient,
425
- diagnosticaDeepLinkResponse,
426
- coverageInfo,
427
- sendVerificationCodeParams,
428
- declareUserParams,
429
- declareUserResponse,
430
- declarePatientParams,
431
- declarePatientResponse,
432
- verificationCodeParams,
433
- externalLoginParams,
434
- externalLoginResponse,
435
- preExternalEnrollmentParams,
436
- externalEnrollmentParams,
437
- sendExternalVerificationCodeParams,
438
- verifyExternalVerificationCodeParams,
439
- externalResetPasswordParams,
440
- externalPatient,
441
- externalAppointment,
442
- emailOrPhone,
443
- emailOrPhoneCode,
444
- };
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 binahWellnessResponse = zod_1.object({
308
+ data: zod_1.object({
309
+ info: zod_1.object({
310
+ link: zod_1.string().url(),
311
+ }),
312
+ timestamp: zod_1.string(),
313
+ }),
314
+ signature: zod_1.string(),
315
+ });
316
+ exports.doc24Schemas = {
317
+ sdkCredentials,
318
+ sdkParams: zod_1.object({ url: zod_1.string(), credentials: sdkCredentials }),
319
+ user,
320
+ patient,
321
+ specialtyMode,
322
+ specialty,
323
+ scheduleAvailabilityFilter,
324
+ availableAppointment,
325
+ availableScheduleClinics,
326
+ scheduleFilter: zod_1.object({
327
+ professionalId: zod_1.number().optional(),
328
+ offset: zod_1.number().optional(),
329
+ limit: zod_1.number().optional(),
330
+ weekDay: zod_1.number().optional(),
331
+ date: zod_1.date().optional(),
332
+ startHour: zod_1.string().optional(),
333
+ finishHour: zod_1.string().optional(),
334
+ language: zod_1.string().optional(),
335
+ userTimeZone: zod_1.string().optional(),
336
+ }),
337
+ professionalsBySpecialtyFilter: zod_1.object({
338
+ professionalId: zod_1.number().optional().nullable(),
339
+ specialtyId: zod_1.number().optional().nullable(),
340
+ offset: zod_1.number().optional().nullable(),
341
+ limit: zod_1.number().optional().nullable(),
342
+ language: zod_1.string().optional().nullable(),
343
+ }),
344
+ scheduleParameters: zod_1.union([
345
+ appointmentScheduleParameters,
346
+ instantScheduleParameters,
347
+ ]),
348
+ videoVisit,
349
+ historicalVideoVisit,
350
+ videoVisitDetails: zod_1.object({
351
+ id: zod_1.number(),
352
+ status: zod_1.string(),
353
+ paymentStatus: zod_1.string(),
354
+ professional: zod_1.object({
355
+ id: zod_1.number(),
356
+ fullName: zod_1.string(),
357
+ }).optional(),
358
+ patient: zod_1.object({
359
+ fullName: zod_1.string(),
360
+ firstAccessDate: zod_1.date(),
361
+ lastAccessDate: zod_1.date(),
362
+ }),
363
+ finishDate: zod_1.date().nullable(),
364
+ retries: zod_1.number(),
365
+ language: zod_1.string(),
366
+ appointment: zod_1.object({ id: zod_1.number(), date: zod_1.date() }).nullable(),
367
+ report: zod_1.object({
368
+ motive: zod_1.string().nullable(),
369
+ actualDesease: zod_1.string().nullable(),
370
+ indications: zod_1.string().nullable(),
371
+ alertSigns: zod_1.string().nullable(),
372
+ extendedMotive: zod_1.string().nullable(),
373
+ diagnose: zod_1.array(zod_1.object({ description: zod_1.string(), code: zod_1.string() })),
374
+ }),
375
+ pdf: zod_1.object({
376
+ atention: zod_1.string().optional(),
377
+ labs: zod_1.string().optional(),
378
+ otherExams: zod_1.string().optional(),
379
+ images: zod_1.string().optional(),
380
+ medication: zod_1.array(zod_1.any()),
381
+ }),
382
+ files: zod_1.array(zod_1.object({ name: zod_1.string(), url: zod_1.string().url() })),
383
+ }),
384
+ activeVideoVisitData: zod_1.object({
385
+ consultationId: zod_1.number(),
386
+ patientId: zod_1.number(),
387
+ vcToken: zod_1.string(),
388
+ }),
389
+ professional: zod_1.object({
390
+ id: zod_1.number(),
391
+ firstName: zod_1.string(),
392
+ lastName: zod_1.string(),
393
+ birthdate: zod_1.date(),
394
+ gender,
395
+ email: zod_1.string(),
396
+ phone: zod_1.string().nullable(),
397
+ logoUrl: zod_1.string(),
398
+ matriculation: zod_1.array(zod_1.object({ number: zod_1.string(), type: zod_1.string() })),
399
+ specialties: zod_1.array(specialty),
400
+ degree: zod_1.string(),
401
+ languages: zod_1.array(zod_1.string()),
402
+ resume: zod_1.object({
403
+ link: zod_1.string(),
404
+ brief: zod_1.string(),
405
+ }),
406
+ consultation_value: zod_1.string().optional().nullish(),
407
+ hasAvailability: zod_1.boolean().optional(),
408
+ status: zod_1.enum(['active', 'deactivated']).optional(),
409
+ }),
410
+ professionalsListItem: zod_1.object({
411
+ id: zod_1.number(),
412
+ fullName: zod_1.string(),
413
+ consultation_value: zod_1.number().or(zod_1.string()).optional().nullish(),
414
+ logoUrl: zod_1.string().optional(),
415
+ primer_turno: zod_1.string().optional(),
416
+ degree: zod_1.string().optional(),
417
+ brief: zod_1.string().optional(),
418
+ }),
419
+ appointment,
420
+ chatroomAvailabilityFilter,
421
+ chatParameters,
422
+ availableChatroom,
423
+ chatDetails,
424
+ chatPost,
425
+ enrollmentParams,
426
+ diagnosticaPatientFilter: zod_1.object({
427
+ gender,
428
+ identificationType: zod_1.literal('DNI'),
429
+ identificationValue: zod_1.string(),
430
+ }),
431
+ diagnosticaHistoryAppointment,
432
+ diagnosticaUser,
433
+ diagnosticaPatient,
434
+ diagnosticaDeepLinkResponse,
435
+ coverageInfo,
436
+ sendVerificationCodeParams,
437
+ declareUserParams,
438
+ declareUserResponse,
439
+ declarePatientParams,
440
+ declarePatientResponse,
441
+ verificationCodeParams,
442
+ externalLoginParams,
443
+ externalLoginResponse,
444
+ preExternalEnrollmentParams,
445
+ externalEnrollmentParams,
446
+ sendExternalVerificationCodeParams,
447
+ verifyExternalVerificationCodeParams,
448
+ externalResetPasswordParams,
449
+ externalPatient,
450
+ externalAppointment,
451
+ binahWellnessResponse,
452
+ emailOrPhone,
453
+ emailOrPhoneCode,
454
+ };