sysone-api-mapper 1.0.165 → 1.0.166

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.
@@ -1,4 +1,5 @@
1
1
  export function billingAdapter(tenant: any): {
2
2
  getBillings: (params: any) => Promise<any>;
3
3
  getBillingByCode: (billingCode: any) => Promise<any>;
4
+ getBillingReport: (billingCode: any) => Promise<any>;
4
5
  };
@@ -5,5 +5,6 @@ const Mapper_1 = require("../mapper/Mapper");
5
5
  const billingAdapter = (tenant) => ({
6
6
  getBillings: (params) => (0, Mapper_1.apiMapper)("GET_BILLINGS", tenant, [], params),
7
7
  getBillingByCode: (billingCode) => (0, Mapper_1.apiMapper)("BILLING_GET_BY_CODE", tenant, [billingCode]),
8
+ getBillingReport: (billingCode) => (0, Mapper_1.apiMapper)("GET_BILLING_REPORT", tenant, [billingCode]),
8
9
  });
9
10
  exports.billingAdapter = billingAdapter;
@@ -6,6 +6,8 @@ export interface Api {
6
6
  getCardTypes: () => Promise<any>;
7
7
  };
8
8
  party: {
9
+ getIndividuals: (params: any) => Promise<any>;
10
+ getOrganisations: (params: any) => Promise<any>;
9
11
  getIndividualDetails: (partyCode: string) => Promise<any>;
10
12
  getOrganisationDetails: (partyCode: string) => Promise<any>;
11
13
  getGenders: () => Promise<any>;
@@ -45,6 +47,7 @@ export interface Api {
45
47
  billing: {
46
48
  getBillings: (params?: Object) => Promise<any>;
47
49
  getBillingByCode: (billingCode: string) => Promise<any>;
50
+ getBillingReport: (billingCode: string) => Promise<any>;
48
51
  };
49
52
  }
50
53
  export declare const createApiAdapter: (tenant?: string) => Api;
@@ -1,4 +1,6 @@
1
1
  export function partyAdapter(tenant: any): {
2
+ getIndividuals: (params: any) => Promise<any>;
3
+ getOrganisations: (params: any) => Promise<any>;
2
4
  getIndividualDetails: (partyCode: any) => Promise<any>;
3
5
  getOrganisationDetails: (partyCode: any) => Promise<any>;
4
6
  getGenders: () => Promise<any>;
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.partyAdapter = void 0;
4
4
  const Mapper_1 = require("../mapper/Mapper");
5
5
  const partyAdapter = (tenant) => ({
6
+ getIndividuals: (params) => (0, Mapper_1.apiMapper)("GET_PARTIES", tenant, ["individuals"], params),
7
+ getOrganisations: (params) => (0, Mapper_1.apiMapper)("GET_PARTIES", tenant, ["organisations"], params),
6
8
  getIndividualDetails: (partyCode) => (0, Mapper_1.apiMapper)("GET_INDIVIDUAL_DETAILS", tenant, [partyCode]),
7
9
  getOrganisationDetails: (partyCode) => (0, Mapper_1.apiMapper)("GET_ORGANISATION_DETAILS", tenant, [partyCode]),
8
10
  getGenders: () => (0, Mapper_1.apiMapper)("GET_GENDERS", tenant),
@@ -1,2 +1,2 @@
1
1
  export function configureApiMapper(config: any): void;
2
- export function apiMapper(endpointCode: any, tenant: any, routeParams: any, params?: null, additionalHeaders?: {}): Promise<any>;
2
+ export function apiMapper(endpointCode: any, routeParams: any, params?: null, additionalHeaders?: {}): Promise<any>;
@@ -37,7 +37,7 @@ const getUrl = (serviceUrl, routeParams) => {
37
37
  return serviceUrl;
38
38
  return serviceUrl.replace(/{(\d+)}/g, (match, index) => routeParams[index] !== undefined ? routeParams[index] : match);
39
39
  };
40
- const apiMapper = async (endpointCode, tenant, routeParams, params = null, additionalHeaders = {}) => {
40
+ const apiMapper = async (endpointCode, routeParams, params = null, additionalHeaders = {}) => {
41
41
  /* -------- Endpoint config -------- */
42
42
  var _a;
43
43
  const configData = endpointsConfig_1.tenantsConfig[endpointCode];