@matech/thebigpos-sdk 3.7.0 → 3.8.0-stag-3544
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/README.md +0 -39
- package/dist/index.d.ts +216 -6
- package/dist/index.js +108 -8
- package/dist/index.js.map +1 -1
- package/package.json +5 -15
- package/scripts/apply-json-patch-content-type.js +36 -189
- package/src/index.ts +382 -16
- package/docs/sdk_generation.md +0 -149
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;
|
|
@@ -5006,6 +5035,25 @@ export interface LoanQueueWithData {
|
|
|
5006
5035
|
data?: any | null;
|
|
5007
5036
|
}
|
|
5008
5037
|
|
|
5038
|
+
export interface LoanRecommendation {
|
|
5039
|
+
/** @format uuid */
|
|
5040
|
+
id: string;
|
|
5041
|
+
canonicalName: string;
|
|
5042
|
+
displayName: string;
|
|
5043
|
+
extractedValue: string;
|
|
5044
|
+
currentLoanValue?: any | null;
|
|
5045
|
+
/** @format uuid */
|
|
5046
|
+
sourceDocumentId: string;
|
|
5047
|
+
sourceDocumentName?: string | null;
|
|
5048
|
+
/** @format float */
|
|
5049
|
+
confidence: number;
|
|
5050
|
+
/** @format uuid */
|
|
5051
|
+
borrowerId?: string | null;
|
|
5052
|
+
borrowerName?: string | null;
|
|
5053
|
+
/** @format date-time */
|
|
5054
|
+
detectedAt: string;
|
|
5055
|
+
}
|
|
5056
|
+
|
|
5009
5057
|
export interface LoanRecord {
|
|
5010
5058
|
loanGuid: string;
|
|
5011
5059
|
loanFields: Record<string, string>;
|
|
@@ -5059,6 +5107,54 @@ export interface LoanRefinanceRequest {
|
|
|
5059
5107
|
currentLoan?: LoanRefinanceCurrentLoanRequest | null;
|
|
5060
5108
|
}
|
|
5061
5109
|
|
|
5110
|
+
export interface LoanRoleSlotTasks {
|
|
5111
|
+
role: LoanRoleSlotTasksRoleEnum;
|
|
5112
|
+
/** @format int32 */
|
|
5113
|
+
borrowerPair: number;
|
|
5114
|
+
/** @format int32 */
|
|
5115
|
+
borrowerPosition: number;
|
|
5116
|
+
tasks: LoanRoleTask[];
|
|
5117
|
+
}
|
|
5118
|
+
|
|
5119
|
+
export interface LoanRoleTask {
|
|
5120
|
+
/** @format uuid */
|
|
5121
|
+
id: string;
|
|
5122
|
+
/** @format uuid */
|
|
5123
|
+
loanId: string;
|
|
5124
|
+
role: LoanRoleTaskRoleEnum;
|
|
5125
|
+
/** @format int32 */
|
|
5126
|
+
borrowerPair: number;
|
|
5127
|
+
/** @format int32 */
|
|
5128
|
+
borrowerPosition: number;
|
|
5129
|
+
/** @format uuid */
|
|
5130
|
+
definitionTaskId: string;
|
|
5131
|
+
/** @format uuid */
|
|
5132
|
+
taskId: string;
|
|
5133
|
+
name: string;
|
|
5134
|
+
description?: string | null;
|
|
5135
|
+
type: LoanRoleTaskTypeEnum;
|
|
5136
|
+
losTarget?: string | null;
|
|
5137
|
+
/** @format int32 */
|
|
5138
|
+
daysDueFromApplication?: number | null;
|
|
5139
|
+
/** @format int32 */
|
|
5140
|
+
weight: number;
|
|
5141
|
+
willAutocompleteAfterResponse: boolean;
|
|
5142
|
+
/** @format uuid */
|
|
5143
|
+
loanDocumentFolderId?: string | null;
|
|
5144
|
+
/** @format date */
|
|
5145
|
+
dueDate?: string | null;
|
|
5146
|
+
source: LoanRoleTaskSourceEnum;
|
|
5147
|
+
isAttached: boolean;
|
|
5148
|
+
/** @format uuid */
|
|
5149
|
+
attachedUserLoanTaskId?: string | null;
|
|
5150
|
+
/** @format date-time */
|
|
5151
|
+
attachedAt?: string | null;
|
|
5152
|
+
/** @format uuid */
|
|
5153
|
+
createdById?: string | null;
|
|
5154
|
+
/** @format date-time */
|
|
5155
|
+
createdAt: string;
|
|
5156
|
+
}
|
|
5157
|
+
|
|
5062
5158
|
export interface LoanSearchCriteria {
|
|
5063
5159
|
searchText?: string | null;
|
|
5064
5160
|
searchTerms?: string[] | null;
|
|
@@ -5087,6 +5183,7 @@ export interface LoanSearchCriteria {
|
|
|
5087
5183
|
closingFrom?: string | null;
|
|
5088
5184
|
/** @format date */
|
|
5089
5185
|
closingTo?: string | null;
|
|
5186
|
+
milestoneConfigurationIds?: string[] | null;
|
|
5090
5187
|
}
|
|
5091
5188
|
|
|
5092
5189
|
export interface LoanSettings {
|
|
@@ -5422,6 +5519,11 @@ export interface ManualDocumentClassificationRequest {
|
|
|
5422
5519
|
documentType: ManualDocumentClassificationRequestDocumentTypeEnum;
|
|
5423
5520
|
}
|
|
5424
5521
|
|
|
5522
|
+
export interface MaterializeLoanRoleTasks {
|
|
5523
|
+
/** @format int32 */
|
|
5524
|
+
rowsAdded: number;
|
|
5525
|
+
}
|
|
5526
|
+
|
|
5425
5527
|
export interface MdmUser {
|
|
5426
5528
|
user_email?: string | null;
|
|
5427
5529
|
user_id?: string | null;
|
|
@@ -6855,6 +6957,8 @@ export interface Task {
|
|
|
6855
6957
|
isGlobal: boolean;
|
|
6856
6958
|
/** @format uuid */
|
|
6857
6959
|
id: string;
|
|
6960
|
+
/** @format uuid */
|
|
6961
|
+
sourceTaskID?: string | null;
|
|
6858
6962
|
user?: User | null;
|
|
6859
6963
|
isFromLegacySource: boolean;
|
|
6860
6964
|
usedInBusinessRule: boolean;
|
|
@@ -7212,6 +7316,17 @@ export interface UpdateLoanQueueRequest {
|
|
|
7212
7316
|
data: any;
|
|
7213
7317
|
}
|
|
7214
7318
|
|
|
7319
|
+
export interface UpdateLoanRoleTaskRequest {
|
|
7320
|
+
name?: string | null;
|
|
7321
|
+
description?: string | null;
|
|
7322
|
+
/** @format int32 */
|
|
7323
|
+
weight?: number | null;
|
|
7324
|
+
/** @format uuid */
|
|
7325
|
+
loanDocumentFolderId?: string | null;
|
|
7326
|
+
/** @format date */
|
|
7327
|
+
dueDate?: string | null;
|
|
7328
|
+
}
|
|
7329
|
+
|
|
7215
7330
|
export interface UpdateMeRequest {
|
|
7216
7331
|
phone?: string | null;
|
|
7217
7332
|
firstName: string;
|
|
@@ -7613,6 +7728,12 @@ export interface UserLoanTaskUpdateRequest {
|
|
|
7613
7728
|
value?: string | null;
|
|
7614
7729
|
/** @format date */
|
|
7615
7730
|
dueDate?: string | null;
|
|
7731
|
+
name?: string | null;
|
|
7732
|
+
description?: string | null;
|
|
7733
|
+
/** @format int32 */
|
|
7734
|
+
weight?: number | null;
|
|
7735
|
+
/** @format uuid */
|
|
7736
|
+
loanDocumentFolderId?: string | null;
|
|
7616
7737
|
}
|
|
7617
7738
|
|
|
7618
7739
|
export interface UserMobilePhoneVerificationRequest {
|
|
@@ -7818,7 +7939,8 @@ export type AiAuditLogEventTypeEnum =
|
|
|
7818
7939
|
| "LoanUpdateProposed"
|
|
7819
7940
|
| "LoanUpdateApplied"
|
|
7820
7941
|
| "LoanUpdateRefused"
|
|
7821
|
-
| "PromptTriggerCoalesced"
|
|
7942
|
+
| "PromptTriggerCoalesced"
|
|
7943
|
+
| "RecommendationRunCompleted";
|
|
7822
7944
|
|
|
7823
7945
|
export type AiChatStructuredDataTypeEnum =
|
|
7824
7946
|
| "Table"
|
|
@@ -7961,6 +8083,21 @@ export type CreateLoanImportRequestImportModeEnum =
|
|
|
7961
8083
|
| "NewOnly"
|
|
7962
8084
|
| "UpdateOnly";
|
|
7963
8085
|
|
|
8086
|
+
export type CreateLoanRoleTaskRequestRoleEnum =
|
|
8087
|
+
| "Borrower"
|
|
8088
|
+
| "CoBorrower"
|
|
8089
|
+
| "NonBorrower"
|
|
8090
|
+
| "LoanOfficer"
|
|
8091
|
+
| "LoanProcessor"
|
|
8092
|
+
| "LoanOfficerAssistant"
|
|
8093
|
+
| "SupportingLoanOfficer"
|
|
8094
|
+
| "BuyerAgent"
|
|
8095
|
+
| "SellerAgent"
|
|
8096
|
+
| "TitleInsuranceAgent"
|
|
8097
|
+
| "EscrowAgent"
|
|
8098
|
+
| "SettlementAgent"
|
|
8099
|
+
| "Admin";
|
|
8100
|
+
|
|
7964
8101
|
export type CreateUserDraftLoanRoleEnum =
|
|
7965
8102
|
| "Borrower"
|
|
7966
8103
|
| "CoBorrower"
|
|
@@ -8238,7 +8375,8 @@ export type LoanLogTypeEnum =
|
|
|
8238
8375
|
| "DocumentClassified"
|
|
8239
8376
|
| "CoBorrowerEmailAutoFixed"
|
|
8240
8377
|
| "LosFieldWriteBack"
|
|
8241
|
-
| "ReferrerChangeDiscarded"
|
|
8378
|
+
| "ReferrerChangeDiscarded"
|
|
8379
|
+
| "TaskEdited";
|
|
8242
8380
|
|
|
8243
8381
|
export type LoanLogDetailLevelEnum = "None" | "Info" | "Warning" | "Error";
|
|
8244
8382
|
|
|
@@ -8262,7 +8400,54 @@ export type LoanLogDetailTypeEnum =
|
|
|
8262
8400
|
| "DocumentClassified"
|
|
8263
8401
|
| "CoBorrowerEmailAutoFixed"
|
|
8264
8402
|
| "LosFieldWriteBack"
|
|
8265
|
-
| "ReferrerChangeDiscarded"
|
|
8403
|
+
| "ReferrerChangeDiscarded"
|
|
8404
|
+
| "TaskEdited";
|
|
8405
|
+
|
|
8406
|
+
export type LoanRoleSlotTasksRoleEnum =
|
|
8407
|
+
| "Borrower"
|
|
8408
|
+
| "CoBorrower"
|
|
8409
|
+
| "NonBorrower"
|
|
8410
|
+
| "LoanOfficer"
|
|
8411
|
+
| "LoanProcessor"
|
|
8412
|
+
| "LoanOfficerAssistant"
|
|
8413
|
+
| "SupportingLoanOfficer"
|
|
8414
|
+
| "BuyerAgent"
|
|
8415
|
+
| "SellerAgent"
|
|
8416
|
+
| "TitleInsuranceAgent"
|
|
8417
|
+
| "EscrowAgent"
|
|
8418
|
+
| "SettlementAgent"
|
|
8419
|
+
| "Admin";
|
|
8420
|
+
|
|
8421
|
+
export type LoanRoleTaskRoleEnum =
|
|
8422
|
+
| "Borrower"
|
|
8423
|
+
| "CoBorrower"
|
|
8424
|
+
| "NonBorrower"
|
|
8425
|
+
| "LoanOfficer"
|
|
8426
|
+
| "LoanProcessor"
|
|
8427
|
+
| "LoanOfficerAssistant"
|
|
8428
|
+
| "SupportingLoanOfficer"
|
|
8429
|
+
| "BuyerAgent"
|
|
8430
|
+
| "SellerAgent"
|
|
8431
|
+
| "TitleInsuranceAgent"
|
|
8432
|
+
| "EscrowAgent"
|
|
8433
|
+
| "SettlementAgent"
|
|
8434
|
+
| "Admin";
|
|
8435
|
+
|
|
8436
|
+
export type LoanRoleTaskTypeEnum =
|
|
8437
|
+
| "Document"
|
|
8438
|
+
| "Field"
|
|
8439
|
+
| "Signature"
|
|
8440
|
+
| "EDisclosure"
|
|
8441
|
+
| "EConsent"
|
|
8442
|
+
| "VerificationOfAssets"
|
|
8443
|
+
| "VerificationOfIncome"
|
|
8444
|
+
| "VerificationOfEmployment"
|
|
8445
|
+
| "VerificationOfCredit"
|
|
8446
|
+
| "Payment"
|
|
8447
|
+
| "VerificationOfIncomeAndEmployment"
|
|
8448
|
+
| "VerificationOfTaxes";
|
|
8449
|
+
|
|
8450
|
+
export type LoanRoleTaskSourceEnum = "Rule" | "Manual";
|
|
8266
8451
|
|
|
8267
8452
|
export type LoanTaskStatusSummaryStatusEnum =
|
|
8268
8453
|
| "Outstanding"
|
|
@@ -8698,15 +8883,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
8698
8883
|
property instanceof Array ? property : [property];
|
|
8699
8884
|
|
|
8700
8885
|
for (const formItem of propertyContent) {
|
|
8701
|
-
|
|
8702
|
-
const isReactNativeFile =
|
|
8703
|
-
!!formItem &&
|
|
8704
|
-
typeof formItem === "object" &&
|
|
8705
|
-
"uri" in formItem &&
|
|
8706
|
-
"name" in formItem &&
|
|
8707
|
-
"type" in formItem;
|
|
8708
|
-
const isFileType =
|
|
8709
|
-
isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
|
|
8886
|
+
const isFileType = formItem instanceof Blob || formItem instanceof File;
|
|
8710
8887
|
formData.append(
|
|
8711
8888
|
key,
|
|
8712
8889
|
isFileType ? formItem : this.stringifyFormItem(formItem),
|
|
@@ -8768,7 +8945,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
8768
8945
|
|
|
8769
8946
|
/**
|
|
8770
8947
|
* @title The Big POS API
|
|
8771
|
-
* @version v3.
|
|
8948
|
+
* @version v3.8.0
|
|
8772
8949
|
* @termsOfService https://www.thebigpos.com/terms-of-use/
|
|
8773
8950
|
* @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
|
|
8774
8951
|
*/
|
|
@@ -16265,6 +16442,194 @@ export class Api<
|
|
|
16265
16442
|
...params,
|
|
16266
16443
|
}),
|
|
16267
16444
|
|
|
16445
|
+
/**
|
|
16446
|
+
* No description
|
|
16447
|
+
*
|
|
16448
|
+
* @tags LoanRecommendations
|
|
16449
|
+
* @name GetLoanRecommendations
|
|
16450
|
+
* @summary Get a loan's open recommendations
|
|
16451
|
+
* @request GET:/api/loans/{loanId}/recommendations
|
|
16452
|
+
* @secure
|
|
16453
|
+
* @response `200` `(LoanRecommendation)[]` OK
|
|
16454
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
16455
|
+
* @response `404` `ProblemDetails` Not Found
|
|
16456
|
+
*/
|
|
16457
|
+
getLoanRecommendations: (loanId: string, params: RequestParams = {}) =>
|
|
16458
|
+
this.request<LoanRecommendation[], ProblemDetails>({
|
|
16459
|
+
path: `/api/loans/${loanId}/recommendations`,
|
|
16460
|
+
method: "GET",
|
|
16461
|
+
secure: true,
|
|
16462
|
+
format: "json",
|
|
16463
|
+
...params,
|
|
16464
|
+
}),
|
|
16465
|
+
|
|
16466
|
+
/**
|
|
16467
|
+
* No description
|
|
16468
|
+
*
|
|
16469
|
+
* @tags LoanRecommendations
|
|
16470
|
+
* @name DismissLoanRecommendation
|
|
16471
|
+
* @summary Dismiss a loan recommendation
|
|
16472
|
+
* @request POST:/api/loans/{loanId}/recommendations/{id}/dismiss
|
|
16473
|
+
* @secure
|
|
16474
|
+
* @response `204` `void` No Content
|
|
16475
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
16476
|
+
* @response `404` `ProblemDetails` Not Found
|
|
16477
|
+
*/
|
|
16478
|
+
dismissLoanRecommendation: (
|
|
16479
|
+
loanId: string,
|
|
16480
|
+
id: string,
|
|
16481
|
+
params: RequestParams = {},
|
|
16482
|
+
) =>
|
|
16483
|
+
this.request<void, ProblemDetails>({
|
|
16484
|
+
path: `/api/loans/${loanId}/recommendations/${id}/dismiss`,
|
|
16485
|
+
method: "POST",
|
|
16486
|
+
secure: true,
|
|
16487
|
+
...params,
|
|
16488
|
+
}),
|
|
16489
|
+
|
|
16490
|
+
/**
|
|
16491
|
+
* No description
|
|
16492
|
+
*
|
|
16493
|
+
* @tags LoanRoleTasks
|
|
16494
|
+
* @name GetLoanRoleTasks
|
|
16495
|
+
* @summary Get queued tasks grouped by borrower slot
|
|
16496
|
+
* @request GET:/api/loans/{loanId}/role-tasks
|
|
16497
|
+
* @secure
|
|
16498
|
+
* @response `200` `(LoanRoleSlotTasks)[]` OK
|
|
16499
|
+
* @response `404` `ProblemDetails` Not Found
|
|
16500
|
+
*/
|
|
16501
|
+
getLoanRoleTasks: (loanId: string, params: RequestParams = {}) =>
|
|
16502
|
+
this.request<LoanRoleSlotTasks[], ProblemDetails>({
|
|
16503
|
+
path: `/api/loans/${loanId}/role-tasks`,
|
|
16504
|
+
method: "GET",
|
|
16505
|
+
secure: true,
|
|
16506
|
+
format: "json",
|
|
16507
|
+
...params,
|
|
16508
|
+
}),
|
|
16509
|
+
|
|
16510
|
+
/**
|
|
16511
|
+
* @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.
|
|
16512
|
+
*
|
|
16513
|
+
* @tags LoanRoleTasks
|
|
16514
|
+
* @name CreateLoanRoleTask
|
|
16515
|
+
* @summary Queue a task for a borrower slot
|
|
16516
|
+
* @request POST:/api/loans/{loanId}/role-tasks
|
|
16517
|
+
* @secure
|
|
16518
|
+
* @response `201` `LoanRoleTask` Created
|
|
16519
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
16520
|
+
* @response `404` `ProblemDetails` Not Found
|
|
16521
|
+
* @response `409` `ProblemDetails` Conflict
|
|
16522
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
16523
|
+
*/
|
|
16524
|
+
createLoanRoleTask: (
|
|
16525
|
+
loanId: string,
|
|
16526
|
+
data: CreateLoanRoleTaskRequest,
|
|
16527
|
+
params: RequestParams = {},
|
|
16528
|
+
) =>
|
|
16529
|
+
this.request<LoanRoleTask, ProblemDetails>({
|
|
16530
|
+
path: `/api/loans/${loanId}/role-tasks`,
|
|
16531
|
+
method: "POST",
|
|
16532
|
+
body: data,
|
|
16533
|
+
secure: true,
|
|
16534
|
+
type: "application/json",
|
|
16535
|
+
format: "json",
|
|
16536
|
+
...params,
|
|
16537
|
+
}),
|
|
16538
|
+
|
|
16539
|
+
/**
|
|
16540
|
+
* No description
|
|
16541
|
+
*
|
|
16542
|
+
* @tags LoanRoleTasks
|
|
16543
|
+
* @name GetLoanRoleTask
|
|
16544
|
+
* @summary Get a queued task
|
|
16545
|
+
* @request GET:/api/loans/{loanId}/role-tasks/{id}
|
|
16546
|
+
* @secure
|
|
16547
|
+
* @response `200` `LoanRoleTask` OK
|
|
16548
|
+
* @response `404` `ProblemDetails` Not Found
|
|
16549
|
+
*/
|
|
16550
|
+
getLoanRoleTask: (loanId: string, id: string, params: RequestParams = {}) =>
|
|
16551
|
+
this.request<LoanRoleTask, ProblemDetails>({
|
|
16552
|
+
path: `/api/loans/${loanId}/role-tasks/${id}`,
|
|
16553
|
+
method: "GET",
|
|
16554
|
+
secure: true,
|
|
16555
|
+
format: "json",
|
|
16556
|
+
...params,
|
|
16557
|
+
}),
|
|
16558
|
+
|
|
16559
|
+
/**
|
|
16560
|
+
* @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.
|
|
16561
|
+
*
|
|
16562
|
+
* @tags LoanRoleTasks
|
|
16563
|
+
* @name UpdateLoanRoleTask
|
|
16564
|
+
* @summary Edit a queued task
|
|
16565
|
+
* @request PUT:/api/loans/{loanId}/role-tasks/{id}
|
|
16566
|
+
* @secure
|
|
16567
|
+
* @response `200` `LoanRoleTask` OK
|
|
16568
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
16569
|
+
* @response `404` `ProblemDetails` Not Found
|
|
16570
|
+
* @response `409` `ProblemDetails` Conflict
|
|
16571
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
16572
|
+
*/
|
|
16573
|
+
updateLoanRoleTask: (
|
|
16574
|
+
loanId: string,
|
|
16575
|
+
id: string,
|
|
16576
|
+
data: UpdateLoanRoleTaskRequest,
|
|
16577
|
+
params: RequestParams = {},
|
|
16578
|
+
) =>
|
|
16579
|
+
this.request<LoanRoleTask, ProblemDetails>({
|
|
16580
|
+
path: `/api/loans/${loanId}/role-tasks/${id}`,
|
|
16581
|
+
method: "PUT",
|
|
16582
|
+
body: data,
|
|
16583
|
+
secure: true,
|
|
16584
|
+
type: "application/json",
|
|
16585
|
+
format: "json",
|
|
16586
|
+
...params,
|
|
16587
|
+
}),
|
|
16588
|
+
|
|
16589
|
+
/**
|
|
16590
|
+
* @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.
|
|
16591
|
+
*
|
|
16592
|
+
* @tags LoanRoleTasks
|
|
16593
|
+
* @name DeleteLoanRoleTask
|
|
16594
|
+
* @summary Remove a queued task
|
|
16595
|
+
* @request DELETE:/api/loans/{loanId}/role-tasks/{id}
|
|
16596
|
+
* @secure
|
|
16597
|
+
* @response `204` `void` No Content
|
|
16598
|
+
* @response `404` `ProblemDetails` Not Found
|
|
16599
|
+
* @response `409` `ProblemDetails` Conflict
|
|
16600
|
+
*/
|
|
16601
|
+
deleteLoanRoleTask: (
|
|
16602
|
+
loanId: string,
|
|
16603
|
+
id: string,
|
|
16604
|
+
params: RequestParams = {},
|
|
16605
|
+
) =>
|
|
16606
|
+
this.request<void, ProblemDetails>({
|
|
16607
|
+
path: `/api/loans/${loanId}/role-tasks/${id}`,
|
|
16608
|
+
method: "DELETE",
|
|
16609
|
+
secure: true,
|
|
16610
|
+
...params,
|
|
16611
|
+
}),
|
|
16612
|
+
|
|
16613
|
+
/**
|
|
16614
|
+
* @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.
|
|
16615
|
+
*
|
|
16616
|
+
* @tags LoanRoleTasks
|
|
16617
|
+
* @name MaterializeLoanRoleTasks
|
|
16618
|
+
* @summary Queue the business rule defaults
|
|
16619
|
+
* @request POST:/api/loans/{loanId}/role-tasks/materialize
|
|
16620
|
+
* @secure
|
|
16621
|
+
* @response `200` `MaterializeLoanRoleTasks` OK
|
|
16622
|
+
* @response `404` `ProblemDetails` Not Found
|
|
16623
|
+
*/
|
|
16624
|
+
materializeLoanRoleTasks: (loanId: string, params: RequestParams = {}) =>
|
|
16625
|
+
this.request<MaterializeLoanRoleTasks, ProblemDetails>({
|
|
16626
|
+
path: `/api/loans/${loanId}/role-tasks/materialize`,
|
|
16627
|
+
method: "POST",
|
|
16628
|
+
secure: true,
|
|
16629
|
+
format: "json",
|
|
16630
|
+
...params,
|
|
16631
|
+
}),
|
|
16632
|
+
|
|
16268
16633
|
/**
|
|
16269
16634
|
* No description
|
|
16270
16635
|
*
|
|
@@ -17075,6 +17440,7 @@ export class Api<
|
|
|
17075
17440
|
* @request POST:/api/loans/{loanId}/users/{userId}
|
|
17076
17441
|
* @secure
|
|
17077
17442
|
* @response `201` `LoanUser` Created
|
|
17443
|
+
* @response `404` `ProblemDetails` Not Found
|
|
17078
17444
|
*/
|
|
17079
17445
|
addLoanUser: (
|
|
17080
17446
|
loanId: string,
|
|
@@ -17082,7 +17448,7 @@ export class Api<
|
|
|
17082
17448
|
data: CreateUserLoan,
|
|
17083
17449
|
params: RequestParams = {},
|
|
17084
17450
|
) =>
|
|
17085
|
-
this.request<LoanUser,
|
|
17451
|
+
this.request<LoanUser, ProblemDetails>({
|
|
17086
17452
|
path: `/api/loans/${loanId}/users/${userId}`,
|
|
17087
17453
|
method: "POST",
|
|
17088
17454
|
body: data,
|
package/docs/sdk_generation.md
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
# Publishing the POS Typescript SDK
|
|
2
|
-
|
|
3
|
-
## Prerequisites
|
|
4
|
-
|
|
5
|
-
1. Clone the repository (if you haven't already):
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
git clone https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript
|
|
9
|
-
cd thebigpos-sdk-typescript
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
2. Install swagger-typescript-api globally:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm i -g swagger-typescript-api
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
3. Connect to the MAT VPN
|
|
19
|
-
|
|
20
|
-
## Step 1: Create a release branch
|
|
21
|
-
|
|
22
|
-
Create a new branch for the version you're releasing:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
git checkout develop
|
|
26
|
-
git pull origin develop
|
|
27
|
-
git checkout -b release/X.Y.Z
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Step 2: Generate the SDK
|
|
31
|
-
|
|
32
|
-
Replace `{version}` with the target API version (e.g., `v2.31.0`):
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npx swagger-typescript-api generate -p https://api.thebigpos.dev/swagger/{version}/swagger.json -o ./src -n index.ts -r true --axios --enum-names-as-values --generate-union-enums
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
> **Note:** If generating locally, use `http://localhost:5212/swagger/{version}/swagger.json` due to self-signed cert issues with https.
|
|
39
|
-
|
|
40
|
-
## Step 3: Apply post-generation fixes
|
|
41
|
-
|
|
42
|
-
Run the script to fix PATCH methods content type and Operation interface:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
node scripts/apply-json-patch-content-type.js
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
This script:
|
|
49
|
-
- Sets all PATCH methods to use `ContentType.JsonPatch`
|
|
50
|
-
- Adds `JsonPatch` to the `ContentType` enum
|
|
51
|
-
- Fixes the `Operation` interface to allow any value type
|
|
52
|
-
|
|
53
|
-
## Step 4: Update the version
|
|
54
|
-
|
|
55
|
-
Use npm's version command to update the version in `package.json`:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npm version X.Y.Z
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**Version conventions:**
|
|
62
|
-
|
|
63
|
-
- Match the SDK version to the API version being released
|
|
64
|
-
- For release candidates (pre-release), use: `npm version X.Y.Z-rc.N --preid=rc`
|
|
65
|
-
- For patch increments: `npm version patch`
|
|
66
|
-
- For minor increments: `npm version minor`
|
|
67
|
-
|
|
68
|
-
## Step 5: Build the SDK
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
npm run build
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Ensure there are no TypeScript compilation errors.
|
|
75
|
-
|
|
76
|
-
## Step 6: Merge develop (if needed)
|
|
77
|
-
|
|
78
|
-
If there are changes in develop that need to be included:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
git fetch origin develop
|
|
82
|
-
git merge origin/develop
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
If there are conflicts in `src/index.ts` or `dist/*`, regenerate the SDK (Step 2), apply fixes (Step 3), and rebuild (Step 5) to resolve them.
|
|
86
|
-
|
|
87
|
-
## Step 7: Commit and push
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
git add .
|
|
91
|
-
git commit -m "X.Y.Z"
|
|
92
|
-
git push -u origin release/X.Y.Z
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Step 8: Publish to NPM
|
|
96
|
-
|
|
97
|
-
### Authentication
|
|
98
|
-
|
|
99
|
-
NPM requires a granular access token with publish permissions and 2FA bypass enabled.
|
|
100
|
-
|
|
101
|
-
1. Go to [npmjs.com](https://www.npmjs.com) > Access Tokens > Generate New Token
|
|
102
|
-
2. Select "Granular Access Token"
|
|
103
|
-
3. Enable "Bypass 2FA for automation"
|
|
104
|
-
4. Set permissions to publish to `@matech/thebigpos-sdk`
|
|
105
|
-
|
|
106
|
-
Configure the token:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
npm config set //registry.npmjs.org/:_authToken YOUR_TOKEN
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Publish
|
|
113
|
-
|
|
114
|
-
**To latest (stable release):**
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
npm publish --access public
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
**To next (pre-release):**
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
npm publish --tag next
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**To a feature tag (for testing):**
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
npm publish --tag feature-name
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Installing the SDK
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
# Latest stable
|
|
136
|
-
yarn add @matech/thebigpos-sdk
|
|
137
|
-
|
|
138
|
-
# Next pre-release
|
|
139
|
-
yarn add @matech/thebigpos-sdk@next
|
|
140
|
-
|
|
141
|
-
# Specific version
|
|
142
|
-
yarn add @matech/thebigpos-sdk@X.Y.Z
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Step 9: Clean up
|
|
146
|
-
|
|
147
|
-
1. **Revoke the NPM token** after publishing for security
|
|
148
|
-
2. **Create a Pull Request** from `release/X.Y.Z` to `develop` and `main`
|
|
149
|
-
3. **Create a GitHub Release** with release notes
|