@lendi/integrations-transform 1.5.10 → 1.6.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.
Files changed (88) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/lib/index.js +26 -10
  3. package/lib/logger.js +5 -2
  4. package/lib/schemas/public-application-event.json +7 -0
  5. package/lib/transform-events/generate-asset-liability-link.js +12 -8
  6. package/lib/transform-events/generate-credit-report-rebuilt.js +12 -8
  7. package/lib/transform-events/generate-employment.js +41 -37
  8. package/lib/transform-events/generate-required-document.d.ts +1 -2
  9. package/lib/transform-events/generate-required-document.js +41 -32
  10. package/lib/transform-events/transform-applicant.js +60 -53
  11. package/lib/transform-events/transform-application-workflow.js +9 -5
  12. package/lib/transform-events/transform-application.d.ts +6 -8
  13. package/lib/transform-events/transform-application.js +30 -25
  14. package/lib/transform-events/transform-asset-address.js +25 -19
  15. package/lib/transform-events/transform-asset.js +128 -118
  16. package/lib/transform-events/transform-expenses.js +39 -31
  17. package/lib/transform-events/transform-funding-position.js +32 -27
  18. package/lib/transform-events/transform-income.js +73 -65
  19. package/lib/transform-events/transform-liability.js +59 -55
  20. package/lib/transform-events/transform-percent-owned.js +7 -3
  21. package/lib/types/enum-mappings/alieo-frequency.js +22 -19
  22. package/lib/types/enum-mappings/asset-type.js +16 -13
  23. package/lib/types/enum-mappings/builder-type.js +8 -5
  24. package/lib/types/enum-mappings/construction-type.js +9 -6
  25. package/lib/types/enum-mappings/country-code.js +245 -242
  26. package/lib/types/enum-mappings/employment-basis.js +11 -8
  27. package/lib/types/enum-mappings/expense-frequency.js +10 -7
  28. package/lib/types/enum-mappings/funding-position.js +32 -29
  29. package/lib/types/enum-mappings/government-benefits.js +9 -6
  30. package/lib/types/enum-mappings/housing-status.js +14 -11
  31. package/lib/types/enum-mappings/income-type.js +15 -12
  32. package/lib/types/enum-mappings/index.js +43 -27
  33. package/lib/types/enum-mappings/liability-payment-type.js +8 -5
  34. package/lib/types/enum-mappings/liability-type.js +20 -17
  35. package/lib/types/enum-mappings/living-expense.js +29 -26
  36. package/lib/types/enum-mappings/marital-status.js +11 -8
  37. package/lib/types/enum-mappings/postcode.js +13 -10
  38. package/lib/types/enum-mappings/preferred-repayment.js +9 -6
  39. package/lib/types/enum-mappings/proof-of-identity.js +9 -6
  40. package/lib/types/enum-mappings/property-expense-category.js +10 -7
  41. package/lib/types/enum-mappings/public-financial-asset.js +11 -8
  42. package/lib/types/enum-mappings/public-primary-purpose.js +8 -5
  43. package/lib/types/enum-mappings/public-property-status.js +10 -7
  44. package/lib/types/enum-mappings/public-property-type.js +22 -19
  45. package/lib/types/enum-mappings/residency-status.js +10 -7
  46. package/lib/types/enum-mappings/title-gender.js +12 -9
  47. package/lib/types/enum-mappings/title.js +12 -9
  48. package/lib/types/enum-mappings/to-be-purchased.js +7 -4
  49. package/lib/types/enum-mappings/to-be-used-as-security.js +7 -4
  50. package/lib/types/enum-mappings/transaction-type.js +8 -5
  51. package/lib/types/enum-mappings/verification.js +12 -9
  52. package/lib/types/events/applicant-delete.js +7 -4
  53. package/lib/types/events/application-workflow.js +13 -10
  54. package/lib/types/events/asset-delete.js +7 -4
  55. package/lib/types/events/asset-liability-relation-delete.js +7 -4
  56. package/lib/types/events/credit-report-retrieved.js +7 -4
  57. package/lib/types/events/employment-delete.js +5 -2
  58. package/lib/types/events/expense-delete.js +5 -2
  59. package/lib/types/events/funding-position.js +9 -6
  60. package/lib/types/events/income-delete.js +7 -4
  61. package/lib/types/events/liability-delete.js +5 -2
  62. package/lib/types/events/opportunity.js +9 -6
  63. package/lib/types/events/public-applicant.js +31 -28
  64. package/lib/types/events/public-application.d.ts +1 -0
  65. package/lib/types/events/public-application.js +29 -26
  66. package/lib/types/events/public-asset-liability-relation.js +7 -4
  67. package/lib/types/events/public-asset.js +29 -26
  68. package/lib/types/events/public-employment.js +21 -18
  69. package/lib/types/events/public-expense.js +11 -8
  70. package/lib/types/events/public-funding-position.js +5 -2
  71. package/lib/types/events/public-income.js +15 -12
  72. package/lib/types/events/public-liability.js +19 -16
  73. package/lib/types/events/public-required-document.js +17 -14
  74. package/lib/types/partial-application.js +2 -1
  75. package/lib/types/recursive-partial.js +2 -1
  76. package/lib/update-application/merge-application.js +6 -2
  77. package/lib/update-application/update-primary-applicant.js +17 -12
  78. package/lib/utils/address-tools.js +43 -33
  79. package/lib/utils/clean-up.js +7 -3
  80. package/lib/utils/formatYesNo.js +6 -2
  81. package/lib/utils/generate-address.js +26 -21
  82. package/lib/utils/get-financial-institution.js +8 -4
  83. package/lib/utils/is-asset-type.js +20 -13
  84. package/lib/utils/is-income-type.js +58 -45
  85. package/lib/utils/iso-date.js +6 -2
  86. package/lib/utils/normalise-date.js +5 -1
  87. package/lib/utils/round-decimal.js +5 -1
  88. package/package.json +3 -3
