@matech/thebigpos-sdk 3.28.0 → 3.29.0-pr-6058-8513

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.28.0",
3
+ "version": "3.29.0-pr-6058-8513",
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": "8361d7b583d417c35a6cfe67414057bd29adf98e11084504c6616b1981e9096c"
49
+ "resolutions": {
50
+ "brace-expansion": "^5.0.12",
51
+ "follow-redirects": "^1.16.1"
52
+ },
53
+ "swaggerSha256": "5e7ccac347eb1a08551a22b724fe8a3de00ac7709e79e35adafce6f993a4f532"
40
54
  }
package/src/index.ts CHANGED
@@ -461,11 +461,7 @@ export type LoanDocumentType =
461
461
 
462
462
  export type LoanDocumentFolderScope = "Any" | "Assigned" | "Unassigned";
463
463
 
464
- export type LoanDocumentFolderPermissionLevel =
465
- | "None"
466
- | "Read"
467
- | "Write"
468
- | "Manage";
464
+ export type LoanDocumentFolderPermissionLevel = "None" | "Read" | "Write";
469
465
 
470
466
  export type LoanCitizenship =
471
467
  | "USCitizen"
@@ -825,6 +821,8 @@ export type AddressFamily =
825
821
  | "ControllerAreaNetwork"
826
822
  | "Unknown";
827
823
 
824
+ export type AccountPartnerStatus = "Active" | "Invited";
825
+
828
826
  export type CanvasWidgetConfig = BaseCanvasWidgetConfig &
