@matech/thebigpos-sdk 3.17.0-pr-5679-6304 → 3.17.0
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 +6 -111
- package/dist/index.js +3 -77
- package/dist/index.js.map +1 -1
- package/package.json +6 -16
- package/scripts/apply-json-patch-content-type.js +36 -189
- package/src/index.ts +30 -198
- 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
|
@@ -78,6 +78,7 @@ export type EncompassLogOperationType = "FieldUpdate" | "ConsentUpdate" | "Docum
|
|
|
78
78
|
export type EncompassEnvironment = "Production" | "UAT";
|
|
79
79
|
export type DraftType = "NewLoan" | "EditLoan";
|
|
80
80
|
export type DocumentVisibilityScope = "Own" | "All";
|
|
81
|
+
export type DocumentType = "PrequalLetter" | "PreapprovalLetter" | "EConsent" | "CreditAuthorization" | "TextOptIn" | "OpenHouseFlyer" | "LoanComparison" | "BuyerAgencyAgreements" | "ListingAgreements" | "Addendums" | "RentalAgreements" | "SalesContracts" | "RealEstateMarketFlyer" | "MortgageMarketingFlyer" | "FeeItemization" | "RefinanceDocument" | "CertifiedCommitments" | "CoBrandedMarketingFlyer";
|
|
81
82
|
export type CustomFieldEntityType = "Loan";
|
|
82
83
|
export type CustomFieldDataType = "String" | "Number" | "Decimal" | "Boolean" | "Date" | "SingleSelect" | "MultiSelect";
|
|
83
84
|
export type CustomFieldAnswerWarningReason = "Unresolved" | "Inactive" | "ReadOnly" | "DuplicateDefinition";
|
|
@@ -5394,9 +5395,6 @@ export interface ReorderLoanRoleTasksRequest {
|
|
|
5394
5395
|
export interface ReorderLoanTasksRequest {
|
|
5395
5396
|
userLoanTaskIDs: string[];
|
|
5396
5397
|
}
|
|
5397
|
-
export interface ReorderUserTableViewsRequest {
|
|
5398
|
-
viewIds: string[];
|
|
5399
|
-
}
|
|
5400
5398
|
export interface RequestImpersonationRequest {
|
|
5401
5399
|
email: string;
|
|
5402
5400
|
}
|
|
@@ -7138,8 +7136,6 @@ export interface UserTableSettings {
|
|
|
7138
7136
|
searchTerms: string[];
|
|
7139
7137
|
pinnedColumnIds: string[];
|
|
7140
7138
|
filters?: PipelineTableFilters | null;
|
|
7141
|
-
/** @format uuid */
|
|
7142
|
-
activeViewId?: string | null;
|
|
7143
7139
|
}
|
|
7144
7140
|
export interface UserTableSettingsRequest {
|
|
7145
7141
|
hiddenColumnIds: string[];
|
|
@@ -7149,31 +7145,6 @@ export interface UserTableSettingsRequest {
|
|
|
7149
7145
|
searchTerms: string[];
|
|
7150
7146
|
pinnedColumnIds: string[];
|
|
7151
7147
|
filters?: PipelineTableFilters | null;
|
|
7152
|
-
/** @format uuid */
|
|
7153
|
-
activeViewId?: string | null;
|
|
7154
|
-
}
|
|
7155
|
-
export interface UserTableView {
|
|
7156
|
-
/** @format uuid */
|
|
7157
|
-
id: string;
|
|
7158
|
-
tableKey: UserTableViewTableKeyEnum;
|
|
7159
|
-
name: string;
|
|
7160
|
-
/** @format int32 */
|
|
7161
|
-
sortOrder: number;
|
|
7162
|
-
searchTerms: string[];
|
|
7163
|
-
filters?: PipelineTableFilters | null;
|
|
7164
|
-
sortColumnId?: string | null;
|
|
7165
|
-
sortDirection?: SortDirection | null;
|
|
7166
|
-
/** @format date-time */
|
|
7167
|
-
createdAt: string;
|
|
7168
|
-
/** @format date-time */
|
|
7169
|
-
updatedAt?: string | null;
|
|
7170
|
-
}
|
|
7171
|
-
export interface UserTableViewRequest {
|
|
7172
|
-
name: string;
|
|
7173
|
-
searchTerms: string[];
|
|
7174
|
-
filters?: PipelineTableFilters | null;
|
|
7175
|
-
sortColumnId?: string | null;
|
|
7176
|
-
sortDirection?: SortDirection | null;
|
|
7177
7148
|
}
|
|
7178
7149
|
export interface VerifyEmailRequest {
|
|
7179
7150
|
token: string;
|
|
@@ -7351,7 +7322,6 @@ export type UserLoanRoleEnum = "Borrower" | "CoBorrower" | "NonBorrower" | "Loan
|
|
|
7351
7322
|
export type UserLoanConsentTypeEnum = "Econsent" | "CreditAuthorization" | "Tcpa";
|
|
7352
7323
|
export type UserLoanConsentLosSyncStatusEnum = "NotStarted" | "Failed" | "Success";
|
|
7353
7324
|
export type UserTableSettingsTableKeyEnum = "Pipeline";
|
|
7354
|
-
export type UserTableViewTableKeyEnum = "Pipeline";
|
|
7355
7325
|
export type GetCanvasParamsSurfaceEnum = "Home" | "LoanSummary" | "LoanDetails";
|
|
7356
7326
|
export type GetCanvasParamsEnum = "Home" | "LoanSummary" | "LoanDetails";
|
|
7357
7327
|
export type GetCustomFieldDefinitionsParamsEntityTypeEnum = "Loan";
|
|
@@ -7376,16 +7346,6 @@ export type GetMyTableSettingsParamsTableKeyEnum = "Pipeline";
|
|
|
7376
7346
|
export type GetMyTableSettingsParamsEnum = "Pipeline";
|
|
7377
7347
|
export type UpdateMyTableSettingsParamsTableKeyEnum = "Pipeline";
|
|
7378
7348
|
export type UpdateMyTableSettingsParamsEnum = "Pipeline";
|
|
7379
|
-
export type GetMyTableViewsParamsTableKeyEnum = "Pipeline";
|
|
7380
|
-
export type GetMyTableViewsParamsEnum = "Pipeline";
|
|
7381
|
-
export type CreateMyTableViewParamsTableKeyEnum = "Pipeline";
|
|
7382
|
-
export type CreateMyTableViewParamsEnum = "Pipeline";
|
|
7383
|
-
export type UpdateMyTableViewParamsTableKeyEnum = "Pipeline";
|
|
7384
|
-
export type UpdateMyTableViewParamsEnum = "Pipeline";
|
|
7385
|
-
export type DeleteMyTableViewParamsTableKeyEnum = "Pipeline";
|
|
7386
|
-
export type DeleteMyTableViewParamsEnum = "Pipeline";
|
|
7387
|
-
export type ReorderMyTableViewsParamsTableKeyEnum = "Pipeline";
|
|
7388
|
-
export type ReorderMyTableViewsParamsEnum = "Pipeline";
|
|
7389
7349
|
import type { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from "axios";
|
|
7390
7350
|
export type QueryParamsType = Record<string | number, any>;
|
|
7391
7351
|
export interface FullRequestParams extends Omit<AxiosRequestConfig, "data" | "params" | "url" | "responseType"> {
|
|
@@ -13335,9 +13295,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13335
13295
|
* @request GET:/api/template-tokens
|
|
13336
13296
|
* @secure
|
|
13337
13297
|
* @response `200` `(TemplateTokenRoot)[]` OK
|
|
13298
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
13338
13299
|
* @response `403` `ProblemDetails` Forbidden
|
|
13339
13300
|
*/
|
|
13340
|
-
getTemplateTokens: (
|
|
13301
|
+
getTemplateTokens: (query?: {
|
|
13302
|
+
notificationKey?: string;
|
|
13303
|
+
documentType?: DocumentType;
|
|
13304
|
+
}, params?: RequestParams) => Promise<AxiosResponse<TemplateTokenRoot[], any, {}>>;
|
|
13341
13305
|
/**
|
|
13342
13306
|
* No description
|
|
13343
13307
|
*
|
|
@@ -14199,75 +14163,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14199
14163
|
* @response `401` `ProblemDetails` Unauthorized
|
|
14200
14164
|
*/
|
|
14201
14165
|
updateMyTableSettings: (tableKey: UpdateMyTableSettingsParamsEnum, data: UserTableSettingsRequest, params?: RequestParams) => Promise<AxiosResponse<UserTableSettings, any, {}>>;
|
|
14202
|
-
/**
|
|
14203
|
-
* @description The caller's saved views for the table, in tab order.
|
|
14204
|
-
*
|
|
14205
|
-
* @tags UsersMe
|
|
14206
|
-
* @name GetMyTableViews
|
|
14207
|
-
* @summary Get Table Views
|
|
14208
|
-
* @request GET:/api/users/me/table-settings/{tableKey}/views
|
|
14209
|
-
* @secure
|
|
14210
|
-
* @response `200` `(UserTableView)[]` OK
|
|
14211
|
-
* @response `401` `ProblemDetails` Unauthorized
|
|
14212
|
-
*/
|
|
14213
|
-
getMyTableViews: (tableKey: GetMyTableViewsParamsEnum, params?: RequestParams) => Promise<AxiosResponse<UserTableView[], any, {}>>;
|
|
14214
|
-
/**
|
|
14215
|
-
* @description Saves a named view at the end of the tab order. A name the caller already uses on the table (ignoring case) is refused with 409, and a 21st view with 400.
|
|
14216
|
-
*
|
|
14217
|
-
* @tags UsersMe
|
|
14218
|
-
* @name CreateMyTableView
|
|
14219
|
-
* @summary Create Table View
|
|
14220
|
-
* @request POST:/api/users/me/table-settings/{tableKey}/views
|
|
14221
|
-
* @secure
|
|
14222
|
-
* @response `201` `UserTableView` Created
|
|
14223
|
-
* @response `400` `ProblemDetails` Bad Request
|
|
14224
|
-
* @response `401` `ProblemDetails` Unauthorized
|
|
14225
|
-
* @response `409` `ProblemDetails` Conflict
|
|
14226
|
-
* @response `422` `ProblemDetails` Unprocessable Content
|
|
14227
|
-
*/
|
|
14228
|
-
createMyTableView: (tableKey: CreateMyTableViewParamsEnum, data: UserTableViewRequest, params?: RequestParams) => Promise<AxiosResponse<UserTableView, any, {}>>;
|
|
14229
|
-
/**
|
|
14230
|
-
* @description Replaces the view's name, search terms, filters and sort.
|
|
14231
|
-
*
|
|
14232
|
-
* @tags UsersMe
|
|
14233
|
-
* @name UpdateMyTableView
|
|
14234
|
-
* @summary Update Table View
|
|
14235
|
-
* @request PUT:/api/users/me/table-settings/{tableKey}/views/{viewId}
|
|
14236
|
-
* @secure
|
|
14237
|
-
* @response `200` `UserTableView` OK
|
|
14238
|
-
* @response `401` `ProblemDetails` Unauthorized
|
|
14239
|
-
* @response `404` `ProblemDetails` Not Found
|
|
14240
|
-
* @response `409` `ProblemDetails` Conflict
|
|
14241
|
-
* @response `422` `ProblemDetails` Unprocessable Content
|
|
14242
|
-
*/
|
|
14243
|
-
updateMyTableView: (tableKey: UpdateMyTableViewParamsEnum, viewId: string, data: UserTableViewRequest, params?: RequestParams) => Promise<AxiosResponse<UserTableView, any, {}>>;
|
|
14244
|
-
/**
|
|
14245
|
-
* @description Deletes the view. When it was the open tab saved in the table settings, the settings fall back to the default tab.
|
|
14246
|
-
*
|
|
14247
|
-
* @tags UsersMe
|
|
14248
|
-
* @name DeleteMyTableView
|
|
14249
|
-
* @summary Delete Table View
|
|
14250
|
-
* @request DELETE:/api/users/me/table-settings/{tableKey}/views/{viewId}
|
|
14251
|
-
* @secure
|
|
14252
|
-
* @response `204` `void` No Content
|
|
14253
|
-
* @response `401` `ProblemDetails` Unauthorized
|
|
14254
|
-
* @response `404` `ProblemDetails` Not Found
|
|
14255
|
-
*/
|
|
14256
|
-
deleteMyTableView: (tableKey: DeleteMyTableViewParamsEnum, viewId: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
|
|
14257
|
-
/**
|
|
14258
|
-
* @description Sets the tab order. The body names every one of the caller's views on the table exactly once; a list that no longer matches them is refused with 409. Two reorders sent at once do not mix: the last to save wins as a whole.
|
|
14259
|
-
*
|
|
14260
|
-
* @tags UsersMe
|
|
14261
|
-
* @name ReorderMyTableViews
|
|
14262
|
-
* @summary Reorder Table Views
|
|
14263
|
-
* @request PUT:/api/users/me/table-settings/{tableKey}/views/order
|
|
14264
|
-
* @secure
|
|
14265
|
-
* @response `204` `void` No Content
|
|
14266
|
-
* @response `401` `ProblemDetails` Unauthorized
|
|
14267
|
-
* @response `409` `ProblemDetails` Conflict
|
|
14268
|
-
* @response `422` `ProblemDetails` Unprocessable Content
|
|
14269
|
-
*/
|
|
14270
|
-
reorderMyTableViews: (tableKey: ReorderMyTableViewsParamsEnum, data: ReorderUserTableViewsRequest, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
|
|
14271
14166
|
/**
|
|
14272
14167
|
* @description Update the phone number If changed will send a verification code to the new number
|
|
14273
14168
|
*
|
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;
|
|
@@ -5404,9 +5398,10 @@ export class Api extends HttpClient {
|
|
|
5404
5398
|
* @request GET:/api/template-tokens
|
|
5405
5399
|
* @secure
|
|
5406
5400
|
* @response `200` `(TemplateTokenRoot)[]` OK
|
|
5401
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
5407
5402
|
* @response `403` `ProblemDetails` Forbidden
|
|
5408
5403
|
*/
|
|
5409
|
-
getTemplateTokens: (params = {}) => this.request(Object.assign({ path: `/api/template-tokens`, method: "GET", secure: true, format: "json" }, params)),
|
|
5404
|
+
getTemplateTokens: (query, params = {}) => this.request(Object.assign({ path: `/api/template-tokens`, method: "GET", query: query, secure: true, format: "json" }, params)),
|
|
5410
5405
|
/**
|
|
5411
5406
|
* No description
|
|
5412
5407
|
*
|
|
@@ -6204,75 +6199,6 @@ export class Api extends HttpClient {
|
|
|
6204
6199
|
* @response `401` `ProblemDetails` Unauthorized
|
|
6205
6200
|
*/
|
|
6206
6201
|
updateMyTableSettings: (tableKey, data, params = {}) => this.request(Object.assign({ path: `/api/users/me/table-settings/${tableKey}`, method: "PUT", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
6207
|
-
/**
|
|
6208
|
-
* @description The caller's saved views for the table, in tab order.
|
|
6209
|
-
*
|
|
6210
|
-
* @tags UsersMe
|
|
6211
|
-
* @name GetMyTableViews
|
|
6212
|
-
* @summary Get Table Views
|
|
6213
|
-
* @request GET:/api/users/me/table-settings/{tableKey}/views
|
|
6214
|
-
* @secure
|
|
6215
|
-
* @response `200` `(UserTableView)[]` OK
|
|
6216
|
-
* @response `401` `ProblemDetails` Unauthorized
|
|
6217
|
-
*/
|
|
6218
|
-
getMyTableViews: (tableKey, params = {}) => this.request(Object.assign({ path: `/api/users/me/table-settings/${tableKey}/views`, method: "GET", secure: true, format: "json" }, params)),
|
|
6219
|
-
/**
|
|
6220
|
-
* @description Saves a named view at the end of the tab order. A name the caller already uses on the table (ignoring case) is refused with 409, and a 21st view with 400.
|
|
6221
|
-
*
|
|
6222
|
-
* @tags UsersMe
|
|
6223
|
-
* @name CreateMyTableView
|
|
6224
|
-
* @summary Create Table View
|
|
6225
|
-
* @request POST:/api/users/me/table-settings/{tableKey}/views
|
|
6226
|
-
* @secure
|
|
6227
|
-
* @response `201` `UserTableView` Created
|
|
6228
|
-
* @response `400` `ProblemDetails` Bad Request
|
|
6229
|
-
* @response `401` `ProblemDetails` Unauthorized
|
|
6230
|
-
* @response `409` `ProblemDetails` Conflict
|
|
6231
|
-
* @response `422` `ProblemDetails` Unprocessable Content
|
|
6232
|
-
*/
|
|
6233
|
-
createMyTableView: (tableKey, data, params = {}) => this.request(Object.assign({ path: `/api/users/me/table-settings/${tableKey}/views`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
6234
|
-
/**
|
|
6235
|
-
* @description Replaces the view's name, search terms, filters and sort.
|
|
6236
|
-
*
|
|
6237
|
-
* @tags UsersMe
|
|
6238
|
-
* @name UpdateMyTableView
|
|
6239
|
-
* @summary Update Table View
|
|
6240
|
-
* @request PUT:/api/users/me/table-settings/{tableKey}/views/{viewId}
|
|
6241
|
-
* @secure
|
|
6242
|
-
* @response `200` `UserTableView` OK
|
|
6243
|
-
* @response `401` `ProblemDetails` Unauthorized
|
|
6244
|
-
* @response `404` `ProblemDetails` Not Found
|
|
6245
|
-
* @response `409` `ProblemDetails` Conflict
|
|
6246
|
-
* @response `422` `ProblemDetails` Unprocessable Content
|
|
6247
|
-
*/
|
|
6248
|
-
updateMyTableView: (tableKey, viewId, data, params = {}) => this.request(Object.assign({ path: `/api/users/me/table-settings/${tableKey}/views/${viewId}`, method: "PUT", body: data, secure: true, type: "application/json", format: "json" }, params)),
|
|
6249
|
-
/**
|
|
6250
|
-
* @description Deletes the view. When it was the open tab saved in the table settings, the settings fall back to the default tab.
|
|
6251
|
-
*
|
|
6252
|
-
* @tags UsersMe
|
|
6253
|
-
* @name DeleteMyTableView
|
|
6254
|
-
* @summary Delete Table View
|
|
6255
|
-
* @request DELETE:/api/users/me/table-settings/{tableKey}/views/{viewId}
|
|
6256
|
-
* @secure
|
|
6257
|
-
* @response `204` `void` No Content
|
|
6258
|
-
* @response `401` `ProblemDetails` Unauthorized
|
|
6259
|
-
* @response `404` `ProblemDetails` Not Found
|
|
6260
|
-
*/
|
|
6261
|
-
deleteMyTableView: (tableKey, viewId, params = {}) => this.request(Object.assign({ path: `/api/users/me/table-settings/${tableKey}/views/${viewId}`, method: "DELETE", secure: true }, params)),
|
|
6262
|
-
/**
|
|
6263
|
-
* @description Sets the tab order. The body names every one of the caller's views on the table exactly once; a list that no longer matches them is refused with 409. Two reorders sent at once do not mix: the last to save wins as a whole.
|
|
6264
|
-
*
|
|
6265
|
-
* @tags UsersMe
|
|
6266
|
-
* @name ReorderMyTableViews
|
|
6267
|
-
* @summary Reorder Table Views
|
|
6268
|
-
* @request PUT:/api/users/me/table-settings/{tableKey}/views/order
|
|
6269
|
-
* @secure
|
|
6270
|
-
* @response `204` `void` No Content
|
|
6271
|
-
* @response `401` `ProblemDetails` Unauthorized
|
|
6272
|
-
* @response `409` `ProblemDetails` Conflict
|
|
6273
|
-
* @response `422` `ProblemDetails` Unprocessable Content
|
|
6274
|
-
*/
|
|
6275
|
-
reorderMyTableViews: (tableKey, data, params = {}) => this.request(Object.assign({ path: `/api/users/me/table-settings/${tableKey}/views/order`, method: "PUT", body: data, secure: true, type: "application/json" }, params)),
|
|
6276
6202
|
/**
|
|
6277
6203
|
* @description Update the phone number If changed will send a verification code to the new number
|
|
6278
6204
|
*
|