@@ -1,10 +1,13 @@
1
- import { IDTitle } from '../events/public-required-document';
2
- import { GenderList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
- export const titleGenderMapping = {
4
- [IDTitle.Miss]: GenderList.Female,
5
- [IDTitle.Mr]: GenderList.Male,
6
- [IDTitle.Mrs]: GenderList.Female,
7
- [IDTitle.MS]: GenderList.Female,
8
- [IDTitle.Other]: GenderList.Undisclosed,
9
- [IDTitle.Unknown]: GenderList.Undisclosed,
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.titleGenderMapping = void 0;
4
+ const public_required_document_1 = require("../events/public-required-document");
5
+ const lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
6
+ exports.titleGenderMapping = {
7
+ [public_required_document_1.IDTitle.Miss]: lixi_internal_request_1.GenderList.Female,
8
+ [public_required_document_1.IDTitle.Mr]: lixi_internal_request_1.GenderList.Male,
9
+ [public_required_document_1.IDTitle.Mrs]: lixi_internal_request_1.GenderList.Female,
10
+ [public_required_document_1.IDTitle.MS]: lixi_internal_request_1.GenderList.Female,
11
+ [public_required_document_1.IDTitle.Other]: lixi_internal_request_1.GenderList.Undisclosed,
12
+ [public_required_document_1.IDTitle.Unknown]: lixi_internal_request_1.GenderList.Undisclosed,
10
13
  };
@@ -1,10 +1,13 @@
1
- import { Title } from '../events/public-applicant';
2
- import { NameTitleList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
3
- export const titleMapping = {
4
- [Title.DR]: NameTitleList.DR,
5
- [Title.Miss]: NameTitleList.Miss,
6
- [Title.Mr]: NameTitleList.Mr,
7
- [Title.Mrs]: NameTitleList.Mrs,
8
- [Title.MS]: NameTitleList.MS,
9
- [Title.Unknown]: NameTitleList.Other,
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.titleMapping = void 0;
4
+ const public_applicant_1 = require("../events/public-applicant");
5
+ const lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
6
+ exports.titleMapping = {
7
+ [public_applicant_1.Title.DR]: lixi_internal_request_1.NameTitleList.DR,
8
+ [public_applicant_1.Title.Miss]: lixi_internal_request_1.NameTitleList.Miss,
9
+ [public_applicant_1.Title.Mr]: lixi_internal_request_1.NameTitleList.Mr,
10
+ [public_applicant_1.Title.Mrs]: lixi_internal_request_1.NameTitleList.Mrs,
11
+ [public_applicant_1.Title.MS]: lixi_internal_request_1.NameTitleList.MS,
12
+ [public_applicant_1.Title.Unknown]: lixi_internal_request_1.NameTitleList.Other,
10
13
  };
@@ -1,5 +1,8 @@
1
- import { AssetTransactionList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
- export const toBePurchasedMapping = {
3
- true: AssetTransactionList.Purchasing,
4
- false: AssetTransactionList.Owns,
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toBePurchasedMapping = void 0;
4
+ const lixi_internal_request_1 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
5
+ exports.toBePurchasedMapping = {
6
+ true: lixi_internal_request_1.AssetTransactionList.Purchasing,
7
+ false: lixi_internal_request_1.AssetTransactionList.Owns,
5
8
  };
@@ -1,5 +1,8 @@
1
- import { YesNoList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
2
- export const toBeUsedAsSecurityMapping = {
3
- true: YesNoList.Yes,
4
- false: YesNoList.No,
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toBeUsedAsSecurityMapping = void 0;
4
+ const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
5
+ exports.toBeUsedAsSecurityMapping = {
6
+ true: lixi_internal_request_1.YesNoList.Yes,
7
+ false: lixi_internal_request_1.YesNoList.No,
5
8
  };
@@ -1,6 +1,9 @@
1
- import { PurposeOfApplicationList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
2
- import { PrimaryPurpose } from '../events/public-application';
3
- export const transactionTypeMapping = {
4
- [PrimaryPurpose.NewPurchase]: PurposeOfApplicationList.PurchaseRealEstate,
5
- [PrimaryPurpose.Refinance]: PurposeOfApplicationList.RefinanceHomeLoan,
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transactionTypeMapping = 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.transactionTypeMapping = {
7
+ [public_application_1.PrimaryPurpose.NewPurchase]: lixi_internal_request_1.PurposeOfApplicationList.PurchaseRealEstate,
8
+ [public_application_1.PrimaryPurpose.Refinance]: lixi_internal_request_1.PurposeOfApplicationList.RefinanceHomeLoan,
6
9
  };
@@ -1,10 +1,13 @@
1
- import { Status } from '../events/public-required-document';
2
- import { YesNoList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
3
- export const verificationMapping = {
4
- [Status.Expired]: YesNoList.No,
5
- [Status.FailedVerification]: YesNoList.No,
6
- [Status.NotRequired]: YesNoList.No,
7
- [Status.PendingUpload]: YesNoList.No,
8
- [Status.Verified]: YesNoList.Yes,
9
- [Status.PendingVerification]: YesNoList.No,
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.verificationMapping = void 0;
4
+ const public_required_document_1 = require("../events/public-required-document");
5
+ const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
6
+ exports.verificationMapping = {
7
+ [public_required_document_1.Status.Expired]: lixi_internal_request_1.YesNoList.No,
8
+ [public_required_document_1.Status.FailedVerification]: lixi_internal_request_1.YesNoList.No,
9
+ [public_required_document_1.Status.NotRequired]: lixi_internal_request_1.YesNoList.No,
10
+ [public_required_document_1.Status.PendingUpload]: lixi_internal_request_1.YesNoList.No,
11
+ [public_required_document_1.Status.Verified]: lixi_internal_request_1.YesNoList.Yes,
12
+ [public_required_document_1.Status.PendingVerification]: lixi_internal_request_1.YesNoList.No,
10
13
  };
@@ -1,12 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = exports.ActionedByRole = void 0;
1
4
  /**
2
5
  * role of the user that made the action
3
6
  */
4
- export var ActionedByRole;
7
+ var ActionedByRole;
5
8
  (function (ActionedByRole) {
6
9
  ActionedByRole["Customer"] = "customer";
7
10
  ActionedByRole["Team"] = "team";
8
- })(ActionedByRole || (ActionedByRole = {}));
9
- export var Type;
11
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
12
+ var Type;
10
13
  (function (Type) {
11
14
  Type["DeleteApplicant"] = "DeleteApplicant";
12
- })(Type || (Type = {}));
15
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,7 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = exports.Status = exports.Stage = exports.ConfirmedPrimaryPurpose = exports.ApplicationStage = void 0;
1
4
  /**
2
5
  * Application stage in Lendi Group Salesforce
3
6
  */
4
- export var ApplicationStage;
7
+ var ApplicationStage;
5
8
  (function (ApplicationStage) {
6
9
  ApplicationStage["ClosedLost"] = "CLOSED_LOST";
7
10
  ApplicationStage["PostSettlement"] = "POST_SETTLEMENT";
@@ -10,11 +13,11 @@ export var ApplicationStage;
10
13
  ApplicationStage["Settlement"] = "SETTLEMENT";
11
14
  ApplicationStage["SubmissionReview"] = "SUBMISSION_REVIEW";
12
15
  ApplicationStage["SubmittedToLender"] = "SUBMITTED_TO_LENDER";
13
- })(ApplicationStage || (ApplicationStage = {}));
16
+ })(ApplicationStage = exports.ApplicationStage || (exports.ApplicationStage = {}));
14
17
  /**
15
18
  * Intention for applying a loan
16
19
  */
17
- export var ConfirmedPrimaryPurpose;
20
+ var ConfirmedPrimaryPurpose;
18
21
  (function (ConfirmedPrimaryPurpose) {
19
22
  ConfirmedPrimaryPurpose["ChattelMortgage"] = "CHATTEL_MORTGAGE";
20
23
  ConfirmedPrimaryPurpose["Commercial"] = "COMMERCIAL";
@@ -34,12 +37,12 @@ export var ConfirmedPrimaryPurpose;
34
37
  ConfirmedPrimaryPurpose["TopUp"] = "TOP_UP";
35
38
  ConfirmedPrimaryPurpose["Unknown"] = "UNKNOWN";
36
39
  ConfirmedPrimaryPurpose["Variation"] = "VARIATION";
37
- })(ConfirmedPrimaryPurpose || (ConfirmedPrimaryPurpose = {}));
40
+ })(ConfirmedPrimaryPurpose = exports.ConfirmedPrimaryPurpose || (exports.ConfirmedPrimaryPurpose = {}));
38
41
  /**
39
42
  * Opportunity stage name. This is a legacy field and will be deprecated after Lendi Group
40
43
  * salesforce goes live
41
44
  */
42
- export var Stage;
45
+ var Stage;
43
46
  (function (Stage) {
44
47
  Stage["ApplicationTaken"] = "APPLICATION_TAKEN";
45
48
  Stage["Appointed"] = "APPOINTED";
@@ -64,12 +67,12 @@ export var Stage;
64
67
  Stage["Settlement"] = "SETTLEMENT";
65
68
  Stage["Submitted"] = "SUBMITTED";
66
69
  Stage["Unknown"] = "UNKNOWN";
67
- })(Stage || (Stage = {}));
70
+ })(Stage = exports.Stage || (exports.Stage = {}));
68
71
  /**
69
72
  * Opportunity status. This is a legacy field and will be deprecated after Lendi Group
70
73
  * salesforce goes live
71
74
  */
72
- export var Status;
75
+ var Status;
73
76
  (function (Status) {
74
77
  Status["Application"] = "APPLICATION";
75
78
  Status["ApplicationCompleted"] = "APPLICATION_COMPLETED";
@@ -130,8 +133,8 @@ export var Status;
130
133
  Status["SubmittedToLender"] = "SUBMITTED_TO_LENDER";
131
134
  Status["UnconditionalApproval"] = "UNCONDITIONAL_APPROVAL";
132
135
  Status["Unknown"] = "UNKNOWN";
133
- })(Status || (Status = {}));
134
- export var Type;
136
+ })(Status = exports.Status || (exports.Status = {}));
137
+ var Type;
135
138
  (function (Type) {
136
139
  Type["ApplicationWorkflowUpdated"] = "ApplicationWorkflowUpdated";
137
- })(Type || (Type = {}));
140
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,12 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = exports.ActionedByRole = void 0;
1
4
  /**
2
5
  * role of the user that made the action
3
6
  */
4
- export var ActionedByRole;
7
+ var ActionedByRole;
5
8
  (function (ActionedByRole) {
6
9
  ActionedByRole["Customer"] = "customer";
7
10
  ActionedByRole["Team"] = "team";
8
- })(ActionedByRole || (ActionedByRole = {}));
9
- export var Type;
11
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
12
+ var Type;
10
13
  (function (Type) {
11
14
  Type["AssetDeleted"] = "AssetDeleted";
12
- })(Type || (Type = {}));
15
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,12 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = exports.ActionedByRole = void 0;
1
4
  /**
2
5
  * role of the user that made the action
3
6
  */
4
- export var ActionedByRole;
7
+ var ActionedByRole;
5
8
  (function (ActionedByRole) {
6
9
  ActionedByRole["Customer"] = "customer";
7
10
  ActionedByRole["Team"] = "team";
8
- })(ActionedByRole || (ActionedByRole = {}));
9
- export var Type;
11
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
12
+ var Type;
10
13
  (function (Type) {
11
14
  Type["AssetAndLiabilityRelationDeleted"] = "AssetAndLiabilityRelationDeleted";
12
- })(Type || (Type = {}));
15
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,12 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = exports.Source = void 0;
1
4
  /**
2
5
  * A list of credit report service provider
3
6
  */
4
- export var Source;
7
+ var Source;
5
8
  (function (Source) {
6
9
  Source["Equifax"] = "equifax";
7
- })(Source || (Source = {}));
8
- export var Type;
10
+ })(Source = exports.Source || (exports.Source = {}));
11
+ var Type;
9
12
  (function (Type) {
10
13
  Type["CreditReportNoMatch"] = "CreditReportNoMatch";
11
14
  Type["CreditReportRetrieved"] = "CreditReportRetrieved";
12
- })(Type || (Type = {}));
15
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,4 +1,7 @@
1
- export var Type;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = void 0;
4
+ var Type;
2
5
  (function (Type) {
3
6
  Type["EmploymentDeleted"] = "EmploymentDeleted";
4
- })(Type || (Type = {}));
7
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,4 +1,7 @@
1
- export var Type;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = void 0;
4
+ var Type;
2
5
  (function (Type) {
3
6
  Type["ExpenseDeleted"] = "ExpenseDeleted";
4
- })(Type || (Type = {}));
7
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,4 +1,7 @@
1
- export var Category;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = exports.DetailType = exports.Category = void 0;
4
+ var Category;
2
5
  (function (Category) {
3
6
  Category["BorrowerContribution"] = "Borrower Contribution";
4
7
  Category["Debt"] = "Debt";
@@ -6,11 +9,11 @@ export var Category;
6
9
  Category["Fee"] = "Fee";
7
10
  Category["Other"] = "Other";
8
11
  Category["Purchase"] = "Purchase";
9
- })(Category || (Category = {}));
12
+ })(Category = exports.Category || (exports.Category = {}));
10
13
  /**
11
14
  * Detail type
12
15
  */
