@integraciones_doc24/sdk 1.12.3 → 1.12.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.
- package/lib/baseSdk/external.d.ts +1 -1
- package/lib/baseSdk/external.js +3 -2
- package/lib/index.d.ts +1 -1
- package/lib/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -179,7 +179,7 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
179
179
|
identificationValue: string;
|
|
180
180
|
birthdate: Date;
|
|
181
181
|
gender: "m" | "f";
|
|
182
|
-
}) => Promise<string>;
|
|
182
|
+
}) => Promise<string | null>;
|
|
183
183
|
getExternalAppointmentsLink: (identificationValue: string, birthdate: Date) => Promise<string | null>;
|
|
184
184
|
getExternalAppointments: () => Promise<{
|
|
185
185
|
date: Date;
|
package/lib/baseSdk/external.js
CHANGED
|
@@ -86,11 +86,12 @@ const getExternalMethods = (makeRequest) => {
|
|
|
86
86
|
return response.data;
|
|
87
87
|
};
|
|
88
88
|
const getExternalStudiesHistoryLink = async (patient) => {
|
|
89
|
+
var _a, _b;
|
|
89
90
|
const path = '/history-external-studies';
|
|
90
91
|
const response = await makeRequest('POST', path, {
|
|
91
92
|
patient: mapPatientData(patient),
|
|
92
93
|
});
|
|
93
|
-
return response.data.info.link;
|
|
94
|
+
return (_b = (_a = response.data.info) === null || _a === void 0 ? void 0 : _a.link) !== null && _b !== void 0 ? _b : null;
|
|
94
95
|
};
|
|
95
96
|
const getExternalAppointmentsLink = async (identificationValue, birthdate) => {
|
|
96
97
|
const path = `/external-appointments-link/${identificationValue}/${date_fns_1.format(birthdate, 'yyyy-MM-dd')}`;
|
|
@@ -135,7 +136,7 @@ const getExternalMethods = (makeRequest) => {
|
|
|
135
136
|
sendExternalVerificationCode: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.sendExternalVerificationCodeParams]), zod_1.void(), sendExternalVerificationCode),
|
|
136
137
|
verifyExternalVerificationCode: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.verifyExternalVerificationCodeParams]), zod_1.any(), verifyExternalVerificationCode),
|
|
137
138
|
externalResetPassword: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalResetPasswordParams]), zod_1.any(), externalResetPassword),
|
|
138
|
-
getExternalStudiesHistoryLink: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalPatient]), zod_1.string(), getExternalStudiesHistoryLink),
|
|
139
|
+
getExternalStudiesHistoryLink: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalPatient]), zod_1.string().nullable(), getExternalStudiesHistoryLink),
|
|
139
140
|
getExternalAppointmentsLink: validation_1.validateFunction(zod_1.tuple([zod_1.string(), zod_1.date()]), zod_1.string().nullable(), getExternalAppointmentsLink),
|
|
140
141
|
getExternalAppointments: validation_1.validateFunction(zod_1.tuple([]), zod_1.array(schemas_1.doc24Schemas.externalAppointment), getExternalAppointments),
|
|
141
142
|
cancelExternalAppointment: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalAppointment]), zod_1.void(), cancelExternalAppointment),
|
package/lib/index.d.ts
CHANGED
|
@@ -365,7 +365,7 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
365
365
|
identificationValue: string;
|
|
366
366
|
birthdate: Date;
|
|
367
367
|
gender: "m" | "f";
|
|
368
|
-
}) => Promise<string>;
|
|
368
|
+
}) => Promise<string | null>;
|
|
369
369
|
getExternalAppointmentsLink: (identificationValue: string, birthdate: Date) => Promise<string | null>;
|
|
370
370
|
getExternalAppointments: () => Promise<{
|
|
371
371
|
date: Date;
|
package/lib/types.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare namespace Doc24 {
|
|
|
63
63
|
sendExternalVerificationCode: (params: SendExternalVerificationCodeParams) => Promise<void>;
|
|
64
64
|
verifyExternalVerificationCode: (params: VerifyExternalVerificationCodeParams) => Promise<any>;
|
|
65
65
|
externalResetPassword: (params: ExternalResetPasswordParams) => Promise<any>;
|
|
66
|
-
getExternalStudiesHistoryLink: (patient: ExternalPatient) => Promise<string>;
|
|
66
|
+
getExternalStudiesHistoryLink: (patient: ExternalPatient) => Promise<string | null>;
|
|
67
67
|
getExternalAppointmentsLink: (identificationValue: string, birthdate: Date) => Promise<string | null>;
|
|
68
68
|
getExternalAppointments: () => Promise<ExternalAppointment[]>;
|
|
69
69
|
cancelExternalAppointment: (appointmentId: ExternalAppointment) => Promise<void>;
|