@integraciones_doc24/sdk 0.39.1 → 0.39.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.
package/lib/index.d.ts CHANGED
@@ -5,37 +5,63 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
5
5
  eventHandlers: Doc24.Webhook.Events;
6
6
  baseAddress: string;
7
7
  }) => Promise<Doc24.Webhook.Handler>;
8
- declareUser: (user: {
8
+ declareUser: (params: {
9
+ user: {
10
+ firstName: string;
11
+ lastName: string;
12
+ identificationType: number;
13
+ identificationValue: string;
14
+ countryId: string;
15
+ birthdate: Date;
16
+ gender: "m" | "f";
17
+ phone: string;
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: {
9
35
  firstName: string;
10
36
  lastName: string;
11
- identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
37
+ identificationType: number;
12
38
  identificationValue: string;
39
+ countryId: string;
40
+ birthdate: Date;
13
41
  gender: "m" | "f";
14
42
  phone: string;
15
43
  email: string;
16
- countryId: string;
17
- birthdate: Date;
18
44
  }) => Promise<number>;
19
45
  getUserInstance: (user: number | {
20
46
  firstName: string;
21
47
  lastName: string;
22
- identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
48
+ identificationType: number;
23
49
  identificationValue: string;
50
+ countryId: string;
51
+ birthdate: Date;
24
52
  gender: "m" | "f";
25
53
  phone: string;
26
54
  email: string;
27
- countryId: string;
28
- birthdate: Date;
29
55
  }) => Promise<Doc24.UserSdk>;
30
56
  getProfessional: (professionalId: number) => Promise<{
31
- id: number;
32
- logoUrl: string;
33
57
  firstName: string;
34
58
  lastName: string;
59
+ birthdate: Date;
35
60
  gender: "m" | "f";
36
61
  phone: string | null;
37
62
  email: string;
38
- birthdate: Date;
63
+ id: number;
64
+ logoUrl: string;
39
65
  specialties: {
40
66
  id: number;
41
67
  description: string;
@@ -73,19 +99,19 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
73
99
  enroll: (params: {
74
100
  firstName: string;
75
101
  lastName: string;
102
+ birthdate: Date;
76
103
  gender: "m" | "f";
77
104
  email: string;
78
- birthdate: Date;
79
- startDate: Date;
80
105
  identificationNumber: string;
106
+ startDate: Date;
81
107
  plan: string;
82
108
  }) => Promise<void>;
83
- getConverageInfo: (identificationValue: string) => Promise<{
109
+ getCoverageInfo: (identificationValue: string) => Promise<{
84
110
  firstName: string | null;
85
111
  lastName: string | null;
112
+ birthdate: Date;
86
113
  gender: "m" | "f";
87
114
  email: string | null;
88
- birthdate: Date;
89
115
  identificationNumber: string;
90
116
  plan: string | null;
91
117
  financerId: number | null;
@@ -104,8 +130,13 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
104
130
  authorizationCode: string | null;
105
131
  authorizationCodeExpiration: Date | null;
106
132
  } | null>;
133
+ sendVerificationCode: (params: {
134
+ identificationType: number;
135
+ identificationValue: string;
136
+ channel: "1" | "2";
137
+ }) => Promise<void>;
107
138
  getDiagnosticaHistory: (patient: {
108
- identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
139
+ identificationType: "DNI";
109
140
  identificationValue: string;
110
141
  gender: "m" | "f";
111
142
  }, from: Date, to: Date) => Promise<{
@@ -115,22 +146,22 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
115
146
  deepLink: string;
116
147
  }[]>;
117
148
  getDiagnosticaDeepLink: (kiosk: string, user: {
118
- language: string;
119
149
  firstName: string;
120
150
  lastName: string;
121
- birthday: Date;
122
- identificationType: "dni";
151
+ identificationType: "DNI";
123
152
  identificationValue: string;
124
153
  gender: "m" | "f";
125
154
  phone: string;
126
155
  email: string;
156
+ language: string;
157
+ birthday: Date;
127
158
  }, patient: {
128
159
  firstName: string;
129
160
  lastName: string;
130
- birthday: Date;
131
- identificationType: "dni";
161
+ identificationType: "DNI";
132
162
  identificationValue: string;
133
163
  gender: "m" | "f";
164
+ birthday: Date;
134
165
  }) => Promise<{
135
166
  forwardingRequired: true;
136
167
  deepLink: string;
@@ -138,22 +169,196 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
138
169
  forwardingRequired: false;
139
170
  }>;
140
171
  getDiagnosticaAccess: (kiosk: string, user: {
141
- language: string;
142
172
  firstName: string;
143
173
  lastName: string;
144
- birthday: Date;
145
- identificationType: "dni";
174
+ identificationType: "DNI";
146
175
  identificationValue: string;
147
176
  gender: "m" | "f";
148
177
  phone: string;
149
178
  email: string;
179
+ language: string;
180
+ birthday: Date;
150
181
  }, patient: {
151
182
  firstName: string;
152
183
  lastName: string;
153
- birthday: Date;
154
- identificationType: "dni";
184
+ identificationType: "DNI";
155
185
  identificationValue: string;
156
186
  gender: "m" | "f";
187
+ birthday: Date;
157
188
  }) => Promise<void>;
189
+ externalLogin: (params: {
190
+ user: string;
191
+ password: string;
192
+ }) => Promise<{
193
+ firstName: string;
194
+ lastName: string;
195
+ countryId: string;
196
+ gender: "m" | "f";
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
+ firstName: string;
322
+ lastName: string;
323
+ countryId: string;
324
+ gender: "m" | "f";
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>;
158
363
  }>;
159
364
  export type { Doc24 } from './types';