@matech/thebigpos-sdk 3.15.0 → 3.16.0-dev-6117

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/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
- const isFileType = formItem instanceof Blob || formItem instanceof File;
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.15.0
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,35 @@ 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)),
1252
+ /**
1253
+ * No description
1254
+ *
1255
+ * @tags BorrowerApplication
1256
+ * @name UpdateBorrowerApplication
1257
+ * @summary Save a step of a borrower's application from flat answers
1258
+ * @request PATCH:/api/loans/{loanId}/borrowers/{borrowerId}/application
1259
+ * @secure
1260
+ * @response `200` `BorrowerApplicationUpdate` OK
1261
+ * @response `400` `any` Bad Request
1262
+ * @response `403` `ProblemDetails` Forbidden
1263
+ * @response `404` `ProblemDetails` Not Found
1264
+ * @response `422` `UnprocessableEntity` Unprocessable Content
1265
+ */
1266
+ updateBorrowerApplication: (loanId, borrowerId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/borrowers/${borrowerId}/application`, method: "PATCH", body: data, secure: true, type: "application/json", format: "json" }, params)),
1232
1267
  /**
1233
1268
  * No description
1234
1269
  *
@@ -1423,6 +1458,46 @@ export class Api extends HttpClient {
1423
1458
  * @response `200` `BusinessRule` OK
1424
1459
  */
1425
1460
  restoreBusinessRule: (id, params = {}) => this.request(Object.assign({ path: `/api/business-rules/${id}/restore`, method: "POST", secure: true, format: "json" }, params)),
1461
+ /**
1462
+ * No description
1463
+ *
1464
+ * @tags Canvases
1465
+ * @name GetCanvas
1466
+ * @summary Get a site's canvas for one surface, as the signed-in user sees it
1467
+ * @request GET:/api/canvases/{surface}
1468
+ * @secure
1469
+ * @response `200` `CanvasView` OK
1470
+ * @response `400` `ProblemDetails` Bad Request
1471
+ * @response `404` `ProblemDetails` Not Found
1472
+ * @response `422` `ProblemDetails` Unprocessable Content
1473
+ */
1474
+ getCanvas: (surface, query, params = {}) => this.request(Object.assign({ path: `/api/canvases/${surface}`, method: "GET", query: query, secure: true, format: "json" }, params)),
1475
+ /**
1476
+ * @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.
1477
+ *
1478
+ * @tags CanvasFields
1479
+ * @name GetCanvasFields
1480
+ * @summary Get the fields a canvas can show
1481
+ * @request GET:/api/canvas/fields
1482
+ * @secure
1483
+ * @response `200` `CanvasFieldCatalog` OK
1484
+ * @response `403` `ProblemDetails` Forbidden
1485
+ * @response `404` `ProblemDetails` Not Found
1486
+ */
1487
+ getCanvasFields: (params = {}) => this.request(Object.assign({ path: `/api/canvas/fields`, method: "GET", secure: true, format: "json" }, params)),
1488
+ /**
1489
+ * No description
1490
+ *
1491
+ * @tags CanvasWidgetTypes
1492
+ * @name GetCanvasWidgetTypes
1493
+ * @summary Get canvas widget types
1494
+ * @request GET:/api/canvas/widget-types
1495
+ * @secure
1496
+ * @response `200` `(CanvasWidgetTypeDescriptor)[]` OK
1497
+ * @response `403` `ProblemDetails` Forbidden
1498
+ * @response `404` `ProblemDetails` Not Found
1499
+ */
1500
+ getCanvasWidgetTypes: (params = {}) => this.request(Object.assign({ path: `/api/canvas/widget-types`, method: "GET", secure: true, format: "json" }, params)),
1426
1501
  /**
1427
1502
  * @description Returns closed loan counts per account within the specified date range, including POS vs non-POS breakdown and utilization ratios.
1428
1503
  *
@@ -2993,6 +3068,22 @@ export class Api extends HttpClient {
2993
3068
  * @response `200` `File` OK
2994
3069
  */
2995
3070
  getListingOpenHouseFlyer: (id, params = {}) => this.request(Object.assign({ path: `/api/listings/${id}/open-house-flyer`, method: "GET", secure: true, format: "json" }, params)),
3071
+ /**
3072
+ * No description
3073
+ *
3074
+ * @tags LoanApplicationEdit
3075
+ * @name OpenBorrowerApplicationEdit
3076
+ * @summary Open a borrower's submitted application for editing
3077
+ * @request POST:/api/loans/{loanId}/application/edit
3078
+ * @secure
3079
+ * @response `200` `BorrowerApplication` OK
3080
+ * @response `400` `any` Bad Request
3081
+ * @response `403` `ProblemDetails` Forbidden
3082
+ * @response `404` `ProblemDetails` Not Found
3083
+ * @response `409` `ProblemDetails` Conflict
3084
+ * @response `423` `any` Locked
3085
+ */
3086
+ openBorrowerApplicationEdit: (loanId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/application/edit`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
2996
3087
  /**
2997
3088
  * No description
2998
3089
  *
@@ -3047,6 +3138,21 @@ export class Api extends HttpClient {
3047
3138
  * @response `423` `UnprocessableEntity` Locked
3048
3139
  */
3049
3140
  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)),