13
- export var DetailType;
16
+ var DetailType;
14
17
  (function (DetailType) {
15
18
  DetailType["Deposit"] = "Deposit";
16
19
  DetailType["DischargeCosts"] = "Discharge Costs";
@@ -22,10 +25,10 @@ export var DetailType;
22
25
  DetailType["PurchaseStampDuty"] = "Purchase Stamp Duty";
23
26
  DetailType["RegistrationFee"] = "Registration Fee";
24
27
  DetailType["TransferFee"] = "Transfer Fee";
25
- })(DetailType || (DetailType = {}));
26
- export var Type;
28
+ })(DetailType = exports.DetailType || (exports.DetailType = {}));
29
+ var Type;
27
30
  (function (Type) {
28
31
  Type["FundingPositionCreated"] = "FundingPositionCreated";
29
32
  Type["FundingPositionMigrated"] = "FundingPositionMigrated";
30
33
  Type["FundingPositionUpdated"] = "FundingPositionUpdated";
31
- })(Type || (Type = {}));
34
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,12 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = exports.ActionedByRole = void 0;
1
4
  /**
2
5
  * role of the user that made the action
3
6
  */
4
- export var ActionedByRole;
7
+ var ActionedByRole;
5
8
  (function (ActionedByRole) {
6
9
  ActionedByRole["Customer"] = "customer";
7
10
  ActionedByRole["Team"] = "team";
8
- })(ActionedByRole || (ActionedByRole = {}));
9
- export var Type;
11
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
12
+ var Type;
10
13
  (function (Type) {
11
14
  Type["IncomeDeleted"] = "IncomeDeleted";
12
- })(Type || (Type = {}));
15
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,4 +1,7 @@
1
- export var Type;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = void 0;
4
+ var Type;
2
5
  (function (Type) {
3
6
  Type["LiabilityDeleted"] = "LiabilityDeleted";
4
- })(Type || (Type = {}));
7
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,17 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = exports.Stage = exports.Brand = void 0;
1
4
  /**
2
5
  * Brand of an Opportunity, taken from Record Type in Salesforce
3
6
  */
