@matech/thebigpos-sdk 3.19.0 → 3.20.0-dev-6956

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.19.0",
3
+ "version": "3.20.0-dev-6956",
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.3",
37
47
  "typescript": "^5.5.4"
38
48
  },
39
- "swaggerSha256": "1dac601bfc6922c5317166893b5b81f4d0e31b0f5927c09cbc197b7aeeabed9b"
49
+ "resolutions": {
50
+ "brace-expansion": "^5.0.12",
51
+ "follow-redirects": "^1.16.1"
52
+ },
53
+ "swaggerSha256": "b230eb1ddebbe38c29fb2cfee9a1a8779e25e7dac0a5b81336bf13fbfbaf68a6"
40
54
  }
package/src/index.ts CHANGED
@@ -2607,7 +2607,7 @@ export interface CreateInviteRequest {
2607
2607
  phoneNumber?: string | null;
2608
2608
  /** @deprecated */
2609
2609
  relationship: CreateInviteRequestRelationshipEnum;
2610
- loanID: string;
2610
+ loanID?: string | null;
2611
2611
  route?: string | null;
2612
2612
  /** @format uuid */
2613
2613
  siteConfigurationID: string;
@@ -3019,6 +3019,7 @@ export interface DraftRequest {
3019
3019
  applicationPayload: any;
3020
3020
  customData?: any | null;
3021
3021
  isCoBorrower: boolean;
3022
+ /** @format uuid */
3022
3023
  partnerId?: string | null;
3023
3024
  }
3024
3025
 
@@ -4049,6 +4050,7 @@ export interface LoanApplicationRequest {
4049
4050
  nonOwningBorrowers: LoanNonOwningBorrowerRequest[];
4050
4051
  /** @format uuid */
4051
4052
  draftId?: string | null;
4053
+ /** @format uuid */
4052
4054
  partnerId?: string | null;
4053
4055
  additionalFields?: Record<string, any> | null;
4054
4056
  /** @format uuid */
@@ -5044,6 +5046,11 @@ export interface LoanDocumentFolderPermission {
5044
5046
  readScope: LoanDocumentFolderPermissionReadScopeEnum;
5045
5047
  }
5046
5048
 
5049
+ export interface LoanDocumentFolderPermissionFilter {
5050
+ role: LoanDocumentFolderPermissionFilterRoleEnum;
5051
+ minimumPermissionLevel: LoanDocumentFolderPermissionFilterMinimumPermissionLevelEnum;
5052
+ }
5053
+
5047
5054
  export interface LoanDocumentFolderPermissionRequest {
5048
5055
  role: LoanDocumentFolderPermissionRequestRoleEnum;
5049
5056
  level: LoanDocumentFolderPermissionRequestLevelEnum;
@@ -5055,6 +5062,7 @@ export interface LoanDocumentFolderSearchCriteria {
5055
5062
  isActive?: boolean | null;
5056
5063
  isSystemDefault?: boolean | null;
5057
5064
  role?: LoanRole | null;
5065
+ permissions?: LoanDocumentFolderPermissionFilter[] | null;
5058
5066
  }
5059
5067
 
5060
5068
  export interface LoanDocumentFolderSummary {
@@ -6496,7 +6504,8 @@ export interface PartnerFormLink {
6496
6504
  }
6497
6505
 
6498
6506
  export interface PartnerLinks {
6499
- slug: string;
6507
+ /** @format uuid */
6508
+ partnerId: string;
6500
6509
  loanOfficers: PartnerLoanOfficerLinks[];
6501
6510
  }
6502
6511
 
@@ -6515,10 +6524,6 @@ export interface PartnerSearchCriteria {
6515
6524
  roles?: UserRole[] | null;
6516
6525
  }
6517
6526
 
6518
- export interface PartnerSlug {
6519
- slug: string;
6520
- }
6521
-
6522
6527
  export interface PendingInvite {
6523
6528
  status: PendingInviteStatusEnum;
6524
6529
  /** @format uuid */
@@ -8162,10 +8167,6 @@ export interface UpdatePartnerPortalRequest {
8162
8167
  isEnabled?: boolean | null;
8163
8168
  }
8164
8169
 
8165
- export interface UpdatePartnerSlugRequest {
8166
- slug: string;
8167
- }
8168
-
8169
8170
  export interface UpdateUserGroupRequest {
8170
8171
  name: string;
8171
8172
  description?: string | null;
@@ -9321,6 +9322,27 @@ export type LoanDocumentFolderPermissionLevelEnum =
9321
9322
 
9322
9323
  export type LoanDocumentFolderPermissionReadScopeEnum = "Own" | "All";
9323
9324
 
9325
+ export type LoanDocumentFolderPermissionFilterRoleEnum =
9326
+ | "Borrower"
9327
+ | "CoBorrower"
9328
+ | "NonBorrower"
9329
+ | "LoanOfficer"
9330
+ | "LoanProcessor"
9331
+ | "LoanOfficerAssistant"
9332
+ | "SupportingLoanOfficer"
9333
+ | "BuyerAgent"
9334
+ | "SellerAgent"
9335
+ | "TitleInsuranceAgent"
9336
+ | "EscrowAgent"
9337
+ | "SettlementAgent"
9338
+ | "Admin";
9339
+
9340
+ export type LoanDocumentFolderPermissionFilterMinimumPermissionLevelEnum =
9341
+ | "None"
9342
+ | "Read"
9343
+ | "Write"
9344
+ | "Manage";
9345
+
9324
9346
  export type LoanDocumentFolderPermissionRequestRoleEnum =
9325
9347
  | "Borrower"
9326
9348
  | "CoBorrower"
@@ -10034,7 +10056,15 @@ export class HttpClient<SecurityDataType = unknown> {
10034
10056
  property instanceof Array ? property : [property];
10035
10057
 
10036
10058
  for (const formItem of propertyContent) {
10037
- const isFileType = formItem instanceof Blob || formItem instanceof File;
10059
+ // React Native files are plain { uri, name, type } objects, not Blob/File.
10060
+ const isReactNativeFile =
10061
+ !!formItem &&
10062
+ typeof formItem === "object" &&
10063
+ "uri" in formItem &&
10064
+ "name" in formItem &&
10065
+ "type" in formItem;
10066
+ const isFileType =
10067
+ isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
10038
10068
  formData.append(
10039
10069
  key,
10040
10070
  isFileType ? formItem : this.stringifyFormItem(formItem),
@@ -10096,7 +10126,7 @@ export class HttpClient<SecurityDataType = unknown> {
10096
10126
 
10097
10127
  /**
10098
10128
  * @title The Big POS API
10099
- * @version v3.19.0
10129
+ * @version v3.20.0
10100
10130
  * @termsOfService https://www.thebigpos.com/terms-of-use/
10101
10131
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
10102
10132
  */
@@ -15750,30 +15780,6 @@ export class Api<
15750
15780
  ...params,
15751
15781
  }),
15752
15782
 
15753
- /**
15754
- * No description
15755
- *
15756
- * @tags LegacyLoan
15757
- * @name GetLoanEmbeddedSigningLink
15758
- * @summary Get Embedded Signing Link
15759
- * @request POST:/api/los/loan/embeddedsigning/{envelopeId}/{userName}/{email}
15760
- * @secure
15761
- * @response `200` `string` OK
15762
- */
15763
- getLoanEmbeddedSigningLink: (
15764
- envelopeId: string,
15765
- userName: string,
15766
- email: string,
15767
- params: RequestParams = {},
15768
- ) =>
15769
- this.request<string, any>({
15770
- path: `/api/los/loan/embeddedsigning/${envelopeId}/${userName}/${email}`,
15771
- method: "POST",
15772
- secure: true,
15773
- format: "json",
15774
- ...params,
15775
- }),
15776
-
15777
15783
  /**
15778
15784
  * No description
15779
15785
  *
@@ -20059,35 +20065,6 @@ export class Api<
20059
20065
  ...params,
20060
20066
  }),
20061
20067
 
20062
- /**
20063
- * @description Changes the short name a realtor's partner links carry. Links shared with the previous name stop working.
20064
- *
20065
- * @tags Partners
20066
- * @name UpdatePartnerLinkSlug
20067
- * @summary Update Partner Link Slug
20068
- * @request PUT:/api/partners/{realtorId}/link-slug
20069
- * @secure
20070
- * @response `200` `PartnerSlug` OK
20071
- * @response `403` `ProblemDetails` Forbidden
20072
- * @response `404` `ProblemDetails` Not Found
20073
- * @response `409` `ProblemDetails` Conflict
20074
- * @response `422` `UnprocessableEntity` Unprocessable Content
20075
- */
20076
- updatePartnerLinkSlug: (
20077
- realtorId: string,
20078
- data: UpdatePartnerSlugRequest,
20079
- params: RequestParams = {},
20080
- ) =>
20081
- this.request<PartnerSlug, ProblemDetails | UnprocessableEntity>({
20082
- path: `/api/partners/${realtorId}/link-slug`,
20083
- method: "PUT",
20084
- body: data,
20085
- secure: true,
20086
- type: "application/json",
20087
- format: "json",
20088
- ...params,
20089
- }),
20090
-
20091
20068
  /**
20092
20069
  * No description
20093
20070
  *
@@ -23066,34 +23043,6 @@ export class Api<
23066
23043
  ...params,
23067
23044
  }),
23068
23045
 
23069
- /**
23070
- * @description Changes the short name the partner's links carry and returns the links rebuilt with it. Links shared with the previous name stop working.
23071
- *
23072
- * @tags UsersMe
23073
- * @name UpdateMyPartnerLinkSlug
23074
- * @summary Update My Partner Link Slug
23075
- * @request PUT:/api/users/me/partner-links/slug
23076
- * @secure
23077
- * @response `200` `PartnerLinks` OK
23078
- * @response `403` `ProblemDetails` Forbidden
23079
- * @response `404` `ProblemDetails` Not Found
23080
- * @response `409` `ProblemDetails` Conflict
23081
- * @response `422` `UnprocessableEntity` Unprocessable Content
23082
- */
23083
- updateMyPartnerLinkSlug: (
23084
- data: UpdatePartnerSlugRequest,
23085
- params: RequestParams = {},
23086
- ) =>
23087
- this.request<PartnerLinks, ProblemDetails | UnprocessableEntity>({
23088
- path: `/api/users/me/partner-links/slug`,
23089
- method: "PUT",
23090
- body: data,
23091
- secure: true,
23092
- type: "application/json",
23093
- format: "json",
23094
- ...params,
23095
- }),
23096
-
23097
23046
  /**
23098
23047
  * No description
23099
23048
  *
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
- }