@integraciones_doc24/sdk 1.15.11 → 1.15.12

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