3141
+ /**
3142
+ * No description
3143
+ *
3144
+ * @tags LoanCanvasFieldValues
3145
+ * @name GetLoanCanvasFieldValues
3146
+ * @summary Get a loan's values for canvas fields
3147
+ * @request POST:/api/loans/{loanId}/canvas/field-values
3148
+ * @secure
3149
+ * @response `200` `CanvasFieldValues` OK
3150
+ * @response `400` `ProblemDetails` Bad Request
3151
+ * @response `403` `ProblemDetails` Forbidden
3152
+ * @response `404` `ProblemDetails` Not Found
3153
+ * @response `422` `ProblemDetails` Unprocessable Content
3154
+ */
3155
+ 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
3156
  /**
3051
3157
  * No description
3052
3158
  *
@@ -3988,6 +4094,7 @@ export class Api extends HttpClient {
3988
4094
  * @response `404` `ProblemDetails` Not Found
3989
4095
  * @response `409` `ProblemDetails` Conflict
3990
4096
  * @response `422` `UnprocessableEntity` Unprocessable Content
4097
+ * @response `423` `ProblemDetails` Locked
3991
4098
  */
3992
4099
  completeBorrowerApplication: (loanId, borrowerId, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/borrowers/${borrowerId}/complete`, method: "POST", secure: true }, params)),
3993
4100
  /**
@@ -4096,6 +4203,20 @@ export class Api extends HttpClient {
4096
4203
  * @response `404` `ProblemDetails` Not Found
4097
4204
  */
4098
4205
  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)),
4206
+ /**
4207
+ * No description
4208
+ *
4209
+ * @tags LoanSigningMethod
4210
+ * @name UpdateLoanSigningMethod
4211
+ * @summary Switch the loan's signing method
4212
+ * @request PUT:/api/loans/{loanId}/signing-method
4213
+ * @secure
4214
+ * @response `204` `void` No Content
4215
+ * @response `403` `ProblemDetails` Forbidden
4216
+ * @response `404` `ProblemDetails` Not Found
4217
+ * @response `422` `ProblemDetails` Unprocessable Content
4218
+ */
4219
+ 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
4220
  /**
4100
4221
  * No description
4101
4222
  *
@@ -4832,6 +4953,98 @@ export class Api extends HttpClient {
4832
4953
  * @response `422` `UnprocessableEntity` Unprocessable Content
4833
4954
  */
4834
4955
  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)),
4956
+ /**
4957
+ * No description
4958
+ *
4959
+ * @tags SiteConfigurationCanvases
4960
+ * @name GetSiteConfigurationCanvases
4961
+ * @summary Get a site's canvases: own, inherited and effective per surface
4962
+ * @request GET:/api/site-configurations/{siteConfigurationId}/canvases
4963
+ * @secure
4964
+ * @response `200` `SiteConfigurationCanvases` OK
4965
+ * @response `403` `ProblemDetails` Forbidden
4966
+ * @response `404` `ProblemDetails` Not Found
4967
+ */
4968
+ getSiteConfigurationCanvases: (siteConfigurationId, params = {}) => this.request(Object.assign({ path: `/api/site-configurations/${siteConfigurationId}/canvases`, method: "GET", secure: true, format: "json" }, params)),
4969
+ /**
4970
+ * @description The request is the canvas's whole state: leaving out forkedFromSiteConfigurationID and forkedFromVersion clears them, and isBehindInherited with them.
4971
+ *
4972
+ * @tags SiteConfigurationCanvases
4973
+ * @name SaveSiteConfigurationCanvas
4974
+ * @summary Save a site's canvas for one surface
4975
+ * @request PUT:/api/site-configurations/{siteConfigurationId}/canvases/{surface}
4976
+ * @secure
4977
+ * @response `200` `CanvasSurfaceState` OK
4978
+ * @response `400` `ProblemDetails` Bad Request
4979
+ * @response `403` `ProblemDetails` Forbidden
4980
+ * @response `404` `ProblemDetails` Not Found
4981
+ * @response `409` `ProblemDetails` Conflict
4982
+ * @response `422` `ProblemDetails` Unprocessable Content
4983
+ * @response `423` `ProblemDetails` Locked
4984
+ */
4985
+ 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)),
4986
+ /**
4987
+ * No description
4988
+ *
4989
+ * @tags SiteConfigurationCanvases
4990
+ * @name DeleteSiteConfigurationCanvas
4991
+ * @summary Delete a site's own canvas for a surface, its boards or its Loan Details tabs, so it inherits again
4992
+ * @request DELETE:/api/site-configurations/{siteConfigurationId}/canvases/{surface}
4993
+ * @secure
4994
+ * @response `204` `void` No Content
4995
+ * @response `400` `ProblemDetails` Bad Request
4996
+ * @response `403` `ProblemDetails` Forbidden
4997
+ * @response `404` `ProblemDetails` Not Found
4998
+ * @response `409` `ProblemDetails` Conflict
4999
+ * @response `422` `ProblemDetails` Unprocessable Content
5000
+ */
5001
+ deleteSiteConfigurationCanvas: (siteConfigurationId, surface, query, params = {}) => this.request(Object.assign({ path: `/api/site-configurations/${siteConfigurationId}/canvases/${surface}`, method: "DELETE", query: query, secure: true }, params)),
5002
+ /**
5003
+ * No description
5004
+ *
5005
+ * @tags SiteConfigurationCanvases
5006
+ * @name PreviewSiteConfigurationCanvas
5007
+ * @summary Preview an unsaved canvas for one surface as a role would see it
5008
+ * @request POST:/api/site-configurations/{siteConfigurationId}/canvases/{surface}/preview
5009
+ * @secure
5010
+ * @response `200` `CanvasView` OK
5011
+ * @response `400` `ProblemDetails` Bad Request
5012
+ * @response `403` `ProblemDetails` Forbidden
5013
+ * @response `404` `ProblemDetails` Not Found
5014
+ * @response `422` `ProblemDetails` Unprocessable Content
5015
+ */
5016
+ 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)),
5017
+ /**
5018
+ * No description
5019
+ *
5020
+ * @tags SiteConfigurationCanvases
5021
+ * @name GetSiteConfigurationCanvasVersions
5022
+ * @summary Get the saved versions of a site's layout for a surface, newest first, including those from before a delete
5023
+ * @request GET:/api/site-configurations/{siteConfigurationId}/canvases/{surface}/versions
5024
+ * @secure
5025
+ * @response `200` `(CanvasVersion)[]` OK
5026
+ * @response `403` `ProblemDetails` Forbidden
5027
+ * @response `404` `ProblemDetails` Not Found
5028
+ * @response `422` `ProblemDetails` Unprocessable Content
5029
+ */
5030
+ getSiteConfigurationCanvasVersions: (siteConfigurationId, surface, params = {}) => this.request(Object.assign({ path: `/api/site-configurations/${siteConfigurationId}/canvases/${surface}/versions`, method: "GET", secure: true, format: "json" }, params)),
5031
+ /**
5032
+ * No description
5033
+ *
5034
+ * @tags SiteConfigurationCanvases
5035
+ * @name RestoreSiteConfigurationCanvasVersion
5036
+ * @summary Restore a saved version of a site's canvas as a new version
5037
+ * @request POST:/api/site-configurations/{siteConfigurationId}/canvases/{surface}/versions/{version}/restore
5038
+ * @secure
5039
+ * @response `200` `CanvasSurfaceState` OK
5040
+ * @response `400` `ProblemDetails` Bad Request
5041
+ * @response `403` `ProblemDetails` Forbidden
5042
+ * @response `404` `ProblemDetails` Not Found
5043
+ * @response `409` `ProblemDetails` Conflict
5044
+ * @response `422` `ProblemDetails` Unprocessable Content
5045
+ * @response `423` `ProblemDetails` Locked
5046
+ */
5047
+ 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
5048
  /**
4836
5049
  * No description
4837
5050
  *