@lendi/integrations-transform 1.5.4 → 1.5.5

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,7 +1,11 @@
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
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -3,6 +3,7 @@ import { Payload as ApplicationPayload } from '../types/events/public-applicatio
3
3
  * Transforms a partial opportunity event to a partial internal request.
4
4
  *
5
5
  * @param opportunity: Partial opportunity event.
6
+ * @param uniqueIdSuffix: Suffix for uniquerId
6
7
  * @return partialApplication: A partial internal request.
7
8
  */
8
- export declare function transformApplication(opportunity: ApplicationPayload): {};
9
+ export declare function transformApplication(opportunity: ApplicationPayload, uniqueIdSuffix?: string): {};
@@ -11,9 +11,11 @@ var transform_applicant_1 = require("./transform-applicant");
11
11
  * Transforms a partial opportunity event to a partial internal request.
12
12
  *
13
13
  * @param opportunity: Partial opportunity event.
14
+ * @param uniqueIdSuffix: Suffix for uniquerId
14
15
  * @return partialApplication: A partial internal request.
15
16
  */
16
- function transformApplication(opportunity) {
17
+ function transformApplication(opportunity, uniqueIdSuffix) {
18
+ if (uniqueIdSuffix === void 0) { uniqueIdSuffix = 'loanDetails'; }
17
19
  var partialApplication = {};
18
20
  var opportunityMapping = {
19
21
  brand: application_paths_2.paths.BusinessName,
@@ -24,7 +26,7 @@ function transformApplication(opportunity) {
24
26
  brokerPrimaryPurpose: 'Package.Content.NeedsAnalysis.PurposeOfApplication[0].@Description',
25
27
  hasOptedInRateLock: "".concat(application_paths_1.paths.FeaturesSelected, ".@RateLock")
26
28
  };
27
- (0, lodash_1.set)(partialApplication, "".concat(application_paths_2.paths.LoanDetail, ".@UniqueID"), "".concat(opportunity.id, "-loanDetails"));
29
+ (0, lodash_1.set)(partialApplication, "".concat(application_paths_2.paths.LoanDetail, ".@UniqueID"), "".concat(opportunity.id, "-").concat(uniqueIdSuffix));
28
30
  (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.Instructions, ".@UniqueID"), "".concat(opportunity.id, "-stage"));
29
31
  (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.Instructions, ".@Name"), lixi_internal_request_1.EventNameApplicationInstructionsList.ApplicationReceived);
30
32
  (0, lodash_1.set)(partialApplication, "".concat(application_paths_1.paths.FeaturesSelected, ".@RateLock"), lixi_internal_request_1.YesNoList.No);
@@ -1,7 +1,11 @@
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
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
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",