sysone-api-mapper 1.0.172 → 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 -57
  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 -17
  22. package/dist/src/adapters/partyAdapter.js +22 -22
  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 -2918
  35. package/dist/src/mapper/endpointsConfig.js +1034 -1034
  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,3 +1,3 @@
1
- export function mapPaymentFrequency(frequencyCode: any): any;
2
- export function mapProductCode(productCode: any): any;
3
- export function mapProvinceCode(provinceCode: any): any;
1
+ export function mapPaymentFrequency(frequencyCode: any): any;
2
+ export function mapProductCode(productCode: any): any;
3
+ export function mapProvinceCode(provinceCode: any): any;
@@ -1,30 +1,30 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mapProvinceCode = exports.mapProductCode = exports.mapPaymentFrequency = void 0;
4
- const mapPaymentFrequency = (frequencyCode) => {
5
- const mapping = {
6
- 'ANNUAL': 6,
7
- 'MONTHLY': 1,
8
- 'QUARTERLY': 3,
9
- 'SEMI_ANNUAL': 5
10
- };
11
- return mapping[frequencyCode] || 6;
12
- };
13
- exports.mapPaymentFrequency = mapPaymentFrequency;
14
- const mapProductCode = (productCode) => {
15
- const mapping = {
16
- 'SC_SC': 534,
17
- 'VI_VI_VIDA_IND_1': 120,
18
- 'OTRO_CODIGO': 0,
19
- };
20
- return mapping[productCode] || 404;
21
- };
22
- exports.mapProductCode = mapProductCode;
23
- const mapProvinceCode = (provinceCode) => {
24
- const mapping = {
25
- 'BS_AS': 1,
26
- 'CABA': 2,
27
- };
28
- return mapping[provinceCode] || 0;
29
- };
30
- exports.mapProvinceCode = mapProvinceCode;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapProvinceCode = exports.mapProductCode = exports.mapPaymentFrequency = void 0;
4
+ const mapPaymentFrequency = (frequencyCode) => {
5
+ const mapping = {
6
+ 'ANNUAL': 6,
7
+ 'MONTHLY': 1,
8
+ 'QUARTERLY': 3,
9
+ 'SEMI_ANNUAL': 5
10
+ };
11
+ return mapping[frequencyCode] || 6;
12
+ };
13
+ exports.mapPaymentFrequency = mapPaymentFrequency;
14
+ const mapProductCode = (productCode) => {
15
+ const mapping = {
16
+ 'SC_SC': 534,
17
+ 'VI_VI_VIDA_IND_1': 120,
18
+ 'OTRO_CODIGO': 0,
19
+ };
20
+ return mapping[productCode] || 404;
21
+ };
22
+ exports.mapProductCode = mapProductCode;
23
+ const mapProvinceCode = (provinceCode) => {
24
+ const mapping = {
25
+ 'BS_AS': 1,
26
+ 'CABA': 2,
27
+ };
28
+ return mapping[provinceCode] || 0;
29
+ };
30
+ exports.mapProvinceCode = mapProvinceCode;
@@ -1,20 +1,20 @@
1
- export function getBillingsParams(i: any): {};
2
- export function getBillingsResponse(data: any): {
3
- values: any;
4
- total: any;
5
- };
6
- export function getDebtorsResponse(data: any): {
7
- values: any;
8
- total: any;
9
- };
10
- export function getCollecionsResponse(data: any): {
11
- values: any;
12
- total: any;
13
- };
14
- export function getBillingTypeResponse(): {
15
- types: {
16
- name: string;
17
- code: string;
18
- operator: null;
19
- }[];
20
- };
1
+ export function getBillingsParams(i: any): {};
2
+ export function getBillingsResponse(data: any): {
3
+ values: any;
4
+ total: any;
5
+ };
6
+ export function getDebtorsResponse(data: any): {
7
+ values: any;
8
+ total: any;
9
+ };
10
+ export function getCollecionsResponse(data: any): {
11
+ values: any;
12
+ total: any;
13
+ };
14
+ export function getBillingTypeResponse(): {
15
+ types: {
16
+ name: string;
17
+ code: string;
18
+ operator: null;
19
+ }[];
20
+ };
@@ -1,136 +1,136 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBillingTypeResponse = exports.getCollecionsResponse = exports.getDebtorsResponse = exports.getBillingsResponse = exports.getBillingsParams = void 0;
4
- const getBillingsParams = (i) => {
5
- return {};
6
- };
7
- exports.getBillingsParams = getBillingsParams;
8
- const getBillingsResponse = (data) => {
9
- const values = data.paymentsEndorsement.flatMap((endorsement, index) => {
10
- return endorsement.payments.map((payment, pIndex) => {
11
- var _a;
12
- return ({
13
- id: `${index + 1}-${pIndex + 1}`, // No tiene ID propio, uso el index + 1
14
- code: `${index + 1}-${pIndex + 1}`, // No tiene código propio, uso el index + 1
15
- billingNumber: payment.installmentNumber,
16
- billingDate: payment.paymentDate,
17
- billingExpirationDate: (_a = payment.expiration) !== null && _a !== void 0 ? _a : payment.expirationDate,
18
- totalAmount: payment.amount,
19
- remainingAmount: payment.debt,
20
- paymentStatus: {
21
- code: payment.amount < 0 ? "UNPAID" : "PAID", // ---- Si el monto es negativo esta pago???
22
- name: payment.amount < 0 ? "Sin Pagar" : "Pagado" // ---- Si el monto es negativo esta pago???
23
- },
24
- status: {}, // ----- NO HAY STATUS
25
- name: "Sin nombre del pagador", // ----- NO HAY NOMBRE DEL PAGADOR
26
- policy: {}, // ----- NO HAY DATOS DE POLIZA
27
- billingValuesGrouping: [
28
- {
29
- type: { name: "Prima", code: "PRIME" },
30
- value: payment.amount // ----- SOLO LLEGA LA PRIMA
31
- }
32
- ],
33
- type: {
34
- name: "Factura",
35
- code: "INVOICE",
36
- },
37
- subtype: {},
38
- exchangeRate: null,
39
- billingDateFrom: "N/A",
40
- billingDateTo: "N/A",
41
- invoiceBarcode: payment.invoiceBarcode || null
42
- });
43
- });
44
- });
45
- return {
46
- values,
47
- total: values.length
48
- };
49
- };
50
- exports.getBillingsResponse = getBillingsResponse;
51
- const getDebtorsResponse = (data) => {
52
- const values = data.paymentsEndorsement
53
- .flatMap((endorsement, index) => {
54
- return endorsement.payments.map((payment, pIndex) => {
55
- var _a;
56
- return ({
57
- id: `${index + 1}-${pIndex + 1}`,
58
- code: `${index + 1}-${pIndex + 1}`,
59
- billingNumber: payment.installmentNumber,
60
- billingDate: payment.paymentDate,
61
- billingExpirationDate: (_a = payment.expiration) !== null && _a !== void 0 ? _a : payment.expirationDate,
62
- totalAmount: payment.amount,
63
- remainingAmount: payment.debt,
64
- paymentStatus: {
65
- code: payment.debt < 0 ? "UNPAID" : "PAID",
66
- name: payment.debt < 0 ? "Sin Pagar" : "Pagado"
67
- },
68
- status: {},
69
- name: "Sin nombre del pagador",
70
- policy: {},
71
- billingValuesGrouping: [
72
- {
73
- type: { name: "Prima", code: "PRIME" },
74
- value: payment.amount
75
- }
76
- ],
77
- type: {
78
- name: "Factura",
79
- code: "INVOICE",
80
- },
81
- subtype: {},
82
- exchangeRate: null,
83
- billingDateFrom: "N/A",
84
- billingDateTo: "N/A",
85
- invoiceBarcode: payment.invoiceBarcode || null
86
- });
87
- });
88
- })
89
- .filter(payment => (payment === null || payment === void 0 ? void 0 : payment.debt) > 0 || (payment === null || payment === void 0 ? void 0 : payment.remainingAmount) > 0);
90
- return {
91
- values,
92
- total: values.length
93
- };
94
- };
95
- exports.getDebtorsResponse = getDebtorsResponse;
96
- const getCollecionsResponse = (data) => {
97
- const values = data.paymentsEndorsement.flatMap((endorsement, index) => {
98
- return endorsement.payments.map((payment, pIndex) => ({
99
- code: `${index + 1}-${pIndex + 1}`,
100
- amount: payment.amount,
101
- applyAmount: payment.debt,
102
- collectionDate: payment.paymentDate,
103
- collectionNumber: payment.installmentNumber,
104
- currency: {
105
- name: "Peso Argentino",
106
- code: "PESO_ARG",
107
- mnemonic: "ARS",
108
- symbol: "$"
109
- },
110
- name: "Sin nombre del pagador",
111
- paymentType: null,
112
- policy: {},
113
- status: {},
114
- invoiceBarcode: payment.invoiceBarcode || null,
115
- rejectionReason: payment.rejectionReason || null,
116
- expirationDate: payment.expirationDate || null,
117
- }));
118
- });
119
- return {
120
- values,
121
- total: values.length
122
- };
123
- };
124
- exports.getCollecionsResponse = getCollecionsResponse;
125
- const getBillingTypeResponse = () => {
126
- return {
127
- types: [
128
- {
129
- name: "Factura",
130
- code: "INVOICE",
131
- operator: null
132
- },
133
- ]
134
- };
135
- };
136
- exports.getBillingTypeResponse = getBillingTypeResponse;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBillingTypeResponse = exports.getCollecionsResponse = exports.getDebtorsResponse = exports.getBillingsResponse = exports.getBillingsParams = void 0;
4
+ const getBillingsParams = (i) => {
5
+ return {};
6
+ };
7
+ exports.getBillingsParams = getBillingsParams;
8
+ const getBillingsResponse = (data) => {
9
+ const values = data.paymentsEndorsement.flatMap((endorsement, index) => {
10
+ return endorsement.payments.map((payment, pIndex) => {
11
+ var _a;
12
+ return ({
13
+ id: `${index + 1}-${pIndex + 1}`, // No tiene ID propio, uso el index + 1
14
+ code: `${index + 1}-${pIndex + 1}`, // No tiene código propio, uso el index + 1
15
+ billingNumber: payment.installmentNumber,
16
+ billingDate: payment.paymentDate,
17
+ billingExpirationDate: (_a = payment.expiration) !== null && _a !== void 0 ? _a : payment.expirationDate,
18
+ totalAmount: payment.amount,
19
+ remainingAmount: payment.debt,
20
+ paymentStatus: {
21
+ code: payment.amount < 0 ? "UNPAID" : "PAID", // ---- Si el monto es negativo esta pago???
22
+ name: payment.amount < 0 ? "Sin Pagar" : "Pagado" // ---- Si el monto es negativo esta pago???
23
+ },
24
+ status: {}, // ----- NO HAY STATUS
25
+ name: "Sin nombre del pagador", // ----- NO HAY NOMBRE DEL PAGADOR
26
+ policy: {}, // ----- NO HAY DATOS DE POLIZA
27
+ billingValuesGrouping: [
28
+ {
29
+ type: { name: "Prima", code: "PRIME" },
30
+ value: payment.amount // ----- SOLO LLEGA LA PRIMA
31
+ }
32
+ ],
33
+ type: {
34
+ name: "Factura",
35
+ code: "INVOICE",
36
+ },
37
+ subtype: {},
38
+ exchangeRate: null,
39
+ billingDateFrom: "N/A",
40
+ billingDateTo: "N/A",
41
+ invoiceBarcode: payment.invoiceBarcode || null
42
+ });
43
+ });
44
+ });
45
+ return {
46
+ values,
47
+ total: values.length
48
+ };
49
+ };
50
+ exports.getBillingsResponse = getBillingsResponse;
51
+ const getDebtorsResponse = (data) => {
52
+ const values = data.paymentsEndorsement
53
+ .flatMap((endorsement, index) => {
54
+ return endorsement.payments.map((payment, pIndex) => {
55
+ var _a;
56
+ return ({
57
+ id: `${index + 1}-${pIndex + 1}`,
58
+ code: `${index + 1}-${pIndex + 1}`,
59
+ billingNumber: payment.installmentNumber,
60
+ billingDate: payment.paymentDate,
61
+ billingExpirationDate: (_a = payment.expiration) !== null && _a !== void 0 ? _a : payment.expirationDate,
62
+ totalAmount: payment.amount,
63
+ remainingAmount: payment.debt,
64
+ paymentStatus: {
65
+ code: payment.debt < 0 ? "UNPAID" : "PAID",
66
+ name: payment.debt < 0 ? "Sin Pagar" : "Pagado"
67
+ },
68
+ status: {},
69
+ name: "Sin nombre del pagador",
70
+ policy: {},
71
+ billingValuesGrouping: [
72
+ {
73
+ type: { name: "Prima", code: "PRIME" },
74
+ value: payment.amount
75
+ }
76
+ ],
77
+ type: {
78
+ name: "Factura",
79
+ code: "INVOICE",
80
+ },
81
+ subtype: {},
82
+ exchangeRate: null,
83
+ billingDateFrom: "N/A",
84
+ billingDateTo: "N/A",
85
+ invoiceBarcode: payment.invoiceBarcode || null
86
+ });
87
+ });
88
+ })
89
+ .filter(payment => (payment === null || payment === void 0 ? void 0 : payment.debt) > 0 || (payment === null || payment === void 0 ? void 0 : payment.remainingAmount) > 0);
90
+ return {
91
+ values,
92
+ total: values.length
93
+ };
94
+ };
95
+ exports.getDebtorsResponse = getDebtorsResponse;
96
+ const getCollecionsResponse = (data) => {
97
+ const values = data.paymentsEndorsement.flatMap((endorsement, index) => {
98
+ return endorsement.payments.map((payment, pIndex) => ({
99
+ code: `${index + 1}-${pIndex + 1}`,
100
+ amount: payment.amount,
101
+ applyAmount: payment.debt,
102
+ collectionDate: payment.paymentDate,
103
+ collectionNumber: payment.installmentNumber,
104
+ currency: {
105
+ name: "Peso Argentino",
106
+ code: "PESO_ARG",
107
+ mnemonic: "ARS",
108
+ symbol: "$"
109
+ },
110
+ name: "Sin nombre del pagador",
111
+ paymentType: null,
112
+ policy: {},
113
+ status: {},
114
+ invoiceBarcode: payment.invoiceBarcode || null,
115
+ rejectionReason: payment.rejectionReason || null,
116
+ expirationDate: payment.expirationDate || null,
117
+ }));
118
+ });
119
+ return {
120
+ values,
121
+ total: values.length
122
+ };
123
+ };
124
+ exports.getCollecionsResponse = getCollecionsResponse;
125
+ const getBillingTypeResponse = () => {
126
+ return {
127
+ types: [
128
+ {
129
+ name: "Factura",
130
+ code: "INVOICE",
131
+ operator: null
132
+ },
133
+ ]
134
+ };
135
+ };
136
+ exports.getBillingTypeResponse = getBillingTypeResponse;
@@ -1,3 +1,3 @@
1
- export function getClaims_CNP(response: any): Promise<{
2
- values: any;
3
- }>;
1
+ export function getClaims_CNP(response: any): Promise<{
2
+ values: any;
3
+ }>;
@@ -1,19 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getClaims_CNP = void 0;
4
- const getClaims_CNP = async (response) => {
5
- var _a;
6
- const objectMapped = {
7
- values: (_a = response === null || response === void 0 ? void 0 : response.claims) === null || _a === void 0 ? void 0 : _a.map((claim) => ({
8
- claimNumber: claim.claimNumber.toString(),
9
- policyNumber: claim.policyNumber,
10
- creationDate: claim.claimDate,
11
- status: {
12
- name: claim.status,
13
- code: "N/A"
14
- }
15
- })),
16
- };
17
- return objectMapped;
18
- };
19
- exports.getClaims_CNP = getClaims_CNP;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getClaims_CNP = void 0;
4
+ const getClaims_CNP = async (response) => {
5
+ var _a;
6
+ const objectMapped = {
7
+ values: (_a = response === null || response === void 0 ? void 0 : response.claims) === null || _a === void 0 ? void 0 : _a.map((claim) => ({
8
+ claimNumber: claim.claimNumber.toString(),
9
+ policyNumber: claim.policyNumber,
10
+ creationDate: claim.claimDate,
11
+ status: {
12
+ name: claim.status,
13
+ code: "N/A"
14
+ }
15
+ })),
16
+ };
17
+ return objectMapped;
18
+ };
19
+ exports.getClaims_CNP = getClaims_CNP;
@@ -1,4 +1,4 @@
1
- export function getModules(): void;
2
- export function getModules_Request(params: any): {
3
- roles: any;
4
- };
1
+ export function getModules(): void;
2
+ export function getModules_Request(params: any): {
3
+ roles: any;
4
+ };
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getModules_Request = exports.getModules = void 0;
4
- const getModules = () => { };
5
- exports.getModules = getModules;
6
- const getModules_Request = (params) => {
7
- return {
8
- roles: params.roles,
9
- };
10
- };
11
- exports.getModules_Request = getModules_Request;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getModules_Request = exports.getModules = void 0;
4
+ const getModules = () => { };
5
+ exports.getModules = getModules;
6
+ const getModules_Request = (params) => {
7
+ return {
8
+ roles: params.roles,
9
+ };
10
+ };
11
+ exports.getModules_Request = getModules_Request;
@@ -1,29 +1,29 @@
1
- export function getIdentificationTypes(response: any): Promise<{
2
- values: any;
3
- }>;
4
- export function getCountries(response: any): Promise<{
5
- countries: any;
6
- }>;
7
- export function getProvinces(response: any): Promise<{
8
- provinces: any;
9
- }>;
10
- export function getMaritalStatuses(response: any): Promise<{
11
- values: any;
12
- }>;
13
- export function getGenders(response: any): Promise<{
14
- values: any;
15
- }>;
16
- export function getProductsBySubsections_Request(params: any): {
17
- subsectionCode: null;
18
- };
19
- export function partySearchParams(params: any): {
20
- firstName: any;
21
- lastName: any;
22
- identification: any;
23
- };
24
- export function partySearch(res: any): {
25
- values: any;
26
- };
27
- export function getCoverages(p: any): {
28
- coverages: any;
29
- };
1
+ export function getIdentificationTypes(response: any): Promise<{
2
+ values: any;
3
+ }>;
4
+ export function getCountries(response: any): Promise<{
5
+ countries: any;
6
+ }>;
7
+ export function getProvinces(response: any): Promise<{
8
+ provinces: any;
9
+ }>;
10
+ export function getMaritalStatuses(response: any): Promise<{
11
+ values: any;
12
+ }>;
13
+ export function getGenders(response: any): Promise<{
14
+ values: any;
15
+ }>;
16
+ export function getProductsBySubsections_Request(params: any): {
17
+ subsectionCode: null;
18
+ };
19
+ export function partySearchParams(params: any): {
20
+ firstName: any;
21
+ lastName: any;
22
+ identification: any;
23
+ };
24
+ export function partySearch(res: any): {
25
+ values: any;
26
+ };
27
+ export function getCoverages(p: any): {
28
+ coverages: any;
29
+ };