@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/index.d.ts CHANGED
@@ -1,365 +1,367 @@
1
- import { Doc24 } from './types';
2
- export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
3
- getRequestHandler: (params: {
4
- credentials: Doc24.SdkCredentials;
5
- eventHandlers: Doc24.Webhook.Events;
6
- baseAddress: string;
7
- }) => Promise<Doc24.Webhook.Handler>;
8
- declareUser: (params: {
9
- user: {
10
- identificationType?: number | undefined;
11
- identificationValue?: string | undefined;
12
- gender?: "m" | "f" | "o" | undefined;
13
- phone?: string | undefined;
14
- firstName: string;
15
- lastName: string;
16
- countryId: string;
17
- birthdate: Date;
18
- email: string;
19
- };
20
- } & {
21
- code?: string | undefined;
22
- channel?: "1" | "2" | undefined;
23
- }) => Promise<{
24
- askCode: true;
25
- userInfo: {
26
- phone: string;
27
- email: string;
28
- };
29
- } | {
30
- patientId: number | null;
31
- askCode: false;
32
- userId: number;
33
- }>;
34
- getUserId: (user: {
35
- identificationType?: number | undefined;
36
- identificationValue?: string | undefined;
37
- gender?: "m" | "f" | "o" | undefined;
38
- phone?: string | undefined;
39
- firstName: string;
40
- lastName: string;
41
- countryId: string;
42
- birthdate: Date;
43
- email: string;
44
- }) => Promise<number>;
45
- getUserInstance: (user: number | {
46
- identificationType?: number | undefined;
47
- identificationValue?: string | undefined;
48
- gender?: "m" | "f" | "o" | undefined;
49
- phone?: string | undefined;
50
- firstName: string;
51
- lastName: string;
52
- countryId: string;
53
- birthdate: Date;
54
- email: string;
55
- }) => Promise<Doc24.UserSdk>;
56
- getProfessional: (professionalId: number) => Promise<{
57
- gender?: "m" | "f" | "o" | undefined;
58
- consultation_value?: string | null | undefined;
59
- firstName: string;
60
- lastName: string;
61
- birthdate: Date;
62
- phone: string | null;
63
- email: string;
64
- id: number;
65
- logoUrl: string;
66
- specialties: {
67
- id: number;
68
- description: string;
69
- }[];
70
- matriculation: {
71
- number: string;
72
- type: string;
73
- }[];
74
- degree: string;
75
- languages: string[];
76
- resume: {
77
- link: string;
78
- brief: string;
79
- };
80
- }>;
81
- getAvailableScheduleClinics: () => Promise<{
82
- specialties: {
83
- id: number;
84
- description: string;
85
- }[];
86
- specialtiesER: {
87
- id: number;
88
- description: string;
89
- }[];
90
- professionals: {
91
- id: number;
92
- fullName: string;
93
- clinicId: number;
94
- specialties: {
95
- id: number;
96
- description: string;
97
- }[];
98
- }[];
99
- }>;
100
- enroll: (params: {
101
- gender?: "m" | "f" | "o" | undefined;
102
- firstName: string;
103
- lastName: string;
104
- birthdate: Date;
105
- email: string;
106
- identificationNumber: string;
107
- startDate: Date;
108
- plan: string;
109
- }) => Promise<void>;
110
- getCoverageInfo: (identificationValue: string) => Promise<{
111
- gender?: "m" | "f" | "o" | undefined;
112
- firstName: string | null;
113
- lastName: string | null;
114
- birthdate: Date;
115
- email: string | null;
116
- identificationNumber: string;
117
- plan: string | null;
118
- financerId: number | null;
119
- defaultAffiliationId: number | null;
120
- credentialNumber: string | null;
121
- financerPlanId: number | null;
122
- brand: number | null;
123
- holderIdentificationNumber: string | null;
124
- copaymentValue: number | null;
125
- mobilePhone: string | null;
126
- company: string | null;
127
- dischargeDate: Date | null;
128
- leavingDate: Date | null;
129
- identificacion_tributaria: string | null;
130
- deregistrationDate: Date | null;
131
- authorizationCode: string | null;
132
- authorizationCodeExpiration: Date | null;
133
- } | null>;
134
- sendVerificationCode: (params: {
135
- identificationType: number;
136
- identificationValue: string;
137
- channel: "1" | "2";
138
- }) => Promise<void>;
139
- getDiagnosticaHistory: (patient: {
140
- gender?: "m" | "f" | "o" | undefined;
141
- identificationType: "DNI";
142
- identificationValue: string;
143
- }, from: Date, to: Date) => Promise<{
144
- date: Date;
145
- location: string;
146
- exams: string[];
147
- deepLink: string;
148
- }[]>;
149
- getDiagnosticaDeepLink: (kiosk: string, user: {
150
- gender?: "m" | "f" | "o" | undefined;
151
- firstName: string;
152
- lastName: string;
153
- identificationType: "DNI";
154
- identificationValue: string;
155
- phone: string;
156
- email: string;
157
- language: string;
158
- birthday: Date;
159
- }, patient: {
160
- gender?: "m" | "f" | "o" | undefined;
161
- firstName: string;
162
- lastName: string;
163
- identificationType: "DNI";
164
- identificationValue: string;
165
- birthday: Date;
166
- }) => Promise<{
167
- forwardingRequired: true;
168
- deepLink: string;
169
- } | {
170
- forwardingRequired: false;
171
- }>;
172
- getDiagnosticaAccess: (kiosk: string, user: {
173
- gender?: "m" | "f" | "o" | undefined;
174
- firstName: string;
175
- lastName: string;
176
- identificationType: "DNI";
177
- identificationValue: string;
178
- phone: string;
179
- email: string;
180
- language: string;
181
- birthday: Date;
182
- }, patient: {
183
- gender?: "m" | "f" | "o" | undefined;
184
- firstName: string;
185
- lastName: string;
186
- identificationType: "DNI";
187
- identificationValue: string;
188
- birthday: Date;
189
- }) => Promise<void>;
190
- externalLogin: (params: {
191
- user: string;
192
- password: string;
193
- }) => Promise<{
194
- gender?: "m" | "f" | "o" | undefined;
195
- firstName: string;
196
- lastName: string;
197
- countryId: string;
198
- phone: string;
199
- email: string;
200
- birthday: Date;
201
- identificationNumber: string;
202
- }>;
203
- preExternalEnrollment: (params: ({
204
- birthdate: Date;
205
- identificationNumber: string;
206
- } & {
207
- phone: string;
208
- email: string;
209
- }) | ({
210
- birthdate: Date;
211
- identificationNumber: string;
212
- } & {
213
- phone?: undefined;
214
- email: string;
215
- }) | ({
216
- birthdate: Date;
217
- identificationNumber: string;
218
- } & {
219
- email?: undefined;
220
- phone: string;
221
- })) => Promise<void>;
222
- externalEnrollment: (params: ({
223
- birthdate: Date;
224
- identificationNumber: string;
225
- } & {
226
- phone: string;
227
- email: string;
228
- } & {
229
- password: string;
230
- } & {
231
- emailCode: string;
232
- phoneCode: string;
233
- }) | ({
234
- birthdate: Date;
235
- identificationNumber: string;
236
- } & {
237
- phone: string;
238
- email: string;
239
- } & {
240
- password: string;
241
- } & {
242
- phoneCode?: undefined;
243
- emailCode: string;
244
- }) | ({
245
- birthdate: Date;
246
- identificationNumber: string;
247
- } & {
248
- phone: string;
249
- email: string;
250
- } & {
251
- password: string;
252
- } & {
253
- emailCode?: undefined;
254
- phoneCode: string;
255
- }) | ({
256
- birthdate: Date;
257
- identificationNumber: string;
258
- } & {
259
- phone?: undefined;
260
- email: string;
261
- } & {
262
- password: string;
263
- } & {
264
- emailCode: string;
265
- phoneCode: string;
266
- }) | ({
267
- birthdate: Date;
268
- identificationNumber: string;
269
- } & {
270
- phone?: undefined;
271
- email: string;
272
- } & {
273
- password: string;
274
- } & {
275
- phoneCode?: undefined;
276
- emailCode: string;
277
- }) | ({
278
- birthdate: Date;
279
- identificationNumber: string;
280
- } & {
281
- phone?: undefined;
282
- email: string;
283
- } & {
284
- password: string;
285
- } & {
286
- emailCode?: undefined;
287
- phoneCode: string;
288
- }) | ({
289
- birthdate: Date;
290
- identificationNumber: string;
291
- } & {
292
- email?: undefined;
293
- phone: string;
294
- } & {
295
- password: string;
296
- } & {
297
- emailCode: string;
298
- phoneCode: string;
299
- }) | ({
300
- birthdate: Date;
301
- identificationNumber: string;
302
- } & {
303
- email?: undefined;
304
- phone: string;
305
- } & {
306
- password: string;
307
- } & {
308
- phoneCode?: undefined;
309
- emailCode: string;
310
- }) | ({
311
- birthdate: Date;
312
- identificationNumber: string;
313
- } & {
314
- email?: undefined;
315
- phone: string;
316
- } & {
317
- password: string;
318
- } & {
319
- emailCode?: undefined;
320
- phoneCode: string;
321
- })) => Promise<{
322
- gender?: "m" | "f" | "o" | undefined;
323
- firstName: string;
324
- lastName: string;
325
- countryId: string;
326
- phone: string;
327
- email: string;
328
- birthday: Date;
329
- identificationNumber: string;
330
- }>;
331
- sendExternalVerificationCode: (params: {
332
- birthdate: Date;
333
- channel: "1" | "2";
334
- identificationNumber: string;
335
- }) => Promise<void>;
336
- verifyExternalVerificationCode: (params: {
337
- code: string;
338
- birthdate: Date;
339
- channel: "1" | "2";
340
- identificationNumber: string;
341
- }) => Promise<any>;
342
- externalResetPassword: (params: ({
343
- birthdate: Date;
344
- password: string;
345
- identificationNumber: string;
346
- } & {
347
- emailCode: string;
348
- phoneCode: string;
349
- }) | ({
350
- birthdate: Date;
351
- password: string;
352
- identificationNumber: string;
353
- } & {
354
- phoneCode?: undefined;
355
- emailCode: string;
356
- }) | ({
357
- birthdate: Date;
358
- password: string;
359
- identificationNumber: string;
360
- } & {
361
- emailCode?: undefined;
362
- phoneCode: string;
363
- })) => Promise<any>;
364
- }>;
365
- export type { Doc24 } from './types';
1
+ import { Doc24 } from './types';
2
+ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
3
+ getRequestHandler: (params: {
4
+ credentials: Doc24.SdkCredentials;
5
+ eventHandlers: Doc24.Webhook.Events;
6
+ baseAddress: string;
7
+ }) => Promise<Doc24.Webhook.Handler>;
8
+ declareUser: (params: {
9
+ user: {
10
+ identificationType?: number | undefined;
11
+ identificationValue?: string | undefined;
12
+ gender?: "m" | "f" | "o" | undefined;
13
+ phone?: string | undefined;
14
+ firstName: string;
15
+ lastName: string;
16
+ countryId: string;
17
+ birthdate: Date;
18
+ email: string;
19
+ };
20
+ } & {
21
+ code?: string | undefined;
22
+ channel?: "1" | "2" | undefined;
23
+ }) => Promise<{
24
+ askCode: true;
25
+ userInfo: {
26
+ phone: string;
27
+ email: string;
28
+ };
29
+ } | {
30
+ patientId: number | null;
31
+ askCode: false;
32
+ userId: number;
33
+ }>;
34
+ getUserId: (user: {
35
+ identificationType?: number | undefined;
36
+ identificationValue?: string | undefined;
37
+ gender?: "m" | "f" | "o" | undefined;
38
+ phone?: string | undefined;
39
+ firstName: string;
40
+ lastName: string;
41
+ countryId: string;
42
+ birthdate: Date;
43
+ email: string;
44
+ }) => Promise<number>;
45
+ getUserInstance: (user: number | {
46
+ identificationType?: number | undefined;
47
+ identificationValue?: string | undefined;
48
+ gender?: "m" | "f" | "o" | undefined;
49
+ phone?: string | undefined;
50
+ firstName: string;
51
+ lastName: string;
52
+ countryId: string;
53
+ birthdate: Date;
54
+ email: string;
55
+ }) => Promise<Doc24.UserSdk>;
56
+ getProfessional: (professionalId: number) => Promise<{
57
+ gender?: "m" | "f" | "o" | undefined;
58
+ status?: "active" | "deactivated" | undefined;
59
+ consultation_value?: string | null | undefined;
60
+ hasAvailability?: boolean | undefined;
61
+ firstName: string;
62
+ lastName: string;
63
+ birthdate: Date;
64
+ phone: string | null;
65
+ email: string;
66
+ id: number;
67
+ logoUrl: string;
68
+ specialties: {
69
+ id: number;
70
+ description: string;
71
+ }[];
72
+ matriculation: {
73
+ number: string;
74
+ type: string;
75
+ }[];
76
+ degree: string;
77
+ languages: string[];
78
+ resume: {
79
+ link: string;
80
+ brief: string;
81
+ };
82
+ }>;
83
+ getAvailableScheduleClinics: () => Promise<{
84
+ specialties: {
85
+ id: number;
86
+ description: string;
87
+ }[];
88
+ specialtiesER: {
89
+ id: number;
90
+ description: string;
91
+ }[];
92
+ professionals: {
93
+ id: number;
94
+ fullName: string;
95
+ clinicId: number;
96
+ specialties: {
97
+ id: number;
98
+ description: string;
99
+ }[];
100
+ }[];
101
+ }>;
102
+ enroll: (params: {
103
+ gender?: "m" | "f" | "o" | undefined;
104
+ firstName: string;
105
+ lastName: string;
106
+ birthdate: Date;
107
+ email: string;
108
+ identificationNumber: string;
109
+ startDate: Date;
110
+ plan: string;
111
+ }) => Promise<void>;
112
+ getCoverageInfo: (identificationValue: string) => Promise<{
113
+ gender?: "m" | "f" | "o" | undefined;
114
+ firstName: string | null;
115
+ lastName: string | null;
116
+ birthdate: Date;
117
+ email: string | null;
118
+ identificationNumber: string;
119
+ plan: string | null;
120
+ financerId: number | null;
121
+ defaultAffiliationId: number | null;
122
+ credentialNumber: string | null;
123
+ financerPlanId: number | null;
124
+ brand: number | null;
125
+ holderIdentificationNumber: string | null;
126
+ copaymentValue: number | null;
127
+ mobilePhone: string | null;
128
+ company: string | null;
129
+ dischargeDate: Date | null;
130
+ leavingDate: Date | null;
131
+ identificacion_tributaria: string | null;
132
+ deregistrationDate: Date | null;
133
+ authorizationCode: string | null;
134
+ authorizationCodeExpiration: Date | null;
135
+ } | null>;
136
+ sendVerificationCode: (params: {
137
+ identificationType: number;
138
+ identificationValue: string;
139
+ channel: "1" | "2";
140
+ }) => Promise<void>;
141
+ getDiagnosticaHistory: (patient: {
142
+ gender?: "m" | "f" | "o" | undefined;
143
+ identificationType: "DNI";
144
+ identificationValue: string;
145
+ }, from: Date, to: Date) => Promise<{
146
+ date: Date;
147
+ location: string;
148
+ exams: string[];
149
+ deepLink: string;
150
+ }[]>;
151
+ getDiagnosticaDeepLink: (kiosk: string, user: {
152
+ gender?: "m" | "f" | "o" | undefined;
153
+ firstName: string;
154
+ lastName: string;
155
+ identificationType: "DNI";
156
+ identificationValue: string;
157
+ phone: string;
158
+ email: string;
159
+ language: string;
160
+ birthday: Date;
161
+ }, patient: {
162
+ gender?: "m" | "f" | "o" | undefined;
163
+ firstName: string;
164
+ lastName: string;
165
+ identificationType: "DNI";
166
+ identificationValue: string;
167
+ birthday: Date;
168
+ }) => Promise<{
169
+ forwardingRequired: true;
170
+ deepLink: string;
171
+ } | {
172
+ forwardingRequired: false;
173
+ }>;
174
+ getDiagnosticaAccess: (kiosk: string, user: {
175
+ gender?: "m" | "f" | "o" | undefined;
176
+ firstName: string;
177
+ lastName: string;
178
+ identificationType: "DNI";
179
+ identificationValue: string;
180
+ phone: string;
181
+ email: string;
182
+ language: string;
183
+ birthday: Date;
184
+ }, patient: {
185
+ gender?: "m" | "f" | "o" | undefined;
186
+ firstName: string;
187
+ lastName: string;
188
+ identificationType: "DNI";
189
+ identificationValue: string;
190
+ birthday: Date;
191
+ }) => Promise<void>;
192
+ externalLogin: (params: {
193
+ user: string;
194
+ password: string;
195
+ }) => Promise<{
196
+ gender?: "m" | "f" | "o" | undefined;
197
+ firstName: string;
198
+ lastName: string;
199
+ countryId: string;
200
+ phone: string;
201
+ email: string;
202
+ birthday: Date;
203
+ identificationNumber: string;
204
+ }>;
205
+ preExternalEnrollment: (params: ({
206
+ birthdate: Date;
207
+ identificationNumber: string;
208
+ } & {
209
+ phone: string;
210
+ email: string;
211
+ }) | ({
212
+ birthdate: Date;
213
+ identificationNumber: string;
214
+ } & {
215
+ phone?: undefined;
216
+ email: string;
217
+ }) | ({
218
+ birthdate: Date;
219
+ identificationNumber: string;
220
+ } & {
221
+ email?: undefined;
222
+ phone: string;
223
+ })) => Promise<void>;
224
+ externalEnrollment: (params: ({
225
+ birthdate: Date;
226
+ identificationNumber: string;
227
+ } & {
228
+ phone: string;
229
+ email: string;
230
+ } & {
231
+ password: string;
232
+ } & {
233
+ emailCode: string;
234
+ phoneCode: string;
235
+ }) | ({
236
+ birthdate: Date;
237
+ identificationNumber: string;
238
+ } & {
239
+ phone: string;
240
+ email: string;
241
+ } & {
242
+ password: string;
243
+ } & {
244
+ phoneCode?: undefined;
245
+ emailCode: string;
246
+ }) | ({
247
+ birthdate: Date;
248
+ identificationNumber: string;
249
+ } & {
250
+ phone: string;
251
+ email: string;
252
+ } & {
253
+ password: string;
254
+ } & {
255
+ emailCode?: undefined;
256
+ phoneCode: string;
257
+ }) | ({
258
+ birthdate: Date;
259
+ identificationNumber: string;
260
+ } & {
261
+ phone?: undefined;
262
+ email: string;
263
+ } & {
264
+ password: string;
265
+ } & {
266
+ emailCode: string;
267
+ phoneCode: string;
268
+ }) | ({
269
+ birthdate: Date;
270
+ identificationNumber: string;
271
+ } & {
272
+ phone?: undefined;
273
+ email: string;
274
+ } & {
275
+ password: string;
276
+ } & {
277
+ phoneCode?: undefined;
278
+ emailCode: string;
279
+ }) | ({
280
+ birthdate: Date;
281
+ identificationNumber: string;
282
+ } & {
283
+ phone?: undefined;
284
+ email: string;
285
+ } & {
286
+ password: string;
287
+ } & {
288
+ emailCode?: undefined;
289
+ phoneCode: string;
290
+ }) | ({
291
+ birthdate: Date;
292
+ identificationNumber: string;
293
+ } & {
294
+ email?: undefined;
295
+ phone: string;
296
+ } & {
297
+ password: string;
298
+ } & {
299
+ emailCode: string;
300
+ phoneCode: string;
301
+ }) | ({
302
+ birthdate: Date;
303
+ identificationNumber: string;
304
+ } & {
305
+ email?: undefined;
306
+ phone: string;
307
+ } & {
308
+ password: string;
309
+ } & {
310
+ phoneCode?: undefined;
311
+ emailCode: string;
312
+ }) | ({
313
+ birthdate: Date;
314
+ identificationNumber: string;
315
+ } & {
316
+ email?: undefined;
317
+ phone: string;
318
+ } & {
319
+ password: string;
320
+ } & {
321
+ emailCode?: undefined;
322
+ phoneCode: string;
323
+ })) => Promise<{
324
+ gender?: "m" | "f" | "o" | undefined;
325
+ firstName: string;
326
+ lastName: string;
327
+ countryId: string;
328
+ phone: string;
329
+ email: string;
330
+ birthday: Date;
331
+ identificationNumber: string;
332
+ }>;
333
+ sendExternalVerificationCode: (params: {
334
+ birthdate: Date;
335
+ channel: "1" | "2";
336
+ identificationNumber: string;
337
+ }) => Promise<void>;
338
+ verifyExternalVerificationCode: (params: {
339
+ code: string;
340
+ birthdate: Date;
341
+ channel: "1" | "2";
342
+ identificationNumber: string;
343
+ }) => Promise<any>;
344
+ externalResetPassword: (params: ({
345
+ birthdate: Date;
346
+ password: string;
347
+ identificationNumber: string;
348
+ } & {
349
+ emailCode: string;
350
+ phoneCode: string;
351
+ }) | ({
352
+ birthdate: Date;
353
+ password: string;
354
+ identificationNumber: string;
355
+ } & {
356
+ phoneCode?: undefined;
357
+ emailCode: string;
358
+ }) | ({
359
+ birthdate: Date;
360
+ password: string;
361
+ identificationNumber: string;
362
+ } & {
363
+ emailCode?: undefined;
364
+ phoneCode: string;
365
+ })) => Promise<any>;
366
+ }>;
367
+ export type { Doc24 } from './types';