loanshub-shared 1.3.2 → 1.3.4

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.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from "./typings/salestrekker";
4
4
  export * from "./typings/firebase";
5
5
  export * from "./utils";
6
6
  export * from "./nominatimAddress";
7
+ export * from "./assetPropertyAddress";
package/lib/index.js CHANGED
@@ -20,4 +20,5 @@ __exportStar(require("./typings/salestrekker"), exports);
20
20
  __exportStar(require("./typings/firebase"), exports);
21
21
  __exportStar(require("./utils"), exports);
22
22
  __exportStar(require("./nominatimAddress"), exports);
23
+ __exportStar(require("./assetPropertyAddress"), exports);
23
24
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,qDAAmC;AACnC,yDAAuC;AACvC,qDAAmC;AACnC,0CAAwB;AACxB,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,qDAAmC;AACnC,yDAAuC;AACvC,qDAAmC;AACnC,0CAAwB;AACxB,qDAAmC;AACnC,yDAAuC"}
@@ -1,6 +1,7 @@
1
1
  import { LoanTypes, AppApplicant, AppAsset, AppLiability, AppAddress, YesNoValues } from ".";
2
2
  import { ContactNextOfKinRelationshipEnumerator, PaymentFrequencyEnumerator } from "../salestrekker";
3
3
  import { AppAttachment } from "./attachment";
