sysone-api-mapper 1.0.197 → 1.0.199

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.
@@ -54,6 +54,7 @@ export interface Api {
54
54
  excludeInsuredFromPolicy: (policyCode: string, insuredCode: string, exclusionData: object) => Promise<any>;
55
55
  getRiskModes: () => Promise<any>;
56
56
  policyCreateInsured: (policyCode: string, payload: any) => Promise<any>;
57
+ getInsuredCertificate: (insuredCode: string) => Promise<any>;
57
58
  };
58
59
  collection: {
59
60
  getCollections: (params?: Object) => Promise<any>;
@@ -70,5 +71,10 @@ export interface Api {
70
71
  getFiscalBillingReport: (fiscalCode: string) => Promise<any>;
71
72
  getBillingPaymentStatus: () => Promise<any>;
72
73
  };
74
+ product: {
75
+ getSection: () => Promise<any>;
76
+ getSubsections: (sectionCode: string) => Promise<any>;
77
+ getProducts: (subsectionCode: string) => Promise<any>;
78
+ };
73
79
  }
74
80
  export declare const createApiAdapter: (tenant?: string) => Api;
@@ -8,6 +8,7 @@ const financeAdapter_1 = require("./financeAdapter");
8
8
  const locationAdapter_1 = require("./locationAdapter");
9
9
  const partyAdapter_1 = require("./partyAdapter");
10
10
  const policyAdapter_1 = require("./policyAdapter");
11
+ const productAdapter_1 = require("./productAdapter");
11
12
  const createApiAdapter = (tenant = 'default') => ({
12
13
  finance: (0, financeAdapter_1.financeAdapter)(tenant),
13
14
  party: (0, partyAdapter_1.partyAdapter)(tenant),
@@ -15,6 +16,7 @@ const createApiAdapter = (tenant = 'default') => ({
15
16
  policy: (0, policyAdapter_1.policyAdapter)(tenant),
16
17
  collection: (0, collectionAdapter_1.collectionAdapter)(tenant),
17
18
  claims: (0, claimsAdapter_1.claimsAdapter)(tenant),
18
- billing: (0, billingAdapter_1.billingAdapter)(tenant)
19
+ billing: (0, billingAdapter_1.billingAdapter)(tenant),
20
+ product: (0, productAdapter_1.productAdapter)(tenant)
19
21
  });
20
22
  exports.createApiAdapter = createApiAdapter;
@@ -14,4 +14,5 @@ export function policyAdapter(tenant: any): {
14
14
  excludeInsuredFromPolicy: (policyCode: any, insuredCode: any, exclusionData: any) => Promise<any>;
15
15
  getRiskModes: () => Promise<any>;
16
16
  policyCreateInsured: (policyCode: any, payload: any) => Promise<any>;
17
+ getInsuredCertificate: (insuredCode: any) => Promise<any>;
17
18
  };
@@ -17,6 +17,7 @@ const policyAdapter = (tenant) => ({
17
17
  getExclusionTypes: () => (0, Mapper_1.apiMapper)("GET_EXCLUSION_TYPES", tenant),
18
18
  excludeInsuredFromPolicy: (policyCode, insuredCode, exclusionData) => (0, Mapper_1.apiMapper)("EXCLUDE_INSURED_FROM_POLICY", tenant, [policyCode, insuredCode], exclusionData),
19
19
  getRiskModes: () => (0, Mapper_1.apiMapper)("GET_RISK_MODES", tenant),
20
- policyCreateInsured: (policyCode, payload) => (0, Mapper_1.apiMapper)("POLICY_LIFE_CREATE_INSURED", tenant, [policyCode], payload)
20
+ policyCreateInsured: (policyCode, payload) => (0, Mapper_1.apiMapper)("POLICY_LIFE_CREATE_INSURED", tenant, [policyCode], payload),
21
+ getInsuredCertificate: (insuredCode) => (0, Mapper_1.apiMapper)("GET_INSURED_CERTIFICATE", tenant, [insuredCode])
21
22
  });
22
23
  exports.policyAdapter = policyAdapter;
@@ -0,0 +1,5 @@
1
+ export function productAdapter(tenant: any): {
2
+ getSection: () => Promise<any>;
3
+ getSubsections: (sectionCode: any) => Promise<any>;
4
+ getProducts: (subsectionCode: any) => Promise<any>;
5
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.productAdapter = void 0;
4
+ const Mapper_1 = require("../mapper/Mapper");
5
+ const productAdapter = (tenant) => ({
6
+ getSection: () => (0, Mapper_1.apiMapper)("GET_SECTIONS", tenant, []),
7
+ getSubsections: (sectionCode) => (0, Mapper_1.apiMapper)("GET_SUBSECTIONS", tenant, [sectionCode]),
8
+ getProducts: (subsectionCode) => (0, Mapper_1.apiMapper)("GET_PRODUCTS", tenant, [subsectionCode]),
9
+ });
10
+ exports.productAdapter = productAdapter;