@lendi/integrations-transform 1.4.9 → 1.5.0

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/lib/index.js CHANGED
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -5,9 +5,10 @@ import { PartialApplication } from '../types/partial-application';
5
5
  * GenerateFundingPosition
6
6
  *
7
7
  * @param fundingPosition a partialFundingPosition.
8
+ * @param uniqueIdSuffix
8
9
  * @return partialApplication with fees, grants and borrowers contributions added.
9
10
  */
10
- export declare function transformFundingPosition(fundingPosition: FundingPositionPayload): PartialApplication;
11
+ export declare function transformFundingPosition(fundingPosition: FundingPositionPayload, uniqueIdSuffix?: string): PartialApplication;
11
12
  /**
12
13
  * getFee
13
14
  *
@@ -9,9 +9,11 @@ var enum_mappings_1 = require("../types/enum-mappings");
9
9
  * GenerateFundingPosition
10
10
  *
11
11
  * @param fundingPosition a partialFundingPosition.
12
+ * @param uniqueIdSuffix
12
13
  * @return partialApplication with fees, grants and borrowers contributions added.
13
14
  */
14
- function transformFundingPosition(fundingPosition) {
15
+ function transformFundingPosition(fundingPosition, uniqueIdSuffix) {
16
+ if (uniqueIdSuffix === void 0) { uniqueIdSuffix = 'loanDetails'; }
15
17
  var partialApplication = {};
16
18
  var contributionFunds = [];
17
19
  var applicationId = fundingPosition.applicationId, id = fundingPosition.id, _a = fundingPosition.lmi, lmi = _a === void 0 ? 0 : _a, _b = fundingPosition.lmiIncluded, lmiIncluded = _b === void 0 ? false : _b;
@@ -41,7 +43,7 @@ function transformFundingPosition(fundingPosition) {
41
43
  break;
42
44
  case 'totalCashOut':
43
45
  (0, lodash_1.set)(partialApplication, fundingPositionMapping[key], value);
44
- (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.LoanDetail, ".@UniqueID"), "".concat(applicationId, "-0"));
46
+ (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.LoanDetail, ".@UniqueID"), "".concat(applicationId, "-").concat(uniqueIdSuffix));
45
47
  break;
46
48
  case 'fundsRequested':
47
49
  (0, lodash_1.set)(partialApplication, fundingPositionMapping[key], Math.round(value));
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.4.9",
3
+ "version": "1.5.0",
4
4
  "description": "Library for kafka event data transforming",
5
5
  "author": "Integrations <integrations@lendi.com.au>",
6
6
  "homepage": "https://bitbucket.org/lendi-dev/integrations-shared-packages#readme",