@lendi/act-credit-decisions-transform 2.0.4 → 2.0.8

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.
@@ -42,7 +42,7 @@
42
42
  "Withdrawn"
43
43
  ]
44
44
  },
45
- "publishedAt": {
45
+ "createdAt": {
46
46
  "type": "string",
47
47
  "format": "date-time"
48
48
  },
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "source": {
57
57
  "type": "string",
58
- "enum": ["Nextgen", "Simpology"]
58
+ "enum": ["nextgen", "onetwo", "simpology"]
59
59
  },
60
60
  "type": {
61
61
  "type": "string",
@@ -66,7 +66,7 @@
66
66
  "applicationId",
67
67
  "description",
68
68
  "message",
69
- "publishedAt",
69
+ "createdAt",
70
70
  "sourceInternalId",
71
71
  "lenderAssignedId",
72
72
  "source",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isLivingExpenseEstimate = exports.isOtherCommitment = exports.normaliseExpenseAmount = exports.transformExpense = exports.transformExpenses = exports.otherCommitmentExpenseTypes = void 0;
4
+ const lixi_internal_request_1 = require("@lendi/act-eac-integrations-protocol/lib/types/lixi-internal-request");
4
5
  const application_paths_1 = require("@lendi/act-eac-integrations-protocol/lib/utils/application-paths");
5
6
  const lodash_1 = require("lodash");
6
7
  const enum_mappings_1 = require("../types/enum-mappings/");
@@ -38,7 +39,8 @@ function transformExpenses(expense) {
38
39
  // unless all individual expenses have a value of 0 and a living estimate exists, transform them without question.
39
40
  if (expenseBreakdownAmountSum === 0 && livingExpenseEstimateExists) {
40
41
  const estimate = transformExpense(livingExpenseEstimate, applicantId, 0, id);
41
- lixiLivingExpenses = [estimate];
42
+ const changedToGrocery = Object.assign(Object.assign({}, estimate), { '@Category': lixi_internal_request_1.LivingExpenseCategoryList.Groceries, '@Description': public_expense_1.ExpenseType.Groceries });
43
+ lixiLivingExpenses = [changedToGrocery];
42
44
  }
43
45
  else {
44
46
  lixiLivingExpenses = expenseBreakdown.map((expense, index) => transformExpense(expense, applicantId, index, id));
@@ -16,6 +16,7 @@ export interface Payload {
16
16
  */
17
17
  additionalInformation?: string;
18
18
  applicationId: string;
19
+ createdAt: string;
19
20
  description: string;
20
21
  /**
21
22
  * The internal reference id assigned by the lender after it is submitted to them by the
@@ -24,7 +25,6 @@ export interface Payload {
24
25
  */
25
26
  lenderAssignedId: string;
26
27
  message: Message;
27
- publishedAt: string;
28
28
  source: Source;
29
29
  sourceInternalId: string;
30
30
  type: PayloadType;
@@ -51,8 +51,9 @@ export declare enum Message {
51
51
  Withdrawn = "Withdrawn"
52
52
  }
53
53
  export declare enum Source {
54
- Nextgen = "Nextgen",
55
- Simpology = "Simpology"
54
+ Nextgen = "nextgen",
55
+ Onetwo = "onetwo",
56
+ Simpology = "simpology"
56
57
  }
57
58
  export declare enum PayloadType {
58
59
  Event = "event",
@@ -25,8 +25,9 @@ var Message;
25
25
  })(Message || (exports.Message = Message = {}));
26
26
  var Source;
27
27
  (function (Source) {
28
- Source["Nextgen"] = "Nextgen";
29
- Source["Simpology"] = "Simpology";
28
+ Source["Nextgen"] = "nextgen";
29
+ Source["Onetwo"] = "onetwo";
30
+ Source["Simpology"] = "simpology";
30
31
  })(Source || (exports.Source = Source = {}));
31
32
  var PayloadType;
32
33
  (function (PayloadType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/act-credit-decisions-transform",
3
- "version": "2.0.4",
3
+ "version": "2.0.8",
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",