@lendi/integrations-transform 1.9.5 → 1.9.6-beta.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,55 @@
1
+ # 1.9.0
2
+
3
+ Changes
4
+ * Bump `@lendi/integrations-credit-protocol` to `v1.19.0` which uses the `@lendi/config-integrations-integrations` only
5
+
6
+ # 1.8.6
7
+
8
+ Changes
9
+ * Update `merge-application` to merge the company applicant directors
10
+
11
+ # 1.8.5
12
+
13
+ Changes
14
+ * Update `transfrom-funding-position` to set pledge amount on application if it exists in property
15
+
16
+ # 1.8.4
17
+
18
+ Changes
19
+ * Update `applicant-event` to include SIMPLE_OR_BARE trust type and update mapping in transform
20
+
21
+ # 1.8.3
22
+
23
+ Changes
24
+ * Update `@lendi/transform-events` to support company applicant mappings
25
+
26
+ # 1.8.2
27
+
28
+ Changes
29
+ * Use `@lendi/integrations-protocol@2.7.4`
30
+
31
+ # 1.8.1
32
+
33
+ Changes
34
+ * Update `transformApplicationWorkflow` to support `applicationStatus`
35
+ * Use `@lendi/integrations-protocol@2.7.2`
36
+
37
+ # 1.7.3
38
+
39
+ Fix
40
+ * Remove some unnecessary `additionalProperties` from event schema to void AJV warning msg
41
+
42
+
43
+ # 1.7.0
44
+
45
+ BREAKING CHANGES
46
+ * Change to use `@lendi/integration-protocols@2.7.0` for better Identification fields support
47
+
48
+
49
+ # 1.6.0
50
+
51
+ BREAKING CHANGES
52
+ * Change to module `commonjs` to make it compatible with existing codebase
53
+
54
+ Changes
55
+ * Upgrade `@lendi/integrations-protocol` to `v2.6.4`
@@ -26,9 +26,26 @@ function transformApplication(opportunity, options = {}) {
26
26
  brokerPrimaryPurpose: 'Package.Content.NeedsAnalysis.PurposeOfApplication[0].@Description',
27
27
  };
28
28
  (0, lodash_1.set)(partialApplication, `${application_paths_2.paths.LoanDetail}.@UniqueID`, `${opportunity.id}-${uniqueIdSuffix}`);
29
+ const { hasOptedInRateLock = false, isFastRefi = false, preferredRepayment: { frequency, method, accountName, bsb, accountNumber }, } = opportunity;
30
+ const preferredRepaymentMethod = enum_mappings_1.preferredRepaymentMethodMapping[method];
31
+ if (preferredRepaymentMethod) {
32
+ (0, lodash_1.set)(partialApplication, `${application_paths_2.paths.LoanDetails}.ProposedRepayment.Method`, preferredRepaymentMethod);
33
+ }
34
+ const preferredRepaymentFrequency = enum_mappings_1.preferredRepaymentFrequencyMapping[frequency];
35
+ if (preferredRepaymentFrequency) {
36
+ (0, lodash_1.set)(partialApplication, `${application_paths_2.paths.LoanDetails}.ProposedRepayment.RegularRepayment[0].Frequency`, preferredRepaymentFrequency);
37
+ }
38
+ if (accountName) {
39
+ (0, lodash_1.set)(partialApplication, `${application_paths_2.paths.LoanDetails}.ProposedRepayment.FromAccount.financialAccountType.AccountName`, accountName);
40
+ }
41
+ if (bsb) {
42
+ (0, lodash_1.set)(partialApplication, `${application_paths_2.paths.LoanDetails}.ProposedRepayment.FromAccount.financialAccountType.BSB`, bsb);
43
+ }
44
+ if (accountNumber) {
45
+ (0, lodash_1.set)(partialApplication, `${application_paths_2.paths.LoanDetails}.ProposedRepayment.FromAccount.financialAccountType.AccountNumber`, accountNumber);
46
+ }
29
47
  (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.Instructions}.@UniqueID`, `${opportunity.id}-stage`);
30
48
  (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.Instructions}.@Name`, lixi_internal_request_1.EventNameApplicationInstructionsList.ApplicationReceived);