4
- export var Brand;
7
+ var Brand;
5
8
  (function (Brand) {
6
9
  Brand["Domain"] = "domain";
7
10
  Brand["DomainVariation"] = "domain variation";
8
11
  Brand["Lendi"] = "lendi";
9
12
  Brand["LendiVariation"] = "lendi variation";
10
- })(Brand || (Brand = {}));
13
+ })(Brand = exports.Brand || (exports.Brand = {}));
11
14
  /**
12
15
  * Opportunity Stage Name
13
16
  */
14
- export var Stage;
17
+ var Stage;
15
18
  (function (Stage) {
16
19
  Stage["ApplicationTaken"] = "Application Taken";
17
20
  Stage["Appointed"] = "Appointed";
@@ -35,10 +38,10 @@ export var Stage;
35
38
  Stage["Settled"] = "Settled";
36
39
  Stage["Settlement"] = "Settlement";
37
40
  Stage["Submitted"] = "Submitted";
38
- })(Stage || (Stage = {}));
39
- export var Type;
41
+ })(Stage = exports.Stage || (exports.Stage = {}));
42
+ var Type;
40
43
  (function (Type) {
41
44
  Type["OpportunityCreated"] = "OpportunityCreated";
42
45
  Type["OpportunityMigrated"] = "OpportunityMigrated";
43
46
  Type["OpportunityUpdated"] = "OpportunityUpdated";
44
- })(Type || (Type = {}));
47
+ })(Type = exports.Type || (exports.Type = {}));
@@ -1,10 +1,13 @@
1
- export var ApplicantType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = exports.Title = exports.ResidencyStatus = exports.ActionedByRole = exports.MaritalStatus = exports.InvitationStatus = exports.GuarantorRelationshipToBorrowerType = exports.Gender = exports.Entity = exports.EmploymentType = exports.CreditStatus = exports.HousingStatusList = exports.Countries = exports.ApplicantType = void 0;
4
+ var ApplicantType;
2
5
  (function (ApplicantType) {
3
6
  ApplicantType["Borrower"] = "BORROWER";
4
7
  ApplicantType["BorrowerAndGuarantor"] = "BORROWER_AND_GUARANTOR";
5
8
  ApplicantType["Guarantor"] = "GUARANTOR";
6
- })(ApplicantType || (ApplicantType = {}));
7
- export var Countries;
9
+ })(ApplicantType = exports.ApplicantType || (exports.ApplicantType = {}));
10
+ var Countries;
8
11
  (function (Countries) {
9
12
  Countries["Afghanistan"] = "Afghanistan";
10
13
  Countries["Albania"] = "Albania";
@@ -245,8 +248,8 @@ export var Countries;
245
248
  Countries["Yemen"] = "Yemen";
246
249
  Countries["Zambia"] = "Zambia";
247
250
  Countries["Zimbabwe"] = "Zimbabwe";
248
- })(Countries || (Countries = {}));
249
- export var HousingStatusList;
251
+ })(Countries = exports.Countries || (exports.Countries = {}));
252
+ var HousingStatusList;
250
253
  (function (HousingStatusList) {
251
254
  HousingStatusList["Boarding"] = "Boarding";
252
255
  HousingStatusList["Caravan"] = "Caravan";
@@ -256,45 +259,45 @@ export var HousingStatusList;
256
259
  HousingStatusList["Renting"] = "Renting";
257
260
  HousingStatusList["SuppliedByEmployer"] = "Supplied by Employer";
258
261
  HousingStatusList["WithParents"] = "With Parents";
259
- })(HousingStatusList || (HousingStatusList = {}));
262
+ })(HousingStatusList = exports.HousingStatusList || (exports.HousingStatusList = {}));
260
263
  /**
261
264
  * current credit status of the applicant (Customer declared value)
262
265
  */
