@matech/thebigpos-sdk 3.7.0 → 3.8.0-dev-3594

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/src/index.ts CHANGED
@@ -23,6 +23,20 @@ export type UserRole =
23
23
  | "LoanOfficerAssistant"
24
24
  | "SystemAdmin";
25
25
 
26
+ export type TaskType =
27
+ | "Document"
28
+ | "Field"
29
+ | "Signature"
30
+ | "EDisclosure"
31
+ | "EConsent"
32
+ | "VerificationOfAssets"
33
+ | "VerificationOfIncome"
34
+ | "VerificationOfEmployment"
35
+ | "VerificationOfCredit"
36
+ | "Payment"
37
+ | "VerificationOfIncomeAndEmployment"
38
+ | "VerificationOfTaxes";
39
+
26
40
  export type TaskStatus =
27
41
  | "Outstanding"
28
42
  | "Pending"
@@ -96,6 +110,8 @@ export type LoanTitleHeld =
96
110
 
97
111
  export type LoanTaskActivityFilter = "Active" | "Inactive" | "All";
98
112
 
113
+ export type LoanRoleTaskSource = "Rule" | "Manual";
114
+
99
115
  export type LoanRole =
100
116
  | "Borrower"
101
117
  | "CoBorrower"
@@ -270,7 +286,8 @@ export type LoanLogType =
270
286
  | "DocumentClassified"
271
287
  | "CoBorrowerEmailAutoFixed"
272
288
  | "LosFieldWriteBack"
273
- | "ReferrerChangeDiscarded";
289
+ | "ReferrerChangeDiscarded"
290
+ | "TaskEdited";
274
291
 
275
292
  export type LoanLienPosition = "First" | "Subordinate";
276
293
 
@@ -647,7 +664,8 @@ export type AiAuditEventType =
647
664
  | "LoanUpdateProposed"
648
665
  | "LoanUpdateApplied"
649
666
  | "LoanUpdateRefused"
650
- | "PromptTriggerCoalesced";
667
+ | "PromptTriggerCoalesced"
668
+ | "RecommendationRunCompleted";
651
669
 
652
670
  export type AddressFamily =
653
671
  | "Unspecified"
@@ -2124,6 +2142,16 @@ export interface CreateLoanImportRequest {
2124
2142
  importMode: CreateLoanImportRequestImportModeEnum;
2125
2143
  }
2126
2144
 
