@integraciones_doc24/sdk 1.16.2 → 1.16.5

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 (46) 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 -76
  8. package/lib/baseSdk/user.d.ts +91 -91
  9. package/lib/baseSdk/user.js +136 -136
  10. package/lib/index.d.ts +367 -367
  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 +1917 -1878
  19. package/lib/schemas.js +454 -444
  20. package/lib/types.d.ts +152 -150
  21. package/lib/types.js +2 -2
  22. package/lib/userSdk/binah.d.ts +12 -0
  23. package/lib/userSdk/binah.js +17 -0
  24. package/lib/userSdk/chat.d.ts +57 -57
  25. package/lib/userSdk/chat.js +98 -98
  26. package/lib/userSdk/external.d.ts +34 -34
  27. package/lib/userSdk/external.js +72 -72
  28. package/lib/userSdk/index.d.ts +2 -2
  29. package/lib/userSdk/index.js +33 -30
  30. package/lib/userSdk/patients.d.ts +39 -39
  31. package/lib/userSdk/patients.js +73 -73
  32. package/lib/userSdk/schedule.d.ts +49 -49
  33. package/lib/userSdk/schedule.js +83 -83
  34. package/lib/userSdk/specialties.d.ts +16 -16
  35. package/lib/userSdk/specialties.js +45 -45
  36. package/lib/userSdk/videoVisit.d.ts +115 -115
  37. package/lib/userSdk/videoVisit.js +155 -155
  38. package/lib/utils.d.ts +2 -2
  39. package/lib/utils.js +16 -16
  40. package/lib/webhook/index.d.ts +2 -2
  41. package/lib/webhook/index.js +56 -56
  42. package/lib/webhook/responses.d.ts +35 -35
  43. package/lib/webhook/responses.js +42 -42
  44. package/lib/webhook/token.d.ts +2 -2
  45. package/lib/webhook/token.js +23 -23
  46. package/package.json +36 -36
package/lib/index.d.ts CHANGED
@@ -1,367 +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
- 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';
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';