@integraciones_doc24/sdk 0.38.0 → 0.38.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 +1 -1
- package/lib/baseSdk/user.d.ts +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/schemas.d.ts +13 -13
- package/lib/schemas.js +2 -2
- package/lib/test.d.ts +1 -0
- package/lib/test.js +26 -0
- package/lib/userSdk/patients.d.ts +3 -3
- package/lib/utils.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RequestMaker } from '../request';
|
|
2
2
|
export declare const getDiagnosticaMethods: (makeRequest: RequestMaker) => {
|
|
3
3
|
getDiagnosticaHistory: (patient: {
|
|
4
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
4
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
5
5
|
identificationValue: string;
|
|
6
6
|
gender: "m" | "f";
|
|
7
7
|
}, from: Date, to: Date) => Promise<{
|
package/lib/baseSdk/user.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const getUserMethods: (makeRequest: RequestMaker, url: string, cr
|
|
|
4
4
|
declareUser: (user: {
|
|
5
5
|
firstName: string;
|
|
6
6
|
lastName: string;
|
|
7
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
7
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
8
8
|
identificationValue: string;
|
|
9
9
|
gender: "m" | "f";
|
|
10
10
|
phone: string;
|
package/lib/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
8
8
|
declareUser: (user: {
|
|
9
9
|
firstName: string;
|
|
10
10
|
lastName: string;
|
|
11
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
11
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
12
12
|
identificationValue: string;
|
|
13
13
|
gender: "m" | "f";
|
|
14
14
|
phone: string;
|
|
@@ -19,7 +19,7 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
19
19
|
getUserInstance: (user: number | {
|
|
20
20
|
firstName: string;
|
|
21
21
|
lastName: string;
|
|
22
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
22
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
23
23
|
identificationValue: string;
|
|
24
24
|
gender: "m" | "f";
|
|
25
25
|
phone: string;
|
|
@@ -105,7 +105,7 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
105
105
|
authorizationCodeExpiration: Date | null;
|
|
106
106
|
} | null>;
|
|
107
107
|
getDiagnosticaHistory: (patient: {
|
|
108
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
108
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
109
109
|
identificationValue: string;
|
|
110
110
|
gender: "m" | "f";
|
|
111
111
|
}, from: Date, to: Date) => Promise<{
|
package/lib/schemas.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const doc24Schemas: {
|
|
2
|
-
identificationType: import("zod").ZodEnum<["dni", "ndi", "passport", "credential", "
|
|
2
|
+
identificationType: import("zod").ZodEnum<["dni", "ndi", "passport", "credential", "nn"]>;
|
|
3
3
|
sdkCredentials: import("zod").ZodObject<{
|
|
4
4
|
iss: import("zod").ZodString;
|
|
5
5
|
key: import("zod").ZodString;
|
|
@@ -38,7 +38,7 @@ export declare const doc24Schemas: {
|
|
|
38
38
|
user: import("zod").ZodObject<import("zod").extendShape<{
|
|
39
39
|
firstName: import("zod").ZodString;
|
|
40
40
|
lastName: import("zod").ZodString;
|
|
41
|
-
identificationType: import("zod").ZodEnum<["dni", "ndi", "passport", "credential", "
|
|
41
|
+
identificationType: import("zod").ZodEnum<["dni", "ndi", "passport", "credential", "nn"]>;
|
|
42
42
|
identificationValue: import("zod").ZodString;
|
|
43
43
|
countryId: import("zod").ZodString;
|
|
44
44
|
birthdate: import("zod").ZodDate;
|
|
@@ -49,7 +49,7 @@ export declare const doc24Schemas: {
|
|
|
49
49
|
}>, "strip", import("zod").ZodTypeAny, {
|
|
50
50
|
firstName: string;
|
|
51
51
|
lastName: string;
|
|
52
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
52
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
53
53
|
identificationValue: string;
|
|
54
54
|
gender: "m" | "f";
|
|
55
55
|
phone: string;
|
|
@@ -59,7 +59,7 @@ export declare const doc24Schemas: {
|
|
|
59
59
|
}, {
|
|
60
60
|
firstName: string;
|
|
61
61
|
lastName: string;
|
|
62
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
62
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
63
63
|
identificationValue: string;
|
|
64
64
|
gender: "m" | "f";
|
|
65
65
|
phone: string;
|
|
@@ -70,7 +70,7 @@ export declare const doc24Schemas: {
|
|
|
70
70
|
patient: import("zod").ZodObject<{
|
|
71
71
|
firstName: import("zod").ZodString;
|
|
72
72
|
lastName: import("zod").ZodString;
|
|
73
|
-
identificationType: import("zod").ZodEnum<["dni", "ndi", "passport", "credential", "
|
|
73
|
+
identificationType: import("zod").ZodEnum<["dni", "ndi", "passport", "credential", "nn"]>;
|
|
74
74
|
identificationValue: import("zod").ZodString;
|
|
75
75
|
countryId: import("zod").ZodString;
|
|
76
76
|
birthdate: import("zod").ZodDate;
|
|
@@ -78,7 +78,7 @@ export declare const doc24Schemas: {
|
|
|
78
78
|
}, "strip", import("zod").ZodTypeAny, {
|
|
79
79
|
firstName: string;
|
|
80
80
|
lastName: string;
|
|
81
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
81
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
82
82
|
identificationValue: string;
|
|
83
83
|
gender: "m" | "f";
|
|
84
84
|
countryId: string;
|
|
@@ -86,7 +86,7 @@ export declare const doc24Schemas: {
|
|
|
86
86
|
}, {
|
|
87
87
|
firstName: string;
|
|
88
88
|
lastName: string;
|
|
89
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
89
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
90
90
|
identificationValue: string;
|
|
91
91
|
gender: "m" | "f";
|
|
92
92
|
countryId: string;
|
|
@@ -945,14 +945,14 @@ export declare const doc24Schemas: {
|
|
|
945
945
|
}>;
|
|
946
946
|
diagnosticaPatientFilter: import("zod").ZodObject<{
|
|
947
947
|
gender: import("zod").ZodEnum<["m", "f"]>;
|
|
948
|
-
identificationType: import("zod").ZodEnum<["dni", "ndi", "passport", "credential", "
|
|
948
|
+
identificationType: import("zod").ZodEnum<["dni", "ndi", "passport", "credential", "nn"]>;
|
|
949
949
|
identificationValue: import("zod").ZodString;
|
|
950
950
|
}, "strip", import("zod").ZodTypeAny, {
|
|
951
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
951
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
952
952
|
identificationValue: string;
|
|
953
953
|
gender: "m" | "f";
|
|
954
954
|
}, {
|
|
955
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
955
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
956
956
|
identificationValue: string;
|
|
957
957
|
gender: "m" | "f";
|
|
958
958
|
}>;
|
|
@@ -1113,13 +1113,13 @@ export declare const doc24Schemas: {
|
|
|
1113
1113
|
authorizationCodeExpiration: Date | null;
|
|
1114
1114
|
}>>;
|
|
1115
1115
|
emergencyIdentificaiton: import("zod").ZodObject<{
|
|
1116
|
-
identificationType: import("zod").ZodLiteral<"
|
|
1116
|
+
identificationType: import("zod").ZodLiteral<"nn">;
|
|
1117
1117
|
identificationValue: import("zod").ZodString;
|
|
1118
1118
|
}, "strip", import("zod").ZodTypeAny, {
|
|
1119
|
-
identificationType: "
|
|
1119
|
+
identificationType: "nn";
|
|
1120
1120
|
identificationValue: string;
|
|
1121
1121
|
}, {
|
|
1122
|
-
identificationType: "
|
|
1122
|
+
identificationType: "nn";
|
|
1123
1123
|
identificationValue: string;
|
|
1124
1124
|
}>;
|
|
1125
1125
|
};
|
package/lib/schemas.js
CHANGED
|
@@ -8,7 +8,7 @@ const identificationType = zod_1.enum([
|
|
|
8
8
|
'ndi',
|
|
9
9
|
'passport',
|
|
10
10
|
'credential',
|
|
11
|
-
'
|
|
11
|
+
'nn',
|
|
12
12
|
]);
|
|
13
13
|
const sdkCredentials = zod_1.object({ iss: zod_1.string(), key: zod_1.string() });
|
|
14
14
|
const basePersonData = zod_1.object({
|
|
@@ -179,7 +179,7 @@ const coverageInfo = zod_1.object({
|
|
|
179
179
|
authorizationCodeExpiration: zod_1.date().nullable(),
|
|
180
180
|
}).nullable();
|
|
181
181
|
const emergencyIdentificaiton = zod_1.object({
|
|
182
|
-
identificationType: zod_1.literal('
|
|
182
|
+
identificationType: zod_1.literal('nn'),
|
|
183
183
|
identificationValue: zod_1.string().uuid(),
|
|
184
184
|
});
|
|
185
185
|
exports.doc24Schemas = {
|
package/lib/test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const test: () => Promise<import("./types").Doc24.UserSdk>;
|
package/lib/test.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.test = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const test = async () => {
|
|
6
|
+
const baseSdk = await _1.doc24Sdk({
|
|
7
|
+
url: 'https://tapi.doc24.com.ar/ws/sdk',
|
|
8
|
+
credentials: {
|
|
9
|
+
iss: 'Diagnostica',
|
|
10
|
+
key: 'gS2J78V0Zw8XiZJPGC9RS8TlECgqM2TmVtOzNAZbqputgmtc',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
const userSdk = await baseSdk.getUserInstance({
|
|
14
|
+
firstName: '-',
|
|
15
|
+
lastName: '-',
|
|
16
|
+
birthdate: new Date(),
|
|
17
|
+
email: 'nomail@diagnostica.com.ar',
|
|
18
|
+
phone: '',
|
|
19
|
+
gender: 'm',
|
|
20
|
+
identificationValue: '',
|
|
21
|
+
identificationType: 'nn',
|
|
22
|
+
countryId: 'AR',
|
|
23
|
+
});
|
|
24
|
+
return userSdk;
|
|
25
|
+
};
|
|
26
|
+
exports.test = test;
|
|
@@ -3,19 +3,19 @@ export declare const getPatientMethods: (makeRequest: RequestMaker) => {
|
|
|
3
3
|
declarePatient: (patient: {
|
|
4
4
|
firstName: string;
|
|
5
5
|
lastName: string;
|
|
6
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
6
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
7
7
|
identificationValue: string;
|
|
8
8
|
gender: "m" | "f";
|
|
9
9
|
countryId: string;
|
|
10
10
|
birthdate: Date;
|
|
11
11
|
}) => Promise<number>;
|
|
12
12
|
updateEmergencyPatient: (emergencyIdentification: {
|
|
13
|
-
identificationType: "
|
|
13
|
+
identificationType: "nn";
|
|
14
14
|
identificationValue: string;
|
|
15
15
|
}, patient: {
|
|
16
16
|
firstName: string;
|
|
17
17
|
lastName: string;
|
|
18
|
-
identificationType: "dni" | "ndi" | "passport" | "credential" | "
|
|
18
|
+
identificationType: "dni" | "ndi" | "passport" | "credential" | "nn";
|
|
19
19
|
identificationValue: string;
|
|
20
20
|
gender: "m" | "f";
|
|
21
21
|
countryId: string;
|
package/lib/utils.js
CHANGED