31
- const { hasOptedInRateLock = false, isFastRefi = false } = opportunity;
32
49
  if (enableRateLock) {
33
50
  (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.FeaturesSelected}.@RateLock`, (0, transform_applicant_1.booleanMapping)(hasOptedInRateLock));
34
51
  }
@@ -12,6 +12,8 @@ export * from './liability-type';
12
12
  export * from './living-expense';
13
13
  export * from './marital-status';
14
14
  export * from './postcode';
15
+ export * from './preferred-repayment-frequency';
16
+ export * from './preferred-repayment-method';
15
17
  export * from './preferred-repayment';
16
18
  export * from './proof-of-identity';
17
19
  export * from './property-expense-category';
@@ -28,6 +28,8 @@ __exportStar(require("./liability-type"), exports);
28
28
  __exportStar(require("./living-expense"), exports);
29
29
  __exportStar(require("./marital-status"), exports);
30
30
  __exportStar(require("./postcode"), exports);
31
+ __exportStar(require("./preferred-repayment-frequency"), exports);
32
+ __exportStar(require("./preferred-repayment-method"), exports);
31
33
  __exportStar(require("./preferred-repayment"), exports);
32
34
  __exportStar(require("./proof-of-identity"), exports);
33
35
  __exportStar(require("./property-expense-category"), exports);
@@ -0,0 +1,7 @@
1
+ import { List as FrequencyList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
+ import { Frequency } from '../events/public-application';
3
+ type PreferredRepaymentFrequencyMapping = {
4
+ [key in Frequency]: FrequencyList;
5
+ };
6
+ export declare const preferredRepaymentFrequencyMapping: Partial<PreferredRepaymentFrequencyMapping>;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.preferredRepaymentFrequencyMapping = void 0;
4
+ const lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
5
+ const public_application_1 = require("../events/public-application");
6
+ exports.preferredRepaymentFrequencyMapping = {
7
+ [public_application_1.Frequency.Fortnightly]: lixi_internal_request_1.List.Fortnightly,
8
+ [public_application_1.Frequency.Monthly]: lixi_internal_request_1.List.Monthly,
9
+ [public_application_1.Frequency.Weekly]: lixi_internal_request_1.List.Weekly,
10
+ };
@@ -0,0 +1,7 @@
1
+ import { ProposedRepaymentMethodList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
2
+ import { Method } from '../events/public-application';
3
+ type PreferredRepaymentMethodMapping = {
4
+ [key in Method]: ProposedRepaymentMethodList;
5
+ };
6
+ export declare const preferredRepaymentMethodMapping: PreferredRepaymentMethodMapping;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.preferredRepaymentMethodMapping = void 0;
4
+ const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
5
+ const public_application_1 = require("../events/public-application");
6
+ exports.preferredRepaymentMethodMapping = {
7
+ [public_application_1.Method.DirectCredit]: lixi_internal_request_1.ProposedRepaymentMethodList.CreditCard,
8
+ [public_application_1.Method.DirectDebitExistingAccount]: lixi_internal_request_1.ProposedRepaymentMethodList.DirectDebitExistingAccount,
9
+ [public_application_1.Method.DirectDebitNewAccount]: lixi_internal_request_1.ProposedRepaymentMethodList.DirectDebitNewAccount,
10
+ [public_application_1.Method.ManualRepayments]: lixi_internal_request_1.ProposedRepaymentMethodList.Other,
11
+ };
@@ -22,6 +22,26 @@ export interface Payload {
22
22
  meta?: ApplicationMeta;
23
23
  name?: string;
24
24
  preliminary: Preliminary;
25
+ preferredRepayment?: PreferredRepayment;
26
+ }
27
+ export interface PreferredRepayment {
28
+ method: Method;
29
+ frequency: Frequency;
30
+ institutionName: string;
31
+ accountName: string;
32
+ bsb: string;
33
+ accountNumber: string;
34
+ }
35
+ export declare enum Frequency {
36
+ Fortnightly = "FORTNIGHTLY",
37
+ Monthly = "MONTHLY",
38
+ Weekly = "WEEKLY"
39
+ }
40
+ export declare enum Method {
41
+ DirectDebitNewAccount = "DIRECT_DEBIT_NEW_ACCOUNT",
42
+ DirectDebitExistingAccount = "DIRECT_DEBIT_EXISTING_ACCOUNT",
43
+ DirectCredit = "DIRECT_CREDIT",
44
+ ManualRepayments = "MANUAL_REPAYMENTS"
25
45
  }
26
46
  export declare enum Brand {
27
47
  Aussie = "aussie",
@@ -1,6 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PublicApplicationType = exports.Urgency = exports.RefinancingReason = exports.PurchaseSituation = exports.PurchaseReason = exports.PrimaryPurpose = exports.PaymentType = exports.EligibleForFHOG = exports.DesiredFeature = exports.ContributionType = exports.ActionedByRole = exports.BrokerPrimaryPurpose = exports.Brand = void 0;
3
+ exports.PublicApplicationType = exports.Urgency = exports.RefinancingReason = exports.PurchaseSituation = exports.PurchaseReason = exports.PrimaryPurpose = exports.PaymentType = exports.EligibleForFHOG = exports.DesiredFeature = exports.ContributionType = exports.ActionedByRole = exports.BrokerPrimaryPurpose = exports.Brand = exports.Method = exports.Frequency = void 0;
4
+ var Frequency;
5
+ (function (Frequency) {
6
+ Frequency["Fortnightly"] = "FORTNIGHTLY";
7
+ Frequency["Monthly"] = "MONTHLY";
8
+ Frequency["Weekly"] = "WEEKLY";
9
+ })(Frequency = exports.Frequency || (exports.Frequency = {}));
10
+ var Method;
11
+ (function (Method) {
12
+ Method["DirectDebitNewAccount"] = "DIRECT_DEBIT_NEW_ACCOUNT";
13
+ Method["DirectDebitExistingAccount"] = "DIRECT_DEBIT_EXISTING_ACCOUNT";
14
+ Method["DirectCredit"] = "DIRECT_CREDIT";
15
+ Method["ManualRepayments"] = "MANUAL_REPAYMENTS";
16
+ })(Method = exports.Method || (exports.Method = {}));
4
17
  var Brand;
5
18
  (function (Brand) {
6
19
  Brand["Aussie"] = "aussie";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.9.5",
3
+ "version": "1.9.6-beta.2",
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.20.0",
24
+ "@lendi/integrations-credit-protocol": "1.20.5",
25
25
  "@lendi/integrations-protocol": "2.7.4",
26
26
  "@lendi/logging": "^1.0.3",
27
27
  "clean-deep": "^3.4.0",