@matech/thebigpos-sdk 3.15.0 → 3.16.0-dev-6073
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 +572 -14
- package/dist/index.js +184 -2
- 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 +1119 -15
package/dist/index.js
CHANGED
|
@@ -86,7 +86,13 @@ 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
|
-
|
|
89
|
+
// React Native files are plain { uri, name, type } objects, not Blob/File.
|
|
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;
|
|
90
96
|
formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem));
|
|
91
97
|
}
|
|
92
98
|
return formData;
|
|
@@ -95,7 +101,7 @@ export class HttpClient {
|
|
|
95
101
|
}
|
|
96
102
|
/**
|
|
97
103
|
* @title The Big POS API
|
|
98
|
-
* @version v3.
|
|
104
|
+
* @version v3.16.0
|
|
99
105
|
* @termsOfService https://www.thebigpos.com/terms-of-use/
|
|
100
106
|
* @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
|
|
101
107
|
*/
|
|
@@ -1229,6 +1235,20 @@ export class Api extends HttpClient {
|
|
|
1229
1235
|
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
1230
1236
|
*/
|
|
1231
1237
|
logOut: (query, params = {}) => this.request(Object.assign({ path: `/api/logout`, method: "POST", query: query, secure: true, format: "json" }, params)),
|
|
1238
|
+
/**
|
|
1239
|
+
* No description
|
|
1240
|
+
*
|
|
1241
|
+
* @tags BorrowerApplication
|
|
1242
|
+
* @name GetBorrowerApplication
|
|
1243
|
+
* @summary Get a borrower's application as flat answers
|
|
1244
|
+
* @request GET:/api/loans/{loanId}/borrowers/{borrowerId}/application
|
|
1245
|
+
* @secure
|
|
1246
|
+
* @response `200` `BorrowerApplication` OK
|
|
1247
|
+
* @response `400` `any` Bad Request
|
|
1248
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
1249
|
+
* @response `404` `ProblemDetails` Not Found
|
|
1250
|
+
*/
|
|
1251
|
+
getBorrowerApplication: (loanId, borrowerId, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/borrowers/${borrowerId}/application`, method: "GET", secure: true, format: "json" }, params)),
|
|
1232
1252
|
/**
|
|
1233
1253
|
* No description
|
|
1234
1254
|
*
|
|
@@ -1423,6 +1443,46 @@ export class Api extends HttpClient {
|
|
|
1423
1443
|
* @response `200` `BusinessRule` OK
|
|
1424
1444
|
*/
|
|
1425
1445
|
restoreBusinessRule: (id, params = {}) => this.request(Object.assign({ path: `/api/business-rules/${id}/restore`, method: "POST", secure: true, format: "json" }, params)),
|
|
1446
|
+
/**
|
|
1447
|
+
* No description
|
|
1448
|
+
*
|
|
1449
|
+
* @tags Canvases
|
|
1450
|
+
* @name GetCanvas
|
|
1451
|
+
* @summary Get a site's canvas for one surface, as the signed-in user sees it
|
|
1452
|
+
* @request GET:/api/canvases/{surface}
|
|
1453
|
+
* @secure
|
|
1454
|
+
* @response `200` `CanvasView` OK
|
|
1455
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
1456
|
+
* @response `404` `ProblemDetails` Not Found
|
|
1457
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
1458
|
+
*/
|
|
1459
|
+
getCanvas: (surface, query, params = {}) => this.request(Object.assign({ path: `/api/canvases/${surface}`, method: "GET", query: query, secure: true, format: "json" }, params)),
|
|
1460
|
+
/**
|
|
1461
|
+
* @description A standard field's key and every categoryKey never change: saved layouts refer to fields by key, and a client can translate labels and categories by these keys.
|
|
1462
|
+
*
|
|
1463
|
+
* @tags CanvasFields
|
|
1464
|
+
* @name GetCanvasFields
|
|
1465
|
+
* @summary Get the fields a canvas can show
|
|
1466
|
+
* @request GET:/api/canvas/fields
|
|
1467
|
+
* @secure
|
|
1468
|
+
* @response `200` `CanvasFieldCatalog` OK
|
|
1469
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
1470
|
+
* @response `404` `ProblemDetails` Not Found
|
|
1471
|
+
*/
|
|
1472
|
+
getCanvasFields: (params = {}) => this.request(Object.assign({ path: `/api/canvas/fields`, method: "GET", secure: true, format: "json" }, params)),
|
|
1473
|
+
/**
|
|
1474
|
+
* No description
|
|
1475
|
+
*
|
|
1476
|
+
* @tags CanvasWidgetTypes
|
|
1477
|
+
* @name GetCanvasWidgetTypes
|
|
1478
|
+
* @summary Get canvas widget types
|
|
1479
|
+
* @request GET:/api/canvas/widget-types
|
|
1480
|
+
* @secure
|
|
1481
|
+
* @response `200` `(CanvasWidgetTypeDescriptor)[]` OK
|
|
1482
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
1483
|
+
* @response `404` `ProblemDetails` Not Found
|
|
1484
|
+
*/
|
|
1485
|
+
getCanvasWidgetTypes: (params = {}) => this.request(Object.assign({ path: `/api/canvas/widget-types`, method: "GET", secure: true, format: "json" }, params)),
|
|
1426
1486
|
/**
|
|
1427
1487
|
* @description Returns closed loan counts per account within the specified date range, including POS vs non-POS breakdown and utilization ratios.
|
|
1428
1488
|
*
|
|
@@ -3047,6 +3107,21 @@ export class Api extends HttpClient {
|
|
|
3047
3107
|
* @response `423` `UnprocessableEntity` Locked
|
|
3048
3108
|
*/
|
|
3049
3109
|
runLoanCalculator: (loanId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/calculators/loan-calculator`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
3110
|
+
/**
|
|
3111
|
+
* No description
|
|
3112
|
+
*
|
|
3113
|
+
* @tags LoanCanvasFieldValues
|
|
3114
|
+
* @name GetLoanCanvasFieldValues
|
|
3115
|
+
* @summary Get a loan's values for canvas fields
|
|
3116
|
+
* @request POST:/api/loans/{loanId}/canvas/field-values
|
|
3117
|
+
* @secure
|
|
3118
|
+
* @response `200` `CanvasFieldValues` OK
|
|
3119
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
3120
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
3121
|
+
* @response `404` `ProblemDetails` Not Found
|
|
3122
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
3123
|
+
*/
|
|
3124
|
+
getLoanCanvasFieldValues: (loanId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/canvas/field-values`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
3050
3125
|
/**
|
|
3051
3126
|
* No description
|
|
3052
3127
|
*
|
|
@@ -3988,6 +4063,7 @@ export class Api extends HttpClient {
|
|
|
3988
4063
|
* @response `404` `ProblemDetails` Not Found
|
|
3989
4064
|
* @response `409` `ProblemDetails` Conflict
|
|
3990
4065
|
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
4066
|
+
* @response `423` `ProblemDetails` Locked
|
|
3991
4067
|
*/
|
|
3992
4068
|
completeBorrowerApplication: (loanId, borrowerId, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/borrowers/${borrowerId}/complete`, method: "POST", secure: true }, params)),
|
|
3993
4069
|
/**
|
|
@@ -4096,6 +4172,20 @@ export class Api extends HttpClient {
|
|
|
4096
4172
|
* @response `404` `ProblemDetails` Not Found
|
|
4097
4173
|
*/
|
|
4098
4174
|
triggerAso: (loanId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/aso`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
4175
|
+
/**
|
|
4176
|
+
* No description
|
|
4177
|
+
*
|
|
4178
|
+
* @tags LoanSigningMethod
|
|
4179
|
+
* @name UpdateLoanSigningMethod
|
|
4180
|
+
* @summary Switch the loan's signing method
|
|
4181
|
+
* @request PUT:/api/loans/{loanId}/signing-method
|
|
4182
|
+
* @secure
|
|
4183
|
+
* @response `204` `void` No Content
|
|
4184
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
4185
|
+
* @response `404` `ProblemDetails` Not Found
|
|
4186
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
4187
|
+
*/
|
|
4188
|
+
updateLoanSigningMethod: (loanId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/signing-method`, method: "PUT", body: data, secure: true, type: "application/json" }, params)),
|
|
4099
4189
|
/**
|
|
4100
4190
|
* No description
|
|
4101
4191
|
*
|
|
@@ -4832,6 +4922,98 @@ export class Api extends HttpClient {
|
|
|
4832
4922
|
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
4833
4923
|
*/
|
|
4834
4924
|
replacePartnerSiteConfiguration: (realtorId, siteConfigurationId, data, query, params = {}) => this.request(Object.assign({ path: `/api/partners/${realtorId}/site-configurations/${siteConfigurationId}`, method: "PUT", query: query, body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
4925
|
+
/**
|
|
4926
|
+
* No description
|
|
4927
|
+
*
|
|
4928
|
+
* @tags SiteConfigurationCanvases
|
|
4929
|
+
* @name GetSiteConfigurationCanvases
|
|
4930
|
+
* @summary Get a site's canvases: own, inherited and effective per surface
|
|
4931
|
+
* @request GET:/api/site-configurations/{siteConfigurationId}/canvases
|
|
4932
|
+
* @secure
|
|
4933
|
+
* @response `200` `SiteConfigurationCanvases` OK
|
|
4934
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
4935
|
+
* @response `404` `ProblemDetails` Not Found
|
|
4936
|
+
*/
|
|
4937
|
+
getSiteConfigurationCanvases: (siteConfigurationId, params = {}) => this.request(Object.assign({ path: `/api/site-configurations/${siteConfigurationId}/canvases`, method: "GET", secure: true, format: "json" }, params)),
|
|
4938
|
+
/**
|
|
4939
|
+
* @description The request is the canvas's whole state: leaving out forkedFromSiteConfigurationID and forkedFromVersion clears them, and isBehindInherited with them.
|
|
4940
|
+
*
|
|
4941
|
+
* @tags SiteConfigurationCanvases
|
|
4942
|
+
* @name SaveSiteConfigurationCanvas
|
|
4943
|
+
* @summary Save a site's canvas for one surface
|
|
4944
|
+
* @request PUT:/api/site-configurations/{siteConfigurationId}/canvases/{surface}
|
|
4945
|
+
* @secure
|
|
4946
|
+
* @response `200` `CanvasSurfaceState` OK
|
|
4947
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
4948
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
4949
|
+
* @response `404` `ProblemDetails` Not Found
|
|
4950
|
+
* @response `409` `ProblemDetails` Conflict
|
|
4951
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
4952
|
+
* @response `423` `ProblemDetails` Locked
|
|
4953
|
+
*/
|
|
4954
|
+
saveSiteConfigurationCanvas: (siteConfigurationId, surface, data, params = {}) => this.request(Object.assign({ path: `/api/site-configurations/${siteConfigurationId}/canvases/${surface}`, method: "PUT", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
4955
|
+
/**
|
|
4956
|
+
* No description
|
|
4957
|
+
*
|
|
4958
|
+
* @tags SiteConfigurationCanvases
|
|
4959
|
+
* @name DeleteSiteConfigurationCanvas
|
|
4960
|
+
* @summary Delete a site's own canvas for a surface, its boards or its Loan Details tabs, so it inherits again
|
|
4961
|
+
* @request DELETE:/api/site-configurations/{siteConfigurationId}/canvases/{surface}
|
|
4962
|
+
* @secure
|
|
4963
|
+
* @response `204` `void` No Content
|
|
4964
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
4965
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
4966
|
+
* @response `404` `ProblemDetails` Not Found
|
|
4967
|
+
* @response `409` `ProblemDetails` Conflict
|
|
4968
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
4969
|
+
*/
|
|
4970
|
+
deleteSiteConfigurationCanvas: (siteConfigurationId, surface, query, params = {}) => this.request(Object.assign({ path: `/api/site-configurations/${siteConfigurationId}/canvases/${surface}`, method: "DELETE", query: query, secure: true }, params)),
|
|
4971
|
+
/**
|
|
4972
|
+
* No description
|
|
4973
|
+
*
|
|
4974
|
+
* @tags SiteConfigurationCanvases
|
|
4975
|
+
* @name PreviewSiteConfigurationCanvas
|
|
4976
|
+
* @summary Preview an unsaved canvas for one surface as a role would see it
|
|
4977
|
+
* @request POST:/api/site-configurations/{siteConfigurationId}/canvases/{surface}/preview
|
|
4978
|
+
* @secure
|
|
4979
|
+
* @response `200` `CanvasView` OK
|
|
4980
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
4981
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
4982
|
+
* @response `404` `ProblemDetails` Not Found
|
|
4983
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
4984
|
+
*/
|
|
4985
|
+
previewSiteConfigurationCanvas: (siteConfigurationId, surface, data, params = {}) => this.request(Object.assign({ path: `/api/site-configurations/${siteConfigurationId}/canvases/${surface}/preview`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
4986
|
+
/**
|
|
4987
|
+
* No description
|
|
4988
|
+
*
|
|
4989
|
+
* @tags SiteConfigurationCanvases
|
|
4990
|
+
* @name GetSiteConfigurationCanvasVersions
|
|
4991
|
+
* @summary Get the saved versions of a site's layout for a surface, newest first, including those from before a delete
|
|
4992
|
+
* @request GET:/api/site-configurations/{siteConfigurationId}/canvases/{surface}/versions
|
|
4993
|
+
* @secure
|
|
4994
|
+
* @response `200` `(CanvasVersion)[]` OK
|
|
4995
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
4996
|
+
* @response `404` `ProblemDetails` Not Found
|
|
4997
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
4998
|
+
*/
|
|
4999
|
+
getSiteConfigurationCanvasVersions: (siteConfigurationId, surface, params = {}) => this.request(Object.assign({ path: `/api/site-configurations/${siteConfigurationId}/canvases/${surface}/versions`, method: "GET", secure: true, format: "json" }, params)),
|
|
5000
|
+
/**
|
|
5001
|
+
* No description
|
|
5002
|
+
*
|
|
5003
|
+
* @tags SiteConfigurationCanvases
|
|
5004
|
+
* @name RestoreSiteConfigurationCanvasVersion
|
|
5005
|
+
* @summary Restore a saved version of a site's canvas as a new version
|
|
5006
|
+
* @request POST:/api/site-configurations/{siteConfigurationId}/canvases/{surface}/versions/{version}/restore
|
|
5007
|
+
* @secure
|
|
5008
|
+
* @response `200` `CanvasSurfaceState` OK
|
|
5009
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
5010
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
5011
|
+
* @response `404` `ProblemDetails` Not Found
|
|
5012
|
+
* @response `409` `ProblemDetails` Conflict
|
|
5013
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
5014
|
+
* @response `423` `ProblemDetails` Locked
|
|
5015
|
+
*/
|
|
5016
|
+
restoreSiteConfigurationCanvasVersion: (siteConfigurationId, surface, version, data, params = {}) => this.request(Object.assign({ path: `/api/site-configurations/${siteConfigurationId}/canvases/${surface}/versions/${version}/restore`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
4835
5017
|
/**
|
|
4836
5018
|
* No description
|
|
4837
5019
|
*
|