@integraciones_doc24/sdk 1.15.11 → 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 -74
  8. package/lib/baseSdk/user.d.ts +91 -91
  9. package/lib/baseSdk/user.js +136 -136
  10. package/lib/index.d.ts +365 -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 +1822 -1816
  19. package/lib/schemas.js +421 -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,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
- 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
+ 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';