sysone-api-mapper 1.0.144 → 1.0.146
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/config/dist/index.js +24 -36
- package/config/dist/index.ts +319 -0
- package/config/webpack.dev.js +7 -2
- package/config/webpack.prod.js +7 -2
- package/dist/axiosInstance.d.ts +2 -0
- package/dist/index.d.ts +8 -0
- package/dist/services.d.ts +2 -0
- package/dist/servicesData.d.ts +143 -0
- package/dist/src/adapters/createApiAdapter.d.ts +16 -0
- package/dist/src/adapters/financeAdapter.d.ts +3 -0
- package/dist/src/adapters/locationAdapter.d.ts +4 -0
- package/dist/src/adapters/partyAdapter.d.ts +6 -0
- package/dist/src/components/notificationToast.d.ts +0 -0
- package/dist/src/contexts/actionsContext.d.ts +5 -0
- package/dist/src/contexts/apiContext.d.ts +2 -0
- package/dist/src/contexts/translationContext.d.ts +5 -0
- package/dist/src/mapper/Mapper.d.ts +2 -0
- package/dist/src/mapper/endpointsConfig.d.ts +2577 -0
- package/dist/src/mapper/helpers/mappingHelpers.d.ts +3 -0
- package/dist/src/mapper/modules/billing/index.d.ts +20 -0
- package/dist/src/mapper/modules/claim/index.d.ts +3 -0
- package/dist/src/mapper/modules/general/index.d.ts +4 -0
- package/dist/src/mapper/modules/party/index.d.ts +29 -0
- package/dist/src/mapper/modules/policy/index.d.ts +366 -0
- package/dist/src/mapper/modules/quotation/index.d.ts +297 -0
- package/dist/src/mapper/modules/request/index.d.ts +42 -0
- package/dist/src/public/index.d.ts +3 -0
- package/dist/src/server.d.ts +1 -0
- package/index.d.ts +5 -0
- package/{index.js → index.ts} +4 -1
- package/package.json +7 -3
- package/src/adapters/createApiAdapter.ts +29 -0
- package/src/contexts/apiContext.js +3 -3
- package/tsconfig.json +9 -0
- package/src/adapters/createApiAdapter.js +0 -10
- package/src/types/sysone-api-mapper.d.ts +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export function getRequest_Params(i: any): {
|
|
2
|
+
number: any;
|
|
3
|
+
statusCode: any;
|
|
4
|
+
productCode: any;
|
|
5
|
+
from: any;
|
|
6
|
+
to: any;
|
|
7
|
+
};
|
|
8
|
+
export function getRequestDetail(data: any): {
|
|
9
|
+
code: any;
|
|
10
|
+
commercialStructure: null;
|
|
11
|
+
creationDate: any;
|
|
12
|
+
email: any;
|
|
13
|
+
expirationDate: any;
|
|
14
|
+
holder: any;
|
|
15
|
+
intermediary: null;
|
|
16
|
+
legalConstraint: null;
|
|
17
|
+
number: any;
|
|
18
|
+
paymentMethods: {
|
|
19
|
+
payment: any;
|
|
20
|
+
};
|
|
21
|
+
paymentFrequency: any;
|
|
22
|
+
phone: any;
|
|
23
|
+
product: any;
|
|
24
|
+
productSegment: null;
|
|
25
|
+
quotationNumber: any;
|
|
26
|
+
quotationCode: any;
|
|
27
|
+
requiresBilling: null;
|
|
28
|
+
status: any;
|
|
29
|
+
validity: null;
|
|
30
|
+
values: {
|
|
31
|
+
risks: {
|
|
32
|
+
coverages: any;
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
vigencyDateFrom: null;
|
|
36
|
+
wordingPlan: null;
|
|
37
|
+
holderPep: any;
|
|
38
|
+
holderSoi: any;
|
|
39
|
+
insured: any;
|
|
40
|
+
questionnaires: any;
|
|
41
|
+
spouse: any;
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.d.ts
ADDED
package/{index.js → index.ts}
RENAMED
|
@@ -4,6 +4,8 @@ import axiosInstance from "./axiosInstance";
|
|
|
4
4
|
import { configureApiMapper, apiMapper } from "./src/mapper/Mapper";
|
|
5
5
|
import { ApiContext, useApi } from "./src/contexts/apiContext";
|
|
6
6
|
import { createApiAdapter } from "./src/adapters/createApiAdapter"
|
|
7
|
+
import type { Api } from './src/adapters/createApiAdapter';
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
export {
|
|
9
11
|
apiCall,
|
|
@@ -13,5 +15,6 @@ export {
|
|
|
13
15
|
configureApiMapper,
|
|
14
16
|
ApiContext,
|
|
15
17
|
useApi,
|
|
16
|
-
createApiAdapter
|
|
18
|
+
createApiAdapter,
|
|
19
|
+
Api
|
|
17
20
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sysone-api-mapper",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.146",
|
|
4
4
|
"description": "Paquete mapper para portal de productores",
|
|
5
|
-
"main": "src/index.
|
|
5
|
+
"main": "src/index.ts",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"start": "node src/server.js",
|
|
8
9
|
"dev": "nodemon src/server.js",
|
|
9
10
|
"build": "webpack --config config/webpack.dev.js",
|
|
11
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
10
12
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
13
|
},
|
|
12
14
|
"keywords": [],
|
|
@@ -39,7 +41,9 @@
|
|
|
39
41
|
"jest": "^29.7.0",
|
|
40
42
|
"nodemon": "^2.0.22",
|
|
41
43
|
"os-browserify": "^0.3.0",
|
|
42
|
-
"path-browserify": "^1.0.1"
|
|
44
|
+
"path-browserify": "^1.0.1",
|
|
45
|
+
"ts-loader": "^9.5.7",
|
|
46
|
+
"typescript": "^6.0.2"
|
|
43
47
|
},
|
|
44
48
|
"repository": {
|
|
45
49
|
"type": "git",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { financeAdapter } from "./financeAdapter";
|
|
2
|
+
import { locationAdapter } from "./locationAdapter";
|
|
3
|
+
import { partyAdapter } from "./partyAdapter";
|
|
4
|
+
|
|
5
|
+
export interface Api {
|
|
6
|
+
finance: {
|
|
7
|
+
getCurrencies: () => Promise<any>;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
party: {
|
|
11
|
+
getGenders: () => Promise<any>,
|
|
12
|
+
getMaritalStatus: () => Promise<any>,
|
|
13
|
+
getActivity: () => Promise<any>,
|
|
14
|
+
getIdentificationTypes: (country: string) => Promise<any>,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
location: {
|
|
18
|
+
getCountries: () => Promise<any>;
|
|
19
|
+
getProvinces: (country: string) => Promise<any>;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const createApiAdapter = (tenant = 'default'): Api => ({
|
|
24
|
+
finance: financeAdapter(tenant),
|
|
25
|
+
party: partyAdapter(tenant),
|
|
26
|
+
location: locationAdapter(tenant)
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
|
|
@@ -3,7 +3,7 @@ import { createContext, useContext } from 'react';
|
|
|
3
3
|
export const ApiContext = createContext(null);
|
|
4
4
|
|
|
5
5
|
export const useApi = () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const ctx = useContext(ApiContext);
|
|
7
|
+
if (!ctx) throw new Error("ApiContext not found");
|
|
8
|
+
return ctx;
|
|
9
9
|
};
|
package/tsconfig.json
ADDED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { apiMapper } from "../mapper/Mapper";
|
|
2
|
-
import { financeAdapter } from "./financeAdapter";
|
|
3
|
-
import { locationAdapter } from "./locationAdapter";
|
|
4
|
-
import { partyAdapter } from "./partyAdapter";
|
|
5
|
-
|
|
6
|
-
export const createApiAdapter = (tenant = 'default') => ({
|
|
7
|
-
finance: financeAdapter(tenant),
|
|
8
|
-
party: partyAdapter(tenant),
|
|
9
|
-
location: locationAdapter(tenant)
|
|
10
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'sysone-api-mapper';
|