@matech/thebigpos-sdk 3.5.1 → 3.6.0-stag-2655
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 +31 -6
- package/dist/index.js +11 -12
- 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 +39 -20
- package/docs/sdk_generation.md +0 -149
package/README.md
CHANGED
|
@@ -40,44 +40,5 @@ apiClient.api.getSiteConfiguration().then((response) => {
|
|
|
40
40
|
});
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
## Generate SDK from Swagger
|
|
44
|
-
|
|
45
|
-
To regenerate the SDK from a specific API version, run:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
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 --enum-style union
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Replace `{version}` with the target API version (e.g. `v2.34.0`):
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npx swagger-typescript-api generate -p https://api.thebigpos.dev/swagger/v2.34.0/swagger.json -o ./src -n index.ts -r true --axios --enum-names-as-values --enum-style union
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Then apply the PATCH content-type fixup, passing the **same** spec that was given
|
|
58
|
-
to the generator. The generator does not propagate `application/json-patch+json`,
|
|
59
|
-
so this step sets each PATCH method's content type from the spec (no hard-coded
|
|
60
|
-
endpoint list):
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
node scripts/apply-json-patch-content-type.js https://api.thebigpos.dev/swagger/v2.34.0/swagger.json
|
|
64
|
-
yarn build
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Publishing
|
|
68
|
-
|
|
69
|
-
1. Update the `version` field in `package.json` before publishing.
|
|
70
|
-
2. Build the project:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
yarn build
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
3. Publish to npm:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
yarn publish
|
|
80
|
-
```
|
|
81
|
-
|
|
82
43
|
____
|
|
83
44
|
© 2024 Mortgage Automation Technologies. All rights reserved
|
package/dist/index.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export type LoanGiftSource = "CommunityNonProfit" | "Employer" | "FederalAgency"
|
|
|
53
53
|
export type LoanGiftAssetType = "Cash" | "Asset" | "Equity" | "Grant";
|
|
54
54
|
export type LoanGenderType = "Male" | "Female";
|
|
55
55
|
export type LoanDocumentType = "W2" | "Paystub" | "Form1099" | "Form1099Int" | "Form1099Misc" | "Form1099Nec" | "Form1099R" | "Form1099G" | "Form1099Div" | "Form1099Ssa" | "FederalTaxReturn1040" | "TaxReturnScheduleC" | "TaxReturnScheduleD" | "TaxReturnScheduleE" | "Form1065" | "Form1120" | "Form1120S" | "ProfitAndLossStatement" | "VerificationOfEmployment" | "BankStatement" | "InvestmentStatement" | "CreditCardStatement" | "MortgageStatement" | "PayoffStatement" | "HoaDocuments" | "UtilityBill" | "IdentityDocument" | "DemographicAddendum" | "Ssa89" | "Vba260551" | "Hud92900B" | "Check" | "Invoice" | "Receipt" | "LoanApplication1003" | "UnderwritingTransmittal1008" | "Other" | "SalesContract" | "TitleCommitment" | "DriversLicense" | "VerificationOfIncome" | "VerificationOfAssets" | "FloodCertificate" | "FraudReport" | "AddendumToSalesContract" | "GiftLetter" | "CpaLetter" | "TaxBill" | "CondoQuestionnaire" | "CondoBudget" | "CondoBylaws" | "RentalAgreements" | "Lease" | "HazardInsurance" | "VaCertificateOfEligibility" | "Appraisal" | "CreditReport" | "CondoMasterPolicy" | "EConsent" | "CreditAuthorization" | "TextOptIn" | "LoanComparison" | "AiGeneratedDocument" | "Unidentified";
|
|
56
|
+
export type LoanDocumentFolderScope = "Any" | "Assigned" | "Unassigned";
|
|
56
57
|
export type LoanDocumentFolderPermissionLevel = "None" | "Read" | "Write" | "Manage";
|
|
57
58
|
export type LoanCitizenship = "USCitizen" | "PermanentResidentAlien" | "NonPermanentResidentAlien";
|
|
58
59
|
export type LoanBankruptcyType = "Chapter7" | "Chapter11" | "Chapter12" | "Chapter13";
|
|
@@ -80,7 +81,7 @@ export type ConsentLosSyncStatus = "NotStarted" | "Failed" | "Success";
|
|
|
80
81
|
export type CompanyDocumentSourceType = "File" | "FreeText";
|
|
81
82
|
export type CompanyDocumentIndexStatus = "Uploaded" | "Indexing" | "Indexed" | "Failed";
|
|
82
83
|
export type ClassificationSource = "Textract" | "Llm" | "Manual";
|
|
83
|
-
export type BulkLoanTaskOperationType = "SetStatus" | "Delete";
|
|
84
|
+
export type BulkLoanTaskOperationType = "SetStatus" | "Delete" | "SetDueDate";
|
|
84
85
|
export type BranchType = "Mortgage" | "RealEstate";
|
|
85
86
|
export type BorrowerType = "Borrower" | "CoBorrower" | "Unknown";
|
|
86
87
|
export type BorrowerRelationship = "NotApplicable" | "Spouse" | "NonSpouse";
|
|
@@ -1051,6 +1052,8 @@ export interface BulkLoanTaskOperationRequest {
|
|
|
1051
1052
|
operation?: BulkLoanTaskOperationType | null;
|
|
1052
1053
|
status?: TaskStatus | null;
|
|
1053
1054
|
comment?: string | null;
|
|
1055
|
+
/** @format date */
|
|
1056
|
+
dueDate?: string | null;
|
|
1054
1057
|
}
|
|
1055
1058
|
export interface BusinessRule {
|
|
1056
1059
|
/** @format date-time */
|
|
@@ -2350,6 +2353,12 @@ export interface GuidPatchOperation {
|
|
|
2350
2353
|
value?: any | null;
|
|
2351
2354
|
from?: string | null;
|
|
2352
2355
|
}
|
|
2356
|
+
export interface HttpError {
|
|
2357
|
+
logId?: string | null;
|
|
2358
|
+
message?: string | null;
|
|
2359
|
+
errorCode?: string | null;
|
|
2360
|
+
errors?: string[] | null;
|
|
2361
|
+
}
|
|
2353
2362
|
export interface IPAddress {
|
|
2354
2363
|
addressFamily: IpAddressAddressFamilyEnum;
|
|
2355
2364
|
/** @format int64 */
|
|
@@ -2932,6 +2941,8 @@ export interface LoanBorrowerEmploymentCurrentGrossIncome {
|
|
|
2932
2941
|
/** @format double */
|
|
2933
2942
|
hourlyRate?: number | null;
|
|
2934
2943
|
/** @format double */
|
|
2944
|
+
annualBasePay?: number | null;
|
|
2945
|
+
/** @format double */
|
|
2935
2946
|
other?: number | null;
|
|
2936
2947
|
/** @format double */
|
|
2937
2948
|
bonus?: number | null;
|
|
@@ -3482,6 +3493,8 @@ export interface LoanDocument {
|
|
|
3482
3493
|
losStatus: string;
|
|
3483
3494
|
contents?: string | null;
|
|
3484
3495
|
failoverDocumentPath?: string | null;
|
|
3496
|
+
/** @format int64 */
|
|
3497
|
+
fileSizeBytes?: number | null;
|
|
3485
3498
|
/** @format date-time */
|
|
3486
3499
|
sensitiveDataPurgedOn?: string | null;
|
|
3487
3500
|
observedDocumentType?: LoanDocumentType | null;
|
|
@@ -3550,6 +3563,7 @@ export interface LoanDocumentFolderWithCount {
|
|
|
3550
3563
|
isActive: boolean;
|
|
3551
3564
|
/** @format int32 */
|
|
3552
3565
|
documentCount: number;
|
|
3566
|
+
isUnassigned: boolean;
|
|
3553
3567
|
}
|
|
3554
3568
|
export interface LoanDocumentPreviewsRequest {
|
|
3555
3569
|
documentIds: string[];
|
|
@@ -3587,6 +3601,7 @@ export interface LoanDocumentSearchCriteria {
|
|
|
3587
3601
|
bucket?: string | null;
|
|
3588
3602
|
/** @format uuid */
|
|
3589
3603
|
folderID?: string | null;
|
|
3604
|
+
folderScope?: LoanDocumentFolderScope | null;
|
|
3590
3605
|
/** @format uuid */
|
|
3591
3606
|
userID?: string | null;
|
|
3592
3607
|
documentIDs?: string[] | null;
|
|
@@ -5712,6 +5727,7 @@ export interface Task {
|
|
|
5712
5727
|
description?: string | null;
|
|
5713
5728
|
type: string;
|
|
5714
5729
|
losTarget?: string | null;
|
|
5730
|
+
loanDocumentFolder?: LoanDocumentFolderSummary | null;
|
|
5715
5731
|
targetUserRole?: string | null;
|
|
5716
5732
|
/** @format int32 */
|
|
5717
5733
|
daysDueFromApplication?: number | null;
|
|
@@ -5758,6 +5774,8 @@ export interface TaskRequest {
|
|
|
5758
5774
|
name: string;
|
|
5759
5775
|
description?: string | null;
|
|
5760
5776
|
losTarget?: string | null;
|
|
5777
|
+
/** @format uuid */
|
|
5778
|
+
loanDocumentFolderID?: string | null;
|
|
5761
5779
|
type: string;
|
|
5762
5780
|
targetUserRole?: string | null;
|
|
5763
5781
|
/** @format int32 */
|
|
@@ -5780,6 +5798,8 @@ export interface TaskUpdateRequest {
|
|
|
5780
5798
|
name: string;
|
|
5781
5799
|
description?: string | null;
|
|
5782
5800
|
losTarget?: string | null;
|
|
5801
|
+
/** @format uuid */
|
|
5802
|
+
loanDocumentFolderID?: string | null;
|
|
5783
5803
|
type: string;
|
|
5784
5804
|
targetUserRole?: string | null;
|
|
5785
5805
|
/** @format int32 */
|
|
@@ -6686,7 +6706,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
6686
6706
|
}
|
|
6687
6707
|
/**
|
|
6688
6708
|
* @title The Big POS API
|
|
6689
|
-
* @version v3.
|
|
6709
|
+
* @version v3.6.0
|
|
6690
6710
|
* @termsOfService https://www.thebigpos.com/terms-of-use/
|
|
6691
6711
|
* @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
|
|
6692
6712
|
*/
|
|
@@ -9854,7 +9874,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9854
9874
|
* @request POST:/api/listings
|
|
9855
9875
|
* @secure
|
|
9856
9876
|
* @response `201` `Listing` Created
|
|
9857
|
-
* @response `
|
|
9877
|
+
* @response `401` `HttpError` Unauthorized
|
|
9878
|
+
* @response `403` `HttpError` Forbidden
|
|
9858
9879
|
*/
|
|
9859
9880
|
createListing: (data: ListingRequest, params?: RequestParams) => Promise<AxiosResponse<Listing, any, {}>>;
|
|
9860
9881
|
/**
|
|
@@ -9888,7 +9909,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9888
9909
|
* @request PUT:/api/listings/{id}
|
|
9889
9910
|
* @secure
|
|
9890
9911
|
* @response `200` `Listing` OK
|
|
9891
|
-
* @response `
|
|
9912
|
+
* @response `401` `HttpError` Unauthorized
|
|
9913
|
+
* @response `403` `HttpError` Forbidden
|
|
9892
9914
|
*/
|
|
9893
9915
|
replaceListing: (id: string, data: ListingRequest, params?: RequestParams) => Promise<AxiosResponse<Listing, any, {}>>;
|
|
9894
9916
|
/**
|
|
@@ -10212,7 +10234,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10212
10234
|
*/
|
|
10213
10235
|
getLoanDocumentFolderUsage: (id: string, params?: RequestParams) => Promise<AxiosResponse<LoanDocumentFolderUsage, any, {}>>;
|
|
10214
10236
|
/**
|
|
10215
|
-
* @description Returns each folder that holds at least one document the caller can read, with the document count per folder. Documents that are not assigned to a folder are returned as a synthetic 'Unassigned' folder (ID = empty GUID).
|
|
10237
|
+
* @description Returns each folder that holds at least one document the caller can read, with the document count per folder. Documents that are not assigned to a folder are returned as a synthetic 'Unassigned' folder (ID = empty GUID, isUnassigned = true); filter to its documents with searchLoanDocuments folderScope 'Unassigned' rather than by echoing that ID.
|
|
10216
10238
|
*
|
|
10217
10239
|
* @tags LoanDocumentFoldersForSingleLoan
|
|
10218
10240
|
* @name ListLoanDocumentFolders
|
|
@@ -10265,7 +10287,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10265
10287
|
*/
|
|
10266
10288
|
getLoanDocumentPreviews: (loanId: string, data: LoanDocumentPreviewsRequest, params?: RequestParams) => Promise<AxiosResponse<Record<string, string>, any, {}>>;
|
|
10267
10289
|
/**
|
|
10268
|
-
*
|
|
10290
|
+
* @description Filters the loan's readable documents. Pass folderID to filter to one folder, or folderScope 'Unassigned' for the documents that have no folder (the synthetic folder listLoanDocumentFolders reports with isUnassigned true); the two cannot be combined.
|
|
10269
10291
|
*
|
|
10270
10292
|
* @tags LoanDocuments
|
|
10271
10293
|
* @name SearchLoanDocuments
|
|
@@ -10273,6 +10295,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10273
10295
|
* @request POST:/api/loans/{loanId}/documents/search
|
|
10274
10296
|
* @secure
|
|
10275
10297
|
* @response `200` `LoanDocumentSearchPaginated` OK
|
|
10298
|
+
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
10276
10299
|
*/
|
|
10277
10300
|
searchLoanDocuments: (loanId: string, data: LoanDocumentSearchCriteria, query?: {
|
|
10278
10301
|
/** @format int32 */
|
|
@@ -10975,6 +10998,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10975
10998
|
* @secure
|
|
10976
10999
|
* @response `201` `TaskComment` Created
|
|
10977
11000
|
* @response `404` `ProblemDetails` Not Found
|
|
11001
|
+
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
10978
11002
|
*/
|
|
10979
11003
|
createLoanTaskComment: (loanId: string, userLoanTaskId: string, data: TaskCommentRequest, params?: RequestParams) => Promise<AxiosResponse<TaskComment, any, {}>>;
|
|
10980
11004
|
/**
|
|
@@ -10987,6 +11011,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10987
11011
|
* @secure
|
|
10988
11012
|
* @response `200` `TaskComment` OK
|
|
10989
11013
|
* @response `404` `ProblemDetails` Not Found
|
|
11014
|
+
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
10990
11015
|
*/
|
|
10991
11016
|
replaceLoanTaskComment: (loanId: string, userLoanTaskId: string, commentId: string, data: TaskCommentRequest, params?: RequestParams) => Promise<AxiosResponse<TaskComment, any, {}>>;
|
|
10992
11017
|
/**
|
package/dist/index.js
CHANGED
|
@@ -86,13 +86,7 @@ export class HttpClient {
|
|
|
86
86
|
const property = input[key];
|
|
87
87
|
const propertyContent = property instanceof Array ? property : [property];
|
|
88
88
|
for (const formItem of propertyContent) {
|
|
89
|
-
|
|
90
|
-
const isReactNativeFile = !!formItem &&
|
|
91
|
-
typeof formItem === "object" &&
|
|
92
|
-
"uri" in formItem &&
|
|
93
|
-
"name" in formItem &&
|
|
94
|
-
"type" in formItem;
|
|
95
|
-
const isFileType = isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
|
|
89
|
+
const isFileType = formItem instanceof Blob || formItem instanceof File;
|
|
96
90
|
formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem));
|
|
97
91
|
}
|
|
98
92
|
return formData;
|
|
@@ -101,7 +95,7 @@ export class HttpClient {
|
|
|
101
95
|
}
|
|
102
96
|
/**
|
|
103
97
|
* @title The Big POS API
|
|
104
|
-
* @version v3.
|
|
98
|
+
* @version v3.6.0
|
|
105
99
|
* @termsOfService https://www.thebigpos.com/terms-of-use/
|
|
106
100
|
* @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
|
|
107
101
|
*/
|
|
@@ -2927,7 +2921,8 @@ export class Api extends HttpClient {
|
|
|
2927
2921
|
* @request POST:/api/listings
|
|
2928
2922
|
* @secure
|
|
2929
2923
|
* @response `201` `Listing` Created
|
|
2930
|
-
* @response `
|
|
2924
|
+
* @response `401` `HttpError` Unauthorized
|
|
2925
|
+
* @response `403` `HttpError` Forbidden
|
|
2931
2926
|
*/
|
|
2932
2927
|
createListing: (data, params = {}) => this.request(Object.assign({ path: `/api/listings`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
2933
2928
|
/**
|
|
@@ -2961,7 +2956,8 @@ export class Api extends HttpClient {
|
|
|
2961
2956
|
* @request PUT:/api/listings/{id}
|
|
2962
2957
|
* @secure
|
|
2963
2958
|
* @response `200` `Listing` OK
|
|
2964
|
-
* @response `
|
|
2959
|
+
* @response `401` `HttpError` Unauthorized
|
|
2960
|
+
* @response `403` `HttpError` Forbidden
|
|
2965
2961
|
*/
|
|
2966
2962
|
replaceListing: (id, data, params = {}) => this.request(Object.assign({ path: `/api/listings/${id}`, method: "PUT", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
2967
2963
|
/**
|
|
@@ -3268,7 +3264,7 @@ export class Api extends HttpClient {
|
|
|
3268
3264
|
*/
|
|
3269
3265
|
getLoanDocumentFolderUsage: (id, params = {}) => this.request(Object.assign({ path: `/api/loan-document-folders/${id}/usage`, method: "GET", secure: true, format: "json" }, params)),
|
|
3270
3266
|
/**
|
|
3271
|
-
* @description Returns each folder that holds at least one document the caller can read, with the document count per folder. Documents that are not assigned to a folder are returned as a synthetic 'Unassigned' folder (ID = empty GUID).
|
|
3267
|
+
* @description Returns each folder that holds at least one document the caller can read, with the document count per folder. Documents that are not assigned to a folder are returned as a synthetic 'Unassigned' folder (ID = empty GUID, isUnassigned = true); filter to its documents with searchLoanDocuments folderScope 'Unassigned' rather than by echoing that ID.
|
|
3272
3268
|
*
|
|
3273
3269
|
* @tags LoanDocumentFoldersForSingleLoan
|
|
3274
3270
|
* @name ListLoanDocumentFolders
|
|
@@ -3315,7 +3311,7 @@ export class Api extends HttpClient {
|
|
|
3315
3311
|
*/
|
|
3316
3312
|
getLoanDocumentPreviews: (loanId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/documents/previews`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
3317
3313
|
/**
|
|
3318
|
-
*
|
|
3314
|
+
* @description Filters the loan's readable documents. Pass folderID to filter to one folder, or folderScope 'Unassigned' for the documents that have no folder (the synthetic folder listLoanDocumentFolders reports with isUnassigned true); the two cannot be combined.
|
|
3319
3315
|
*
|
|
3320
3316
|
* @tags LoanDocuments
|
|
3321
3317
|
* @name SearchLoanDocuments
|
|
@@ -3323,6 +3319,7 @@ export class Api extends HttpClient {
|
|
|
3323
3319
|
* @request POST:/api/loans/{loanId}/documents/search
|
|
3324
3320
|
* @secure
|
|
3325
3321
|
* @response `200` `LoanDocumentSearchPaginated` OK
|
|
3322
|
+
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
3326
3323
|
*/
|
|
3327
3324
|
searchLoanDocuments: (loanId, data, query, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/documents/search`, method: "POST", query: query, body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
3328
3325
|
/**
|
|
@@ -3942,6 +3939,7 @@ export class Api extends HttpClient {
|
|
|
3942
3939
|
* @secure
|
|
3943
3940
|
* @response `201` `TaskComment` Created
|
|
3944
3941
|
* @response `404` `ProblemDetails` Not Found
|
|
3942
|
+
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
3945
3943
|
*/
|
|
3946
3944
|
createLoanTaskComment: (loanId, userLoanTaskId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/tasks/${userLoanTaskId}/comments`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
3947
3945
|
/**
|
|
@@ -3954,6 +3952,7 @@ export class Api extends HttpClient {
|
|
|
3954
3952
|
* @secure
|
|
3955
3953
|
* @response `200` `TaskComment` OK
|
|
3956
3954
|
* @response `404` `ProblemDetails` Not Found
|
|
3955
|
+
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
3957
3956
|
*/
|
|
3958
3957
|
replaceLoanTaskComment: (loanId, userLoanTaskId, commentId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/tasks/${userLoanTaskId}/comments/${commentId}`, method: "PUT", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
3959
3958
|
/**
|