@integraciones_doc24/sdk 1.15.11 → 1.15.13

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