829
827
  (
830
828
  | BaseCanvasWidgetConfigTypeMapping<"Information", InformationWidgetConfig>
@@ -937,6 +935,32 @@ export interface AccountFailureCount {
937
935
  count: number;
938
936
  }
939
937
 
938
+ export interface AccountPartner {
939
+ /** @format uuid */
940
+ partnerProfileID?: string | null;
941
+ /** @format uuid */
942
+ partnerID?: string | null;
943
+ firstName: string;
944
+ lastName: string;
945
+ email: string;
946
+ phone?: string | null;
947
+ status: AccountPartnerStatusEnum;
948
+ tier: AccountPartnerTierEnum;
949
+ /** @format date-time */
950
+ createdAt: string;
951
+ }
952
+
953
+ export interface AccountPartnerPaginated {
954
+ rows: AccountPartner[];
955
+ pagination: Pagination;
956
+ /** @format int64 */
957
+ count: number;
958
+ }
959
+
960
+ export interface AccountPartnerSearchCriteria {
961
+ searchText?: string | null;
962
+ }
963
+
940
964
  export interface AccountSettings {
941
965
  isSmsEnabled: boolean;
942
966
  smsNumber?: string | null;
@@ -4038,6 +4062,8 @@ export interface LoanApplicationRequest {
4038
4062
  userID: string;
4039
4063
  /** @format uuid */
4040
4064
  siteConfigurationID: string;
4065
+ /** @format uuid */
4066
+ submissionKey?: string | null;
4041
4067
  loanOfficerEmail?: string | null;
4042
4068
  purpose?: LoanPurpose | null;
4043
4069
  referrer?: string | null;
@@ -6324,6 +6350,17 @@ export interface MyPartner {
6324
6350
  createdAt: string;
6325
6351
  }
6326
6352
 
6353
+ export interface MyPartnerPaginated {
6354
+ rows: MyPartner[];
6355
+ pagination: Pagination;
6356
+ /** @format int64 */
6357
+ count: number;
6358
+ }
6359
+
6360
+ export interface MyPartnerSearchCriteria {
6361
+ searchText?: string | null;
6362
+ }
6363
+
6327
6364
  export type MyTasksWidgetConfig = UtilRequiredKeys<
6328
6365
  BaseCanvasWidgetConfig,
6329
6366
  "type"
@@ -8223,6 +8260,13 @@ export interface UpdatePartnerPortalRequest {
8223
8260
  isEnabled?: boolean | null;
8224
8261
  }
8225
8262
 
8263
+ export interface UpdatePartnerRequest {
8264
+ firstName: string;
8265
+ lastName: string;
8266
+ email: string;
8267
+ phone?: string | null;
8268
+ }
8269
+
8226
8270
  export interface UpdateUserGroupRequest {
8227
8271
  name: string;
8228
8272
  description?: string | null;
@@ -8826,6 +8870,10 @@ type BaseCanvasWidgetConfigTypeMapping<Key, Type> = {
8826
8870
 
8827
8871
  export type AccountBillingRequestBillingTypeEnum = "ClosedLoan" | "LoanOfficer";
8828
8872
 
8873
+ export type AccountPartnerStatusEnum = "Active" | "Invited";
8874
+
8875
+ export type AccountPartnerTierEnum = "Lite" | "LitePlusPortal" | "Pending";
8876
+
8829
8877
  export type AdminAccessUserMfaFactorEnum = "None" | "Sms" | "Email";
8830
8878
 
8831
8879
  export type AiAccessReadAloudVoiceEnum =
@@ -9402,11 +9450,7 @@ export type LoanDocumentFolderPermissionRoleEnum =
9402
9450
  | "SettlementAgent"
9403
9451
  | "Admin";
9404
9452
 
9405
- export type LoanDocumentFolderPermissionLevelEnum =
9406
- | "None"
9407
- | "Read"
9408
- | "Write"
9409
- | "Manage";
9453
+ export type LoanDocumentFolderPermissionLevelEnum = "None" | "Read" | "Write";
9410
9454
 
9411
9455
  export type LoanDocumentFolderPermissionReadScopeEnum = "Own" | "All";
9412
9456
 
@@ -9428,8 +9472,7 @@ export type LoanDocumentFolderPermissionFilterRoleEnum =
9428
9472
  export type LoanDocumentFolderPermissionFilterMinimumPermissionLevelEnum =
9429
9473
  | "None"
9430
9474
  | "Read"
9431
- | "Write"
9432
- | "Manage";
9475
+ | "Write";
9433
9476
 
9434
9477
  export type LoanDocumentFolderPermissionRequestRoleEnum =
9435
9478
  | "Borrower"
@@ -9449,16 +9492,14 @@ export type LoanDocumentFolderPermissionRequestRoleEnum =
9449
9492
  export type LoanDocumentFolderPermissionRequestLevelEnum =
9450
9493
  | "None"
9451
9494
  | "Read"
9452
- | "Write"
9453
- | "Manage";
9495
+ | "Write";
9454
9496
 
9455
9497
  export type LoanDocumentFolderPermissionRequestReadScopeEnum = "Own" | "All";
9456
9498
 
9457
9499
  export type LoanDocumentFolderWithCountAccessLevelEnum =
9458
9500
  | "None"
9459
9501
  | "Read"
9460
- | "Write"
9461
- | "Manage";
9502
+ | "Write";
9462
9503
 
9463
9504
  export type LoanFieldAccessRoleEnum =
9464
9505
  | "Borrower"
@@ -10152,7 +10193,15 @@ export class HttpClient<SecurityDataType = unknown> {
10152
10193
  property instanceof Array ? property : [property];
10153
10194
 
10154
10195
  for (const formItem of propertyContent) {
10155
- const isFileType = formItem instanceof Blob || formItem instanceof File;
10196
+ // React Native files are plain { uri, name, type } objects, not Blob/File.
10197
+ const isReactNativeFile =
10198
+ !!formItem &&
10199
+ typeof formItem === "object" &&
10200
+ "uri" in formItem &&
10201
+ "name" in formItem &&
10202
+ "type" in formItem;
10203
+ const isFileType =
10204
+ isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
10156
10205
  formData.append(
10157
10206
  key,
10158
10207
  isFileType ? formItem : this.stringifyFormItem(formItem),
@@ -10214,7 +10263,7 @@ export class HttpClient<SecurityDataType = unknown> {
10214
10263
 
10215
10264
  /**
10216
10265
  * @title The Big POS API
10217
- * @version v3.28.0
10266
+ * @version v3.29.0
10218
10267
  * @termsOfService https://www.thebigpos.com/terms-of-use/
10219
10268
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
10220
10269
  */
@@ -10346,6 +10395,141 @@ export class Api<
10346
10395
  ...params,
10347
10396
  }),
10348
10397
 
10398
+ /**
10399
+ * @description Every partner of the caller's account: Realtors with an account and pending partners who have not signed up yet
10400
+ *
10401
+ * @tags AccountPartners
10402
+ * @name SearchAccountPartners
10403
+ * @summary Search Account Partners
10404
+ * @request POST:/api/account/partners/search
10405
+ * @secure
10406
+ * @response `200` `AccountPartnerPaginated` OK
10407
+ * @response `400` `ProblemDetails` Bad Request
10408
+ * @response `403` `ProblemDetails` Forbidden
10409
+ * @response `422` `ProblemDetails` Unprocessable Content
10410
+ */
10411
+ searchAccountPartners: (
10412
+ data: AccountPartnerSearchCriteria,
10413
+ query?: {
10414
+ /** @format int32 */
10415
+ pageSize?: number;
10416
+ /** @format int32 */
10417
+ pageNumber?: number;
10418
+ sortBy?: string;
10419
+ sortDirection?: string;
10420
+ },
10421
+ params: RequestParams = {},
10422
+ ) =>
10423
+ this.request<AccountPartnerPaginated, ProblemDetails>({
10424
+ path: `/api/account/partners/search`,
10425
+ method: "POST",
10426
+ query: query,
10427
+ body: data,
10428
+ secure: true,
10429
+ type: "application/json",
10430
+ format: "json",
10431
+ ...params,
10432
+ }),
10433
+
10434
+ /**
10435
+ * @description Makes a settlement agent, by user ID or by an open invite's ID, a partner with no loan officer
10436
+ *
10437
+ * @tags AccountPartners
10438
+ * @name PromotePartner
10439
+ * @summary Promote To Partner
10440
+ * @request POST:/api/account/partners/promotions
10441
+ * @secure
10442
+ * @response `200` `PromotePartner` OK
10443
+ * @response `400` `ProblemDetails` Bad Request
10444
+ * @response `403` `ProblemDetails` Forbidden
10445
+ * @response `404` `ProblemDetails` Not Found
10446
+ * @response `409` `ProblemDetails` Conflict
10447
+ * @response `422` `ProblemDetails` Unprocessable Content
10448
+ */
10449
+ promotePartner: (data: PromotePartnerRequest, params: RequestParams = {}) =>
10450
+ this.request<PromotePartner, ProblemDetails>({
10451
+ path: `/api/account/partners/promotions`,
10452
+ method: "POST",
10453
+ body: data,
10454
+ secure: true,
10455
+ type: "application/json",
10456
+ format: "json",
10457
+ ...params,
10458
+ }),
10459
+
10460
+ /**
10461
+ * @description Changes a registered partner's name, sign-in email and phone
10462
+ *
10463
+ * @tags AccountPartners
10464
+ * @name ReplacePartner
10465
+ * @summary Replace Partner
10466
+ * @request PUT:/api/account/partners/{partnerProfileId}
10467
+ * @secure
10468
+ * @response `204` `void` No Content
10469
+ * @response `403` `ProblemDetails` Forbidden
10470
+ * @response `404` `ProblemDetails` Not Found
10471
+ * @response `409` `ProblemDetails` Conflict
10472
+ * @response `422` `ProblemDetails` Unprocessable Content
10473
+ */
10474
+ replacePartner: (
10475
+ partnerProfileId: string,
10476
+ data: UpdatePartnerRequest,
10477
+ params: RequestParams = {},
10478
+ ) =>
10479
+ this.request<void, ProblemDetails>({
10480
+ path: `/api/account/partners/${partnerProfileId}`,
10481
+ method: "PUT",
10482
+ body: data,
10483
+ secure: true,
10484
+ type: "application/json",
10485
+ ...params,
10486
+ }),
10487
+
10488
+ /**
10489
+ * @description Makes a registered partner a settlement agent again and retires their partner profile; their account and loans stay
10490
+ *
10491
+ * @tags AccountPartners
10492
+ * @name DemotePartner
10493
+ * @summary Demote Partner
10494
+ * @request POST:/api/account/partners/{partnerProfileId}/demote
10495
+ * @secure
10496
+ * @response `204` `void` No Content
10497
+ * @response `403` `ProblemDetails` Forbidden
10498
+ * @response `404` `ProblemDetails` Not Found
10499
+ * @response `409` `ProblemDetails` Conflict
10500
+ */
10501
+ demotePartner: (partnerProfileId: string, params: RequestParams = {}) =>
10502
+ this.request<void, ProblemDetails>({
10503
+ path: `/api/account/partners/${partnerProfileId}/demote`,
10504
+ method: "POST",
10505
+ secure: true,
10506
+ ...params,
10507
+ }),
10508
+
10509
+ /**
10510
+ * @description Cancels a pending partner's invites and retires their partner profile; inviting the email again restores it
10511
+ *
10512
+ * @tags AccountPartners
10513
+ * @name CancelPartnerInvite
10514
+ * @summary Cancel Partner Invite
10515
+ * @request POST:/api/account/partners/{partnerProfileId}/cancel
10516
+ * @secure
10517
+ * @response `204` `void` No Content
10518
+ * @response `403` `ProblemDetails` Forbidden
10519
+ * @response `404` `ProblemDetails` Not Found
10520
+ * @response `409` `ProblemDetails` Conflict
10521
+ */
10522
+ cancelPartnerInvite: (
10523
+ partnerProfileId: string,
10524
+ params: RequestParams = {},
10525
+ ) =>
10526
+ this.request<void, ProblemDetails>({
10527
+ path: `/api/account/partners/${partnerProfileId}/cancel`,
10528
+ method: "POST",
10529
+ secure: true,
10530
+ ...params,
10531
+ }),
10532
+
10349
10533
  /**
10350
10534
  * No description
10351
10535
  *
@@ -15634,6 +15818,7 @@ export class Api<
15634
15818
  * @request POST:/api/los/loan/application/internal
15635
15819
  * @secure
15636
15820
  * @response `200` `string` OK
15821
+ * @response `409` `ProblemDetails` Conflict
15637
15822
  * @response `422` `UnprocessableEntity` Unprocessable Content
15638
15823
  * @response `423` `UnprocessableEntity` Locked
15639
15824
  */
@@ -15645,7 +15830,7 @@ export class Api<
15645
15830
  },
15646
15831
  params: RequestParams = {},
15647
15832
  ) =>
15648
- this.request<string, UnprocessableEntity>({
15833
+ this.request<string, ProblemDetails | UnprocessableEntity>({
15649
15834
  path: `/api/los/loan/application/internal`,
15650
15835
  method: "POST",
15651
15836
  query: query,
@@ -18390,6 +18575,7 @@ export class Api<
18390
18575
  * @response `401` `ProblemDetails` Unauthorized
18391
18576
  * @response `403` `ProblemDetails` Forbidden
18392
18577
  * @response `404` `ProblemDetails` Not Found
18578
+ * @response `409` `ProblemDetails` Conflict
18393
18579
  */
18394
18580
  createLoanv3: (
18395
18581
  data: LoanApplicationRequest,
@@ -23123,6 +23309,41 @@ export class Api<
23123
23309
  ...params,
23124
23310
  }),
23125
23311
 
23312
+ /**
23313
+ * @description Searches the rows getMyPartners returns by first name, last name, full name or email, and pages them. Sorts by firstName, lastName, email, tier or createdAt when both sortBy and sortDirection are given, else newest first
23314
+ *
23315
+ * @tags UsersMe
23316
+ * @name SearchMyPartners
23317
+ * @summary Search My Partners
23318
+ * @request POST:/api/users/me/partners/search
23319
+ * @secure
23320
+ * @response `200` `MyPartnerPaginated` OK
23321
+ * @response `400` `ProblemDetails` Bad Request
23322
+ * @response `403` `ProblemDetails` Forbidden
23323
+ */
23324
+ searchMyPartners: (
23325
+ data: MyPartnerSearchCriteria,
23326
+ query?: {
23327
+ /** @format int32 */
23328
+ pageSize?: number;
23329
+ /** @format int32 */
23330
+ pageNumber?: number;
23331
+ sortBy?: string;
23332
+ sortDirection?: string;
23333
+ },
23334
+ params: RequestParams = {},
23335
+ ) =>
23336
+ this.request<MyPartnerPaginated, ProblemDetails>({
23337
+ path: `/api/users/me/partners/search`,
23338
+ method: "POST",
23339
+ query: query,
23340
+ body: data,
23341
+ secure: true,
23342
+ type: "application/json",
23343
+ format: "json",
23344
+ ...params,
23345
+ }),
23346
+
23126
23347
  /**
23127
23348
  * @description Adds a partner, by partner profile ID, to the loan officer's list; a pending partner can be added too
23128
23349
  *
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
- }