@matech/thebigpos-sdk 3.27.0 → 3.28.0-dev-8422

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.27.0
104
+ * @version v3.28.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
  */
@@ -171,6 +177,65 @@ export class Api extends HttpClient {
171
177
  * @response `422` `UnprocessableEntity` Unprocessable Content
172
178
  */
173
179
  updateSiteConfigurationForAccount: (data, params = {}) => this.request(Object.assign({ path: `/api/account/site-configurations`, method: "PUT", body: data, secure: true, type: "application/json", format: "json" }, params)),
180
+ /**
181
+ * @description Makes a settlement agent, by user ID or by an open invite's ID, a partner with no loan officer
182
+ *
183
+ * @tags AccountPartners
184
+ * @name PromotePartner
185
+ * @summary Promote To Partner
186
+ * @request POST:/api/account/partners/promotions
187
+ * @secure
188
+ * @response `200` `PromotePartner` OK
189
+ * @response `400` `ProblemDetails` Bad Request
190
+ * @response `403` `ProblemDetails` Forbidden
191
+ * @response `404` `ProblemDetails` Not Found
192
+ * @response `409` `ProblemDetails` Conflict
193
+ * @response `422` `ProblemDetails` Unprocessable Content
194
+ */
195
+ promotePartner: (data, params = {}) => this.request(Object.assign({ path: `/api/account/partners/promotions`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
196
+ /**
197
+ * @description Changes a registered partner's name, sign-in email and phone
198
+ *
199
+ * @tags AccountPartners
200
+ * @name ReplacePartner
201
+ * @summary Replace Partner
202
+ * @request PUT:/api/account/partners/{partnerProfileId}
203
+ * @secure
204
+ * @response `204` `void` No Content
205
+ * @response `403` `ProblemDetails` Forbidden
206
+ * @response `404` `ProblemDetails` Not Found
207
+ * @response `409` `ProblemDetails` Conflict
208
+ * @response `422` `ProblemDetails` Unprocessable Content
209
+ */
210
+ replacePartner: (partnerProfileId, data, params = {}) => this.request(Object.assign({ path: `/api/account/partners/${partnerProfileId}`, method: "PUT", body: data, secure: true, type: "application/json" }, params)),
211
+ /**
212
+ * @description Makes a registered partner a settlement agent again and retires their partner profile; their account and loans stay
213
+ *
214
+ * @tags AccountPartners
215
+ * @name DemotePartner
216
+ * @summary Demote Partner
217
+ * @request POST:/api/account/partners/{partnerProfileId}/demote
218
+ * @secure
219
+ * @response `204` `void` No Content
220
+ * @response `403` `ProblemDetails` Forbidden
221
+ * @response `404` `ProblemDetails` Not Found
222
+ * @response `409` `ProblemDetails` Conflict
223
+ */
224
+ demotePartner: (partnerProfileId, params = {}) => this.request(Object.assign({ path: `/api/account/partners/${partnerProfileId}/demote`, method: "POST", secure: true }, params)),
225
+ /**
226
+ * @description Cancels a pending partner's invites and retires their partner profile; inviting the email again restores it
227
+ *
228
+ * @tags AccountPartners
229
+ * @name CancelPartnerInvite
230
+ * @summary Cancel Partner Invite
231
+ * @request POST:/api/account/partners/{partnerProfileId}/cancel
232
+ * @secure
233
+ * @response `204` `void` No Content
234
+ * @response `403` `ProblemDetails` Forbidden
235
+ * @response `404` `ProblemDetails` Not Found
236
+ * @response `409` `ProblemDetails` Conflict
237
+ */
238
+ cancelPartnerInvite: (partnerProfileId, params = {}) => this.request(Object.assign({ path: `/api/account/partners/${partnerProfileId}/cancel`, method: "POST", secure: true }, params)),
174
239
  /**
175
240
  * No description
176
241
  *
@@ -2850,6 +2915,7 @@ export class Api extends HttpClient {
2850
2915
  * @secure
2851
2916
  * @response `200` `Draft` OK
2852
2917
  * @response `400` `ProblemDetails` Bad Request
2918
+ * @response `403` `ProblemDetails` Forbidden
2853
2919
  * @response `404` `ProblemDetails` Not Found
2854
2920
  * @response `423` `ProblemDetails` Locked
2855
2921
  */
@@ -6449,6 +6515,19 @@ export class Api extends HttpClient {
6449
6515
  * @response `403` `ProblemDetails` Forbidden
6450
6516
  */
6451
6517
  getMyPartners: (params = {}) => this.request(Object.assign({ path: `/api/users/me/partners`, method: "GET", secure: true, format: "json" }, params)),
6518
+ /**
6519
+ * @description Searches the rows getMyPartners returns by first name, last name, full name or email, and pages them. Sorts by firstName, lastName, email, tier or createdAt when both sortBy and sortDirection are given, else newest first
6520
+ *
6521
+ * @tags UsersMe
6522
+ * @name SearchMyPartners
6523
+ * @summary Search My Partners
6524
+ * @request POST:/api/users/me/partners/search
6525
+ * @secure
6526
+ * @response `200` `MyPartnerPaginated` OK
6527
+ * @response `400` `ProblemDetails` Bad Request
6528
+ * @response `403` `ProblemDetails` Forbidden
6529
+ */
6530
+ searchMyPartners: (data, query, params = {}) => this.request(Object.assign({ path: `/api/users/me/partners/search`, method: "POST", query: query, body: data, secure: true, type: "application/json", format: "json" }, params)),
6452
6531
  /**
6453
6532
  * @description Adds a partner, by partner profile ID, to the loan officer's list; a pending partner can be added too
6454
6533
  *