sysone-api-mapper 1.0.176 → 1.0.178
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/dist/axiosInstance.d.ts +3 -3
- package/dist/axiosInstance.js +10 -10
- package/dist/index.d.ts +8 -8
- package/dist/index.js +20 -20
- package/dist/services.d.ts +2 -2
- package/dist/services.js +100 -100
- package/dist/servicesData.d.ts +143 -143
- package/dist/servicesData.js +999 -999
- package/dist/src/adapters/billingAdapter.d.ts +6 -6
- package/dist/src/adapters/billingAdapter.js +11 -11
- package/dist/src/adapters/claimsAdapter.d.ts +3 -3
- package/dist/src/adapters/claimsAdapter.js +8 -8
- package/dist/src/adapters/collectionAdapter.d.ts +6 -6
- package/dist/src/adapters/collectionAdapter.js +11 -11
- package/dist/src/adapters/createApiAdapter.d.ts +57 -57
- package/dist/src/adapters/createApiAdapter.js +20 -20
- package/dist/src/adapters/financeAdapter.d.ts +6 -6
- package/dist/src/adapters/financeAdapter.js +11 -11
- package/dist/src/adapters/locationAdapter.d.ts +6 -6
- package/dist/src/adapters/locationAdapter.js +11 -11
- package/dist/src/adapters/partyAdapter.d.ts +17 -17
- package/dist/src/adapters/partyAdapter.js +22 -22
- package/dist/src/adapters/policyAdapter.d.ts +11 -11
- package/dist/src/adapters/policyAdapter.js +16 -16
- package/dist/src/components/notificationToast.js +35 -35
- package/dist/src/contexts/actionsContext.d.ts +6 -6
- package/dist/src/contexts/actionsContext.js +78 -78
- package/dist/src/contexts/apiContext.d.ts +3 -3
- package/dist/src/contexts/apiContext.js +12 -12
- package/dist/src/contexts/translationContext.d.ts +6 -6
- package/dist/src/contexts/translationContext.js +54 -54
- package/dist/src/mapper/Mapper.d.ts +2 -2
- package/dist/src/mapper/Mapper.js +115 -115
- package/dist/src/mapper/endpointsConfig.d.ts +2986 -2918
- package/dist/src/mapper/endpointsConfig.js +1066 -1034
- package/dist/src/mapper/helpers/mappingHelpers.d.ts +3 -3
- package/dist/src/mapper/helpers/mappingHelpers.js +30 -30
- package/dist/src/mapper/modules/billing/index.d.ts +20 -20
- package/dist/src/mapper/modules/billing/index.js +136 -136
- package/dist/src/mapper/modules/claim/index.d.ts +3 -3
- package/dist/src/mapper/modules/claim/index.js +19 -19
- package/dist/src/mapper/modules/general/index.d.ts +4 -4
- package/dist/src/mapper/modules/general/index.js +11 -11
- package/dist/src/mapper/modules/party/index.d.ts +35 -29
- package/dist/src/mapper/modules/party/index.js +153 -131
- package/dist/src/mapper/modules/policy/index.d.ts +366 -366
- package/dist/src/mapper/modules/policy/index.js +592 -592
- package/dist/src/mapper/modules/quotation/index.d.ts +297 -297
- package/dist/src/mapper/modules/quotation/index.js +494 -494
- package/dist/src/mapper/modules/request/index.d.ts +42 -42
- package/dist/src/mapper/modules/request/index.js +65 -65
- package/dist/src/public/index.d.ts +3 -3
- package/dist/src/public/index.js +7 -7
- package/dist/src/server.d.ts +1 -1
- package/dist/src/server.js +18 -18
- package/package.json +1 -1
|
@@ -1,131 +1,153 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCoverages = exports.partySearch = exports.partySearchParams = exports.getProductsBySubsections_Request = exports.getGenders = exports.getMaritalStatuses = exports.getProvinces = exports.getCountries = exports.getIdentificationTypes = void 0;
|
|
4
|
-
const getIdentificationTypes = async (response) => {
|
|
5
|
-
const objectMapped = {
|
|
6
|
-
values: response.types.map(a => ({
|
|
7
|
-
code: a.code,
|
|
8
|
-
name: a.name,
|
|
9
|
-
})),
|
|
10
|
-
};
|
|
11
|
-
return objectMapped;
|
|
12
|
-
};
|
|
13
|
-
exports.getIdentificationTypes = getIdentificationTypes;
|
|
14
|
-
const getCountries = async (response) => {
|
|
15
|
-
const objectMapped = {
|
|
16
|
-
countries: response.countries.map(a => ({
|
|
17
|
-
code: a.code,
|
|
18
|
-
name: a.name,
|
|
19
|
-
areaCode: 'N/A'
|
|
20
|
-
})),
|
|
21
|
-
};
|
|
22
|
-
return objectMapped;
|
|
23
|
-
};
|
|
24
|
-
exports.getCountries = getCountries;
|
|
25
|
-
const getProvinces = async (response) => {
|
|
26
|
-
const objectMapped = {
|
|
27
|
-
provinces: response.provinces.map(a => ({
|
|
28
|
-
name: a.name,
|
|
29
|
-
code: a.code,
|
|
30
|
-
country: {
|
|
31
|
-
code: a.country.code,
|
|
32
|
-
name: a.country.name,
|
|
33
|
-
areaCode: "N/A"
|
|
34
|
-
}
|
|
35
|
-
})),
|
|
36
|
-
};
|
|
37
|
-
return objectMapped;
|
|
38
|
-
};
|
|
39
|
-
exports.getProvinces = getProvinces;
|
|
40
|
-
const getMaritalStatuses = async (response) => {
|
|
41
|
-
const objectMapped = {
|
|
42
|
-
values: response.statuses.map(a => ({
|
|
43
|
-
name: a.name,
|
|
44
|
-
code: a.code,
|
|
45
|
-
})),
|
|
46
|
-
};
|
|
47
|
-
return objectMapped;
|
|
48
|
-
};
|
|
49
|
-
exports.getMaritalStatuses = getMaritalStatuses;
|
|
50
|
-
const getGenders = async (response) => {
|
|
51
|
-
const objectMapped = {
|
|
52
|
-
values: response.genders.map(a => ({
|
|
53
|
-
name: a.name,
|
|
54
|
-
code: a.code,
|
|
55
|
-
})),
|
|
56
|
-
};
|
|
57
|
-
return objectMapped;
|
|
58
|
-
};
|
|
59
|
-
exports.getGenders = getGenders;
|
|
60
|
-
const getProductsBySubsections_Request = (params) => {
|
|
61
|
-
return {
|
|
62
|
-
subsectionCode: null
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
exports.getProductsBySubsections_Request = getProductsBySubsections_Request;
|
|
66
|
-
const partySearchParams = (params) => {
|
|
67
|
-
return {
|
|
68
|
-
firstName: params.firstName || params.name || null,
|
|
69
|
-
lastName: params.lastName || null,
|
|
70
|
-
identification: params.identificationValue || null,
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
exports.partySearchParams = partySearchParams;
|
|
74
|
-
const partySearch = (res) => {
|
|
75
|
-
var _a;
|
|
76
|
-
const objectMapped = {
|
|
77
|
-
values: (_a = res === null || res === void 0 ? void 0 : res.parties) === null || _a === void 0 ? void 0 : _a.map(party => {
|
|
78
|
-
var _a, _b, _c;
|
|
79
|
-
// Separación por doble espacio
|
|
80
|
-
const [lastNamePart, firstNamePart] = ((_a = party === null || party === void 0 ? void 0 : party.fullName) === null || _a === void 0 ? void 0 : _a.split(" ")) || [];
|
|
81
|
-
return {
|
|
82
|
-
activeDate: (party === null || party === void 0 ? void 0 : party.activeDate) || null,
|
|
83
|
-
partyCode: (party === null || party === void 0 ? void 0 : party.code) || null,
|
|
84
|
-
code: ((_b = party === null || party === void 0 ? void 0 : party.identification) === null || _b === void 0 ? void 0 : _b.value) || null,
|
|
85
|
-
firstName: firstNamePart || null,
|
|
86
|
-
lastName: lastNamePart || null,
|
|
87
|
-
identifications: {
|
|
88
|
-
values: [
|
|
89
|
-
{
|
|
90
|
-
default: true,
|
|
91
|
-
type: {
|
|
92
|
-
code: "",
|
|
93
|
-
name: "",
|
|
94
|
-
},
|
|
95
|
-
value: ((_c = party === null || party === void 0 ? void 0 : party.identification) === null || _c === void 0 ? void 0 : _c.value) || null,
|
|
96
|
-
}
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
birthDate: party === null || party === void 0 ? void 0 : party.birthDate,
|
|
100
|
-
insuredCode: party === null || party === void 0 ? void 0 : party.insuredCode
|
|
101
|
-
};
|
|
102
|
-
})
|
|
103
|
-
};
|
|
104
|
-
return objectMapped;
|
|
105
|
-
};
|
|
106
|
-
exports.partySearch = partySearch;
|
|
107
|
-
const getCoverages = (p) => {
|
|
108
|
-
var _a;
|
|
109
|
-
const objectMapped = {
|
|
110
|
-
coverages: (_a = p.coverages) === null || _a === void 0 ? void 0 : _a.map(c => {
|
|
111
|
-
var _a, _b, _c;
|
|
112
|
-
return ({
|
|
113
|
-
calculatorTypes: [],
|
|
114
|
-
active: c.active,
|
|
115
|
-
coverage: {
|
|
116
|
-
code: (_a = c.coverage) === null || _a === void 0 ? void 0 : _a.code,
|
|
117
|
-
name: (_b = c.coverage) === null || _b === void 0 ? void 0 : _b.description,
|
|
118
|
-
description: (_c = c.coverage) === null || _c === void 0 ? void 0 : _c.name,
|
|
119
|
-
},
|
|
120
|
-
coverageValues: c.coverageValues,
|
|
121
|
-
type: c.type,
|
|
122
|
-
deductibles: null,
|
|
123
|
-
requiredDeductible: null,
|
|
124
|
-
taxPlan: null,
|
|
125
|
-
wordings: []
|
|
126
|
-
});
|
|
127
|
-
})
|
|
128
|
-
};
|
|
129
|
-
return objectMapped;
|
|
130
|
-
};
|
|
131
|
-
exports.getCoverages = getCoverages;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSubsections = exports.getSections = exports.getCoverages = exports.partySearch = exports.partySearchParams = exports.getProductsBySubsections_Request = exports.getGenders = exports.getMaritalStatuses = exports.getProvinces = exports.getCountries = exports.getIdentificationTypes = void 0;
|
|
4
|
+
const getIdentificationTypes = async (response) => {
|
|
5
|
+
const objectMapped = {
|
|
6
|
+
values: response.types.map(a => ({
|
|
7
|
+
code: a.code,
|
|
8
|
+
name: a.name,
|
|
9
|
+
})),
|
|
10
|
+
};
|
|
11
|
+
return objectMapped;
|
|
12
|
+
};
|
|
13
|
+
exports.getIdentificationTypes = getIdentificationTypes;
|
|
14
|
+
const getCountries = async (response) => {
|
|
15
|
+
const objectMapped = {
|
|
16
|
+
countries: response.countries.map(a => ({
|
|
17
|
+
code: a.code,
|
|
18
|
+
name: a.name,
|
|
19
|
+
areaCode: 'N/A'
|
|
20
|
+
})),
|
|
21
|
+
};
|
|
22
|
+
return objectMapped;
|
|
23
|
+
};
|
|
24
|
+
exports.getCountries = getCountries;
|
|
25
|
+
const getProvinces = async (response) => {
|
|
26
|
+
const objectMapped = {
|
|
27
|
+
provinces: response.provinces.map(a => ({
|
|
28
|
+
name: a.name,
|
|
29
|
+
code: a.code,
|
|
30
|
+
country: {
|
|
31
|
+
code: a.country.code,
|
|
32
|
+
name: a.country.name,
|
|
33
|
+
areaCode: "N/A"
|
|
34
|
+
}
|
|
35
|
+
})),
|
|
36
|
+
};
|
|
37
|
+
return objectMapped;
|
|
38
|
+
};
|
|
39
|
+
exports.getProvinces = getProvinces;
|
|
40
|
+
const getMaritalStatuses = async (response) => {
|
|
41
|
+
const objectMapped = {
|
|
42
|
+
values: response.statuses.map(a => ({
|
|
43
|
+
name: a.name,
|
|
44
|
+
code: a.code,
|
|
45
|
+
})),
|
|
46
|
+
};
|
|
47
|
+
return objectMapped;
|
|
48
|
+
};
|
|
49
|
+
exports.getMaritalStatuses = getMaritalStatuses;
|
|
50
|
+
const getGenders = async (response) => {
|
|
51
|
+
const objectMapped = {
|
|
52
|
+
values: response.genders.map(a => ({
|
|
53
|
+
name: a.name,
|
|
54
|
+
code: a.code,
|
|
55
|
+
})),
|
|
56
|
+
};
|
|
57
|
+
return objectMapped;
|
|
58
|
+
};
|
|
59
|
+
exports.getGenders = getGenders;
|
|
60
|
+
const getProductsBySubsections_Request = (params) => {
|
|
61
|
+
return {
|
|
62
|
+
subsectionCode: null
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
exports.getProductsBySubsections_Request = getProductsBySubsections_Request;
|
|
66
|
+
const partySearchParams = (params) => {
|
|
67
|
+
return {
|
|
68
|
+
firstName: params.firstName || params.name || null,
|
|
69
|
+
lastName: params.lastName || null,
|
|
70
|
+
identification: params.identificationValue || null,
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
exports.partySearchParams = partySearchParams;
|
|
74
|
+
const partySearch = (res) => {
|
|
75
|
+
var _a;
|
|
76
|
+
const objectMapped = {
|
|
77
|
+
values: (_a = res === null || res === void 0 ? void 0 : res.parties) === null || _a === void 0 ? void 0 : _a.map(party => {
|
|
78
|
+
var _a, _b, _c;
|
|
79
|
+
// Separación por doble espacio
|
|
80
|
+
const [lastNamePart, firstNamePart] = ((_a = party === null || party === void 0 ? void 0 : party.fullName) === null || _a === void 0 ? void 0 : _a.split(" ")) || [];
|
|
81
|
+
return {
|
|
82
|
+
activeDate: (party === null || party === void 0 ? void 0 : party.activeDate) || null,
|
|
83
|
+
partyCode: (party === null || party === void 0 ? void 0 : party.code) || null,
|
|
84
|
+
code: ((_b = party === null || party === void 0 ? void 0 : party.identification) === null || _b === void 0 ? void 0 : _b.value) || null,
|
|
85
|
+
firstName: firstNamePart || null,
|
|
86
|
+
lastName: lastNamePart || null,
|
|
87
|
+
identifications: {
|
|
88
|
+
values: [
|
|
89
|
+
{
|
|
90
|
+
default: true,
|
|
91
|
+
type: {
|
|
92
|
+
code: "",
|
|
93
|
+
name: "",
|
|
94
|
+
},
|
|
95
|
+
value: ((_c = party === null || party === void 0 ? void 0 : party.identification) === null || _c === void 0 ? void 0 : _c.value) || null,
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
birthDate: party === null || party === void 0 ? void 0 : party.birthDate,
|
|
100
|
+
insuredCode: party === null || party === void 0 ? void 0 : party.insuredCode
|
|
101
|
+
};
|
|
102
|
+
})
|
|
103
|
+
};
|
|
104
|
+
return objectMapped;
|
|
105
|
+
};
|
|
106
|
+
exports.partySearch = partySearch;
|
|
107
|
+
const getCoverages = (p) => {
|
|
108
|
+
var _a;
|
|
109
|
+
const objectMapped = {
|
|
110
|
+
coverages: (_a = p.coverages) === null || _a === void 0 ? void 0 : _a.map(c => {
|
|
111
|
+
var _a, _b, _c;
|
|
112
|
+
return ({
|
|
113
|
+
calculatorTypes: [],
|
|
114
|
+
active: c.active,
|
|
115
|
+
coverage: {
|
|
116
|
+
code: (_a = c.coverage) === null || _a === void 0 ? void 0 : _a.code,
|
|
117
|
+
name: (_b = c.coverage) === null || _b === void 0 ? void 0 : _b.description,
|
|
118
|
+
description: (_c = c.coverage) === null || _c === void 0 ? void 0 : _c.name,
|
|
119
|
+
},
|
|
120
|
+
coverageValues: c.coverageValues,
|
|
121
|
+
type: c.type,
|
|
122
|
+
deductibles: null,
|
|
123
|
+
requiredDeductible: null,
|
|
124
|
+
taxPlan: null,
|
|
125
|
+
wordings: []
|
|
126
|
+
});
|
|
127
|
+
})
|
|
128
|
+
};
|
|
129
|
+
return objectMapped;
|
|
130
|
+
};
|
|
131
|
+
exports.getCoverages = getCoverages;
|
|
132
|
+
const getSections = (res) => {
|
|
133
|
+
var _a;
|
|
134
|
+
const objectMapped = {
|
|
135
|
+
sections: (_a = res.subsections) === null || _a === void 0 ? void 0 : _a.map((s) => ({
|
|
136
|
+
code: s.code,
|
|
137
|
+
name: s.name,
|
|
138
|
+
}))
|
|
139
|
+
};
|
|
140
|
+
return objectMapped;
|
|
141
|
+
};
|
|
142
|
+
exports.getSections = getSections;
|
|
143
|
+
const getSubsections = (res) => {
|
|
144
|
+
var _a;
|
|
145
|
+
const objectMapped = {
|
|
146
|
+
subSections: (_a = res.subsections) === null || _a === void 0 ? void 0 : _a.map((s) => ({
|
|
147
|
+
code: s.code,
|
|
148
|
+
name: s.name,
|
|
149
|
+
}))
|
|
150
|
+
};
|
|
151
|
+
return objectMapped;
|
|
152
|
+
};
|
|
153
|
+
exports.getSubsections = getSubsections;
|