263
- export var CreditStatus;
266
+ var CreditStatus;
264
267
  (function (CreditStatus) {
265
268
  CreditStatus["Average"] = "AVERAGE";
266
269
  CreditStatus["Excellent"] = "EXCELLENT";
267
270
  CreditStatus["Fair"] = "FAIR";
268
271
  CreditStatus["Unknown"] = "UNKNOWN";
269
- })(CreditStatus || (CreditStatus = {}));
272
+ })(CreditStatus = exports.CreditStatus || (exports.CreditStatus = {}));
270
273
  /**
271
274
  * applicant's employment type
272
275
  */
273
- export var EmploymentType;
276
+ var EmploymentType;
274
277
  (function (EmploymentType) {
275
278
  EmploymentType["Employee"] = "EMPLOYEE";
276
279
  EmploymentType["SelfEmployed"] = "SELF_EMPLOYED";
277
280
  EmploymentType["Unknown"] = "UNKNOWN";
278
- })(EmploymentType || (EmploymentType = {}));
281
+ })(EmploymentType = exports.EmploymentType || (exports.EmploymentType = {}));
279
282
  /**
280
283
  * applicant's entity. For a person applicant this is 'PERSON'
281
284
  */
282
- export var Entity;
285
+ var Entity;
283
286
  (function (Entity) {
284
287
  Entity["Company"] = "COMPANY";
285
288
  Entity["Person"] = "PERSON";
286
- })(Entity || (Entity = {}));
287
- export var Gender;
289
+ })(Entity = exports.Entity || (exports.Entity = {}));
290
+ var Gender;
288
291
  (function (Gender) {
289
292
  Gender["Female"] = "FEMALE";
290
293
  Gender["Male"] = "MALE";
291
294
  Gender["Undisclosed"] = "UNDISCLOSED";
292
295
  Gender["Unknown"] = "UNKNOWN";
293
- })(Gender || (Gender = {}));
296
+ })(Gender = exports.Gender || (exports.Gender = {}));
294
297
  /**
295
298
  * The relationship between borrower and guarantor.
296
299
  */
