@matech/thebigpos-sdk 3.8.0-stag-3544 → 3.9.0-dev-3835

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 CHANGED
@@ -40,5 +40,44 @@ 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
+
43
82
  ____
44
83
  © 2024 Mortgage Automation Technologies. All rights reserved
package/dist/index.d.ts CHANGED
@@ -1431,6 +1431,8 @@ export interface CreateLoanRoleTaskRequest {
1431
1431
  borrowerPair: number;
1432
1432
  /** @format int32 */
1433
1433
  borrowerPosition: number;
1434
+ /** @format date */
1435
+ dueDate?: string | null;
1434
1436
  }
1435
1437
  export interface CreateSession {
1436
1438
  sessionId: string;
@@ -2084,8 +2086,6 @@ export interface File {
2084
2086
  fileName: string;
2085
2087
  name: string;
2086
2088
  s3FilePath: string;
2087
- user?: User | null;
2088
- account?: Account | null;
2089
2089
  url: string;
2090
2090
  }
2091
2091
  export interface FilePaginated {
@@ -2469,7 +2469,6 @@ export interface Invite {
2469
2469
  /** @format date-time */
2470
2470
  expiresAt?: string | null;
2471
2471
  status: string;
2472
- invitedBy?: User | null;
2473
2472
  loan: LoanIdentifier;
2474
2473
  url: string;
2475
2474
  }
@@ -3514,7 +3513,7 @@ export interface LoanDocument {
3514
3513
  /** @format uuid */
3515
3514
  id: string;
3516
3515
  name: string;
3517
- loan: Loan;
3516
+ loan: LoanIdentifier;
3518
3517
  user?: UserSummary | null;
3519
3518
  /** @deprecated */
3520
3519
  initialBucket?: string | null;
@@ -3676,6 +3675,7 @@ export interface LoanFinancialRequest {
3676
3675
  cashToClose?: number | null;
3677
3676
  /** @format double */
3678
3677
  cashDownPayment?: number | null;
3678
+ downPaymentPercent?: string | null;
3679
3679
  /** @format double */
3680
3680
  maximumPurchasePrice?: number | null;
3681
3681
  isDownPaymentGift?: boolean | null;
@@ -4084,6 +4084,7 @@ export interface LoanRecommendation {
4084
4084
  canonicalName: string;
4085
4085
  displayName: string;
4086
4086
  extractedValue: string;
4087
+ mintable: boolean;
4087
4088
  currentLoanValue?: any | null;
4088
4089
  /** @format uuid */
4089
4090
  sourceDocumentId: string;
@@ -4113,6 +4114,8 @@ export interface LoanRefinance {
4113
4114
  existingLiens?: number | null;
4114
4115
  /** @format double */
4115
4116
  costOfImprovements?: number | null;
4117
+ /** @format double */
4118
+ cashOutAmount?: number | null;
4116
4119
  purpose?: LoanRefinancePurpose | null;
4117
4120
  currentLoan?: LoanRefinanceCurrentLoan | null;
4118
4121
  }
@@ -4142,6 +4145,8 @@ export interface LoanRefinanceRequest {
4142
4145
  /** @format int32 */
4143
4146
  yearAcquired?: number | null;
4144
4147
  purpose?: LoanRefinancePurpose | null;
4148
+ /** @format double */
4149
+ cashOutAmount?: number | null;
4145
4150
  currentLoan?: LoanRefinanceCurrentLoanRequest | null;
4146
4151
  }
4147
4152
  export interface LoanRoleSlotTasks {
@@ -4560,6 +4565,14 @@ export interface MilestoneConfigurationRequest {
4560
4565
  loanType: string;
4561
4566
  notificationsEnabled: boolean;
4562
4567
  }
4568
+ export interface MintedProposal {
4569
+ /** @format uuid */
4570
+ id: string;
4571
+ /** @format date-time */
4572
+ expiresAt: string;
4573
+ columns: string[];
4574
+ rows: string[][];
4575
+ }
4563
4576
  export interface MobileAppReviewSeed {
4564
4577
  /** @format uuid */
4565
4578
  userID: string;
@@ -6887,7 +6900,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
6887
6900
  }
6888
6901
  /**
6889
6902
  * @title The Big POS API
6890
- * @version v3.8.0
6903
+ * @version v3.9.0
6891
6904
  * @termsOfService https://www.thebigpos.com/terms-of-use/
6892
6905
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
6893
6906
  */
@@ -8118,13 +8131,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8118
8131
  *
8119
8132
  * @tags Authentication
8120
8133
  * @name LogOut
8121
- * @summary Sign out (clear auth cookies)
8134
+ * @summary Sign out (revoke the session and clear auth cookies)
8122
8135
  * @request POST:/api/logout
8123
8136
  * @secure
8124
8137
  * @response `204` `NoContentResult` No Content
8125
8138
  * @response `422` `UnprocessableEntity` Unprocessable Content
8126
8139
  */
8127
- logOut: (params?: RequestParams) => Promise<AxiosResponse<NoContentResult, any, {}>>;
8140
+ logOut: (query?: {
8141
+ /** @default true */
8142
+ revokeSessions?: boolean;
8143
+ }, params?: RequestParams) => Promise<AxiosResponse<NoContentResult, any, {}>>;
8128
8144
  /**
8129
8145
  * No description
8130
8146
  *
@@ -11019,6 +11035,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11019
11035
  * @response `404` `ProblemDetails` Not Found
11020
11036
  */
11021
11037
  dismissLoanRecommendation: (loanId: string, id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
11038
+ /**
11039
+ * No description
11040
+ *
11041
+ * @tags LoanRecommendations
11042
+ * @name MintLoanRecommendationProposal
11043
+ * @summary Mint a confirmable pending update from a recommendation
11044
+ * @request POST:/api/loans/{loanId}/recommendations/{id}/proposals
11045
+ * @secure
11046
+ * @response `200` `MintedProposal` OK
11047
+ * @response `400` `ProblemDetails` Bad Request
11048
+ * @response `404` `ProblemDetails` Not Found
11049
+ * @response `409` `ProblemDetails` Conflict
11050
+ */
11051
+ mintLoanRecommendationProposal: (loanId: string, id: string, params?: RequestParams) => Promise<AxiosResponse<MintedProposal, any, {}>>;
11022
11052
  /**
11023
11053
  * No description
11024
11054
  *
@@ -11032,7 +11062,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11032
11062
  */
11033
11063
  getLoanRoleTasks: (loanId: string, params?: RequestParams) => Promise<AxiosResponse<LoanRoleSlotTasks[], any, {}>>;
11034
11064
  /**
11035
- * @description Queues an account template against a borrower slot that has no registered user yet. The row owns a per-loan copy of the template, so editing it never changes the account's catalogue.
11065
+ * @description Queues an account template against a borrower slot that has no registered user yet. The row owns a per-loan copy of the template, so editing it never changes the account's catalogue. An optional due date is stored on the row; without one the row has none.
11036
11066
  *
11037
11067
  * @tags LoanRoleTasks
11038
11068
  * @name CreateLoanRoleTask
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.8.0
104
+ * @version v3.9.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
  */
@@ -1192,13 +1198,13 @@ export class Api extends HttpClient {
1192
1198
  *
1193
1199
  * @tags Authentication
1194
1200
  * @name LogOut
1195
- * @summary Sign out (clear auth cookies)
1201
+ * @summary Sign out (revoke the session and clear auth cookies)
1196
1202
  * @request POST:/api/logout
1197
1203
  * @secure
1198
1204
  * @response `204` `NoContentResult` No Content
1199
1205
  * @response `422` `UnprocessableEntity` Unprocessable Content
1200
1206
  */
1201
- logOut: (params = {}) => this.request(Object.assign({ path: `/api/logout`, method: "POST", secure: true, format: "json" }, params)),
1207
+ logOut: (query, params = {}) => this.request(Object.assign({ path: `/api/logout`, method: "POST", query: query, secure: true, format: "json" }, params)),
1202
1208
  /**
1203
1209
  * No description
1204
1210
  *
@@ -3793,6 +3799,20 @@ export class Api extends HttpClient {
3793
3799
  * @response `404` `ProblemDetails` Not Found
3794
3800
  */
3795
3801
  dismissLoanRecommendation: (loanId, id, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/recommendations/${id}/dismiss`, method: "POST", secure: true }, params)),
3802
+ /**
3803
+ * No description
3804
+ *
3805
+ * @tags LoanRecommendations
3806
+ * @name MintLoanRecommendationProposal
3807
+ * @summary Mint a confirmable pending update from a recommendation
3808
+ * @request POST:/api/loans/{loanId}/recommendations/{id}/proposals
3809
+ * @secure
3810
+ * @response `200` `MintedProposal` OK
3811
+ * @response `400` `ProblemDetails` Bad Request
3812
+ * @response `404` `ProblemDetails` Not Found
3813
+ * @response `409` `ProblemDetails` Conflict
3814
+ */
3815
+ mintLoanRecommendationProposal: (loanId, id, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/recommendations/${id}/proposals`, method: "POST", secure: true, format: "json" }, params)),
3796
3816
  /**
3797
3817
  * No description
3798
3818
  *
@@ -3806,7 +3826,7 @@ export class Api extends HttpClient {
3806
3826
  */
3807
3827
  getLoanRoleTasks: (loanId, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/role-tasks`, method: "GET", secure: true, format: "json" }, params)),
3808
3828
  /**
3809
- * @description Queues an account template against a borrower slot that has no registered user yet. The row owns a per-loan copy of the template, so editing it never changes the account's catalogue.
3829
+ * @description Queues an account template against a borrower slot that has no registered user yet. The row owns a per-loan copy of the template, so editing it never changes the account's catalogue. An optional due date is stored on the row; without one the row has none.
3810
3830
  *
3811
3831
  * @tags LoanRoleTasks
3812
3832
  * @name CreateLoanRoleTask