@integraciones_doc24/sdk 1.8.2 → 1.8.3
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/baseSdk/external.d.ts +11 -2
- package/lib/baseSdk/external.js +14 -4
- package/lib/index.d.ts +10 -1
- package/lib/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
31
31
|
} & {
|
|
32
32
|
email?: undefined;
|
|
33
33
|
phone: string;
|
|
34
|
-
})) => Promise<
|
|
34
|
+
})) => Promise<void>;
|
|
35
35
|
externalEnrollment: (params: ({
|
|
36
36
|
birthdate: Date;
|
|
37
37
|
identificationNumber: string;
|
|
@@ -131,7 +131,16 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
131
131
|
} & {
|
|
132
132
|
emailCode?: undefined;
|
|
133
133
|
phoneCode: string;
|
|
134
|
-
})) => Promise<
|
|
134
|
+
})) => Promise<{
|
|
135
|
+
firstName: string;
|
|
136
|
+
lastName: string;
|
|
137
|
+
countryId: string;
|
|
138
|
+
gender: "m" | "f";
|
|
139
|
+
phone: string;
|
|
140
|
+
email: string;
|
|
141
|
+
birthday: Date;
|
|
142
|
+
identificationNumber: string;
|
|
143
|
+
}>;
|
|
135
144
|
getExternalVerificationCode: (params: {
|
|
136
145
|
birthdate: Date;
|
|
137
146
|
channel: "1" | "2";
|
package/lib/baseSdk/external.js
CHANGED
|
@@ -16,7 +16,7 @@ const getExternalMethods = (makeRequest) => {
|
|
|
16
16
|
countryId: info.country_id,
|
|
17
17
|
birthday: new Date(Date.parse(info.birthdate)),
|
|
18
18
|
identificationNumber: info.identification_number,
|
|
19
|
-
gender: info.gender
|
|
19
|
+
gender: info.gender.toLowerCase(),
|
|
20
20
|
email: info.email,
|
|
21
21
|
phone: info.telephone,
|
|
22
22
|
};
|
|
@@ -42,7 +42,17 @@ const getExternalMethods = (makeRequest) => {
|
|
|
42
42
|
email_code: params.emailCode,
|
|
43
43
|
telephone_code: params.phoneCode,
|
|
44
44
|
});
|
|
45
|
-
|
|
45
|
+
const info = response.data.info;
|
|
46
|
+
return {
|
|
47
|
+
firstName: info.firstname,
|
|
48
|
+
lastName: info.lastname,
|
|
49
|
+
countryId: info.country_id,
|
|
50
|
+
birthday: new Date(Date.parse(info.birthdate)),
|
|
51
|
+
identificationNumber: info.identification_number,
|
|
52
|
+
gender: info.gender.toLowerCase(),
|
|
53
|
+
email: info.email,
|
|
54
|
+
phone: info.telephone,
|
|
55
|
+
};
|
|
46
56
|
};
|
|
47
57
|
const getExternalVerificationCode = async (params) => {
|
|
48
58
|
const path = '/send-external-verification-code';
|
|
@@ -66,8 +76,8 @@ const getExternalMethods = (makeRequest) => {
|
|
|
66
76
|
};
|
|
67
77
|
return {
|
|
68
78
|
externalLogin: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalLoginParams]), schemas_1.doc24Schemas.externalLoginResponse, externalLogin),
|
|
69
|
-
preExternalEnrollment: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.preExternalEnrollmentParams]), zod_1.
|
|
70
|
-
externalEnrollment: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalEnrollmentParams]),
|
|
79
|
+
preExternalEnrollment: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.preExternalEnrollmentParams]), zod_1.void(), preExternalEnrollment),
|
|
80
|
+
externalEnrollment: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalEnrollmentParams]), schemas_1.doc24Schemas.externalLoginResponse, externalEnrollment),
|
|
71
81
|
getExternalVerificationCode: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalVerificationCodeParams]), zod_1.any(), getExternalVerificationCode),
|
|
72
82
|
externalResetPassword: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalResetPasswordParams]), zod_1.any(), externalResetPassword),
|
|
73
83
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -317,7 +317,16 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
317
317
|
} & {
|
|
318
318
|
emailCode?: undefined;
|
|
319
319
|
phoneCode: string;
|
|
320
|
-
})) => Promise<
|
|
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
|
+
}>;
|
|
321
330
|
getExternalVerificationCode: (params: {
|
|
322
331
|
birthdate: Date;
|
|
323
332
|
channel: "1" | "2";
|
package/lib/types.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare namespace Doc24 {
|
|
|
55
55
|
getDiagnosticaAccess: (kiosk: string, user: DiagnosticaUser, patient: DiagnosticaPatient) => Promise<void>;
|
|
56
56
|
externalLogin: (params: ExternalLoginParams) => Promise<ExternalLoginResponse>;
|
|
57
57
|
preExternalEnrollment: (params: PreExternalEnrollmentParams) => Promise<void>;
|
|
58
|
-
externalEnrollment: (params: ExternalEnrollmentParams) => Promise<
|
|
58
|
+
externalEnrollment: (params: ExternalEnrollmentParams) => Promise<ExternalLoginResponse>;
|
|
59
59
|
getExternalVerificationCode: (params: ExternalVerificationCodeParams) => Promise<void>;
|
|
60
60
|
externalResetPassword: (params: ExternalResetPasswordParams) => Promise<any>;
|
|
61
61
|
};
|