@matech/thebigpos-sdk 3.30.0 → 3.31.0-dev-8990

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/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "@matech/thebigpos-sdk",
3
- "version": "3.30.0",
3
+ "version": "3.31.0-dev-8990",
4
4
  "description": "The Big POS Typescript SDK",
5
- "main": "dist/index.js",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.js",
7
+ "react-native": "dist/index.js",
6
8
  "types": "dist/index.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "src",
12
+ "index.js"
13
+ ],
7
14
  "scripts": {
8
- "build": "rimraf dist && tsc",
9
- "test": "mocha -r ts-node/register 'src/api_test.spec.ts' --exit",
15
+ "build": "rimraf dist && tsc && esbuild dist/index.js --format=cjs --platform=node --packages=external --sourcemap --outfile=dist/index.cjs",
16
+ "postbuild": "node -e \"if (typeof require('./').Api !== 'function') { console.error('Smoke check failed: the CommonJS entry does not export Api'); process.exit(1) }\"",
10
17
  "browserify": "tsc && esbuild dist/index.js --bundle --minify --sourcemap --global-name=thebigpos --outfile=dist/thebigpos.min.js",
11
18
  "prepare": "husky"
12
19
  },
@@ -26,15 +33,22 @@
26
33
  "url": "https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript/issues"
27
34
  },
28
35
  "homepage": "https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript#readme",
29
- "dependencies": {
30
- "axios": "^1.7.7"
36
+ "engines": {
37
+ "node": ">=18"
38
+ },
39
+ "peerDependencies": {
40
+ "axios": "^1"
31
41
  },
32
42
  "devDependencies": {
33
- "esbuild": "^0.27.0",
43
+ "axios": "^1.20.0",
44
+ "esbuild": "^0.28.1",
34
45
  "husky": "^9.1.5",
35
- "rimraf": "6.1.1",
36
- "ts-node": "^10.9.2",
46
+ "rimraf": "6.1.4",
37
47
  "typescript": "^5.5.4"
38
48
  },
39
- "swaggerSha256": "559b6b2ba69a254a45166ef53bfe5e6c02b96b80947924d3ce04ecae65b0e095"
49
+ "resolutions": {
50
+ "brace-expansion": "^5.0.12",
51
+ "follow-redirects": "^1.16.1"
52
+ },
53
+ "swaggerSha256": "4026d2f9d6c16a156e1a78e2d0c10c5cc299665c7e8001e8800f4e97beb46392"
40
54
  }
package/src/index.ts CHANGED
@@ -195,7 +195,11 @@ export type LoanQueueReason =
195
195
  | "Exception"
196
196
  | "TransientError";
197
197
 
198
- export type LoanPurpose = "Purchase" | "Refinance";
198
+ export type LoanPurpose =
199
+ | "Purchase"
200
+ | "Refinance"
201
+ | "ConstructionOnly"
202
+ | "ConstructionToPermanent";
199
203
 
200
204
  export type LoanPropertyType =
201
205
  | "SingleFamily"
@@ -205,7 +209,14 @@ export type LoanPropertyType =
205
209
  | "ManufacturedHome"
206
210
  | "PlannedUnitDevelopment"
207
211
  | "ModularHome"
208
- | "Other";
212
+ | "Other"
213
+ | "DetachedCondo"
214
+ | "HighRiseCondominium"
215
+ | "Cooperative"
216
+ | "ManufacturedHomeCondoPudCoOp"
217
+ | "MHHomeChoice"
218
+ | "MHSelect"
219
+ | "MHAdvantage";
209
220
 
210
221
  export type LoanPhoneNumberType = "Home" | "Cell" | "Work" | "Fax" | "Other";
211
222
 
@@ -319,7 +330,8 @@ export type LoanLogType =
319
330
  | "LosFieldWriteBack"
320
331
  | "ReferrerChangeDiscarded"
321
332
  | "TaskEdited"
322
- | "SigningMethodChanged";
333
+ | "SigningMethodChanged"
334
+ | "ConsumerConnectUnlinked";
323
335
 
324
336
  export type LoanLienPosition = "First" | "Subordinate";
325
337
 
@@ -6135,6 +6147,12 @@ export interface LosSyncStep {
6135
6147
  atUtc: string;
6136
6148
  }
