@matech/thebigpos-sdk 3.30.0 → 3.31.0-dev-9005
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/README.md +39 -0
- package/dist/index.cjs +6738 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +572 -543
- package/dist/index.js +28 -2
- package/dist/index.js.map +1 -1
- package/index.js +1 -1
- package/package.json +24 -10
- package/src/index.ts +74 -7
- package/.husky/pre-commit +0 -3
- package/scripts/apply-json-patch-content-type.js +0 -56
- package/tsconfig.json +0 -27
package/package.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matech/thebigpos-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.31.0-dev-9005",
|
|
4
4
|
"description": "The Big POS Typescript SDK",
|
|
5
|
-
"main": "dist/index.
|
|
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
|
-
"
|
|
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
|
-
"
|
|
30
|
-
"
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"axios": "^1"
|
|
31
41
|
},
|
|
32
42
|
"devDependencies": {
|
|
33
|
-
"
|
|
43
|
+
"axios": "^1.20.0",
|
|
44
|
+
"esbuild": "^0.28.1",
|
|
34
45
|
"husky": "^9.1.5",
|
|
35
|
-
"rimraf": "6.1.
|
|
36
|
-
"ts-node": "^10.9.2",
|
|
46
|
+
"rimraf": "6.1.4",
|
|
37
47
|
"typescript": "^5.5.4"
|
|
38
48
|
},
|
|
39
|
-
"
|
|
49
|
+
"resolutions": {
|
|
50
|
+
"brace-expansion": "^5.0.12",
|
|
51
|
+
"follow-redirects": "^1.16.1"
|
|
52
|
+
},
|
|
53
|
+
"swaggerSha256": "08630611292ea96c4d10ff4e300b52bb793c4537ef17a863499a6b88d79e7e05"
|
|
40
54
|
}
|
package/src/index.ts
CHANGED
|
@@ -195,7 +195,11 @@ export type LoanQueueReason =
|
|
|
195
195
|
| "Exception"
|
|
196
196
|
| "TransientError";
|
|
197
197
|
|
|
198
|
-
export type LoanPurpose =
|
|
198
|
+
export type LoanPurpose =
|
|
199
|
+
| "Purchase"
|
|
200
|
+
| "Refinance"
|
|
201
|
+
| "ConstructionOnly"
|
|
202
|
+
| "ConstructionToPermanent";
|
|
199
203
|
|
|
200
204
|
export type LoanPropertyType =
|
|
201
205
|
| "SingleFamily"
|
|
@@ -205,7 +209,14 @@ export type LoanPropertyType =
|
|
|
205
209
|
| "ManufacturedHome"
|
|
206
210
|
| "PlannedUnitDevelopment"
|
|
207
211
|
| "ModularHome"
|
|
208
|
-
| "Other"
|
|
212
|
+
| "Other"
|
|
213
|
+
| "DetachedCondo"
|
|
214
|
+
| "HighRiseCondominium"
|
|
215
|
+
| "Cooperative"
|
|
216
|
+
| "ManufacturedHomeCondoPudCoOp"
|
|
217
|
+
| "MHHomeChoice"
|
|
218
|
+
| "MHSelect"
|
|
219
|
+
| "MHAdvantage";
|
|
209
220
|
|
|
210
221
|
export type LoanPhoneNumberType = "Home" | "Cell" | "Work" | "Fax" | "Other";
|
|
211
222
|
|
|
@@ -319,7 +330,8 @@ export type LoanLogType =
|
|
|
319
330
|
| "LosFieldWriteBack"
|
|
320
331
|
| "ReferrerChangeDiscarded"
|
|
321
332
|
| "TaskEdited"
|
|
322
|
-
| "SigningMethodChanged"
|
|
333
|
+
| "SigningMethodChanged"
|
|
334
|
+
| "ConsumerConnectUnlinked";
|
|
323
335
|
|
|
324
336
|
export type LoanLienPosition = "First" | "Subordinate";
|
|
325
337
|
|
|
@@ -6135,6 +6147,12 @@ export interface LosSyncStep {
|
|
|
6135
6147
|
atUtc: string;
|
|
6136
6148
|
}
|
|
6137
6149
|
|
|
6150
|
+
export interface LosUnlinkedRecipient {
|
|
6151
|
+
email: string;
|
|
6152
|
+
contactType: string;
|
|
6153
|
+
recipientId: string;
|
|
6154
|
+
}
|
|
6155
|
+
|
|
6138
6156
|
export interface LosWebhook {
|
|
6139
6157
|
/** @format uuid */
|
|
6140
6158
|
id: string;
|
|
@@ -7209,6 +7227,7 @@ export interface SiteConfiguration {
|
|
|
7209
7227
|
addCoBorrowerAnimatedIconID?: string | null;
|
|
7210
7228
|
disclosuresSSOSiteID?: string | null;
|
|
7211
7229
|
signingMethodOverride?: SigningMethod | null;
|
|
7230
|
+
signingMethod: SiteConfigurationSigningMethodEnum;
|
|
7212
7231
|
loanChannel?: string | null;
|
|
7213
7232
|
loanFolder?: string | null;
|
|
7214
7233
|
loanTemplate?: string | null;
|
|
@@ -7405,6 +7424,7 @@ export interface SiteConfigurationByUrl {
|
|
|
7405
7424
|
addCoBorrowerAnimatedIconID?: string | null;
|
|
7406
7425
|
disclosuresSSOSiteID?: string | null;
|
|
7407
7426
|
signingMethodOverride?: SigningMethod | null;
|
|
7427
|
+
signingMethod: SiteConfigurationByUrlSigningMethodEnum;
|
|
7408
7428
|
loanChannel?: string | null;
|
|
7409
7429
|
loanFolder?: string | null;
|
|
7410
7430
|
loanTemplate?: string | null;
|
|
@@ -9564,7 +9584,8 @@ export type LoanLogTypeEnum =
|
|
|
9564
9584
|
| "LosFieldWriteBack"
|
|
9565
9585
|
| "ReferrerChangeDiscarded"
|
|
9566
9586
|
| "TaskEdited"
|
|
9567
|
-
| "SigningMethodChanged"
|
|
9587
|
+
| "SigningMethodChanged"
|
|
9588
|
+
| "ConsumerConnectUnlinked";
|
|
9568
9589
|
|
|
9569
9590
|
export type LoanLogDetailLevelEnum = "None" | "Info" | "Warning" | "Error";
|
|
9570
9591
|
|
|
@@ -9590,7 +9611,8 @@ export type LoanLogDetailTypeEnum =
|
|
|
9590
9611
|
| "LosFieldWriteBack"
|
|
9591
9612
|
| "ReferrerChangeDiscarded"
|
|
9592
9613
|
| "TaskEdited"
|
|
9593
|
-
| "SigningMethodChanged"
|
|
9614
|
+
| "SigningMethodChanged"
|
|
9615
|
+
| "ConsumerConnectUnlinked";
|
|
9594
9616
|
|
|
9595
9617
|
export type LoanProgressWidgetConfigTypeEnum = "LoanProgress";
|
|
9596
9618
|
|
|
@@ -9826,6 +9848,8 @@ export type SiteConfigurationTypeEnum =
|
|
|
9826
9848
|
| "LoanOfficer"
|
|
9827
9849
|
| "Partner";
|
|
9828
9850
|
|
|
9851
|
+
export type SiteConfigurationSigningMethodEnum = "ConsumerConnect" | "POSF";
|
|
9852
|
+
|
|
9829
9853
|
export type SiteConfigurationByUrlTypeEnum =
|
|
9830
9854
|
| "None"
|
|
9831
9855
|
| "Account"
|
|
@@ -9834,6 +9858,10 @@ export type SiteConfigurationByUrlTypeEnum =
|
|
|
9834
9858
|
| "LoanOfficer"
|
|
9835
9859
|
| "Partner";
|
|
9836
9860
|
|
|
9861
|
+
export type SiteConfigurationByUrlSigningMethodEnum =
|
|
9862
|
+
| "ConsumerConnect"
|
|
9863
|
+
| "POSF";
|
|
9864
|
+
|
|
9837
9865
|
export type SiteConfigurationReducedTypeEnum =
|
|
9838
9866
|
| "None"
|
|
9839
9867
|
| "Account"
|
|
@@ -10205,7 +10233,15 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
10205
10233
|
property instanceof Array ? property : [property];
|
|
10206
10234
|
|
|
10207
10235
|
for (const formItem of propertyContent) {
|
|
10208
|
-
|
|
10236
|
+
// React Native files are plain { uri, name, type } objects, not Blob/File.
|
|
10237
|
+
const isReactNativeFile =
|
|
10238
|
+
!!formItem &&
|
|
10239
|
+
typeof formItem === "object" &&
|
|
10240
|
+
"uri" in formItem &&
|
|
10241
|
+
"name" in formItem &&
|
|
10242
|
+
"type" in formItem;
|
|
10243
|
+
const isFileType =
|
|
10244
|
+
isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
|
|
10209
10245
|
formData.append(
|
|
10210
10246
|
key,
|
|
10211
10247
|
isFileType ? formItem : this.stringifyFormItem(formItem),
|
|
@@ -10267,7 +10303,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
10267
10303
|
|
|
10268
10304
|
/**
|
|
10269
10305
|
* @title The Big POS API
|
|
10270
|
-
* @version v3.
|
|
10306
|
+
* @version v3.31.0
|
|
10271
10307
|
* @termsOfService https://www.thebigpos.com/terms-of-use/
|
|
10272
10308
|
* @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
|
|
10273
10309
|
*/
|
|
@@ -16764,6 +16800,7 @@ export class Api<
|
|
|
16764
16800
|
* @response `204` `void` No Content
|
|
16765
16801
|
* @response `400` `ProblemDetails` Bad Request
|
|
16766
16802
|
* @response `422` `ProblemDetails` Unprocessable Content
|
|
16803
|
+
* @response `423` `ProblemDetails` Locked
|
|
16767
16804
|
*/
|
|
16768
16805
|
bulkSetLoanCustomFieldValues: (
|
|
16769
16806
|
loanId: string,
|
|
@@ -16791,6 +16828,7 @@ export class Api<
|
|
|
16791
16828
|
* @response `400` `ProblemDetails` Bad Request
|
|
16792
16829
|
* @response `404` `ProblemDetails` Not Found
|
|
16793
16830
|
* @response `422` `ProblemDetails` Unprocessable Content
|
|
16831
|
+
* @response `423` `ProblemDetails` Locked
|
|
16794
16832
|
*/
|
|
16795
16833
|
setLoanCustomFieldValue: (
|
|
16796
16834
|
loanId: string,
|
|
@@ -18915,6 +18953,35 @@ export class Api<
|
|
|
18915
18953
|
...params,
|
|
18916
18954
|
}),
|
|
18917
18955
|
|
|
18956
|
+
/**
|
|
18957
|
+
* No description
|
|
18958
|
+
*
|
|
18959
|
+
* @tags LoanSigningMethod
|
|
18960
|
+
* @name UnlinkLoanFromConsumerConnect
|
|
18961
|
+
* @summary Unlink the loan's borrowers from Consumer Connect
|
|
18962
|
+
* @request POST:/api/loans/{loanId}/signing-method/unlink
|
|
18963
|
+
* @secure
|
|
18964
|
+
* @response `200` `(LosUnlinkedRecipient)[]` OK
|
|
18965
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
18966
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
18967
|
+
* @response `404` `ProblemDetails` Not Found
|
|
18968
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
18969
|
+
* @response `423` `ProblemDetails` Locked
|
|
18970
|
+
* @response `429` `ProblemDetails` Too Many Requests
|
|
18971
|
+
* @response `504` `void` Gateway Timeout
|
|
18972
|
+
*/
|
|
18973
|
+
unlinkLoanFromConsumerConnect: (
|
|
18974
|
+
loanId: string,
|
|
18975
|
+
params: RequestParams = {},
|
|
18976
|
+
) =>
|
|
18977
|
+
this.request<LosUnlinkedRecipient[], ProblemDetails | void>({
|
|
18978
|
+
path: `/api/loans/${loanId}/signing-method/unlink`,
|
|
18979
|
+
method: "POST",
|
|
18980
|
+
secure: true,
|
|
18981
|
+
format: "json",
|
|
18982
|
+
...params,
|
|
18983
|
+
}),
|
|
18984
|
+
|
|
18918
18985
|
/**
|
|
18919
18986
|
* No description
|
|
18920
18987
|
*
|
package/.husky/pre-commit
DELETED
|
@@ -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
|
-
}
|