2145
+ export interface CreateLoanRoleTaskRequest {
2146
+ /** @format uuid */
2147
+ taskId: string;
2148
+ role: CreateLoanRoleTaskRequestRoleEnum;
2149
+ /** @format int32 */
2150
+ borrowerPair: number;
2151
+ /** @format int32 */
2152
+ borrowerPosition: number;
2153
+ }
2154
+
2127
2155
  export interface CreateSession {
2128
2156
  sessionId: string;
2129
2157
  sessionUrl: string;
@@ -2577,6 +2605,7 @@ export interface EnabledServices {
2577
2605
  ringCentral?: boolean | null;
2578
2606
  socialSurvey?: boolean | null;
2579
2607
  borrowerTasks?: boolean | null;
2608
+ preBorrowerTasks?: boolean | null;
2580
2609
  docusign?: boolean | null;
2581
2610
  emailNotifications?: boolean | null;
2582
2611
  autoTaskReminders?: boolean | null;
@@ -2837,8 +2866,6 @@ export interface File {
2837
2866
  fileName: string;
2838
2867
  name: string;
2839
2868
  s3FilePath: string;
2840
- user?: User | null;
2841
- account?: Account | null;
2842
2869
  url: string;
2843
2870
  }
2844
2871
 
@@ -3261,7 +3288,6 @@ export interface Invite {
3261
3288
  /** @format date-time */
3262
3289
  expiresAt?: string | null;
3263
3290
  status: string;
3264
- invitedBy?: User | null;
3265
3291
  loan: LoanIdentifier;
3266
3292
  url: string;
3267
3293
  }
@@ -4392,7 +4418,7 @@ export interface LoanDocument {
4392
4418
  /** @format uuid */
4393
4419
  id: string;
4394
4420
  name: string;
4395
- loan: Loan;
4421
+ loan: LoanIdentifier;
4396
4422
  user?: UserSummary | null;
4397
4423
  /** @deprecated */
4398
4424
  initialBucket?: string | null;
@@ -4569,6 +4595,7 @@ export interface LoanFinancialRequest {
4569
4595
  cashToClose?: number | null;
4570
4596
  /** @format double */
4571
4597
  cashDownPayment?: number | null;
4598
+ downPaymentPercent?: string | null;
4572
4599
  /** @format double */
4573
4600
  maximumPurchasePrice?: number | null;
4574
4601
  isDownPaymentGift?: boolean | null;
@@ -5006,6 +5033,25 @@ export interface LoanQueueWithData {
5006
5033
  data?: any | null;
5007
5034
  }
5008
5035
 
5036
+ export interface LoanRecommendation {
5037
+ /** @format uuid */
5038
+ id: string;
5039
+ canonicalName: string;
5040
+ displayName: string;
5041
+ extractedValue: string;
5042
+ currentLoanValue?: any | null;
5043
+ /** @format uuid */
5044
+ sourceDocumentId: string;
5045
+ sourceDocumentName?: string | null;
5046
+ /** @format float */
5047
+ confidence: number;
5048
+ /** @format uuid */
5049
+ borrowerId?: string | null;
5050
+ borrowerName?: string | null;
5051
+ /** @format date-time */
5052
+ detectedAt: string;
5053
+ }
5054
+
5009
5055
  export interface LoanRecord {
5010
5056
  loanGuid: string;
5011
5057
  loanFields: Record<string, string>;
@@ -5059,6 +5105,54 @@ export interface LoanRefinanceRequest {
5059
5105
  currentLoan?: LoanRefinanceCurrentLoanRequest | null;
5060
5106
  }
5061
5107
 
5108
+ export interface LoanRoleSlotTasks {
5109
+ role: LoanRoleSlotTasksRoleEnum;
5110
+ /** @format int32 */
5111
+ borrowerPair: number;
5112
+ /** @format int32 */
5113
+ borrowerPosition: number;
5114
+ tasks: LoanRoleTask[];
5115
+ }
5116
+
5117
+ export interface LoanRoleTask {
5118
+ /** @format uuid */
5119
+ id: string;
5120
+ /** @format uuid */
5121
+ loanId: string;
5122
+ role: LoanRoleTaskRoleEnum;
5123
+ /** @format int32 */
5124
+ borrowerPair: number;
5125
+ /** @format int32 */
5126
+ borrowerPosition: number;
5127
+ /** @format uuid */
5128
+ definitionTaskId: string;
5129
+ /** @format uuid */
5130
+ taskId: string;
5131
+ name: string;
5132
+ description?: string | null;
5133
+ type: LoanRoleTaskTypeEnum;
5134
+ losTarget?: string | null;
5135
+ /** @format int32 */
5136
+ daysDueFromApplication?: number | null;
5137
+ /** @format int32 */
5138
+ weight: number;
5139
+ willAutocompleteAfterResponse: boolean;
5140
+ /** @format uuid */
5141
+ loanDocumentFolderId?: string | null;
5142
+ /** @format date */
5143
+ dueDate?: string | null;
5144
+ source: LoanRoleTaskSourceEnum;
5145
+ isAttached: boolean;
5146
+ /** @format uuid */
5147
+ attachedUserLoanTaskId?: string | null;
5148
+ /** @format date-time */
5149
+ attachedAt?: string | null;
5150
+ /** @format uuid */
5151
+ createdById?: string | null;
5152
+ /** @format date-time */
5153
+ createdAt: string;
5154
+ }
5155
+
5062
5156
  export interface LoanSearchCriteria {
5063
5157
  searchText?: string | null;
5064
5158
  searchTerms?: string[] | null;
@@ -5087,6 +5181,7 @@ export interface LoanSearchCriteria {
5087
5181
  closingFrom?: string | null;
5088
5182
  /** @format date */
5089
5183
  closingTo?: string | null;
5184
+ milestoneConfigurationIds?: string[] | null;
5090
5185
  }
5091
5186
 
5092
5187
  export interface LoanSettings {
@@ -5422,6 +5517,11 @@ export interface ManualDocumentClassificationRequest {
5422
5517
  documentType: ManualDocumentClassificationRequestDocumentTypeEnum;
5423
5518
  }
5424
5519
 
5520
+ export interface MaterializeLoanRoleTasks {
5521
+ /** @format int32 */
5522
+ rowsAdded: number;
5523
+ }
5524
+
5425
5525
  export interface MdmUser {
5426
5526
  user_email?: string | null;
5427
5527
  user_id?: string | null;
@@ -6855,6 +6955,8 @@ export interface Task {
6855
6955
  isGlobal: boolean;
6856
6956
  /** @format uuid */
6857
6957
  id: string;
6958
+ /** @format uuid */
6959
+ sourceTaskID?: string | null;
6858
6960
  user?: User | null;
6859
6961
  isFromLegacySource: boolean;
6860
6962
  usedInBusinessRule: boolean;
@@ -7212,6 +7314,17 @@ export interface UpdateLoanQueueRequest {
7212
7314
  data: any;
7213
7315
  }
7214
7316
 
7317
+ export interface UpdateLoanRoleTaskRequest {
7318
+ name?: string | null;
7319
+ description?: string | null;
7320
+ /** @format int32 */
7321
+ weight?: number | null;
7322
+ /** @format uuid */
7323
+ loanDocumentFolderId?: string | null;
7324
+ /** @format date */
7325
+ dueDate?: string | null;
7326
+ }
7327
+
7215
7328
  export interface UpdateMeRequest {
7216
7329
  phone?: string | null;
7217
7330
  firstName: string;
@@ -7613,6 +7726,12 @@ export interface UserLoanTaskUpdateRequest {
7613
7726
  value?: string | null;
7614
7727
  /** @format date */
7615
7728
  dueDate?: string | null;
7729
+ name?: string | null;
7730
+ description?: string | null;
7731
+ /** @format int32 */
7732
+ weight?: number | null;
7733
+ /** @format uuid */
7734
+ loanDocumentFolderId?: string | null;
7616
7735
  }
7617
7736
 
7618
7737
  export interface UserMobilePhoneVerificationRequest {
@@ -7818,7 +7937,8 @@ export type AiAuditLogEventTypeEnum =
7818
7937
  | "LoanUpdateProposed"
7819
7938
  | "LoanUpdateApplied"
7820
7939
  | "LoanUpdateRefused"
7821
- | "PromptTriggerCoalesced";
7940
+ | "PromptTriggerCoalesced"
7941
+ | "RecommendationRunCompleted";
7822
7942
 
7823
7943
  export type AiChatStructuredDataTypeEnum =
7824
7944
  | "Table"
@@ -7961,6 +8081,21 @@ export type CreateLoanImportRequestImportModeEnum =
7961
8081
  | "NewOnly"
7962
8082
  | "UpdateOnly";
7963
8083
 
8084
+ export type CreateLoanRoleTaskRequestRoleEnum =
8085
+ | "Borrower"
8086
+ | "CoBorrower"
8087
+ | "NonBorrower"
8088
+ | "LoanOfficer"
8089
+ | "LoanProcessor"
8090
+ | "LoanOfficerAssistant"
8091
+ | "SupportingLoanOfficer"
8092
+ | "BuyerAgent"
8093
+ | "SellerAgent"
8094
+ | "TitleInsuranceAgent"
8095
+ | "EscrowAgent"
8096
+ | "SettlementAgent"
8097
+ | "Admin";
8098
+
7964
8099
  export type CreateUserDraftLoanRoleEnum =
7965
8100
  | "Borrower"
7966
8101
  | "CoBorrower"
@@ -8238,7 +8373,8 @@ export type LoanLogTypeEnum =
8238
8373
  | "DocumentClassified"
8239
8374
  | "CoBorrowerEmailAutoFixed"
8240
8375
  | "LosFieldWriteBack"
8241
- | "ReferrerChangeDiscarded";
8376
+ | "ReferrerChangeDiscarded"
8377
+ | "TaskEdited";
8242
8378
 
8243
8379
  export type LoanLogDetailLevelEnum = "None" | "Info" | "Warning" | "Error";
8244
8380
 
@@ -8262,7 +8398,54 @@ export type LoanLogDetailTypeEnum =
8262
8398
  | "DocumentClassified"
8263
8399
  | "CoBorrowerEmailAutoFixed"
8264
8400
  | "LosFieldWriteBack"
8265
- | "ReferrerChangeDiscarded";
8401
+ | "ReferrerChangeDiscarded"
8402
+ | "TaskEdited";
8403
+
8404
+ export type LoanRoleSlotTasksRoleEnum =
8405
+ | "Borrower"
8406
+ | "CoBorrower"
8407
+ | "NonBorrower"
8408
+ | "LoanOfficer"
8409
+ | "LoanProcessor"
8410
+ | "LoanOfficerAssistant"
8411
+ | "SupportingLoanOfficer"
8412
+ | "BuyerAgent"
8413
+ | "SellerAgent"
8414
+ | "TitleInsuranceAgent"
8415
+ | "EscrowAgent"
8416
+ | "SettlementAgent"
8417
+ | "Admin";
8418
+
8419
+ export type LoanRoleTaskRoleEnum =
8420
+ | "Borrower"
8421
+ | "CoBorrower"
8422
+ | "NonBorrower"
8423
+ | "LoanOfficer"
8424
+ | "LoanProcessor"
8425
+ | "LoanOfficerAssistant"
8426
+ | "SupportingLoanOfficer"
8427
+ | "BuyerAgent"
8428
+ | "SellerAgent"
8429
+ | "TitleInsuranceAgent"
8430
+ | "EscrowAgent"
8431
+ | "SettlementAgent"
8432
+ | "Admin";
8433
+
8434
+ export type LoanRoleTaskTypeEnum =
8435
+ | "Document"
8436
+ | "Field"
8437
+ | "Signature"
8438
+ | "EDisclosure"
8439
+ | "EConsent"
8440
+ | "VerificationOfAssets"
8441
+ | "VerificationOfIncome"
8442
+ | "VerificationOfEmployment"
8443
+ | "VerificationOfCredit"
8444
+ | "Payment"
8445
+ | "VerificationOfIncomeAndEmployment"
8446
+ | "VerificationOfTaxes";
8447
+
8448
+ export type LoanRoleTaskSourceEnum = "Rule" | "Manual";
8266
8449
 
8267
8450
  export type LoanTaskStatusSummaryStatusEnum =
8268
8451
  | "Outstanding"
@@ -8768,7 +8951,7 @@ export class HttpClient<SecurityDataType = unknown> {
8768
8951
 
8769
8952
  /**
8770
8953
  * @title The Big POS API
8771
- * @version v3.7.0
8954
+ * @version v3.8.0
8772
8955
  * @termsOfService https://www.thebigpos.com/terms-of-use/
8773
8956
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
8774
8957
  */
@@ -16265,6 +16448,194 @@ export class Api<
16265
16448
  ...params,
16266
16449
  }),
16267
16450
 
16451
+ /**
16452
+ * No description
16453
+ *
16454
+ * @tags LoanRecommendations
16455
+ * @name GetLoanRecommendations
16456
+ * @summary Get a loan's open recommendations
16457
+ * @request GET:/api/loans/{loanId}/recommendations
16458
+ * @secure
16459
+ * @response `200` `(LoanRecommendation)[]` OK
16460
+ * @response `400` `ProblemDetails` Bad Request
16461
+ * @response `404` `ProblemDetails` Not Found
16462
+ */
16463
+ getLoanRecommendations: (loanId: string, params: RequestParams = {}) =>
16464
+ this.request<LoanRecommendation[], ProblemDetails>({
16465
+ path: `/api/loans/${loanId}/recommendations`,
16466
+ method: "GET",
16467
+ secure: true,
16468
+ format: "json",
16469
+ ...params,
16470
+ }),
16471
+
16472
+ /**
16473
+ * No description
16474
+ *
16475
+ * @tags LoanRecommendations
16476
+ * @name DismissLoanRecommendation
16477
+ * @summary Dismiss a loan recommendation
16478
+ * @request POST:/api/loans/{loanId}/recommendations/{id}/dismiss
16479
+ * @secure
16480
+ * @response `204` `void` No Content
16481
+ * @response `400` `ProblemDetails` Bad Request
16482
+ * @response `404` `ProblemDetails` Not Found
16483
+ */
16484
+ dismissLoanRecommendation: (
16485
+ loanId: string,
16486
+ id: string,
16487
+ params: RequestParams = {},
16488
+ ) =>
16489
+ this.request<void, ProblemDetails>({
16490
+ path: `/api/loans/${loanId}/recommendations/${id}/dismiss`,
16491
+ method: "POST",
16492
+ secure: true,
16493
+ ...params,
16494
+ }),
16495
+
16496
+ /**
16497
+ * No description
16498
+ *
16499
+ * @tags LoanRoleTasks
16500
+ * @name GetLoanRoleTasks
16501
+ * @summary Get queued tasks grouped by borrower slot
16502
+ * @request GET:/api/loans/{loanId}/role-tasks
16503
+ * @secure
16504
+ * @response `200` `(LoanRoleSlotTasks)[]` OK
16505
+ * @response `404` `ProblemDetails` Not Found
16506
+ */
16507
+ getLoanRoleTasks: (loanId: string, params: RequestParams = {}) =>
16508
+ this.request<LoanRoleSlotTasks[], ProblemDetails>({
16509
+ path: `/api/loans/${loanId}/role-tasks`,
16510
+ method: "GET",
16511
+ secure: true,
16512
+ format: "json",
16513
+ ...params,
16514
+ }),
16515
+
16516
+ /**
16517
+ * @description Queues an account template against a borrower slot that has no registered user yet. The row owns a per-loan copy of the template, so editing it never changes the account's catalogue.
16518
+ *
16519
+ * @tags LoanRoleTasks
16520
+ * @name CreateLoanRoleTask
16521
+ * @summary Queue a task for a borrower slot
16522
+ * @request POST:/api/loans/{loanId}/role-tasks
16523
+ * @secure
16524
+ * @response `201` `LoanRoleTask` Created
16525
+ * @response `400` `ProblemDetails` Bad Request
16526
+ * @response `404` `ProblemDetails` Not Found
16527
+ * @response `409` `ProblemDetails` Conflict
16528
+ * @response `422` `ProblemDetails` Unprocessable Content
16529
+ */
16530
+ createLoanRoleTask: (
16531
+ loanId: string,
16532
+ data: CreateLoanRoleTaskRequest,
16533
+ params: RequestParams = {},
16534
+ ) =>
16535
+ this.request<LoanRoleTask, ProblemDetails>({
16536
+ path: `/api/loans/${loanId}/role-tasks`,
16537
+ method: "POST",
16538
+ body: data,
16539
+ secure: true,
16540
+ type: "application/json",
16541
+ format: "json",
16542
+ ...params,
16543
+ }),
16544
+
16545
+ /**
16546
+ * No description
16547
+ *
16548
+ * @tags LoanRoleTasks
16549
+ * @name GetLoanRoleTask
16550
+ * @summary Get a queued task
16551
+ * @request GET:/api/loans/{loanId}/role-tasks/{id}
16552
+ * @secure
16553
+ * @response `200` `LoanRoleTask` OK
16554
+ * @response `404` `ProblemDetails` Not Found
16555
+ */
16556
+ getLoanRoleTask: (loanId: string, id: string, params: RequestParams = {}) =>
16557
+ this.request<LoanRoleTask, ProblemDetails>({
16558
+ path: `/api/loans/${loanId}/role-tasks/${id}`,
16559
+ method: "GET",
16560
+ secure: true,
16561
+ format: "json",
16562
+ ...params,
16563
+ }),
16564
+
16565
+ /**
16566
+ * @description Edits the loan's own copy of the template. The account's catalogue entry is untouched, so the change applies to this borrower only. Omitted fields are left as they are.
16567
+ *
16568
+ * @tags LoanRoleTasks
16569
+ * @name UpdateLoanRoleTask
16570
+ * @summary Edit a queued task
16571
+ * @request PUT:/api/loans/{loanId}/role-tasks/{id}
16572
+ * @secure
16573
+ * @response `200` `LoanRoleTask` OK
16574
+ * @response `400` `ProblemDetails` Bad Request
16575
+ * @response `404` `ProblemDetails` Not Found
16576
+ * @response `409` `ProblemDetails` Conflict
16577
+ * @response `422` `ProblemDetails` Unprocessable Content
16578
+ */
16579
+ updateLoanRoleTask: (
16580
+ loanId: string,
16581
+ id: string,
16582
+ data: UpdateLoanRoleTaskRequest,
16583
+ params: RequestParams = {},
16584
+ ) =>
16585
+ this.request<LoanRoleTask, ProblemDetails>({
16586
+ path: `/api/loans/${loanId}/role-tasks/${id}`,
16587
+ method: "PUT",
16588
+ body: data,
16589
+ secure: true,
16590
+ type: "application/json",
16591
+ format: "json",
16592
+ ...params,
16593
+ }),
16594
+
16595
+ /**
16596
+ * @description Removes a queued task from a borrower slot. The removal is remembered, so a later run of the rules does not queue the same template again.
16597
+ *
16598
+ * @tags LoanRoleTasks
16599
+ * @name DeleteLoanRoleTask
16600
+ * @summary Remove a queued task
16601
+ * @request DELETE:/api/loans/{loanId}/role-tasks/{id}
16602
+ * @secure
16603
+ * @response `204` `void` No Content
16604
+ * @response `404` `ProblemDetails` Not Found
16605
+ * @response `409` `ProblemDetails` Conflict
16606
+ */
16607
+ deleteLoanRoleTask: (
16608
+ loanId: string,
16609
+ id: string,
16610
+ params: RequestParams = {},
16611
+ ) =>
16612
+ this.request<void, ProblemDetails>({
16613
+ path: `/api/loans/${loanId}/role-tasks/${id}`,
16614
+ method: "DELETE",
16615
+ secure: true,
16616
+ ...params,
16617
+ }),
16618
+
16619
+ /**
16620
+ * @description Runs the account's business rules against the loan and queues what is missing. Templates already queued, and ones removed by staff, are left alone.
16621
+ *
16622
+ * @tags LoanRoleTasks
16623
+ * @name MaterializeLoanRoleTasks
16624
+ * @summary Queue the business rule defaults
16625
+ * @request POST:/api/loans/{loanId}/role-tasks/materialize
16626
+ * @secure
16627
+ * @response `200` `MaterializeLoanRoleTasks` OK
16628
+ * @response `404` `ProblemDetails` Not Found
16629
+ */
16630
+ materializeLoanRoleTasks: (loanId: string, params: RequestParams = {}) =>
16631
+ this.request<MaterializeLoanRoleTasks, ProblemDetails>({
16632
+ path: `/api/loans/${loanId}/role-tasks/materialize`,
16633
+ method: "POST",
16634
+ secure: true,
16635
+ format: "json",
16636
+ ...params,
16637
+ }),
16638
+
16268
16639
  /**
16269
16640
  * No description
16270
16641
  *
@@ -17075,6 +17446,7 @@ export class Api<
17075
17446
  * @request POST:/api/loans/{loanId}/users/{userId}
17076
17447
  * @secure
17077
17448
  * @response `201` `LoanUser` Created
17449
+ * @response `404` `ProblemDetails` Not Found
17078
17450
  */
17079
17451
  addLoanUser: (
17080
17452
  loanId: string,
@@ -17082,7 +17454,7 @@ export class Api<
17082
17454
  data: CreateUserLoan,
17083
17455
  params: RequestParams = {},
17084
17456
  ) =>
17085
- this.request<LoanUser, any>({
17457
+ this.request<LoanUser, ProblemDetails>({
17086
17458
  path: `/api/loans/${loanId}/users/${userId}`,
17087
17459
  method: "POST",
17088
17460
  body: data,