6137
6149
 
6150
+ export interface LosUnlinkedRecipient {
6151
+ email: string;
6152
+ contactType: string;
6153
+ recipientId: string;
6154
+ }
6155
+
6138
6156
  export interface LosWebhook {
6139
6157
  /** @format uuid */
6140
6158
  id: string;
@@ -9564,7 +9582,8 @@ export type LoanLogTypeEnum =
9564
9582
  | "LosFieldWriteBack"
9565
9583
  | "ReferrerChangeDiscarded"
9566
9584
  | "TaskEdited"
9567
- | "SigningMethodChanged";
9585
+ | "SigningMethodChanged"
9586
+ | "ConsumerConnectUnlinked";
9568
9587
 
9569
9588
  export type LoanLogDetailLevelEnum = "None" | "Info" | "Warning" | "Error";
9570
9589
 
@@ -9590,7 +9609,8 @@ export type LoanLogDetailTypeEnum =
9590
9609
  | "LosFieldWriteBack"
9591
9610
  | "ReferrerChangeDiscarded"
9592
9611
  | "TaskEdited"
9593
- | "SigningMethodChanged";
9612
+ | "SigningMethodChanged"
9613
+ | "ConsumerConnectUnlinked";
9594
9614
 
9595
9615
  export type LoanProgressWidgetConfigTypeEnum = "LoanProgress";
9596
9616
 
@@ -10205,7 +10225,15 @@ export class HttpClient<SecurityDataType = unknown> {
10205
10225
  property instanceof Array ? property : [property];
10206
10226
 
10207
10227
  for (const formItem of propertyContent) {
10208
- const isFileType = formItem instanceof Blob || formItem instanceof File;
10228
+ // React Native files are plain { uri, name, type } objects, not Blob/File.
10229
+ const isReactNativeFile =
10230
+ !!formItem &&
10231
+ typeof formItem === "object" &&
10232
+ "uri" in formItem &&
10233
+ "name" in formItem &&
10234
+ "type" in formItem;
10235
+ const isFileType =
10236
+ isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
10209
10237
  formData.append(
10210
10238
  key,
10211
10239
  isFileType ? formItem : this.stringifyFormItem(formItem),
@@ -10267,7 +10295,7 @@ export class HttpClient<SecurityDataType = unknown> {
10267
10295
 
10268
10296
  /**
10269
10297
  * @title The Big POS API
10270
- * @version v3.30.0
10298
+ * @version v3.31.0
10271
10299
  * @termsOfService https://www.thebigpos.com/terms-of-use/
10272
10300
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
10273
10301
  */
@@ -16764,6 +16792,7 @@ export class Api<
16764
16792
  * @response `204` `void` No Content
16765
16793
  * @response `400` `ProblemDetails` Bad Request
16766
16794
  * @response `422` `ProblemDetails` Unprocessable Content
16795
+ * @response `423` `ProblemDetails` Locked
16767
16796
  */
16768
16797
  bulkSetLoanCustomFieldValues: (
16769
16798
  loanId: string,
@@ -16791,6 +16820,7 @@ export class Api<
16791
16820
  * @response `400` `ProblemDetails` Bad Request
16792
16821
  * @response `404` `ProblemDetails` Not Found
16793
16822
  * @response `422` `ProblemDetails` Unprocessable Content
16823
+ * @response `423` `ProblemDetails` Locked
16794
16824
  */
16795
16825
  setLoanCustomFieldValue: (
16796
16826
  loanId: string,
@@ -18915,6 +18945,35 @@ export class Api<
18915
18945
  ...params,
18916
18946
  }),
18917
18947
 
18948
+ /**
18949
+ * No description
18950
+ *
18951
+ * @tags LoanSigningMethod
18952
+ * @name UnlinkLoanFromConsumerConnect
18953
+ * @summary Unlink the loan's borrowers from Consumer Connect
18954
+ * @request POST:/api/loans/{loanId}/signing-method/unlink
18955
+ * @secure
18956
+ * @response `200` `(LosUnlinkedRecipient)[]` OK
18957
+ * @response `400` `ProblemDetails` Bad Request
18958
+ * @response `403` `ProblemDetails` Forbidden
18959
+ * @response `404` `ProblemDetails` Not Found
18960
+ * @response `422` `ProblemDetails` Unprocessable Content
18961
+ * @response `423` `ProblemDetails` Locked
18962
+ * @response `429` `ProblemDetails` Too Many Requests
18963
+ * @response `504` `void` Gateway Timeout
18964
+ */
18965
+ unlinkLoanFromConsumerConnect: (
18966
+ loanId: string,
18967
+ params: RequestParams = {},
18968
+ ) =>
18969
+ this.request<LosUnlinkedRecipient[], ProblemDetails | void>({
18970
+ path: `/api/loans/${loanId}/signing-method/unlink`,
18971
+ method: "POST",
18972
+ secure: true,
18973
+ format: "json",
18974
+ ...params,
18975
+ }),
18976
+
18918
18977
  /**
18919
18978
  * No description
18920
18979
  *
package/.husky/pre-commit DELETED
@@ -1,3 +0,0 @@
1
- [ -f ./src/index.ts ] && node scripts/apply-json-patch-content-type.js
2
- yarn build
3
- git add .
@@ -1,56 +0,0 @@
1
- /*
2
- This script is meant to run after the SDK has been generated.
3
-
4
- - It updates the generated code to ensure that all PATCH methods use ContentType.JsonPatch.
5
- - It also ensures that the ContentType enum includes JsonPatch and modifies the Operation interface
6
- to allow any value for the `value` property instead of just object or null.
7
-
8
- This is necessary because the SDK generation does not currently handle these cases correctly.
9
- */
10
-
11
- const fs = require('fs')
12
-
13
- const path = require('path').resolve(__dirname, '../src/index.ts')
14
-
15
- if (!fs.existsSync(path)) {
16
- console.error(`Error: File not found at path "${path}". Please ensure the SDK has been generated.`)
17
- process.exit(1)
18
- }
19
- let content
20
- try {
21
- content = fs.readFileSync(path, 'utf8')
22
- } catch (err) {
23
- console.error(`Error: Unable to read file at path "${path}". Details: ${err.message}`)
24
- process.exit(1)
25
- }
26
-
27
- // Update PATCH methods to use ContentType.JsonPatch
28
- content = content.replace(
29
- /(method:\s*"PATCH"[\s\S]+?)type:\s*ContentType\.Json/g,
30
- (match) => match.replace('ContentType.Json', 'ContentType.JsonPatch')
31
- )
32
-
33
- // Ensure JsonPatch is included in the ContentType enum
34
- content = content.replace(
35
- /export enum ContentType\s*{([\s\S]*?)}/,
36
- (match, enumBody) => {
37
- if (enumBody.includes('JsonPatch')) return match
38
- const insertion = ` JsonPatch = "application/json-patch+json",\n `
39
- return `export enum ContentType {\n${insertion}${enumBody.trim()}\n}`
40
- }
41
- )
42
-
43
- // Fix the Operation interface to allow any value
44
- content = content.replace(
45
- /export interface Operation\s*{([\s\S]*?)}/,
46
- (match, body) => {
47
- const updated = body.replace(
48
- /value\?:\s*object\s*\|?\s*null?;/,
49
- 'value?: string | number | boolean | null | object;'
50
- )
51
- return `export interface Operation {\n ${updated.trim()}\n}`
52
- }
53
- )
54
-
55
- fs.writeFileSync(path, content)
56
- console.log('SDK patch complete: All PATCH methods now use ContentType.JsonPatch.')
package/tsconfig.json DELETED
@@ -1,27 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es6",
4
- "module": "esnext",
5
- "allowJs": true,
6
- "sourceMap": true,
7
- "outDir": "./dist",
8
- "strict": true,
9
- "moduleResolution": "node",
10
- "baseUrl": "./",
11
- "declaration": true,
12
- "paths": {
13
- "*": [
14
- "node_modules/*"
15
- ]
16
- },
17
- "typeRoots": [
18
- "./node_modules/@types"
19
- ],
20
- "esModuleInterop": true,
21
- "skipLibCheck": true,
22
- "forceConsistentCasingInFileNames": true,
23
- "resolveJsonModule": true
24
- },
25
- "include": ["./src/**/*"],
26
- "exclude": ["./dist"]
27
- }