4
+ import { RateReviewFlowType, RateReviewLifecycleStatus } from "./rateReview";
4
5
  export interface AppApplication<Timestamp> {
5
6
  title?: string;
6
7
  loanType: LoanTypes;
@@ -66,6 +67,11 @@ export interface AppApplication<Timestamp> {
66
67
  lenderAppId?: string;
67
68
  rateReviewEnabled?: boolean;
68
69
  nextRateReviewDate?: Timestamp;
70
+ /** Current step in the post-settlement rate capture and refinance flow. */
71
+ rateReviewStatus?: RateReviewLifecycleStatus;
72
+ rateReviewFlowType?: RateReviewFlowType;
73
+ /** Refinance application created from this rate-review flow. */
74
+ rateReviewRefinanceApplicationId?: string;
69
75
  /** When the application was created in Firebase */
70
76
  created: Timestamp;
71
77
  /** when the application was submitted to Firebase, (and it left `Draft` status and was sent to Salestrekker) */
@@ -1 +1 @@
1
- {"version":3,"file":"application.js","sourceRoot":"","sources":["../../../src/typings/loanshub/application.ts"],"names":[],"mappings":";;;AAoHA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,iDAAgC,CAAA;IAChC,0CAAyB,CAAA;AAC3B,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"}
1
+ {"version":3,"file":"application.js","sourceRoot":"","sources":["../../../src/typings/loanshub/application.ts"],"names":[],"mappings":";;;AA0HA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,iDAAgC,CAAA;IAChC,0CAAyB,CAAA;AAC3B,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"}
@@ -1,8 +1,10 @@
1
1
  import { AssetTypeEnumerator } from "../salestrekker";
2
+ import type { AppAssetPropertyAddress } from "../../assetPropertyAddress";
2
3
  export interface AppAsset {
3
4
  type: AssetTypeEnumerator;
4
5
  value: number;
5
- address: string;
6
+ /** Property assets: structured Australian address (legacy string is normalized on load). */
7
+ address?: AppAssetPropertyAddress | string;
6
8
  isSecurity: boolean;
7
9
  monthlyRentalIncome?: number;
8
10
  description: string;
@@ -2,3 +2,33 @@ export interface RateReviewRecord<T> {
2
2
  sentDate: T;
3
3
  body: string;
4
4
  }
5
+ export declare enum RateReviewFlowType {
6
+ Regular = "REGULAR",
7
+ Legacy = "LEGACY"
8
+ }
9
+ /** The application's current position in the complete rate-review journey. */
10
+ export declare enum RateReviewLifecycleStatus {
11
+ ReadyForRateCapture = "READY_FOR_RATE_CAPTURE",
12
+ RateCaptureFormSent = "RATE_CAPTURE_FORM_SENT",
13
+ RateCaptureFormOpened = "RATE_CAPTURE_FORM_OPENED",
14
+ RateCaptureSubmitted = "RATE_CAPTURE_SUBMITTED",
15
+ WaitingForRateReview = "WAITING_FOR_RATE_REVIEW",
16
+ RateReviewDue = "RATE_REVIEW_DUE",
17
+ RateReviewFormSent = "RATE_REVIEW_FORM_SENT",
18
+ RateReviewFormOpened = "RATE_REVIEW_FORM_OPENED",
19
+ RateReviewSubmitted = "RATE_REVIEW_SUBMITTED",
20
+ PendingEligibilityCheck = "PENDING_ELIGIBILITY_CHECK",
21
+ NotEligibleClosed = "NOT_ELIGIBLE_CLOSED",
22
+ RefinanceEligible = "REFINANCE_ELIGIBLE",
23
+ RefinanceInviteSent = "REFINANCE_INVITE_SENT",
24
+ RefinanceApplicationCreated = "REFINANCE_APPLICATION_CREATED",
25
+ RefinanceApplicationSubmitted = "REFINANCE_APPLICATION_SUBMITTED",
26
+ RefinanceSettled = "REFINANCE_SETTLED",
27
+ RateCaptureExpired = "RATE_CAPTURE_EXPIRED",
28
+ RateReviewExpired = "RATE_REVIEW_EXPIRED",
29
+ EmailDeliveryFailed = "EMAIL_DELIVERY_FAILED",
30
+ CustomerOptedOut = "CUSTOMER_OPTED_OUT",
31
+ LoanNoLongerActive = "LOAN_NO_LONGER_ACTIVE",
32
+ FlowCancelled = "FLOW_CANCELLED"
33
+ }
34
+ export declare const RateReviewLifecycleStatusLabels: Record<RateReviewLifecycleStatus, string>;
@@ -1,3 +1,59 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RateReviewLifecycleStatusLabels = exports.RateReviewLifecycleStatus = exports.RateReviewFlowType = void 0;
4
+ var RateReviewFlowType;
5
+ (function (RateReviewFlowType) {
6
+ RateReviewFlowType["Regular"] = "REGULAR";
7
+ RateReviewFlowType["Legacy"] = "LEGACY";
8
+ })(RateReviewFlowType || (exports.RateReviewFlowType = RateReviewFlowType = {}));
9
+ /** The application's current position in the complete rate-review journey. */
10
+ var RateReviewLifecycleStatus;
11
+ (function (RateReviewLifecycleStatus) {
12
+ RateReviewLifecycleStatus["ReadyForRateCapture"] = "READY_FOR_RATE_CAPTURE";
13
+ RateReviewLifecycleStatus["RateCaptureFormSent"] = "RATE_CAPTURE_FORM_SENT";
14
+ RateReviewLifecycleStatus["RateCaptureFormOpened"] = "RATE_CAPTURE_FORM_OPENED";
15
+ RateReviewLifecycleStatus["RateCaptureSubmitted"] = "RATE_CAPTURE_SUBMITTED";
16
+ RateReviewLifecycleStatus["WaitingForRateReview"] = "WAITING_FOR_RATE_REVIEW";
17
+ RateReviewLifecycleStatus["RateReviewDue"] = "RATE_REVIEW_DUE";
18
+ RateReviewLifecycleStatus["RateReviewFormSent"] = "RATE_REVIEW_FORM_SENT";
19
+ RateReviewLifecycleStatus["RateReviewFormOpened"] = "RATE_REVIEW_FORM_OPENED";
20
+ RateReviewLifecycleStatus["RateReviewSubmitted"] = "RATE_REVIEW_SUBMITTED";
21
+ RateReviewLifecycleStatus["PendingEligibilityCheck"] = "PENDING_ELIGIBILITY_CHECK";
22
+ RateReviewLifecycleStatus["NotEligibleClosed"] = "NOT_ELIGIBLE_CLOSED";
23
+ RateReviewLifecycleStatus["RefinanceEligible"] = "REFINANCE_ELIGIBLE";
24
+ RateReviewLifecycleStatus["RefinanceInviteSent"] = "REFINANCE_INVITE_SENT";
25
+ RateReviewLifecycleStatus["RefinanceApplicationCreated"] = "REFINANCE_APPLICATION_CREATED";
26
+ RateReviewLifecycleStatus["RefinanceApplicationSubmitted"] = "REFINANCE_APPLICATION_SUBMITTED";
27
+ RateReviewLifecycleStatus["RefinanceSettled"] = "REFINANCE_SETTLED";
28
+ RateReviewLifecycleStatus["RateCaptureExpired"] = "RATE_CAPTURE_EXPIRED";
29
+ RateReviewLifecycleStatus["RateReviewExpired"] = "RATE_REVIEW_EXPIRED";
30
+ RateReviewLifecycleStatus["EmailDeliveryFailed"] = "EMAIL_DELIVERY_FAILED";
31
+ RateReviewLifecycleStatus["CustomerOptedOut"] = "CUSTOMER_OPTED_OUT";
32
+ RateReviewLifecycleStatus["LoanNoLongerActive"] = "LOAN_NO_LONGER_ACTIVE";
33
+ RateReviewLifecycleStatus["FlowCancelled"] = "FLOW_CANCELLED";
34
+ })(RateReviewLifecycleStatus || (exports.RateReviewLifecycleStatus = RateReviewLifecycleStatus = {}));
35
+ exports.RateReviewLifecycleStatusLabels = {
36
+ [RateReviewLifecycleStatus.ReadyForRateCapture]: "Ready for rate capture",
37
+ [RateReviewLifecycleStatus.RateCaptureFormSent]: "Rate capture form sent",
38
+ [RateReviewLifecycleStatus.RateCaptureFormOpened]: "Rate capture form opened",
39
+ [RateReviewLifecycleStatus.RateCaptureSubmitted]: "Rate capture submitted",
40
+ [RateReviewLifecycleStatus.WaitingForRateReview]: "Waiting for rate review",
41
+ [RateReviewLifecycleStatus.RateReviewDue]: "Rate review due",
42
+ [RateReviewLifecycleStatus.RateReviewFormSent]: "Rate review form sent",
43
+ [RateReviewLifecycleStatus.RateReviewFormOpened]: "Rate review form opened",
44
+ [RateReviewLifecycleStatus.RateReviewSubmitted]: "Rate review submitted",
45
+ [RateReviewLifecycleStatus.PendingEligibilityCheck]: "Checking eligibility",
46
+ [RateReviewLifecycleStatus.NotEligibleClosed]: "Not eligible — closed",
47
+ [RateReviewLifecycleStatus.RefinanceEligible]: "Refinance eligible",
48
+ [RateReviewLifecycleStatus.RefinanceInviteSent]: "Refinance invite sent",
49
+ [RateReviewLifecycleStatus.RefinanceApplicationCreated]: "Refinance application created",
50
+ [RateReviewLifecycleStatus.RefinanceApplicationSubmitted]: "Refinance application submitted",
51
+ [RateReviewLifecycleStatus.RefinanceSettled]: "Refinance settled",
52
+ [RateReviewLifecycleStatus.RateCaptureExpired]: "Rate capture expired",
53
+ [RateReviewLifecycleStatus.RateReviewExpired]: "Rate review expired",
54
+ [RateReviewLifecycleStatus.EmailDeliveryFailed]: "Email delivery failed",
55
+ [RateReviewLifecycleStatus.CustomerOptedOut]: "Customer opted out",
56
+ [RateReviewLifecycleStatus.LoanNoLongerActive]: "Loan no longer active",
57
+ [RateReviewLifecycleStatus.FlowCancelled]: "Flow cancelled",
58
+ };
3
59
  //# sourceMappingURL=rateReview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rateReview.js","sourceRoot":"","sources":["../../../src/typings/loanshub/rateReview.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"rateReview.js","sourceRoot":"","sources":["../../../src/typings/loanshub/rateReview.ts"],"names":[],"mappings":";;;AAKA,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;AACnB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,8EAA8E;AAC9E,IAAY,yBAuBX;AAvBD,WAAY,yBAAyB;IACnC,2EAA8C,CAAA;IAC9C,2EAA8C,CAAA;IAC9C,+EAAkD,CAAA;IAClD,4EAA+C,CAAA;IAC/C,6EAAgD,CAAA;IAChD,8DAAiC,CAAA;IACjC,yEAA4C,CAAA;IAC5C,6EAAgD,CAAA;IAChD,0EAA6C,CAAA;IAC7C,kFAAqD,CAAA;IACrD,sEAAyC,CAAA;IACzC,qEAAwC,CAAA;IACxC,0EAA6C,CAAA;IAC7C,0FAA6D,CAAA;IAC7D,8FAAiE,CAAA;IACjE,mEAAsC,CAAA;IACtC,wEAA2C,CAAA;IAC3C,sEAAyC,CAAA;IACzC,0EAA6C,CAAA;IAC7C,oEAAuC,CAAA;IACvC,yEAA4C,CAAA;IAC5C,6DAAgC,CAAA;AAClC,CAAC,EAvBW,yBAAyB,yCAAzB,yBAAyB,QAuBpC;AAEY,QAAA,+BAA+B,GAA8C;IACxF,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,EAAE,wBAAwB;IACzE,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,EAAE,wBAAwB;IACzE,CAAC,yBAAyB,CAAC,qBAAqB,CAAC,EAAE,0BAA0B;IAC7E,CAAC,yBAAyB,CAAC,oBAAoB,CAAC,EAAE,wBAAwB;IAC1E,CAAC,yBAAyB,CAAC,oBAAoB,CAAC,EAAE,yBAAyB;IAC3E,CAAC,yBAAyB,CAAC,aAAa,CAAC,EAAE,iBAAiB;IAC5D,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,EAAE,uBAAuB;IACvE,CAAC,yBAAyB,CAAC,oBAAoB,CAAC,EAAE,yBAAyB;IAC3E,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,EAAE,uBAAuB;IACxE,CAAC,yBAAyB,CAAC,uBAAuB,CAAC,EAAE,sBAAsB;IAC3E,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,EAAE,uBAAuB;IACtE,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,EAAE,oBAAoB;IACnE,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,EAAE,uBAAuB;IACxE,CAAC,yBAAyB,CAAC,2BAA2B,CAAC,EAAE,+BAA+B;IACxF,CAAC,yBAAyB,CAAC,6BAA6B,CAAC,EAAE,iCAAiC;IAC5F,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,EAAE,mBAAmB;IACjE,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,EAAE,sBAAsB;IACtE,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,EAAE,qBAAqB;IACpE,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,EAAE,uBAAuB;IACxE,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,EAAE,oBAAoB;IAClE,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,EAAE,uBAAuB;IACvE,CAAC,yBAAyB,CAAC,aAAa,CAAC,EAAE,gBAAgB;CAC5D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loanshub-shared",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "shared package for loanshub",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -15,6 +15,7 @@
15
15
  "@types/jest": "^29.5.13",
16
16
  "jest": "^29.7.0",
17
17
  "ts-jest": "^29.2.5",
18
- "typescript": "^5.6.3"
18
+ "typescript": "^5.6.3",
19
+ "undici-types": "^8.10.0"
19
20
  }
20
21
  }