@lendi/integrations-transform 1.4.4 → 1.4.7

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];
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "brokerPrimaryPurpose": {
10
10
  "description": "Additional data point for broker to capture primary purpose, other than the preliminary primary purpose associated with current user journey for new purchase or refinance",
11
+ "_comment": "PURCHASE is deprecated (will migrated to NEW_PURCHASE), VARIATION is deprecated (domain variation/lendi variation brand will be migrated to VARIATION_NON_CREDIT_CRITICAL, domain/lendi brand will be migrated to VARIATION_CREDIT_CRITICAL) and both PURCHASE and VARIATION will be removed in the future",
11
12
  "enum": [
12
13
  "COMMERCIAL",
13
14
  "CONSTRUCTION",
@@ -21,7 +22,9 @@
21
22
  "REFINANCE",
22
23
  "SLR",
23
24
  "TOP_UP",
24
- "VARIATION"
25
+ "VARIATION",
26
+ "VARIATION_CREDIT_CRITICAL",
27
+ "VARIATION_NON_CREDIT_CRITICAL"
25
28
  ]
26
29
  },
27
30
  "customerId": {
@@ -83,10 +86,12 @@
83
86
  "type": "boolean"
84
87
  },
85
88
  "totalMonthlyExpenses": {
86
- "type": "number"
89
+ "type": "number",
90
+ "minimum": 0
87
91
  },
88
92
  "numberOfDependants": {
89
- "type": "number"
93
+ "type": "number",
94
+ "minimum": 0
90
95
  },
91
96
  "contributions": {
92
97
  "type": "array",
@@ -98,7 +103,8 @@
98
103
  "enum": ["DEPOSIT"]
99
104
  },
100
105
  "amount": {
101
- "type": "number"
106
+ "type": "number",
107
+ "minimum": 0
102
108
  }
103
109
  }
104
110
  }
@@ -109,6 +115,10 @@
109
115
  "enum": ["CONSOLIDATE_CASHOUT", "FASTER_PAYOFF", "DECREASE_REPAYMENTS", "CONSTRUCTION"]
110
116
  }
111
117
  },
118
+ "highIntent": {
119
+ "description": "Indication that this application carries high customer intent",
120
+ "type": "boolean"
121
+ },
112
122
  "payload": {
113
123
  "type": "object",
114
124
  "additionalProperties": false,
@@ -191,6 +201,9 @@
191
201
  "$ref": "#/definitions/contributions"
192
202
  }
193
203
  }
204
+ },
205
+ "highIntent": {
206
+ "$ref": "#/definitions/highIntent"
194
207
  }
195
208
  },
196
209
  "required": ["id", "preliminary"]
