@matech/thebigpos-sdk 3.29.0 → 3.30.0-dev-8899

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.29.0",
3
+ "version": "3.30.0-dev-8899",
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": "8ec54dadaa4052cd5f60c1a51f6f1048aab11fab0dabebf4351afd7350ae2823"
49
+ "resolutions": {
50
+ "brace-expansion": "^5.0.12",
51
+ "follow-redirects": "^1.16.1"
52
+ },
53
+ "swaggerSha256": "9b35860ed24aa28054e297e6652c9fb9bfd3628605d9fc79e3c69cdb7d131400"
40
54
  }
package/src/index.ts CHANGED
@@ -110,7 +110,13 @@ export type LosCredentialHealthStatus =
110
110
 
111
111
  export type LogLevel = "None" | "Info" | "Warning" | "Error";
112
112
 
113
- export type LoanType = "Fha" | "Conventional" | "UsdaRd" | "Va" | "Other";
113
+ export type LoanType =
114
+ | "Fha"
115
+ | "Conventional"
116
+ | "UsdaRd"
117
+ | "Va"
118
+ | "Other"
119
+ | "Heloc";
114
120
 
115
121
  export type LoanTrustType = "Living" | "Land" | "Testamentary" | "Other";
116
122
 
@@ -313,7 +319,8 @@ export type LoanLogType =
313
319
  | "LosFieldWriteBack"
314
320
  | "ReferrerChangeDiscarded"
315
321
  | "TaskEdited"
316
- | "SigningMethodChanged";
322
+ | "SigningMethodChanged"
323
+ | "ConsumerConnectUnlinked";
317
324
 
318
325
  export type LoanLienPosition = "First" | "Subordinate";
319
326
 
@@ -461,11 +468,7 @@ export type LoanDocumentType =
461
468
 
462
469
  export type LoanDocumentFolderScope = "Any" | "Assigned" | "Unassigned";
463
470
 
464
- export type LoanDocumentFolderPermissionLevel =
465
- | "None"
466
- | "Read"
467
- | "Write"
468
- | "Manage";
471
+ export type LoanDocumentFolderPermissionLevel = "None" | "Read" | "Write";
469
472
 
470
473
  export type LoanCitizenship =
471
474
  | "USCitizen"
