@matech/thebigpos-sdk 2.36.0 → 2.36.4

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,39 +1,39 @@
1
- {
2
- "name": "@matech/thebigpos-sdk",
3
- "version": "2.36.0",
4
- "description": "The Big POS Typescript SDK",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "build": "rimraf dist && tsc",
9
- "test": "mocha -r ts-node/register 'src/api_test.spec.ts' --exit",
10
- "browserify": "tsc && esbuild dist/index.js --bundle --minify --sourcemap --global-name=thebigpos --outfile=dist/thebigpos.min.js",
11
- "prepare": "husky"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript.git"
16
- },
17
- "keywords": [
18
- "pos",
19
- "loans",
20
- "mortgage",
21
- "automation"
22
- ],
23
- "author": "Mortgage Automation Technologies",
24
- "license": "MIT",
25
- "bugs": {
26
- "url": "https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript/issues"
27
- },
28
- "homepage": "https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript#readme",
29
- "dependencies": {
30
- "axios": "^1.13.5"
31
- },
32
- "devDependencies": {
33
- "esbuild": "^0.27.0",
34
- "husky": "^9.1.5",
35
- "rimraf": "6.1.1",
36
- "ts-node": "^10.9.2",
37
- "typescript": "^5.5.4"
38
- }
39
- }
1
+ {
2
+ "name": "@matech/thebigpos-sdk",
3
+ "version": "2.36.4",
4
+ "description": "The Big POS Typescript SDK",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "rimraf dist && tsc",
9
+ "test": "mocha -r ts-node/register 'src/api_test.spec.ts' --exit",
10
+ "browserify": "tsc && esbuild dist/index.js --bundle --minify --sourcemap --global-name=thebigpos --outfile=dist/thebigpos.min.js",
11
+ "prepare": "husky"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript.git"
16
+ },
17
+ "keywords": [
18
+ "pos",
19
+ "loans",
20
+ "mortgage",
21
+ "automation"
22
+ ],
23
+ "author": "Mortgage Automation Technologies",
24
+ "license": "MIT",
25
+ "bugs": {
26
+ "url": "https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript/issues"
27
+ },
28
+ "homepage": "https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript#readme",
29
+ "dependencies": {
30
+ "axios": "^1.13.5"
31
+ },
32
+ "devDependencies": {
33
+ "esbuild": "^0.27.0",
34
+ "husky": "^9.1.5",
35
+ "rimraf": "6.1.1",
36
+ "ts-node": "^10.9.2",
37
+ "typescript": "^5.5.4"
38
+ }
39
+ }
@@ -1,56 +1,56 @@
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.')
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/src/index.ts CHANGED
@@ -184,7 +184,8 @@ export type LoanLogType =
184
184
  | "CoBorrowerAdded"
185
185
  | "TaskCompleted"
186
186
  | "LoanStatusChanged"
187
- | "EConsent";
187
+ | "EConsent"
188
+ | "SensitiveDataPurge";
188
189
 
189
190
  export type LoanLienPosition = "First" | "Subordinate";
190
191
 
@@ -312,6 +313,17 @@ export type EntityType =
312
313
  | "LoanOfficer"
313
314
  | "Realtor";
314
315
 
316
+ export type EncompassLogOutcome = "Success" | "Failure" | "PartialSuccess";
317
+
318
+ export type EncompassLogOperationType =
319
+ | "FieldUpdate"
320
+ | "EConsentUpdate"
321
+ | "DocumentSync"
322
+ | "ApiError"
323
+ | "LoanCreation"
324
+ | "SlotCreation"
325
+ | "MilestoneUpdate";
326
+
315
327
  export type DraftType = "NewLoan" | "EditLoan";
316
328
 
317
329
  export type ConsentType = "Econsent" | "CreditAuthorization" | "Tcpa";
@@ -1527,6 +1539,18 @@ export interface EncompassError {
1527
1539
  details?: string[] | null;
1528
1540
  }
1529
1541
 