297
- export var GuarantorRelationshipToBorrowerType;
300
+ var GuarantorRelationshipToBorrowerType;
298
301
  (function (GuarantorRelationshipToBorrowerType) {
299
302
  GuarantorRelationshipToBorrowerType["Brother"] = "Brother";
300
303
  GuarantorRelationshipToBorrowerType["Daughter"] = "Daughter";
@@ -305,41 +308,41 @@ export var GuarantorRelationshipToBorrowerType;
305
308
  GuarantorRelationshipToBorrowerType["Sister"] = "Sister";
306
309
  GuarantorRelationshipToBorrowerType["Son"] = "Son";
307
310
  GuarantorRelationshipToBorrowerType["Spouse"] = "Spouse";
308
- })(GuarantorRelationshipToBorrowerType || (GuarantorRelationshipToBorrowerType = {}));
311
+ })(GuarantorRelationshipToBorrowerType = exports.GuarantorRelationshipToBorrowerType || (exports.GuarantorRelationshipToBorrowerType = {}));
309
312
  /**
310
313
  * different invitation statuses an applicant can have
311
314
  */
312
- export var InvitationStatus;
315
+ var InvitationStatus;
313
316
  (function (InvitationStatus) {
314
317
  InvitationStatus["Accepted"] = "ACCEPTED";
315
318
  InvitationStatus["Cancelled"] = "CANCELLED";
316
319
  InvitationStatus["Expired"] = "EXPIRED";
317
320
  InvitationStatus["Pending"] = "PENDING";
318
- })(InvitationStatus || (InvitationStatus = {}));
319
- export var MaritalStatus;
321
+ })(InvitationStatus = exports.InvitationStatus || (exports.InvitationStatus = {}));
322
+ var MaritalStatus;
320
323
  (function (MaritalStatus) {
321
324
  MaritalStatus["DeFacto"] = "DE_FACTO";
322
325
  MaritalStatus["Divorced"] = "DIVORCED";
323
326
  MaritalStatus["Married"] = "MARRIED";
324
327
  MaritalStatus["Single"] = "SINGLE";
325
328
  MaritalStatus["Unknown"] = "UNKNOWN";
326
- })(MaritalStatus || (MaritalStatus = {}));
329
+ })(MaritalStatus = exports.MaritalStatus || (exports.MaritalStatus = {}));
327
330
  /**
328
331
  * role of the user that made the action
329
332
  */
