@integraciones_doc24/sdk 1.16.1 → 1.16.2

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 +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 -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 +1878 -1816
  19. package/lib/schemas.js +444 -420
  20. package/lib/types.d.ts +150 -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 +39 -38
  29. package/lib/userSdk/patients.js +73 -67
  30. package/lib/userSdk/schedule.d.ts +49 -47
  31. package/lib/userSdk/schedule.js +83 -81
  32. package/lib/userSdk/specialties.d.ts +16 -7
  33. package/lib/userSdk/specialties.js +45 -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,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({ 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
+ 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
+ };