1542
+ export interface EncompassLogSearchCriteria {
1543
+ searchText?: string | null;
1544
+ operationTypes?: EncompassLogOperationType[] | null;
1545
+ outcomes?: EncompassLogOutcome[] | null;
1546
+ /** @format date-time */
1547
+ createdFrom?: string | null;
1548
+ /** @format date-time */
1549
+ createdTo?: string | null;
1550
+ /** @format int32 */
1551
+ httpStatusCode?: number | null;
1552
+ }
1553
+
1530
1554
  export interface EncompassPackageItem {
1531
1555
  packageId: string;
1532
1556
  status: string;
@@ -1547,6 +1571,33 @@ export interface EncompassPackageList {
1547
1571
  totalPages: number;
1548
1572
  }
1549
1573
 
1574
+ export interface EncompassRequestLog {
1575
+ /** @format uuid */
1576
+ id: string;
1577
+ losId?: string | null;
1578
+ /** @format uuid */
1579
+ accountId: string;
1580
+ operationType: EncompassRequestLogOperationTypeEnum;
1581
+ outcome: EncompassRequestLogOutcomeEnum;
1582
+ message: string;
1583
+ endpoint?: string | null;
1584
+ httpMethod?: string | null;
1585
+ /** @format int32 */
1586
+ httpStatusCode?: number | null;
1587
+ /** @format int64 */
1588
+ durationMs?: number | null;
1589
+ context?: any;
1590
+ /** @format date-time */
1591
+ createdAt: string;
1592
+ }
1593
+
1594
+ export interface EncompassRequestLogPaginated {
1595
+ rows: EncompassRequestLog[];
1596
+ pagination: Pagination;
1597
+ /** @format int64 */
1598
+ count: number;
1599
+ }
1600
+
1550
1601
  export interface Error {
1551
1602
  message: string;
1552
1603
  }
@@ -3906,7 +3957,7 @@ export interface NotificationTemplateVersionUpdateRequest {
3906
3957
 
3907
3958
  export interface Operation {
3908
3959
  op?: string;
3909
- value?: object | null;
3960
+ value?: string | number | boolean | null | object;
3910
3961
  path?: string;
3911
3962
  }
3912
3963
 
@@ -5842,6 +5893,20 @@ export type DraftTypeEnum = "NewLoan" | "EditLoan";
5842
5893
 
5843
5894
  export type DraftContentTypeEnum = "NewLoan" | "EditLoan";
5844
5895
 
5896
+ export type EncompassRequestLogOperationTypeEnum =
5897
+ | "FieldUpdate"
5898
+ | "EConsentUpdate"
5899
+ | "DocumentSync"
5900
+ | "ApiError"
5901
+ | "LoanCreation"
5902
+ | "SlotCreation"
5903
+ | "MilestoneUpdate";
5904
+
5905
+ export type EncompassRequestLogOutcomeEnum =
5906
+ | "Success"
5907
+ | "Failure"
5908
+ | "PartialSuccess";
5909
+
5845
5910
  export type FusionReportFilterFilterTypeEnum =
5846
5911
  | "DateGreaterThanOrEqualTo"
5847
5912
  | "DateGreaterThan"
@@ -5931,7 +5996,8 @@ export type LoanLogTypeEnum =
5931
5996
  | "CoBorrowerAdded"
5932
5997
  | "TaskCompleted"
5933
5998
  | "LoanStatusChanged"
5934
- | "EConsent";
5999
+ | "EConsent"
6000
+ | "SensitiveDataPurge";
5935
6001
 
5936
6002
  export type LoanUserLoanRoleEnum =
5937
6003
  | "Borrower"
@@ -6114,6 +6180,7 @@ export interface ApiConfig<SecurityDataType = unknown>
6114
6180
  }
6115
6181
 
6116
6182
  export enum ContentType {
6183
+ JsonPatch = "application/json-patch+json",
6117
6184
  Json = "application/json",
6118
6185
  JsonApi = "application/vnd.api+json",
6119
6186
  FormData = "multipart/form-data",
@@ -6249,7 +6316,7 @@ export class HttpClient<SecurityDataType = unknown> {
6249
6316
 
6250
6317
  /**
6251
6318
  * @title The Big POS API
6252
- * @version v2.36.0
6319
+ * @version v2.36.4
6253
6320
  * @termsOfService https://www.thebigpos.com/terms-of-use/
6254
6321
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
6255
6322
  */
@@ -8505,7 +8572,7 @@ export class Api<
8505
8572
  method: "PATCH",
8506
8573
  body: data,
8507
8574
  secure: true,
8508
- type: ContentType.Json,
8575
+ type: ContentType.JsonPatchPatch,
8509
8576
  format: "json",
8510
8577
  ...params,
8511
8578
  }),
@@ -8615,7 +8682,7 @@ export class Api<
8615
8682
  method: "PATCH",
8616
8683
  body: data,
8617
8684
  secure: true,
8618
- type: ContentType.Json,
8685
+ type: ContentType.JsonPatchPatch,
8619
8686
  format: "json",
8620
8687
  ...params,
8621
8688
  }),
