@matech/thebigpos-sdk 3.24.0 → 3.25.0-dev-7801

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.24.0",
3
+ "version": "3.25.0-dev-7801",
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": "224eeb9fbfe774cc390fb25a4a18112127be4908677d123b123c95ce85482730"
49
+ "resolutions": {
50
+ "brace-expansion": "^5.0.12",
51
+ "follow-redirects": "^1.16.1"
52
+ },
53
+ "swaggerSha256": "98bd7ebfc4467f265800d08927599de4c7e0e1dbdd51d0eb109c1e74843a2371"
40
54
  }
package/src/index.ts CHANGED
@@ -73,6 +73,8 @@ export type PartnerTier = "Lite" | "LitePlusPortal" | "Pending";
73
73
 
74
74
  export type OutboundFailureSeverity = "All" | "Failed" | "CompletedWithErrors";
75
75
 
76
+ export type MfaFactor = "None" | "Sms" | "Email";
77
+
76
78
  export type LosWebhookSigningKeySyncStatus = "Unknown" | "Synced";
77
79
 
78
80
  export type LosWebhookInventoryStatus =
@@ -1011,6 +1013,7 @@ export interface AdminAccessUser {
1011
1013
  title?: string | null;
1012
1014
  forcePasswordReset: boolean;
1013
1015
  mfaEnabled: boolean;
1016
+ mfaFactor: AdminAccessUserMfaFactorEnum;
1014
1017
  phoneVerified: boolean;
1015
1018
  /** @format int32 */
1016
1019
  loginsWithoutMFACount: number;
@@ -1890,6 +1893,7 @@ export interface BranchUser {
1890
1893
  title?: string | null;
1891
1894
  forcePasswordReset: boolean;
1892
1895
  mfaEnabled: boolean;
1896
+ mfaFactor: BranchUserMfaFactorEnum;
1893
1897
  phoneVerified: boolean;
1894
1898
  /** @format int32 */
1895
1899
  loginsWithoutMFACount: number;
@@ -2689,6 +2693,7 @@ export interface CustomFieldDefinition {
2689
2693
  regexPattern?: string | null;
2690
2694
  dataType: CustomFieldDefinitionDataTypeEnum;
2691
2695
  entityType: CustomFieldDefinitionEntityTypeEnum;
2696
+ isAiEnabled: boolean;
2692
2697
  options: CustomFieldOption[];
2693
2698
  permissions: CustomFieldPermission[];
2694
2699
  encompassMapping?: EncompassMapping | null;
@@ -2766,6 +2771,7 @@ export interface DetailedUser {
2766
2771
  title?: string | null;
2767
2772
  forcePasswordReset: boolean;
2768
2773
  mfaEnabled: boolean;
2774
+ mfaFactor: DetailedUserMfaFactorEnum;
2769
2775
  phoneVerified: boolean;
2770
2776
  /** @format int32 */
2771
2777
  loginsWithoutMFACount: number;
@@ -3608,6 +3614,7 @@ export interface ImpersonatedDetailedUser {
3608
3614
  title?: string | null;
3609
3615
  forcePasswordReset: boolean;
3610
3616
  mfaEnabled: boolean;
3617
+ mfaFactor: ImpersonatedDetailedUserMfaFactorEnum;
3611
3618
  phoneVerified: boolean;
3612
3619
  /** @format int32 */
3613
3620
  loginsWithoutMFACount: number;
@@ -4009,6 +4016,8 @@ export interface LoanApplicationRequest {
4009
4016
  draftId?: string | null;
4010
4017
  /** @format uuid */
4011
4018
  partnerId?: string | null;
4019
+ /** @format uuid */
4020
+ formId?: string | null;
4012
4021
  additionalFields?: Record<string, any> | null;
4013
4022
  /** @format uuid */
4014
4023
  existingLoanId?: string | null;
@@ -6106,6 +6115,14 @@ export interface MaterializeLoanRoleTasks {
6106
6115
  rowsAdded: number;
6107
6116
  }
6108
6117
 
6118
+ export interface MfaMethod {
6119
+ factor: MfaMethodFactorEnum;
6120
+ available: boolean;
6121
+ current: boolean;
6122
+ destination?: string | null;
6123
+ requiresConfirmation: boolean;
6124
+ }
6125
+
6109
6126
  export interface MilestoneConfiguration {
6110
6127
  /** @format date-time */
6111
6128
  createdAt: string;
@@ -6519,6 +6536,23 @@ export interface PinAiConversationRequest {
6519
6536
  isPinned: boolean;
6520
6537
  }
6521
6538
 
6539
+ export interface PipelineLoanOfficer {
6540
+ /** @format uuid */
6541
+ id: string;
6542
+ firstName: string;
6543
+ lastName: string;
6544
+ email: string;
6545
+ branchName?: string | null;
6546
+ isActive: boolean;
6547
+ }
6548
+
6549
+ export interface PipelineLoanOfficerPaginated {
6550
+ rows: PipelineLoanOfficer[];
6551
+ pagination: Pagination;
6552
+ /** @format int64 */
6553
+ count: number;
6554
+ }
6555
+
6522
6556
  export interface PipelineTableFilters {
6523
6557
  activityStatus?: LoanActivityStatus | null;
6524
6558
  loanPurpose?: LoanPurpose | null;
@@ -8104,6 +8138,11 @@ export interface UpdateMeRequest {
8104
8138
  preferredLoanOfficerId?: string | null;
8105
8139
  }
8106
8140
 
8141
+ export interface UpdateMfaFactorRequest {
8142
+ factor?: MfaFactor | null;
8143
+ passwordConfirmation?: string | null;
8144
+ }
8145
+
8107
8146
  export interface UpdateMobilePhoneRequest {
8108
8147
  phone: string;
8109
8148
  }
@@ -8315,6 +8354,7 @@ export interface User {
8315
8354
  title?: string | null;
8316
8355
  forcePasswordReset: boolean;
8317
8356
  mfaEnabled: boolean;
8357
+ mfaFactor: UserMfaFactorEnum;
8318
8358
  phoneVerified: boolean;
8319
8359
  /** @format int32 */
8320
8360
  loginsWithoutMFACount: number;
@@ -8503,6 +8543,13 @@ export interface UserLoanTaskUpdateRequest {
8503
8543
  loanDocumentFolderId?: string | null;
8504
8544
  }
8505
8545
 
8546
+ export interface UserMfaState {
8547
+ enabled: boolean;
8548
+ factor: UserMfaStateFactorEnum;
8549
+ required: boolean;
8550
+ methods: MfaMethod[];
8551
+ }
8552
+
8506
8553
  export interface UserMobilePhoneVerificationRequest {
8507
8554
  code: string;
8508
8555
  }
@@ -8707,6 +8754,8 @@ type BaseCanvasWidgetConfigTypeMapping<Key, Type> = {
8707
8754
 
8708
8755
  export type AccountBillingRequestBillingTypeEnum = "ClosedLoan" | "LoanOfficer";
8709
8756
 
8757
+ export type AdminAccessUserMfaFactorEnum = "None" | "Sms" | "Email";
8758
+
8710
8759
  export type AiAuditLogEventTypeEnum =
8711
8760
  | "Error"
8712
8761
  | "GuardrailBlockedPre"
@@ -8828,6 +8877,8 @@ export type BorrowerIdentityRoleEnum =
8828
8877
  | "SettlementAgent"
8829
8878
  | "Admin";
8830
8879
 
8880
+ export type BranchUserMfaFactorEnum = "None" | "Sms" | "Email";
8881
+
8831
8882
  export type CanvasFieldDescriptorSourceEnum = "Standard" | "Custom";
8832
8883
 
8833
8884
  export type CanvasFieldDescriptorDataTypeEnum =
@@ -9127,6 +9178,8 @@ export type CustomFieldValueDataTypeEnum =
9127
9178
  | "SingleSelect"
9128
9179
  | "MultiSelect";
9129
9180
 
9181
+ export type DetailedUserMfaFactorEnum = "None" | "Sms" | "Email";
9182
+
9130
9183
  export type DocumentsWidgetConfigTypeEnum = "Documents";
9131
9184
 
9132
9185
  export type DraftTypeEnum = "NewLoan" | "EditLoan";
@@ -9213,6 +9266,8 @@ export type IpAddressAddressFamilyEnum =
9213
9266
  | "ControllerAreaNetwork"
9214
9267
  | "Unknown";
9215
9268
 
9269
+ export type ImpersonatedDetailedUserMfaFactorEnum = "None" | "Sms" | "Email";
9270
+
9216
9271
  export type IncompleteLoanSourceEnum = "V3" | "LegacyDraft";
9217
9272
 
9218
9273
  export type IncompleteLoanBorrowerApplicationStatusEnum = "Draft" | "Complete";
@@ -9584,6 +9639,8 @@ export type ManualDocumentClassificationRequestDocumentTypeEnum =
9584
9639
  | "AiGeneratedDocument"
9585
9640
  | "Unidentified";
9586
9641
 
9642
+ export type MfaMethodFactorEnum = "None" | "Sms" | "Email";
9643
+
9587
9644
  export type MonthlyPaymentWidgetConfigTypeEnum = "MonthlyPayment";
9588
9645
 
9589
9646
  export type MyPartnerTierEnum = "Lite" | "LitePlusPortal" | "Pending";
@@ -9710,6 +9767,8 @@ export type UpdateAiUrlSourceRequestCategoryEnum =
9710
9767
 
9711
9768
  export type UpdateAiUrlSourceRequestScopeEnum = "FullDomain" | "SpecificPath";
9712
9769
 
9770
+ export type UserMfaFactorEnum = "None" | "Sms" | "Email";
9771
+
9713
9772
  export type UserDraftRoleEnum =
9714
9773
  | "Borrower"
9715
9774
  | "CoBorrower"
@@ -9763,6 +9822,8 @@ export type UserLoanConsentLosSyncStatusEnum =
9763
9822
  | "Failed"
9764
9823
  | "Success";
9765
9824
 
9825
+ export type UserMfaStateFactorEnum = "None" | "Sms" | "Email";
9826
+
9766
9827
  export type UserTableSettingsTableKeyEnum = "Pipeline";
9767
9828
 
9768
9829
  export type UserTableViewTableKeyEnum = "Pipeline";
@@ -10001,7 +10062,15 @@ export class HttpClient<SecurityDataType = unknown> {
10001
10062
  property instanceof Array ? property : [property];
10002
10063
 
10003
10064
  for (const formItem of propertyContent) {
10004
- const isFileType = formItem instanceof Blob || formItem instanceof File;
10065
+ // React Native files are plain { uri, name, type } objects, not Blob/File.
10066
+ const isReactNativeFile =
10067
+ !!formItem &&
10068
+ typeof formItem === "object" &&
10069
+ "uri" in formItem &&
10070
+ "name" in formItem &&
10071
+ "type" in formItem;
10072
+ const isFileType =
10073
+ isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
10005
10074
  formData.append(
10006
10075
  key,
10007
10076
  isFileType ? formItem : this.stringifyFormItem(formItem),
@@ -10063,7 +10132,7 @@ export class HttpClient<SecurityDataType = unknown> {
10063
10132
 
10064
10133
  /**
10065
10134
  * @title The Big POS API
10066
- * @version v3.24.0
10135
+ * @version v3.25.0
10067
10136
  * @termsOfService https://www.thebigpos.com/terms-of-use/
10068
10137
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
10069
10138
  */
@@ -18184,6 +18253,41 @@ export class Api<
18184
18253
  ...params,
18185
18254
  }),
18186
18255
 
18256
+ /**
18257
+ * No description
18258
+ *
18259
+ * @tags Loans
18260
+ * @name SearchPipelineLoanOfficers
18261
+ * @summary Search the loan officers of the caller's pipeline
18262
+ * @request POST:/api/loans/loan-officers/search
18263
+ * @secure
18264
+ * @response `200` `PipelineLoanOfficerPaginated` OK
18265
+ * @response `400` `ProblemDetails` Bad Request
18266
+ * @response `403` `ProblemDetails` Forbidden
18267
+ */
18268
+ searchPipelineLoanOfficers: (
18269
+ data: SearchCriteria,
18270
+ query?: {
18271
+ /** @format int32 */
18272
+ pageSize?: number;
18273
+ /** @format int32 */
18274
+ pageNumber?: number;
18275
+ sortBy?: string;
18276
+ sortDirection?: string;
18277
+ },
18278
+ params: RequestParams = {},
18279
+ ) =>
18280
+ this.request<PipelineLoanOfficerPaginated, ProblemDetails>({
18281
+ path: `/api/loans/loan-officers/search`,
18282
+ method: "POST",
18283
+ query: query,
18284
+ body: data,
18285
+ secure: true,
18286
+ type: "application/json",
18287
+ format: "json",
18288
+ ...params,
18289
+ }),
18290
+
18187
18291
  /**
18188
18292
  * No description
18189
18293
  *
@@ -22456,6 +22560,35 @@ export class Api<
22456
22560
  ...params,
22457
22561
  }),
22458
22562
 
22563
+ /**
22564
+ * No description
22565
+ *
22566
+ * @tags Users
22567
+ * @name ClearUserMfa
22568
+ * @summary Clear MFA
22569
+ * @request PUT:/api/users/{id}/mfa
22570
+ * @secure
22571
+ * @response `200` `UserMfaState` OK
22572
+ * @response `400` `ProblemDetails` Bad Request
22573
+ * @response `403` `ProblemDetails` Forbidden
22574
+ * @response `404` `ProblemDetails` Not Found
22575
+ * @response `422` `UnprocessableEntity` Unprocessable Content
22576
+ */
22577
+ clearUserMfa: (
22578
+ id: string,
22579
+ data: UpdateMfaFactorRequest,
22580
+ params: RequestParams = {},
22581
+ ) =>
22582
+ this.request<UserMfaState, ProblemDetails | UnprocessableEntity>({
22583
+ path: `/api/users/${id}/mfa`,
22584
+ method: "PUT",
22585
+ body: data,
22586
+ secure: true,
22587
+ type: "application/json",
22588
+ format: "json",
22589
+ ...params,
22590
+ }),
22591
+
22459
22592
  /**
22460
22593
  * No description
22461
22594
  *
@@ -22882,6 +23015,51 @@ export class Api<
22882
23015
  ...params,
22883
23016
  }),
22884
23017
 
23018
+ /**
23019
+ * No description
23020
+ *
23021
+ * @tags UsersMeMfa
23022
+ * @name GetMyMfa
23023
+ * @summary Get MFA
23024
+ * @request GET:/api/users/me/mfa
23025
+ * @secure
23026
+ * @response `200` `UserMfaState` OK
23027
+ * @response `401` `ProblemDetails` Unauthorized
23028
+ */
23029
+ getMyMfa: (params: RequestParams = {}) =>
23030
+ this.request<UserMfaState, ProblemDetails>({
23031
+ path: `/api/users/me/mfa`,
23032
+ method: "GET",
23033
+ secure: true,
23034
+ format: "json",
23035
+ ...params,
23036
+ }),
23037
+
23038
+ /**
23039
+ * No description
23040
+ *
23041
+ * @tags UsersMeMfa
23042
+ * @name UpdateMyMfa
23043
+ * @summary Update MFA
23044
+ * @request PUT:/api/users/me/mfa
23045
+ * @secure
23046
+ * @response `200` `UserMfaState` OK
23047
+ * @response `400` `ProblemDetails` Bad Request
23048
+ * @response `401` `ProblemDetails` Unauthorized
23049
+ * @response `403` `ProblemDetails` Forbidden
23050
+ * @response `422` `UnprocessableEntity` Unprocessable Content
23051
+ */
23052
+ updateMyMfa: (data: UpdateMfaFactorRequest, params: RequestParams = {}) =>
23053
+ this.request<UserMfaState, ProblemDetails | UnprocessableEntity>({
23054
+ path: `/api/users/me/mfa`,
23055
+ method: "PUT",
23056
+ body: data,
23057
+ secure: true,
23058
+ type: "application/json",
23059
+ format: "json",
23060
+ ...params,
23061
+ }),
23062
+
22885
23063
  /**
22886
23064
  * No description
22887
23065
  *
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
- }