330
- export var ActionedByRole;
333
+ var ActionedByRole;
331
334
  (function (ActionedByRole) {
332
335
  ActionedByRole["Customer"] = "customer";
333
336
  ActionedByRole["Team"] = "team";
334
- })(ActionedByRole || (ActionedByRole = {}));
335
- export var ResidencyStatus;
337
+ })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
338
+ var ResidencyStatus;
336
339
  (function (ResidencyStatus) {
337
340
  ResidencyStatus["AustralianCitizen"] = "AUSTRALIAN_CITIZEN";
338
341
  ResidencyStatus["PermanentResident"] = "PERMANENT_RESIDENT";
339
342
  ResidencyStatus["TemporaryResident"] = "TEMPORARY_RESIDENT";
340
343
  ResidencyStatus["Unknown"] = "UNKNOWN";
341
- })(ResidencyStatus || (ResidencyStatus = {}));
342
- export var Title;
344
+ })(ResidencyStatus = exports.ResidencyStatus || (exports.ResidencyStatus = {}));
345
+ var Title;
343
346
  (function (Title) {
344
347
  Title["DR"] = "DR";
345
348
  Title["MS"] = "MS";
@@ -347,9 +350,9 @@ export var Title;
347
350
  Title["Mr"] = "MR";
348
351
  Title["Mrs"] = "MRS";
349
352
  Title["Unknown"] = "UNKNOWN";
350
- })(Title || (Title = {}));
351
- export var Type;
353
+ })(Title = exports.Title || (exports.Title = {}));
354
+ var Type;
352
355
  (function (Type) {
353
356
  Type["CreateApplicant"] = "CreateApplicant";
354
357
  Type["UpdateApplicant"] = "UpdateApplicant";
355
- })(Type || (Type = {}));
358
+ })(Type = exports.Type || (exports.Type = {}));
@@ -18,6 +18,7 @@ export interface Payload {
18
18
  hidden?: boolean;
19
19
  highIntent?: boolean;
20
20
  id: string;
21
+ isFastRefi?: boolean;
21
22
  meta?: ApplicationMeta;
22
23
  name?: string;
23
24
  preliminary: Preliminary;