@@ -8642,7 +8709,7 @@ export class Api<
8642
8709
  method: "PATCH",
8643
8710
  body: data,
8644
8711
  secure: true,
8645
- type: ContentType.Json,
8712
+ type: ContentType.JsonPatchPatch,
8646
8713
  format: "json",
8647
8714
  ...params,
8648
8715
  }),
@@ -8884,7 +8951,7 @@ export class Api<
8884
8951
  method: "PATCH",
8885
8952
  body: data,
8886
8953
  secure: true,
8887
- type: ContentType.Json,
8954
+ type: ContentType.JsonPatchPatch,
8888
8955
  format: "json",
8889
8956
  ...params,
8890
8957
  }),
@@ -8964,7 +9031,7 @@ export class Api<
8964
9031
  method: "PATCH",
8965
9032
  body: data,
8966
9033
  secure: true,
8967
- type: ContentType.Json,
9034
+ type: ContentType.JsonPatchPatch,
8968
9035
  format: "json",
8969
9036
  ...params,
8970
9037
  }),
@@ -10484,6 +10551,25 @@ export class Api<
10484
10551
  ...params,
10485
10552
  }),
10486
10553
 
10554
+ /**
10555
+ * No description
10556
+ *
10557
+ * @tags LoanSensitiveDataPurge
10558
+ * @name PurgeSensitiveLoanData
10559
+ * @summary Manually trigger sensitive data purge for a specific loan
10560
+ * @request POST:/api/loans/sensitive-data-purge/{loanId}
10561
+ * @secure
10562
+ * @response `204` `void` No Content
10563
+ * @response `404` `ProblemDetails` Not Found
10564
+ */
10565
+ purgeSensitiveLoanData: (loanId: string, params: RequestParams = {}) =>
10566
+ this.request<void, ProblemDetails>({
10567
+ path: `/api/loans/sensitive-data-purge/${loanId}`,
10568
+ method: "POST",
10569
+ secure: true,
10570
+ ...params,
10571
+ }),
10572
+
10487
10573
  /**
10488
10574
  * No description
10489
10575
  *
@@ -10515,7 +10601,7 @@ export class Api<
10515
10601
  query: query,
10516
10602
  body: data,
10517
10603
  secure: true,
10518
- type: ContentType.Json,
10604
+ type: ContentType.JsonPatchPatch,
10519
10605
  format: "json",
10520
10606
  ...params,
10521
10607
  }),
@@ -12230,6 +12316,39 @@ export class Api<
12230
12316
  ...params,
12231
12317
  }),
12232
12318
 
12319
+ /**
12320
+ * No description
12321
+ *
12322
+ * @tags TheBigPOS
12323
+ * @name SearchEncompassLogs
12324
+ * @request POST:/api/los/encompass/logs/{losId}/search
12325
+ * @secure
12326
+ * @response `200` `EncompassRequestLogPaginated` Success
12327
+ */
12328
+ searchEncompassLogs: (
12329
+ losId: string,
12330
+ query: {
12331
+ /** @format int32 */
12332
+ pageSize: number;
12333
+ /** @format int32 */
12334
+ pageNumber: number;
12335
+ sortBy?: string;
12336
+ sortDirection?: string;
12337
+ },
12338
+ data: EncompassLogSearchCriteria,
12339
+ params: RequestParams = {},
12340
+ ) =>
12341
+ this.request<EncompassRequestLogPaginated, any>({
12342
+ path: `/api/los/encompass/logs/${losId}/search`,
12343
+ method: "POST",
12344
+ query: query,
12345
+ body: data,
12346
+ secure: true,
12347
+ type: ContentType.Json,
12348
+ format: "json",
12349
+ ...params,
12350
+ }),
12351
+
12233
12352
  /**
12234
12353
  * No description
12235
12354
  *
package/tsconfig.json CHANGED
@@ -1,27 +1,27 @@
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
- }
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
+ }