@integraciones_doc24/sdk 0.32.0 → 0.32.1
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/diagnostica.d.ts +0 -4
- package/lib/baseSdk/diagnostica.js +1 -13
- package/lib/baseSdk/external.d.ts +25 -3
- package/lib/index.d.ts +0 -4
- package/lib/schemas.d.ts +0 -13
- package/lib/schemas.js +0 -5
- package/lib/types.d.ts +1 -2
- package/package.json +1 -1
|
@@ -4,10 +4,6 @@ export declare const getDiagnosticaMethods: (makeRequest: RequestMaker) => {
|
|
|
4
4
|
identificationType: "ndi" | "passport" | "credential";
|
|
5
5
|
identificationValue: string;
|
|
6
6
|
gender: "m" | "f";
|
|
7
|
-
}, user: {
|
|
8
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
9
|
-
identificationValue: string;
|
|
10
|
-
gender: "m" | "f";
|
|
11
7
|
}, from: Date, to: Date) => Promise<{
|
|
12
8
|
date: Date;
|
|
13
9
|
location: string;
|
|
@@ -5,12 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const validation_1 = require("../request/validation");
|
|
6
6
|
const schemas_1 = require("../schemas");
|
|
7
7
|
const getDiagnosticaMethods = (makeRequest) => {
|
|
8
|
-
const getDiagnosticaHistory = validation_1.validateFunction(zod_1.tuple([
|
|
9
|
-
schemas_1.doc24Schemas.diagnosticaPatientFilter,
|
|
10
|
-
schemas_1.doc24Schemas.diagnosticaUserFilter,
|
|
11
|
-
zod_1.date(),
|
|
12
|
-
zod_1.date(),
|
|
13
|
-
]), schemas_1.doc24Schemas.diagnosticaHistoryAppointment.array(), async (patient, user, from, to) => {
|
|
8
|
+
const getDiagnosticaHistory = validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.diagnosticaPatientFilter, zod_1.date(), zod_1.date()]), schemas_1.doc24Schemas.diagnosticaHistoryAppointment.array(), async (patient, from, to) => {
|
|
14
9
|
const path = '/history-diagnostica';
|
|
15
10
|
const response = await makeRequest('POST', path, {
|
|
16
11
|
patient: {
|
|
@@ -20,13 +15,6 @@ const getDiagnosticaMethods = (makeRequest) => {
|
|
|
20
15
|
: patient.identificationType,
|
|
21
16
|
id_value: patient.identificationValue,
|
|
22
17
|
},
|
|
23
|
-
user: {
|
|
24
|
-
gender: user.gender,
|
|
25
|
-
id_type: user.identificationType === 'ndi'
|
|
26
|
-
? 'DNI'
|
|
27
|
-
: user.identificationType,
|
|
28
|
-
id_value: user.identificationValue,
|
|
29
|
-
},
|
|
30
18
|
dateFrom: from.toISOString(),
|
|
31
19
|
dateTo: to.toISOString(),
|
|
32
20
|
});
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
import { RequestMaker } from '../request';
|
|
2
2
|
export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
3
|
-
externalLogin:
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
externalLogin: (user: string, password: string) => Promise<{
|
|
4
|
+
firstName: string;
|
|
5
|
+
lastName: string;
|
|
6
|
+
phone: string;
|
|
7
|
+
identificationNumber: string;
|
|
8
|
+
email: string;
|
|
9
|
+
countryId: string;
|
|
10
|
+
gender: "m" | "f";
|
|
11
|
+
birthday: Date;
|
|
12
|
+
}>;
|
|
13
|
+
preExternalEnroll: (params: {
|
|
14
|
+
phone: string;
|
|
15
|
+
identificationNumber: string;
|
|
16
|
+
birthdate: Date;
|
|
17
|
+
email: string;
|
|
18
|
+
}) => Promise<void>;
|
|
19
|
+
externalEnroll: (params: {
|
|
20
|
+
phone: string;
|
|
21
|
+
identificationNumber: string;
|
|
22
|
+
birthdate: Date;
|
|
23
|
+
email: string;
|
|
24
|
+
password: string;
|
|
25
|
+
emailCode: string;
|
|
26
|
+
phoneCode: string;
|
|
27
|
+
}) => Promise<void>;
|
|
6
28
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -80,10 +80,6 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
80
80
|
identificationType: "ndi" | "passport" | "credential";
|
|
81
81
|
identificationValue: string;
|
|
82
82
|
gender: "m" | "f";
|
|
83
|
-
}, user: {
|
|
84
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
85
|
-
identificationValue: string;
|
|
86
|
-
gender: "m" | "f";
|
|
87
83
|
}, from: Date, to: Date) => Promise<{
|
|
88
84
|
date: Date;
|
|
89
85
|
location: string;
|
package/lib/schemas.d.ts
CHANGED
|
@@ -938,19 +938,6 @@ export declare const doc24Schemas: {
|
|
|
938
938
|
identificationValue: string;
|
|
939
939
|
gender: "m" | "f";
|
|
940
940
|
}>;
|
|
941
|
-
diagnosticaUserFilter: import("zod").ZodObject<{
|
|
942
|
-
gender: import("zod").ZodEnum<["m", "f"]>;
|
|
943
|
-
identificationType: import("zod").ZodEnum<["ndi", "passport", "credential"]>;
|
|
944
|
-
identificationValue: import("zod").ZodString;
|
|
945
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
946
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
947
|
-
identificationValue: string;
|
|
948
|
-
gender: "m" | "f";
|
|
949
|
-
}, {
|
|
950
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
951
|
-
identificationValue: string;
|
|
952
|
-
gender: "m" | "f";
|
|
953
|
-
}>;
|
|
954
941
|
diagnosticaHistoryAppointment: import("zod").ZodObject<{
|
|
955
942
|
date: import("zod").ZodDate;
|
|
956
943
|
location: import("zod").ZodString;
|
package/lib/schemas.js
CHANGED
|
@@ -244,10 +244,5 @@ exports.doc24Schemas = {
|
|
|
244
244
|
identificationType,
|
|
245
245
|
identificationValue: zod_1.string(),
|
|
246
246
|
}),
|
|
247
|
-
diagnosticaUserFilter: zod_1.object({
|
|
248
|
-
gender,
|
|
249
|
-
identificationType,
|
|
250
|
-
identificationValue: zod_1.string(),
|
|
251
|
-
}),
|
|
252
247
|
diagnosticaHistoryAppointment,
|
|
253
248
|
};
|
package/lib/types.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ export declare namespace Doc24 {
|
|
|
24
24
|
type ChatDetails = TypeOf<typeof doc24Schemas.chatDetails>;
|
|
25
25
|
type ChatPost = TypeOf<typeof doc24Schemas.chatPost>;
|
|
26
26
|
type EnrollmentParams = TypeOf<typeof doc24Schemas.enrollmentParams>;
|
|
27
|
-
type DiagnosticaUserFilter = TypeOf<typeof doc24Schemas.diagnosticaUserFilter>;
|
|
28
27
|
type DiagnosticaPatientFilter = TypeOf<typeof doc24Schemas.diagnosticaPatientFilter>;
|
|
29
28
|
type DiagnosticaHistoryAppointment = TypeOf<typeof doc24Schemas.diagnosticaHistoryAppointment>;
|
|
30
29
|
type BaseSdk = {
|
|
@@ -33,7 +32,7 @@ export declare namespace Doc24 {
|
|
|
33
32
|
getProfessional: (professionalId: number) => Promise<Professional>;
|
|
34
33
|
getAvailableScheduleClinics: () => Promise<AvailableScheduleClinics>;
|
|
35
34
|
enroll: (params: EnrollmentParams) => Promise<void>;
|
|
36
|
-
getDiagnosticaHistory: (patient: DiagnosticaPatientFilter,
|
|
35
|
+
getDiagnosticaHistory: (patient: DiagnosticaPatientFilter, from: Date, to: Date) => Promise<DiagnosticaHistoryAppointment[]>;
|
|
37
36
|
};
|
|
38
37
|
type UserSdk = {
|
|
39
38
|
declarePatient: (patient: Patient) => Promise<number>;
|