@@ -4070,6 +4073,7 @@ export interface LoanApplicationRequest {
4070
4073
  submissionKey?: string | null;
4071
4074
  loanOfficerEmail?: string | null;
4072
4075
  purpose?: LoanPurpose | null;
4076
+ type?: LoanType | null;
4073
4077
  referrer?: string | null;
4074
4078
  companyName?: string | null;
4075
4079
  relationship?: BorrowerRelationship | null;
@@ -4531,6 +4535,11 @@ export interface LoanBorrowerEmploymentPreviousRequest {
4531
4535
  /** @format double */
4532
4536
  grossIncome?: number | null;
4533
4537
  isSelfEmployed?: boolean | null;
4538
+ payType?: string | null;
4539
+ /** @format double */
4540
+ hourlyRate?: number | null;
4541
+ /** @format int32 */
4542
+ hoursPerWeek?: number | null;
4534
4543
  /** @format double */
4535
4544
  bonus?: number | null;
4536
4545
  /** @format double */
@@ -6127,6 +6136,12 @@ export interface LosSyncStep {
6127
6136
  atUtc: string;
6128
6137
  }
6129
6138
 
6139
+ export interface LosUnlinkedRecipient {
6140
+ email: string;
6141
+ contactType: string;
6142
+ recipientId: string;
6143
+ }
6144
+
6130
6145
  export interface LosWebhook {
6131
6146
  /** @format uuid */
6132
6147
  id: string;
@@ -9454,11 +9469,7 @@ export type LoanDocumentFolderPermissionRoleEnum =
9454
9469
  | "SettlementAgent"
9455
9470
  | "Admin";
9456
9471
 
9457
- export type LoanDocumentFolderPermissionLevelEnum =
9458
- | "None"
9459
- | "Read"
9460
- | "Write"
9461
- | "Manage";
9472
+ export type LoanDocumentFolderPermissionLevelEnum = "None" | "Read" | "Write";
9462
9473
 
9463
9474
  export type LoanDocumentFolderPermissionReadScopeEnum = "Own" | "All";
9464
9475
 
@@ -9480,8 +9491,7 @@ export type LoanDocumentFolderPermissionFilterRoleEnum =
9480
9491
  export type LoanDocumentFolderPermissionFilterMinimumPermissionLevelEnum =
9481
9492
  | "None"
9482
9493
  | "Read"
9483
- | "Write"
9484
- | "Manage";
9494
+ | "Write";
9485
9495
 
9486
9496
  export type LoanDocumentFolderPermissionRequestRoleEnum =
9487
9497
  | "Borrower"
@@ -9501,16 +9511,14 @@ export type LoanDocumentFolderPermissionRequestRoleEnum =
9501
9511
  export type LoanDocumentFolderPermissionRequestLevelEnum =
9502
9512
  | "None"
9503
9513
  | "Read"
9504
- | "Write"
9505
- | "Manage";
9514
+ | "Write";
9506
9515
 
9507
9516
  export type LoanDocumentFolderPermissionRequestReadScopeEnum = "Own" | "All";
9508
9517
 
9509
9518
  export type LoanDocumentFolderWithCountAccessLevelEnum =
9510
9519
  | "None"
9511
9520
  | "Read"
9512
- | "Write"
9513
- | "Manage";
9521
+ | "Write";
9514
9522
 
9515
9523
  export type LoanFieldAccessRoleEnum =
9516
9524
  | "Borrower"
@@ -9563,7 +9571,8 @@ export type LoanLogTypeEnum =
9563
9571
  | "LosFieldWriteBack"
9564
9572
  | "ReferrerChangeDiscarded"
9565
9573
  | "TaskEdited"
9566
- | "SigningMethodChanged";
9574
+ | "SigningMethodChanged"
9575
+ | "ConsumerConnectUnlinked";
9567
9576
 
9568
9577
  export type LoanLogDetailLevelEnum = "None" | "Info" | "Warning" | "Error";
9569
9578
 
@@ -9589,7 +9598,8 @@ export type LoanLogDetailTypeEnum =
9589
9598
  | "LosFieldWriteBack"
9590
9599
  | "ReferrerChangeDiscarded"
9591
9600
  | "TaskEdited"
9592
- | "SigningMethodChanged";
9601
+ | "SigningMethodChanged"
9602
+ | "ConsumerConnectUnlinked";
9593
9603
 
9594
9604
  export type LoanProgressWidgetConfigTypeEnum = "LoanProgress";
9595
9605
 
@@ -10204,7 +10214,15 @@ export class HttpClient<SecurityDataType = unknown> {
10204
10214
  property instanceof Array ? property : [property];
10205
10215
 
10206
10216
  for (const formItem of propertyContent) {
10207
- const isFileType = formItem instanceof Blob || formItem instanceof File;
10217
+ // React Native files are plain { uri, name, type } objects, not Blob/File.
10218
+ const isReactNativeFile =
10219
+ !!formItem &&
10220
+ typeof formItem === "object" &&
10221
+ "uri" in formItem &&
10222
+ "name" in formItem &&
10223
+ "type" in formItem;
10224
+ const isFileType =
10225
+ isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
10208
10226
  formData.append(
10209
10227
  key,
10210
10228
  isFileType ? formItem : this.stringifyFormItem(formItem),
@@ -10266,7 +10284,7 @@ export class HttpClient<SecurityDataType = unknown> {
10266
10284
 
10267
10285
  /**
10268
10286
  * @title The Big POS API
10269
- * @version v3.29.0
10287
+ * @version v3.30.0
10270
10288
  * @termsOfService https://www.thebigpos.com/terms-of-use/
10271
10289
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
10272
10290
  */
@@ -16763,6 +16781,7 @@ export class Api<
16763
16781
  * @response `204` `void` No Content
16764
16782
  * @response `400` `ProblemDetails` Bad Request
16765
16783
  * @response `422` `ProblemDetails` Unprocessable Content
16784
+ * @response `423` `ProblemDetails` Locked
16766
16785
  */
16767
16786
  bulkSetLoanCustomFieldValues: (
16768
16787
  loanId: string,
@@ -16790,6 +16809,7 @@ export class Api<
16790
16809
  * @response `400` `ProblemDetails` Bad Request
16791
16810
  * @response `404` `ProblemDetails` Not Found
16792
16811
  * @response `422` `ProblemDetails` Unprocessable Content
16812
+ * @response `423` `ProblemDetails` Locked
16793
16813
  */
16794
16814
  setLoanCustomFieldValue: (
16795
16815
  loanId: string,
@@ -18914,6 +18934,35 @@ export class Api<
18914
18934
  ...params,
18915
18935
  }),
18916
18936
 
18937
+ /**
18938
+ * No description
18939
+ *
18940
+ * @tags LoanSigningMethod
18941
+ * @name UnlinkLoanFromConsumerConnect
18942
+ * @summary Unlink the loan's borrowers from Consumer Connect
18943
+ * @request POST:/api/loans/{loanId}/signing-method/unlink
18944
+ * @secure
18945
+ * @response `200` `(LosUnlinkedRecipient)[]` OK
18946
+ * @response `400` `ProblemDetails` Bad Request
18947
+ * @response `403` `ProblemDetails` Forbidden
18948
+ * @response `404` `ProblemDetails` Not Found
18949
+ * @response `422` `ProblemDetails` Unprocessable Content
18950
+ * @response `423` `ProblemDetails` Locked
18951
+ * @response `429` `ProblemDetails` Too Many Requests
18952
+ * @response `504` `void` Gateway Timeout
18953
+ */
18954
+ unlinkLoanFromConsumerConnect: (
18955
+ loanId: string,
18956
+ params: RequestParams = {},
18957
+ ) =>
18958
+ this.request<LosUnlinkedRecipient[], ProblemDetails | void>({
18959
+ path: `/api/loans/${loanId}/signing-method/unlink`,
18960
+ method: "POST",
18961
+ secure: true,
18962
+ format: "json",
18963
+ ...params,
18964
+ }),
18965
+
18917
18966
  /**
18918
18967
  * No description
18919
18968
  *
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
- }