@matech/thebigpos-sdk 3.23.0 → 3.24.0-dev-7537

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.23.0",
3
+ "version": "3.24.0-dev-7537",
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": "383cf016f569a137e7923378cc3b78b3fe97fbf2ffe50af0c5bf868a4048668f"
49
+ "resolutions": {
50
+ "brace-expansion": "^5.0.12",
51
+ "follow-redirects": "^1.16.1"
52
+ },
53
+ "swaggerSha256": "8d46ae2f24b2203c1a1582793642cb7426e0d46a96c47900086703f539710607"
40
54
  }
package/src/index.ts CHANGED
@@ -1203,30 +1203,6 @@ export interface AiAuditLogPaginated {
1203
1203
  count: number;
1204
1204
  }
1205
1205
 
1206
- export interface AiCanonicalField {
1207
- /** @format uuid */
1208
- id: string;
1209
- canonicalName: string;
1210
- displayName: string;
1211
- description: string;
1212
- allowedRoles: string[];
1213
- efPath?: string | null;
1214
- isPii: boolean;
1215
- isActive: boolean;
1216
- dataSource: string;
1217
- isDefault: boolean;
1218
- category?: string | null;
1219
- jsonPropertyName?: string | null;
1220
- hasAccountOverride: boolean;
1221
- writable: boolean;
1222
- patchPath?: string | null;
1223
- /** @format date-time */
1224
- createdAt: string;
1225
- /** @format date-time */
1226
- updatedAt?: string | null;
1227
- updatedBy?: AiUpdatedBy | null;
1228
- }
1229
-
1230
1206
  export interface AiChat {
1231
1207
  /** @format uuid */
1232
1208
  conversationId: string;
@@ -2482,14 +2458,6 @@ export interface CreateAccountRequest {
2482
2458
  billingSettings: AccountBillingRequest;
2483
2459
  }
2484
2460
 
2485
- export interface CreateAiCanonicalFieldRequest {
2486
- displayName: string;
2487
- description: string;
2488
- allowedRoles: string[];
2489
- isPii: boolean;
2490
- category?: string | null;
2491
- }
2492
-
2493
2461
  export interface CreateAiGuardrailRequest {
2494
2462
  name: string;
2495
2463
  category: CreateAiGuardrailRequestCategoryEnum;
@@ -2721,6 +2689,7 @@ export interface CustomFieldDefinition {
2721
2689
  regexPattern?: string | null;
2722
2690
  dataType: CustomFieldDefinitionDataTypeEnum;
2723
2691
  entityType: CustomFieldDefinitionEntityTypeEnum;
2692
+ isAiEnabled: boolean;
2724
2693
  options: CustomFieldOption[];
2725
2694
  permissions: CustomFieldPermission[];
2726
2695
  encompassMapping?: EncompassMapping | null;
@@ -4041,6 +4010,8 @@ export interface LoanApplicationRequest {
4041
4010
  draftId?: string | null;
4042
4011
  /** @format uuid */
4043
4012
  partnerId?: string | null;
4013
+ /** @format uuid */
4014
+ formId?: string | null;
4044
4015
  additionalFields?: Record<string, any> | null;
4045
4016
  /** @format uuid */
4046
4017
  existingLoanId?: string | null;
@@ -6551,6 +6522,23 @@ export interface PinAiConversationRequest {
6551
6522
  isPinned: boolean;
6552
6523
  }
6553
6524
 
6525
+ export interface PipelineLoanOfficer {
6526
+ /** @format uuid */
6527
+ id: string;
6528
+ firstName: string;
6529
+ lastName: string;
6530
+ email: string;
6531
+ branchName?: string | null;
6532
+ isActive: boolean;
6533
+ }
6534
+
6535
+ export interface PipelineLoanOfficerPaginated {
6536
+ rows: PipelineLoanOfficer[];
6537
+ pagination: Pagination;
6538
+ /** @format int64 */
6539
+ count: number;
6540
+ }
6541
+
6554
6542
  export interface PipelineTableFilters {
6555
6543
  activityStatus?: LoanActivityStatus | null;
6556
6544
  loanPurpose?: LoanPurpose | null;
@@ -7711,7 +7699,7 @@ export interface StandardLoanField {
7711
7699
  mappings: LoanFieldMappings;
7712
7700
  access: Record<string, CustomFieldAccessLevel>;
7713
7701
  isCustomized: boolean;
7714
- isAiEnabled?: boolean | null;
7702
+ isAiEnabled: boolean;
7715
7703
  }
7716
7704
 
7717
7705
  export interface SupportedModel {
@@ -8005,14 +7993,6 @@ export interface UpdateAiAccountTokenLimitRequest {
8005
7993
  tokenLimit: number;
8006
7994
  }
8007
7995
 
8008
- export interface UpdateAiCanonicalFieldRequest {
8009
- displayName: string;
8010
- description: string;
8011
- allowedRoles: string[];
8012
- isPii: boolean;
8013
- category?: string | null;
8014
- }
8015
-
8016
7996
  export interface UpdateAiGuardrailRequest {
8017
7997
  name: string;
8018
7998
  category: UpdateAiGuardrailRequestCategoryEnum;
@@ -10041,7 +10021,15 @@ export class HttpClient<SecurityDataType = unknown> {
10041
10021
  property instanceof Array ? property : [property];
10042
10022
 
10043
10023
  for (const formItem of propertyContent) {
10044
- const isFileType = formItem instanceof Blob || formItem instanceof File;
10024
+ // React Native files are plain { uri, name, type } objects, not Blob/File.
10025
+ const isReactNativeFile =
10026
+ !!formItem &&
10027
+ typeof formItem === "object" &&
10028
+ "uri" in formItem &&
10029
+ "name" in formItem &&
10030
+ "type" in formItem;
10031
+ const isFileType =
10032
+ isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
10045
10033
  formData.append(
10046
10034
  key,
10047
10035
  isFileType ? formItem : this.stringifyFormItem(formItem),
@@ -10103,7 +10091,7 @@ export class HttpClient<SecurityDataType = unknown> {
10103
10091
 
10104
10092
  /**
10105
10093
  * @title The Big POS API
10106
- * @version v3.23.0
10094
+ * @version v3.24.0
10107
10095
  * @termsOfService https://www.thebigpos.com/terms-of-use/
10108
10096
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
10109
10097
  */
@@ -10904,136 +10892,6 @@ export class Api<
10904
10892
  ...params,
10905
10893
  }),
10906
10894
 
10907
- /**
10908
- * No description
10909
- *
10910
- * @tags AiCanonicalField
10911
- * @name GetAiCanonicalFields
10912
- * @summary Get all canonical fields
10913
- * @request GET:/api/ai/canonical-fields
10914
- * @secure
10915
- * @response `200` `(AiCanonicalField)[]` OK
10916
- */
10917
- getAiCanonicalFields: (params: RequestParams = {}) =>
10918
- this.request<AiCanonicalField[], any>({
10919
- path: `/api/ai/canonical-fields`,
10920
- method: "GET",
10921
- secure: true,
10922
- format: "json",
10923
- ...params,
10924
- }),
10925
-
10926
- /**
10927
- * No description
10928
- *
10929
- * @tags AiCanonicalField
10930
- * @name CreateAiCanonicalField
10931
- * @summary Create canonical field
10932
- * @request POST:/api/ai/canonical-fields
10933
- * @secure
10934
- * @response `201` `AiCanonicalField` Created
10935
- * @response `400` `ProblemDetails` Bad Request
10936
- */
10937
- createAiCanonicalField: (
10938
- data: CreateAiCanonicalFieldRequest,
10939
- params: RequestParams = {},
10940
- ) =>
10941
- this.request<AiCanonicalField, ProblemDetails>({
10942
- path: `/api/ai/canonical-fields`,
10943
- method: "POST",
10944
- body: data,
10945
- secure: true,
10946
- type: "application/json",
10947
- format: "json",
10948
- ...params,
10949
- }),
10950
-
10951
- /**
10952
- * No description
10953
- *
10954
- * @tags AiCanonicalField
10955
- * @name GetAiCanonicalField
10956
- * @summary Get canonical field by ID
10957
- * @request GET:/api/ai/canonical-fields/{id}
10958
- * @secure
10959
- * @response `200` `AiCanonicalField` OK
10960
- * @response `404` `ProblemDetails` Not Found
10961
- */
10962
- getAiCanonicalField: (id: string, params: RequestParams = {}) =>
10963
- this.request<AiCanonicalField, ProblemDetails>({
10964
- path: `/api/ai/canonical-fields/${id}`,
10965
- method: "GET",
10966
- secure: true,
10967
- format: "json",
10968
- ...params,
10969
- }),
10970
-
10971
- /**
10972
- * No description
10973
- *
10974
- * @tags AiCanonicalField
10975
- * @name UpdateAiCanonicalField
10976
- * @summary Update canonical field
10977
- * @request PUT:/api/ai/canonical-fields/{id}
10978
- * @secure
10979
- * @response `200` `AiCanonicalField` OK
10980
- * @response `400` `ProblemDetails` Bad Request
10981
- * @response `404` `ProblemDetails` Not Found
10982
- */
10983
- updateAiCanonicalField: (
10984
- id: string,
10985
- data: UpdateAiCanonicalFieldRequest,
10986
- params: RequestParams = {},
10987
- ) =>
10988
- this.request<AiCanonicalField, ProblemDetails>({
10989
- path: `/api/ai/canonical-fields/${id}`,
10990
- method: "PUT",
10991
- body: data,
10992
- secure: true,
10993
- type: "application/json",
10994
- format: "json",
10995
- ...params,
10996
- }),
10997
-
10998
- /**
10999
- * No description
11000
- *
11001
- * @tags AiCanonicalField
11002
- * @name DeleteAiCanonicalField
11003
- * @summary Delete canonical field
11004
- * @request DELETE:/api/ai/canonical-fields/{id}
11005
- * @secure
11006
- * @response `204` `void` No Content
11007
- * @response `404` `ProblemDetails` Not Found
11008
- */
11009
- deleteAiCanonicalField: (id: string, params: RequestParams = {}) =>
11010
- this.request<void, ProblemDetails>({
11011
- path: `/api/ai/canonical-fields/${id}`,
11012
- method: "DELETE",
11013
- secure: true,
11014
- ...params,
11015
- }),
11016
-
11017
- /**
11018
- * No description
11019
- *
11020
- * @tags AiCanonicalField
11021
- * @name ToggleAiCanonicalField
11022
- * @summary Toggle canonical field active/inactive
11023
- * @request PATCH:/api/ai/canonical-fields/{id}/toggle
11024
- * @secure
11025
- * @response `200` `AiCanonicalField` OK
11026
- * @response `404` `ProblemDetails` Not Found
11027
- */
11028
- toggleAiCanonicalField: (id: string, params: RequestParams = {}) =>
11029
- this.request<AiCanonicalField, ProblemDetails>({
11030
- path: `/api/ai/canonical-fields/${id}/toggle`,
11031
- method: "PATCH",
11032
- secure: true,
11033
- format: "json",
11034
- ...params,
11035
- }),
11036
-
11037
10895
  /**
11038
10896
  * No description
11039
10897
  *
@@ -17425,7 +17283,6 @@ export class Api<
17425
17283
  * @response `200` `BulkLoanFieldOperation` OK
17426
17284
  * @response `401` `ProblemDetails` Unauthorized
17427
17285
  * @response `403` `ProblemDetails` Forbidden
17428
- * @response `404` `ProblemDetails` Not Found
17429
17286
  * @response `422` `UnprocessableEntity` Unprocessable Content
17430
17287
  */
17431
17288
  bulkLoanFieldOperation: (
@@ -18355,6 +18212,41 @@ export class Api<
18355
18212
  ...params,
18356
18213
  }),
18357
18214
 
18215
+ /**
18216
+ * No description
18217
+ *
18218
+ * @tags Loans
18219
+ * @name SearchPipelineLoanOfficers
18220
+ * @summary Search the loan officers of the caller's pipeline
18221
+ * @request POST:/api/loans/loan-officers/search
18222
+ * @secure
18223
+ * @response `200` `PipelineLoanOfficerPaginated` OK
18224
+ * @response `400` `ProblemDetails` Bad Request
18225
+ * @response `403` `ProblemDetails` Forbidden
18226
+ */
18227
+ searchPipelineLoanOfficers: (
18228
+ data: SearchCriteria,
18229
+ query?: {
18230
+ /** @format int32 */
18231
+ pageSize?: number;
18232
+ /** @format int32 */
18233
+ pageNumber?: number;
18234
+ sortBy?: string;
18235
+ sortDirection?: string;
18236
+ },
18237
+ params: RequestParams = {},
18238
+ ) =>
18239
+ this.request<PipelineLoanOfficerPaginated, ProblemDetails>({
18240
+ path: `/api/loans/loan-officers/search`,
18241
+ method: "POST",
18242
+ query: query,
18243
+ body: data,
18244
+ secure: true,
18245
+ type: "application/json",
18246
+ format: "json",
18247
+ ...params,
18248
+ }),
18249
+
18358
18250
  /**
18359
18251
  * No description
18360
18252
  *
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
- }