@integraciones_doc24/sdk 0.34.1 → 0.34.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/user.d.ts +18 -18
- package/lib/baseSdk/user.js +30 -1
- package/lib/index.d.ts +18 -18
- package/lib/schemas.d.ts +54 -54
- package/lib/schemas.js +18 -18
- package/package.json +1 -1
package/lib/baseSdk/user.d.ts
CHANGED
|
@@ -15,27 +15,27 @@ export declare const getUserMethods: (makeRequest: RequestMaker, url: string, cr
|
|
|
15
15
|
getUserInstance: (...params: any) => Promise<any>;
|
|
16
16
|
enroll: (...params: any) => Promise<void>;
|
|
17
17
|
getConverageInfo: (identificationValue: string) => Promise<{
|
|
18
|
+
firstName: string | null;
|
|
19
|
+
lastName: string | null;
|
|
20
|
+
gender: "m" | "f";
|
|
18
21
|
email: string | null;
|
|
22
|
+
birthdate: Date;
|
|
23
|
+
identificationNumber: string;
|
|
19
24
|
plan: string | null;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
apellido: string | null;
|
|
25
|
-
nombre: string | null;
|
|
26
|
-
fecha_nacimiento: string;
|
|
27
|
-
id_financiador_plan: number | null;
|
|
28
|
-
sexo: "M" | "F" | null;
|
|
25
|
+
financerId: number | null;
|
|
26
|
+
defaultAffiliationId: number | null;
|
|
27
|
+
credentialNumber: string | null;
|
|
28
|
+
financerPlanId: number | null;
|
|
29
29
|
brand: number | null;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
holderIdentificationNumber: string | null;
|
|
31
|
+
copaymentValue: number | null;
|
|
32
|
+
mobilePhone: string | null;
|
|
33
|
+
company: string | null;
|
|
34
|
+
dischargeDate: Date | null;
|
|
35
|
+
leavingDate: Date | null;
|
|
36
36
|
identificacion_tributaria: string | null;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
deregistrationDate: Date | null;
|
|
38
|
+
authorizationCode: string | null;
|
|
39
|
+
authorizationCodeExpiration: Date | null;
|
|
40
40
|
} | null>;
|
|
41
41
|
};
|
package/lib/baseSdk/user.js
CHANGED
|
@@ -28,7 +28,36 @@ const getUserMethods = (makeRequest, url, credentials) => {
|
|
|
28
28
|
const getConverageInfo = validation_1.validateFunction(zod_1.tuple([zod_1.string()]), schemas_1.doc24Schemas.coverageInfo, async (identificationValue) => {
|
|
29
29
|
const path = `/info-coverage/${identificationValue}`;
|
|
30
30
|
const response = await makeRequest('GET', path);
|
|
31
|
-
|
|
31
|
+
const raw = response.data.info;
|
|
32
|
+
const mappedCoverageInfo = {
|
|
33
|
+
financerId: raw.id_financiador,
|
|
34
|
+
defaultAffiliationId: raw.id_afiliacion_default,
|
|
35
|
+
plan: raw.plan,
|
|
36
|
+
identificationNumber: raw.nro_documento,
|
|
37
|
+
credentialNumber: raw.nro_credencial,
|
|
38
|
+
lastName: raw.apellido,
|
|
39
|
+
firstName: raw.nombre,
|
|
40
|
+
birthdate: utils_1.parseDate(raw.fecha_nacimiento),
|
|
41
|
+
financerPlanId: raw.id_financiador_plan,
|
|
42
|
+
gender: raw.sexo.toLowerCase(),
|
|
43
|
+
brand: raw.brand,
|
|
44
|
+
holderIdentificationNumber: raw.nro_documento_titular,
|
|
45
|
+
copaymentValue: raw.valor_copago,
|
|
46
|
+
mobilePhone: raw.telefono_movil,
|
|
47
|
+
company: raw.empresa,
|
|
48
|
+
email: raw.email,
|
|
49
|
+
dischargeDate: raw.fecha_alta ? utils_1.parseDateTime(raw.fecha_alta) : null,
|
|
50
|
+
leavingDate: raw.fecha_baja ? utils_1.parseDateTime(raw.fecha_baja) : null,
|
|
51
|
+
identificacion_tributaria: raw.identificacion_tributaria,
|
|
52
|
+
deregistrationDate: raw.fecha_baja_padron
|
|
53
|
+
? utils_1.parseDateTime(raw.fecha_baja_padron)
|
|
54
|
+
: null,
|
|
55
|
+
authorizationCode: raw.codigo_autorizacion,
|
|
56
|
+
authorizationCodeExpiration: raw.codigo_autorizacion_vencimiento
|
|
57
|
+
? utils_1.parseDateTime(raw.codigo_autorizacion_vencimiento)
|
|
58
|
+
: null,
|
|
59
|
+
};
|
|
60
|
+
return mappedCoverageInfo;
|
|
32
61
|
});
|
|
33
62
|
return {
|
|
34
63
|
declareUser: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.user]), zod_1.number(), getUserId),
|
package/lib/index.d.ts
CHANGED
|
@@ -77,28 +77,28 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
77
77
|
plan: string;
|
|
78
78
|
}) => Promise<void>;
|
|
79
79
|
getConverageInfo: (identificationValue: string) => Promise<{
|
|
80
|
+
firstName: string | null;
|
|
81
|
+
lastName: string | null;
|
|
82
|
+
gender: "m" | "f";
|
|
80
83
|
email: string | null;
|
|
84
|
+
birthdate: Date;
|
|
85
|
+
identificationNumber: string;
|
|
81
86
|
plan: string | null;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
apellido: string | null;
|
|
87
|
-
nombre: string | null;
|
|
88
|
-
fecha_nacimiento: string;
|
|
89
|
-
id_financiador_plan: number | null;
|
|
90
|
-
sexo: "M" | "F" | null;
|
|
87
|
+
financerId: number | null;
|
|
88
|
+
defaultAffiliationId: number | null;
|
|
89
|
+
credentialNumber: string | null;
|
|
90
|
+
financerPlanId: number | null;
|
|
91
91
|
brand: number | null;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
holderIdentificationNumber: string | null;
|
|
93
|
+
copaymentValue: number | null;
|
|
94
|
+
mobilePhone: string | null;
|
|
95
|
+
company: string | null;
|
|
96
|
+
dischargeDate: Date | null;
|
|
97
|
+
leavingDate: Date | null;
|
|
98
98
|
identificacion_tributaria: string | null;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
deregistrationDate: Date | null;
|
|
100
|
+
authorizationCode: string | null;
|
|
101
|
+
authorizationCodeExpiration: Date | null;
|
|
102
102
|
} | null>;
|
|
103
103
|
getDiagnosticaHistory: (patient: {
|
|
104
104
|
identificationType: "ndi" | "passport" | "credential";
|
package/lib/schemas.d.ts
CHANGED
|
@@ -1025,73 +1025,73 @@ export declare const doc24Schemas: {
|
|
|
1025
1025
|
forwardingRequired: false;
|
|
1026
1026
|
}>]>;
|
|
1027
1027
|
coverageInfo: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
1028
|
-
|
|
1029
|
-
|
|
1028
|
+
financerId: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
1029
|
+
defaultAffiliationId: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
1030
1030
|
plan: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1031
|
+
identificationNumber: import("zod").ZodString;
|
|
1032
|
+
credentialNumber: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1033
|
+
lastName: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1034
|
+
firstName: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1035
|
+
birthdate: import("zod").ZodDate;
|
|
1036
|
+
financerPlanId: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
1037
|
+
gender: import("zod").ZodEnum<["m", "f"]>;
|
|
1038
1038
|
brand: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1039
|
+
holderIdentificationNumber: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1040
|
+
copaymentValue: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
1041
|
+
mobilePhone: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1042
|
+
company: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1043
1043
|
email: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1044
|
-
|
|
1045
|
-
|
|
1044
|
+
dischargeDate: import("zod").ZodNullable<import("zod").ZodDate>;
|
|
1045
|
+
leavingDate: import("zod").ZodNullable<import("zod").ZodDate>;
|
|
1046
1046
|
identificacion_tributaria: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1047
|
+
deregistrationDate: import("zod").ZodNullable<import("zod").ZodDate>;
|
|
1048
|
+
authorizationCode: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1049
|
+
authorizationCodeExpiration: import("zod").ZodNullable<import("zod").ZodDate>;
|
|
1050
1050
|
}, "strip", import("zod").ZodTypeAny, {
|
|
1051
|
+
firstName: string | null;
|
|
1052
|
+
lastName: string | null;
|
|
1053
|
+
gender: "m" | "f";
|
|
1051
1054
|
email: string | null;
|
|
1055
|
+
birthdate: Date;
|
|
1056
|
+
identificationNumber: string;
|
|
1052
1057
|
plan: string | null;
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
apellido: string | null;
|
|
1058
|
-
nombre: string | null;
|
|
1059
|
-
fecha_nacimiento: string;
|
|
1060
|
-
id_financiador_plan: number | null;
|
|
1061
|
-
sexo: "M" | "F" | null;
|
|
1058
|
+
financerId: number | null;
|
|
1059
|
+
defaultAffiliationId: number | null;
|
|
1060
|
+
credentialNumber: string | null;
|
|
1061
|
+
financerPlanId: number | null;
|
|
1062
1062
|
brand: number | null;
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1063
|
+
holderIdentificationNumber: string | null;
|
|
1064
|
+
copaymentValue: number | null;
|
|
1065
|
+
mobilePhone: string | null;
|
|
1066
|
+
company: string | null;
|
|
1067
|
+
dischargeDate: Date | null;
|
|
1068
|
+
leavingDate: Date | null;
|
|
1069
1069
|
identificacion_tributaria: string | null;
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1070
|
+
deregistrationDate: Date | null;
|
|
1071
|
+
authorizationCode: string | null;
|
|
1072
|
+
authorizationCodeExpiration: Date | null;
|
|
1073
1073
|
}, {
|
|
1074
|
+
firstName: string | null;
|
|
1075
|
+
lastName: string | null;
|
|
1076
|
+
gender: "m" | "f";
|
|
1074
1077
|
email: string | null;
|
|
1078
|
+
birthdate: Date;
|
|
1079
|
+
identificationNumber: string;
|
|
1075
1080
|
plan: string | null;
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
apellido: string | null;
|
|
1081
|
-
nombre: string | null;
|
|
1082
|
-
fecha_nacimiento: string;
|
|
1083
|
-
id_financiador_plan: number | null;
|
|
1084
|
-
sexo: "M" | "F" | null;
|
|
1081
|
+
financerId: number | null;
|
|
1082
|
+
defaultAffiliationId: number | null;
|
|
1083
|
+
credentialNumber: string | null;
|
|
1084
|
+
financerPlanId: number | null;
|
|
1085
1085
|
brand: number | null;
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1086
|
+
holderIdentificationNumber: string | null;
|
|
1087
|
+
copaymentValue: number | null;
|
|
1088
|
+
mobilePhone: string | null;
|
|
1089
|
+
company: string | null;
|
|
1090
|
+
dischargeDate: Date | null;
|
|
1091
|
+
leavingDate: Date | null;
|
|
1092
1092
|
identificacion_tributaria: string | null;
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1093
|
+
deregistrationDate: Date | null;
|
|
1094
|
+
authorizationCode: string | null;
|
|
1095
|
+
authorizationCodeExpiration: Date | null;
|
|
1096
1096
|
}>>;
|
|
1097
1097
|
};
|
package/lib/schemas.js
CHANGED
|
@@ -148,28 +148,28 @@ const diagnosticaDeepLinkResponse = zod_1.object({
|
|
|
148
148
|
deepLink: zod_1.string().url(),
|
|
149
149
|
}).or(zod_1.object({ forwardingRequired: zod_1.literal(false) }));
|
|
150
150
|
const coverageInfo = zod_1.object({
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
financerId: zod_1.number().nullable(),
|
|
152
|
+
defaultAffiliationId: zod_1.number().nullable(),
|
|
153
153
|
plan: zod_1.string().nullable(),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
identificationNumber: zod_1.string(),
|
|
155
|
+
credentialNumber: zod_1.string().nullable(),
|
|
156
|
+
lastName: zod_1.string().nullable(),
|
|
157
|
+
firstName: zod_1.string().nullable(),
|
|
158
|
+
birthdate: zod_1.date(),
|
|
159
|
+
financerPlanId: zod_1.number().nullable(),
|
|
160
|
+
gender,
|
|
161
161
|
brand: zod_1.number().nullable(),
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
holderIdentificationNumber: zod_1.string().nullable(),
|
|
163
|
+
copaymentValue: zod_1.number().nullable(),
|
|
164
|
+
mobilePhone: zod_1.string().nullable(),
|
|
165
|
+
company: zod_1.string().nullable(),
|
|
166
166
|
email: zod_1.string().email().nullable(),
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
dischargeDate: zod_1.date().nullable(),
|
|
168
|
+
leavingDate: zod_1.date().nullable(),
|
|
169
169
|
identificacion_tributaria: zod_1.string().nullable(),
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
deregistrationDate: zod_1.date().nullable(),
|
|
171
|
+
authorizationCode: zod_1.string().nullable(),
|
|
172
|
+
authorizationCodeExpiration: zod_1.date().nullable(),
|
|
173
173
|
}).nullable();
|
|
174
174
|
exports.doc24Schemas = {
|
|
175
175
|
identificationType,
|