@integraciones_doc24/sdk 1.15.6 → 1.15.8

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
+ 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;
9
39
  firstName: string;
10
40
  lastName: string;
11
- identificationType: "dni" | "ndi" | "passport" | "credential" | "nn" | "cpf" | "rg";
12
- identificationValue: string;
13
- gender: "m" | "f";
14
- phone: string;
15
- email: string;
16
41
  countryId: string;
17
42
  birthdate: Date;
43
+ email: string;
18
44
  }) => Promise<number>;
19
45
  getUserInstance: (user: number | {
46
+ identificationType?: number | undefined;
47
+ identificationValue?: string | undefined;
48
+ gender?: "m" | "f" | "o" | undefined;
49
+ phone?: string | undefined;
20
50
  firstName: string;
21
51
  lastName: string;
22
- identificationType: "dni" | "ndi" | "passport" | "credential" | "nn" | "cpf" | "rg";
23
- identificationValue: string;
24
- gender: "m" | "f";
25
- phone: string;
26
- email: string;
27
52
  countryId: string;
28
53
  birthdate: Date;
54
+ email: string;
29
55
  }) => Promise<Doc24.UserSdk>;
30
56
  getProfessional: (professionalId: number) => Promise<{
31
- id: number;
32
- logoUrl: string;
57
+ gender?: "m" | "f" | "o" | undefined;
33
58
  firstName: string;
34
59
  lastName: string;
35
- gender: "m" | "f";
60
+ birthdate: Date;
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;
@@ -71,21 +97,21 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
71
97
  }[];
72
98
  }>;
73
99
  enroll: (params: {
100
+ gender?: "m" | "f" | "o" | undefined;
74
101
  firstName: string;
75
102
  lastName: string;
76
- gender: "m" | "f";
77
- email: string;
78
103
  birthdate: Date;
79
- startDate: Date;
104
+ email: string;
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<{
110
+ gender?: "m" | "f" | "o" | undefined;
84
111
  firstName: string | null;
85
112
  lastName: string | null;
86
- gender: "m" | "f";
87
- email: string | null;
88
113
  birthdate: Date;
114
+ email: string | null;
89
115
  identificationNumber: string;
90
116
  plan: string | null;
91
117
  financerId: number | null;
@@ -104,10 +130,15 @@ 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" | "cpf" | "rg";
139
+ gender?: "m" | "f" | "o" | undefined;
140
+ identificationType: "DNI";
109
141
  identificationValue: string;
110
- gender: "m" | "f";
111
142
  }, from: Date, to: Date) => Promise<{
112
143
  date: Date;
113
144
  location: string;
@@ -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;
149
+ gender?: "m" | "f" | "o" | undefined;
119
150
  firstName: string;
120
151
  lastName: string;
121
- birthday: Date;
122
- identificationType: "dni";
152
+ identificationType: "DNI";
123
153
  identificationValue: string;
124
- gender: "m" | "f";
125
154
  phone: string;
126
155
  email: string;
156
+ language: string;
157
+ birthday: Date;
127
158
  }, patient: {
159
+ gender?: "m" | "f" | "o" | undefined;
128
160
  firstName: string;
129
161
  lastName: string;
130
- birthday: Date;
131
- identificationType: "dni";
162
+ identificationType: "DNI";
132
163
  identificationValue: string;
133
- 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;
172
+ gender?: "m" | "f" | "o" | undefined;
142
173
  firstName: string;
143
174
  lastName: string;
144
- birthday: Date;
145
- identificationType: "dni";
175
+ identificationType: "DNI";
146
176
  identificationValue: string;
147
- gender: "m" | "f";
148
177
  phone: string;
149
178
  email: string;
179
+ language: string;
180
+ birthday: Date;
150
181
  }, patient: {
182
+ gender?: "m" | "f" | "o" | undefined;
151
183
  firstName: string;
152
184
  lastName: string;
153
- birthday: Date;
154
- identificationType: "dni";
185
+ identificationType: "DNI";
155
186
  identificationValue: string;
156
- gender: "m" | "f";
187
+ birthday: Date;
157
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>;
158
363
  }>;
159
364
  export type { Doc24 } from './types';