sysone-api-mapper 1.0.171 → 1.0.173

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.
Files changed (56) hide show
  1. package/dist/axiosInstance.d.ts +3 -3
  2. package/dist/axiosInstance.js +10 -10
  3. package/dist/index.d.ts +8 -8
  4. package/dist/index.js +20 -20
  5. package/dist/services.d.ts +2 -2
  6. package/dist/services.js +100 -100
  7. package/dist/servicesData.d.ts +143 -143
  8. package/dist/servicesData.js +999 -999
  9. package/dist/src/adapters/billingAdapter.d.ts +6 -6
  10. package/dist/src/adapters/billingAdapter.js +11 -11
  11. package/dist/src/adapters/claimsAdapter.d.ts +3 -3
  12. package/dist/src/adapters/claimsAdapter.js +8 -8
  13. package/dist/src/adapters/collectionAdapter.d.ts +6 -6
  14. package/dist/src/adapters/collectionAdapter.js +11 -11
  15. package/dist/src/adapters/createApiAdapter.d.ts +57 -55
  16. package/dist/src/adapters/createApiAdapter.js +20 -20
  17. package/dist/src/adapters/financeAdapter.d.ts +6 -6
  18. package/dist/src/adapters/financeAdapter.js +11 -11
  19. package/dist/src/adapters/locationAdapter.d.ts +6 -6
  20. package/dist/src/adapters/locationAdapter.js +11 -11
  21. package/dist/src/adapters/partyAdapter.d.ts +17 -15
  22. package/dist/src/adapters/partyAdapter.js +22 -20
  23. package/dist/src/adapters/policyAdapter.d.ts +11 -11
  24. package/dist/src/adapters/policyAdapter.js +16 -16
  25. package/dist/src/components/notificationToast.js +35 -35
  26. package/dist/src/contexts/actionsContext.d.ts +6 -6
  27. package/dist/src/contexts/actionsContext.js +78 -78
  28. package/dist/src/contexts/apiContext.d.ts +3 -3
  29. package/dist/src/contexts/apiContext.js +12 -12
  30. package/dist/src/contexts/translationContext.d.ts +6 -6
  31. package/dist/src/contexts/translationContext.js +54 -54
  32. package/dist/src/mapper/Mapper.d.ts +2 -2
  33. package/dist/src/mapper/Mapper.js +115 -115
  34. package/dist/src/mapper/endpointsConfig.d.ts +2918 -2884
  35. package/dist/src/mapper/endpointsConfig.js +1034 -1016
  36. package/dist/src/mapper/helpers/mappingHelpers.d.ts +3 -3
  37. package/dist/src/mapper/helpers/mappingHelpers.js +30 -30
  38. package/dist/src/mapper/modules/billing/index.d.ts +20 -20
  39. package/dist/src/mapper/modules/billing/index.js +136 -136
  40. package/dist/src/mapper/modules/claim/index.d.ts +3 -3
  41. package/dist/src/mapper/modules/claim/index.js +19 -19
  42. package/dist/src/mapper/modules/general/index.d.ts +4 -4
  43. package/dist/src/mapper/modules/general/index.js +11 -11
  44. package/dist/src/mapper/modules/party/index.d.ts +29 -29
  45. package/dist/src/mapper/modules/party/index.js +131 -131
  46. package/dist/src/mapper/modules/policy/index.d.ts +366 -366
  47. package/dist/src/mapper/modules/policy/index.js +592 -592
  48. package/dist/src/mapper/modules/quotation/index.d.ts +297 -297
  49. package/dist/src/mapper/modules/quotation/index.js +494 -494
  50. package/dist/src/mapper/modules/request/index.d.ts +42 -42
  51. package/dist/src/mapper/modules/request/index.js +65 -65
  52. package/dist/src/public/index.d.ts +3 -3
  53. package/dist/src/public/index.js +7 -7
  54. package/dist/src/server.d.ts +1 -1
  55. package/dist/src/server.js +18 -18
  56. package/package.json +1 -1
@@ -1,131 +1,131 @@
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.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;