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