@matech/thebigpos-sdk 3.31.0 → 3.32.0-main-9137
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 +6724 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +548 -563
- package/dist/index.js +12 -20
- package/dist/index.js.map +1 -1
- package/index.js +1 -1
- package/package.json +24 -10
- package/src/index.ts +36 -40
- 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.32.0-main-9137",
|
|
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": "146118641aaffa2d0b0d2b1b4d38dddc5f999cb8526382f7eb30e950f21e3804"
|
|
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
|
|
|
@@ -6136,12 +6147,6 @@ export interface LosSyncStep {
|
|
|
6136
6147
|
atUtc: string;
|
|
6137
6148
|
}
|
|
6138
6149
|
|
|
6139
|
-
export interface LosUnlinkedRecipient {
|
|
6140
|
-
email: string;
|
|
6141
|
-
contactType: string;
|
|
6142
|
-
recipientId: string;
|
|
6143
|
-
}
|
|
6144
|
-
|
|
6145
6150
|
export interface LosWebhook {
|
|
6146
6151
|
/** @format uuid */
|
|
6147
6152
|
id: string;
|
|
@@ -7216,6 +7221,7 @@ export interface SiteConfiguration {
|
|
|
7216
7221
|
addCoBorrowerAnimatedIconID?: string | null;
|
|
7217
7222
|
disclosuresSSOSiteID?: string | null;
|
|
7218
7223
|
signingMethodOverride?: SigningMethod | null;
|
|
7224
|
+
signingMethod: SiteConfigurationSigningMethodEnum;
|
|
7219
7225
|
loanChannel?: string | null;
|
|
7220
7226
|
loanFolder?: string | null;
|
|
7221
7227
|
loanTemplate?: string | null;
|
|
@@ -7412,6 +7418,7 @@ export interface SiteConfigurationByUrl {
|
|
|
7412
7418
|
addCoBorrowerAnimatedIconID?: string | null;
|
|
7413
7419
|
disclosuresSSOSiteID?: string | null;
|
|
7414
7420
|
signingMethodOverride?: SigningMethod | null;
|
|
7421
|
+
signingMethod: SiteConfigurationByUrlSigningMethodEnum;
|
|
7415
7422
|
loanChannel?: string | null;
|
|
7416
7423
|
loanFolder?: string | null;
|
|
7417
7424
|
loanTemplate?: string | null;
|
|
@@ -9835,6 +9842,8 @@ export type SiteConfigurationTypeEnum =
|
|
|
9835
9842
|
| "LoanOfficer"
|
|
9836
9843
|
| "Partner";
|
|
9837
9844
|
|
|
9845
|
+
export type SiteConfigurationSigningMethodEnum = "ConsumerConnect" | "POSF";
|
|
9846
|
+
|
|
9838
9847
|
export type SiteConfigurationByUrlTypeEnum =
|
|
9839
9848
|
| "None"
|
|
9840
9849
|
| "Account"
|
|
@@ -9843,6 +9852,10 @@ export type SiteConfigurationByUrlTypeEnum =
|
|
|
9843
9852
|
| "LoanOfficer"
|
|
9844
9853
|
| "Partner";
|
|
9845
9854
|
|
|
9855
|
+
export type SiteConfigurationByUrlSigningMethodEnum =
|
|
9856
|
+
| "ConsumerConnect"
|
|
9857
|
+
| "POSF";
|
|
9858
|
+
|
|
9846
9859
|
export type SiteConfigurationReducedTypeEnum =
|
|
9847
9860
|
| "None"
|
|
9848
9861
|
| "Account"
|
|
@@ -10214,7 +10227,15 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
10214
10227
|
property instanceof Array ? property : [property];
|
|
10215
10228
|
|
|
10216
10229
|
for (const formItem of propertyContent) {
|
|
10217
|
-
|
|
10230
|
+
// React Native files are plain { uri, name, type } objects, not Blob/File.
|
|
10231
|
+
const isReactNativeFile =
|
|
10232
|
+
!!formItem &&
|
|
10233
|
+
typeof formItem === "object" &&
|
|
10234
|
+
"uri" in formItem &&
|
|
10235
|
+
"name" in formItem &&
|
|
10236
|
+
"type" in formItem;
|
|
10237
|
+
const isFileType =
|
|
10238
|
+
isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
|
|
10218
10239
|
formData.append(
|
|
10219
10240
|
key,
|
|
10220
10241
|
isFileType ? formItem : this.stringifyFormItem(formItem),
|
|
@@ -10276,7 +10297,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
10276
10297
|
|
|
10277
10298
|
/**
|
|
10278
10299
|
* @title The Big POS API
|
|
10279
|
-
* @version v3.
|
|
10300
|
+
* @version v3.32.0
|
|
10280
10301
|
* @termsOfService https://www.thebigpos.com/terms-of-use/
|
|
10281
10302
|
* @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
|
|
10282
10303
|
*/
|
|
@@ -18926,35 +18947,6 @@ export class Api<
|
|
|
18926
18947
|
...params,
|
|
18927
18948
|
}),
|
|
18928
18949
|
|
|
18929
|
-
/**
|
|
18930
|
-
* No description
|
|
18931
|
-
*
|
|
18932
|
-
* @tags LoanSigningMethod
|
|
18933
|
-
* @name UnlinkLoanFromConsumerConnect
|
|
18934
|
-
* @summary Unlink the loan's borrowers from Consumer Connect
|
|
18935
|
-
* @request POST:/api/loans/{loanId}/signing-method/unlink
|
|
18936
|
-
* @secure
|
|
18937
|
-
* @response `200` `(LosUnlinkedRecipient)[]` OK
|
|
18938
|
-
* @response `400` `ProblemDetails` Bad Request
|
|
18939
|
-
* @response `403` `ProblemDetails` Forbidden
|
|
18940
|
-
* @response `404` `ProblemDetails` Not Found
|
|
18941
|
-
* @response `422` `ProblemDetails` Unprocessable Content
|
|
18942
|
-
* @response `423` `ProblemDetails` Locked
|
|
18943
|
-
* @response `429` `ProblemDetails` Too Many Requests
|
|
18944
|
-
* @response `504` `void` Gateway Timeout
|
|
18945
|
-
*/
|
|
18946
|
-
unlinkLoanFromConsumerConnect: (
|
|
18947
|
-
loanId: string,
|
|
18948
|
-
params: RequestParams = {},
|
|
18949
|
-
) =>
|
|
18950
|
-
this.request<LosUnlinkedRecipient[], ProblemDetails | void>({
|
|
18951
|
-
path: `/api/loans/${loanId}/signing-method/unlink`,
|
|
18952
|
-
method: "POST",
|
|
18953
|
-
secure: true,
|
|
18954
|
-
format: "json",
|
|
18955
|
-
...params,
|
|
18956
|
-
}),
|
|
18957
|
-
|
|
18958
18950
|
/**
|
|
18959
18951
|
* No description
|
|
18960
18952
|
*
|
|
@@ -18964,16 +18956,20 @@ export class Api<
|
|
|
18964
18956
|
* @request PUT:/api/loans/{loanId}/signing-method
|
|
18965
18957
|
* @secure
|
|
18966
18958
|
* @response `204` `void` No Content
|
|
18959
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
18967
18960
|
* @response `403` `ProblemDetails` Forbidden
|
|
18968
18961
|
* @response `404` `ProblemDetails` Not Found
|
|
18969
18962
|
* @response `422` `ProblemDetails` Unprocessable Content
|
|
18963
|
+
* @response `423` `ProblemDetails` Locked
|
|
18964
|
+
* @response `429` `ProblemDetails` Too Many Requests
|
|
18965
|
+
* @response `504` `void` Gateway Timeout
|
|
18970
18966
|
*/
|
|
18971
18967
|
updateLoanSigningMethod: (
|
|
18972
18968
|
loanId: string,
|
|
18973
18969
|
data: UpdateLoanSigningMethodRequest,
|
|
18974
18970
|
params: RequestParams = {},
|
|
18975
18971
|
) =>
|
|
18976
|
-
this.request<void, ProblemDetails>({
|
|
18972
|
+
this.request<void, ProblemDetails | void>({
|
|
18977
18973
|
path: `/api/loans/${loanId}/signing-method`,
|
|
18978
18974
|
method: "PUT",
|
|
18979
18975
|
body: data,
|
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
|
-
}
|