@matech/thebigpos-sdk 3.16.0 → 3.17.0-dev-6319
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 +39 -0
- package/dist/index.d.ts +89 -7
- package/dist/index.js +56 -3
- package/dist/index.js.map +1 -1
- package/docs/sdk_generation.md +149 -0
- package/package.json +16 -6
- package/scripts/apply-json-patch-content-type.js +189 -36
- package/src/index.ts +187 -8
package/src/index.ts
CHANGED
|
@@ -543,6 +543,26 @@ export type DraftType = "NewLoan" | "EditLoan";
|
|
|
543
543
|
|
|
544
544
|
export type DocumentVisibilityScope = "Own" | "All";
|
|
545
545
|
|
|
546
|
+
export type DocumentType =
|
|
547
|
+
| "PrequalLetter"
|
|
548
|
+
| "PreapprovalLetter"
|
|
549
|
+
| "EConsent"
|
|
550
|
+
| "CreditAuthorization"
|
|
551
|
+
| "TextOptIn"
|
|
552
|
+
| "OpenHouseFlyer"
|
|
553
|
+
| "LoanComparison"
|
|
554
|
+
| "BuyerAgencyAgreements"
|
|
555
|
+
| "ListingAgreements"
|
|
556
|
+
| "Addendums"
|
|
557
|
+
| "RentalAgreements"
|
|
558
|
+
| "SalesContracts"
|
|
559
|
+
| "RealEstateMarketFlyer"
|
|
560
|
+
| "MortgageMarketingFlyer"
|
|
561
|
+
| "FeeItemization"
|
|
562
|
+
| "RefinanceDocument"
|
|
563
|
+
| "CertifiedCommitments"
|
|
564
|
+
| "CoBrandedMarketingFlyer";
|
|
565
|
+
|
|
546
566
|
export type CustomFieldEntityType = "Loan";
|
|
547
567
|
|
|
548
568
|
export type CustomFieldDataType =
|
|
@@ -635,6 +655,15 @@ export type BorrowerType = "Borrower" | "CoBorrower" | "Unknown";
|
|
|
635
655
|
|
|
636
656
|
export type BorrowerRelationship = "NotApplicable" | "Spouse" | "NonSpouse";
|
|
637
657
|
|
|
658
|
+
export type BorrowerApplicationWarningCode =
|
|
659
|
+
| "UnknownKey"
|
|
660
|
+
| "NotWritable"
|
|
661
|
+
| "CustomFieldUnresolved"
|
|
662
|
+
| "CustomFieldInactive"
|
|
663
|
+
| "CustomFieldReadOnly"
|
|
664
|
+
| "CustomFieldDuplicateDefinition"
|
|
665
|
+
| "LoanOfficerUnresolved";
|
|
666
|
+
|
|
638
667
|
export type BorrowerApplicationStatus = "Draft" | "Complete";
|
|
639
668
|
|
|
640
669
|
export type BillingType = "ClosedLoan" | "LoanOfficer";
|
|
@@ -881,6 +910,7 @@ export interface AccountFailureCount {
|
|
|
881
910
|
export interface AccountSettings {
|
|
882
911
|
isSmsEnabled: boolean;
|
|
883
912
|
isLoanEditEnabled: boolean;
|
|
913
|
+
isApplicationEditEnabled?: boolean | null;
|
|
884
914
|
smsNumber?: string | null;
|
|
885
915
|
ssoHostOverride?: string | null;
|
|
886
916
|
isEarlyAdopter: boolean;
|
|
@@ -890,6 +920,7 @@ export interface AccountSettingsRequest {
|
|
|
890
920
|
isSmsEnabled: boolean;
|
|
891
921
|
smsNumber?: string | null;
|
|
892
922
|
isEarlyAdopter: boolean;
|
|
923
|
+
isApplicationEditEnabled?: boolean | null;
|
|
893
924
|
}
|
|
894
925
|
|
|
895
926
|
export interface Address {
|
|
@@ -1170,8 +1201,6 @@ export interface AiCanonicalField {
|
|
|
1170
1201
|
isDefault: boolean;
|
|
1171
1202
|
category?: string | null;
|
|
1172
1203
|
jsonPropertyName?: string | null;
|
|
1173
|
-
textractKey?: string | null;
|
|
1174
|
-
textractKeyAliases: string[];
|
|
1175
1204
|
hasAccountOverride: boolean;
|
|
1176
1205
|
writable: boolean;
|
|
1177
1206
|
patchPath?: string | null;
|
|
@@ -1777,6 +1806,36 @@ export interface AutomatedService {
|
|
|
1777
1806
|
rateLimited: string[];
|
|
1778
1807
|
}
|
|
1779
1808
|
|
|
1809
|
+
export interface BorrowerApplication {
|
|
1810
|
+
/** @format uuid */
|
|
1811
|
+
loanId: string;
|
|
1812
|
+
/** @format uuid */
|
|
1813
|
+
borrowerId: string;
|
|
1814
|
+
/** @format uuid */
|
|
1815
|
+
coBorrowerId?: string | null;
|
|
1816
|
+
applicationStatus: BorrowerApplicationApplicationStatusEnum;
|
|
1817
|
+
answers: Record<string, any>;
|
|
1818
|
+
additionalFields: Record<string, string>;
|
|
1819
|
+
cursor?: LoanApplicationSession | null;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
export interface BorrowerApplicationUpdate {
|
|
1823
|
+
warnings: BorrowerApplicationWarning[];
|
|
1824
|
+
application: BorrowerApplication;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
export interface BorrowerApplicationUpdateRequest {
|
|
1828
|
+
answers: Record<string, any>;
|
|
1829
|
+
additionalFields?: Record<string, any> | null;
|
|
1830
|
+
cursor?: LoanApplicationSessionRequest | null;
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
export interface BorrowerApplicationWarning {
|
|
1834
|
+
key: string;
|
|
1835
|
+
code: BorrowerApplicationWarningCodeEnum;
|
|
1836
|
+
message: string;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1780
1839
|
export interface BorrowerCount {
|
|
1781
1840
|
/** @format uuid */
|
|
1782
1841
|
userId: string;
|
|
@@ -2409,7 +2468,6 @@ export interface CreateAiCanonicalFieldRequest {
|
|
|
2409
2468
|
description: string;
|
|
2410
2469
|
allowedRoles: string[];
|
|
2411
2470
|
isPii: boolean;
|
|
2412
|
-
dataSource: string;
|
|
2413
2471
|
category?: string | null;
|
|
2414
2472
|
}
|
|
2415
2473
|
|
|
@@ -3687,7 +3745,7 @@ export interface Invite {
|
|
|
3687
3745
|
phoneNumber: string;
|
|
3688
3746
|
relationship: string;
|
|
3689
3747
|
/** @deprecated */
|
|
3690
|
-
loanID
|
|
3748
|
+
loanID?: string | null;
|
|
3691
3749
|
route?: string | null;
|
|
3692
3750
|
/** @format uuid */
|
|
3693
3751
|
siteConfigurationID: string;
|
|
@@ -3703,7 +3761,7 @@ export interface Invite {
|
|
|
3703
3761
|
/** @format date-time */
|
|
3704
3762
|
expiresAt?: string | null;
|
|
3705
3763
|
status: string;
|
|
3706
|
-
loan
|
|
3764
|
+
loan?: LoanIdentifier | null;
|
|
3707
3765
|
url: string;
|
|
3708
3766
|
linksBorrowerApplication?: boolean | null;
|
|
3709
3767
|
}
|
|
@@ -6312,6 +6370,10 @@ export interface NotificationTemplateVersionUpdateRequest {
|
|
|
6312
6370
|
pushNotificationBody?: string | null;
|
|
6313
6371
|
}
|
|
6314
6372
|
|
|
6373
|
+
export interface OpenBorrowerApplicationEditRequest {
|
|
6374
|
+
isCoBorrower: boolean;
|
|
6375
|
+
}
|
|
6376
|
+
|
|
6315
6377
|
export type OpenTasksWidgetConfig = UtilRequiredKeys<
|
|
6316
6378
|
BaseCanvasWidgetConfig,
|
|
6317
6379
|
"type"
|
|
@@ -8620,6 +8682,17 @@ export type AuditLogEntryChangeTypeEnum =
|
|
|
8620
8682
|
| "Reactivated"
|
|
8621
8683
|
| "Accessed";
|
|
8622
8684
|
|
|
8685
|
+
export type BorrowerApplicationApplicationStatusEnum = "Draft" | "Complete";
|
|
8686
|
+
|
|
8687
|
+
export type BorrowerApplicationWarningCodeEnum =
|
|
8688
|
+
| "UnknownKey"
|
|
8689
|
+
| "NotWritable"
|
|
8690
|
+
| "CustomFieldUnresolved"
|
|
8691
|
+
| "CustomFieldInactive"
|
|
8692
|
+
| "CustomFieldReadOnly"
|
|
8693
|
+
| "CustomFieldDuplicateDefinition"
|
|
8694
|
+
| "LoanOfficerUnresolved";
|
|
8695
|
+
|
|
8623
8696
|
export type BorrowerCountRoleEnum =
|
|
8624
8697
|
| "Borrower"
|
|
8625
8698
|
| "CoBorrower"
|
|
@@ -9753,7 +9826,15 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
9753
9826
|
property instanceof Array ? property : [property];
|
|
9754
9827
|
|
|
9755
9828
|
for (const formItem of propertyContent) {
|
|
9756
|
-
|
|
9829
|
+
// React Native files are plain { uri, name, type } objects, not Blob/File.
|
|
9830
|
+
const isReactNativeFile =
|
|
9831
|
+
!!formItem &&
|
|
9832
|
+
typeof formItem === "object" &&
|
|
9833
|
+
"uri" in formItem &&
|
|
9834
|
+
"name" in formItem &&
|
|
9835
|
+
"type" in formItem;
|
|
9836
|
+
const isFileType =
|
|
9837
|
+
isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
|
|
9757
9838
|
formData.append(
|
|
9758
9839
|
key,
|
|
9759
9840
|
isFileType ? formItem : this.stringifyFormItem(formItem),
|
|
@@ -9815,7 +9896,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
9815
9896
|
|
|
9816
9897
|
/**
|
|
9817
9898
|
* @title The Big POS API
|
|
9818
|
-
* @version v3.
|
|
9899
|
+
* @version v3.17.0
|
|
9819
9900
|
* @termsOfService https://www.thebigpos.com/terms-of-use/
|
|
9820
9901
|
* @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
|
|
9821
9902
|
*/
|
|
@@ -12097,6 +12178,65 @@ export class Api<
|
|
|
12097
12178
|
...params,
|
|
12098
12179
|
}),
|
|
12099
12180
|
|
|
12181
|
+
/**
|
|
12182
|
+
* No description
|
|
12183
|
+
*
|
|
12184
|
+
* @tags BorrowerApplication
|
|
12185
|
+
* @name GetBorrowerApplication
|
|
12186
|
+
* @summary Get a borrower's application as flat answers
|
|
12187
|
+
* @request GET:/api/loans/{loanId}/borrowers/{borrowerId}/application
|
|
12188
|
+
* @secure
|
|
12189
|
+
* @response `200` `BorrowerApplication` OK
|
|
12190
|
+
* @response `400` `any` Bad Request
|
|
12191
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
12192
|
+
* @response `404` `ProblemDetails` Not Found
|
|
12193
|
+
*/
|
|
12194
|
+
getBorrowerApplication: (
|
|
12195
|
+
loanId: string,
|
|
12196
|
+
borrowerId: string,
|
|
12197
|
+
params: RequestParams = {},
|
|
12198
|
+
) =>
|
|
12199
|
+
this.request<BorrowerApplication, ProblemDetails>({
|
|
12200
|
+
path: `/api/loans/${loanId}/borrowers/${borrowerId}/application`,
|
|
12201
|
+
method: "GET",
|
|
12202
|
+
secure: true,
|
|
12203
|
+
format: "json",
|
|
12204
|
+
...params,
|
|
12205
|
+
}),
|
|
12206
|
+
|
|
12207
|
+
/**
|
|
12208
|
+
* No description
|
|
12209
|
+
*
|
|
12210
|
+
* @tags BorrowerApplication
|
|
12211
|
+
* @name UpdateBorrowerApplication
|
|
12212
|
+
* @summary Save a step of a borrower's application from flat answers
|
|
12213
|
+
* @request PATCH:/api/loans/{loanId}/borrowers/{borrowerId}/application
|
|
12214
|
+
* @secure
|
|
12215
|
+
* @response `200` `BorrowerApplicationUpdate` OK
|
|
12216
|
+
* @response `400` `any` Bad Request
|
|
12217
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
12218
|
+
* @response `404` `ProblemDetails` Not Found
|
|
12219
|
+
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
12220
|
+
*/
|
|
12221
|
+
updateBorrowerApplication: (
|
|
12222
|
+
loanId: string,
|
|
12223
|
+
borrowerId: string,
|
|
12224
|
+
data: JsonPatchDocument,
|
|
12225
|
+
params: RequestParams = {},
|
|
12226
|
+
) =>
|
|
12227
|
+
this.request<
|
|
12228
|
+
BorrowerApplicationUpdate,
|
|
12229
|
+
ProblemDetails | UnprocessableEntity
|
|
12230
|
+
>({
|
|
12231
|
+
path: `/api/loans/${loanId}/borrowers/${borrowerId}/application`,
|
|
12232
|
+
method: "PATCH",
|
|
12233
|
+
body: data,
|
|
12234
|
+
secure: true,
|
|
12235
|
+
type: "application/json",
|
|
12236
|
+
format: "json",
|
|
12237
|
+
...params,
|
|
12238
|
+
}),
|
|
12239
|
+
|
|
12100
12240
|
/**
|
|
12101
12241
|
* No description
|
|
12102
12242
|
*
|
|
@@ -15822,6 +15962,36 @@ export class Api<
|
|
|
15822
15962
|
...params,
|
|
15823
15963
|
}),
|
|
15824
15964
|
|
|
15965
|
+
/**
|
|
15966
|
+
* No description
|
|
15967
|
+
*
|
|
15968
|
+
* @tags LoanApplicationEdit
|
|
15969
|
+
* @name OpenBorrowerApplicationEdit
|
|
15970
|
+
* @summary Open a borrower's submitted application for editing
|
|
15971
|
+
* @request POST:/api/loans/{loanId}/application/edit
|
|
15972
|
+
* @secure
|
|
15973
|
+
* @response `200` `BorrowerApplication` OK
|
|
15974
|
+
* @response `400` `any` Bad Request
|
|
15975
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
15976
|
+
* @response `404` `ProblemDetails` Not Found
|
|
15977
|
+
* @response `409` `ProblemDetails` Conflict
|
|
15978
|
+
* @response `423` `any` Locked
|
|
15979
|
+
*/
|
|
15980
|
+
openBorrowerApplicationEdit: (
|
|
15981
|
+
loanId: string,
|
|
15982
|
+
data: OpenBorrowerApplicationEditRequest,
|
|
15983
|
+
params: RequestParams = {},
|
|
15984
|
+
) =>
|
|
15985
|
+
this.request<BorrowerApplication, ProblemDetails>({
|
|
15986
|
+
path: `/api/loans/${loanId}/application/edit`,
|
|
15987
|
+
method: "POST",
|
|
15988
|
+
body: data,
|
|
15989
|
+
secure: true,
|
|
15990
|
+
type: "application/json",
|
|
15991
|
+
format: "json",
|
|
15992
|
+
...params,
|
|
15993
|
+
}),
|
|
15994
|
+
|
|
15825
15995
|
/**
|
|
15826
15996
|
* No description
|
|
15827
15997
|
*
|
|
@@ -17841,6 +18011,7 @@ export class Api<
|
|
|
17841
18011
|
* @response `404` `ProblemDetails` Not Found
|
|
17842
18012
|
* @response `409` `ProblemDetails` Conflict
|
|
17843
18013
|
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
18014
|
+
* @response `423` `ProblemDetails` Locked
|
|
17844
18015
|
*/
|
|
17845
18016
|
completeBorrowerApplication: (
|
|
17846
18017
|
loanId: string,
|
|
@@ -20565,12 +20736,20 @@ export class Api<
|
|
|
20565
20736
|
* @request GET:/api/template-tokens
|
|
20566
20737
|
* @secure
|
|
20567
20738
|
* @response `200` `(TemplateTokenRoot)[]` OK
|
|
20739
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
20568
20740
|
* @response `403` `ProblemDetails` Forbidden
|
|
20569
20741
|
*/
|
|
20570
|
-
getTemplateTokens: (
|
|
20742
|
+
getTemplateTokens: (
|
|
20743
|
+
query?: {
|
|
20744
|
+
notificationKey?: string;
|
|
20745
|
+
documentType?: DocumentType;
|
|
20746
|
+
},
|
|
20747
|
+
params: RequestParams = {},
|
|
20748
|
+
) =>
|
|
20571
20749
|
this.request<TemplateTokenRoot[], ProblemDetails>({
|
|
20572
20750
|
path: `/api/template-tokens`,
|
|
20573
20751
|
method: "GET",
|
|
20752
|
+
query: query,
|
|
20574
20753
|
secure: true,
|
|
20575
20754
|
format: "json",
|
|
20576
20755
|
...params,
|