@@ -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];
@@ -15,6 +15,7 @@ export interface Payload {
15
15
  clonedFromApplicationId?: string;
16
16
  customerId?: string;
17
17
  hidden?: boolean;
18
+ highIntent?: boolean;
18
19
  id: string;
19
20
  meta?: ApplicationMeta;
20
21
  name?: string;
@@ -43,7 +44,9 @@ export declare enum BrokerPrimaryPurpose {
43
44
  Refinance = "REFINANCE",
44
45
  Slr = "SLR",
45
46
  TopUp = "TOP_UP",
46
- Variation = "VARIATION"
47
+ Variation = "VARIATION",
48
+ VariationCreditCritical = "VARIATION_CREDIT_CRITICAL",
49
+ VariationNonCreditCritical = "VARIATION_NON_CREDIT_CRITICAL"
47
50
  }
48
51
  /**
49
52
  * The metadata of the application
@@ -27,6 +27,8 @@ var BrokerPrimaryPurpose;
27
27
  BrokerPrimaryPurpose["Slr"] = "SLR";
28
28
  BrokerPrimaryPurpose["TopUp"] = "TOP_UP";
29
29
  BrokerPrimaryPurpose["Variation"] = "VARIATION";
30
+ BrokerPrimaryPurpose["VariationCreditCritical"] = "VARIATION_CREDIT_CRITICAL";
31
+ BrokerPrimaryPurpose["VariationNonCreditCritical"] = "VARIATION_NON_CREDIT_CRITICAL";
30
32
  })(BrokerPrimaryPurpose = exports.BrokerPrimaryPurpose || (exports.BrokerPrimaryPurpose = {}));
31
33
  /**
32
34
  * role of the user that made the action
@@ -36,6 +36,8 @@ function deepMergeApplication(existingApplication, newApplication) {
36
36
  var listsWithXApplicant = ['Applicant'];
37
37
  // Array fields with @x_ResidentialAddress
38
38
  var listsWithXResidentialAddress = ['PriorAddress'];
39
+ // Array fields with @x_Guarantor
40
+ var listsWithXGuarantor = ['Guarantor'];
39
41
  // Curried function which takes a uniqueKey and returns a function which will either replace
40
42
  // or merge the item in the array based on the uniqueKey
41
43
  if (!existingApplication) {
@@ -67,6 +69,9 @@ function deepMergeApplication(existingApplication, newApplication) {
67
69
  if (listsWithXApplicant.find(function (item) { return item === key; })) {
68
70
  return mergeItems('@x_Applicant');
69
71
  }
72
+ if (listsWithXGuarantor.find(function (item) { return item === key; })) {
73
+ return mergeItems('@x_Guarantor');
74
+ }
70
75
  return mergeItems(key);
71
76
  }
72
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.4.4",
3
+ "version": "1.4.7",
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",
@@ -21,7 +21,7 @@
21
21
  "url": "git+ssh://git@bitbucket.org/lendi-dev/integrations-shared-packages.git"
22
22
  },
23
23
  "dependencies": {
24
- "@lendi/integrations-credit-protocol": "1.16.2",
24
+ "@lendi/integrations-credit-protocol": "1.17.0",
25
25
  "@lendi/integrations-protocol": "2.5.4",
26
26
  "clean-deep": "^3.4.0",
27
27
  "date-fns": "2.19.0",
@@ -31,7 +31,7 @@
31
31
  "devDependencies": {
32
32
  "@lendi/prettier-config": "^1.0.0",
33
33
  "@lendi/typescript-config": "^2.0.0",
34
- "@types/jest": "^26.0.14",
34
+ "@types/jest": "^27.4.1",
35
35
  "@types/lodash": "^4.14.141",
36
36
  "@types/node": "^12.12.5",
37
37
  "@types/pino": "^6.3.3",
@@ -44,7 +44,7 @@
44
44
  "eslint-plugin-prettier": "^3.3.1",
45
45
  "eslint-plugin-sonarjs": "^0.5.0",
46
46
  "husky": "^3.0.8",
47
- "jest": "^26.6.3",
47
+ "jest": "^27.5.1",
48
48
  "jest-buildkite-reporter": "^0.2.8",
49
49
  "jest-sonar-reporter": "^2.0.0",
50
50
  "path": "^0.12.7",
@@ -53,7 +53,7 @@
53
53
  "prettier-eslint": "^12.0.0",
54
54
  "quicktype": "15.0.207",
55
55
  "sinon": "^7.4.2",
56
- "ts-jest": "^26.5.0",
56
+ "ts-jest": "^27.1.4",
57
57
  "ts-node": "^8.4.1",
58
58
  "typedoc": "^0.20.36",
59
59
  "typescript": "^4.1.3"
@@ -72,9 +72,7 @@
72
72
  "prepack": "npm run build",
73
73
  "prepublishOnly": "npm run build",
74
74
  "postpack": "rm -rf lib",
75
- "test": "yarn test:unit",
76
- "test:cover": "yarn test:unit --coverage",
77
- "test:unit": "jest --config jest.config.json --detectOpenHandles",
75
+ "test:unit": "jest --config jest.config.json",
78
76
  "list:package-contents": "npm publish --dry-run",
79
77
  "semver:patch": "npm version patch",
80
78
  "semver:minor": "npm version minor",