@matech/thebigpos-sdk 3.20.0 → 3.21.0-dev-7189
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 +6494 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +531 -564
- package/dist/index.js +8 -26
- package/dist/index.js.map +1 -1
- package/index.js +1 -1
- package/package.json +24 -10
- package/src/index.ts +37 -68
- 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.21.0-dev-7189",
|
|
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.3",
|
|
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": "e306511ec803916eb85f24fc640c48d6c62b09549fc9275545679d74952ce895"
|
|
40
54
|
}
|
package/src/index.ts
CHANGED
|
@@ -1446,7 +1446,6 @@ export interface AiPrompt {
|
|
|
1446
1446
|
isFeatured: boolean;
|
|
1447
1447
|
icon?: string | null;
|
|
1448
1448
|
agentSystemPrompt?: string | null;
|
|
1449
|
-
tools?: AiPromptTool[] | null;
|
|
1450
1449
|
hasAccountOverride: boolean;
|
|
1451
1450
|
/** @format date-time */
|
|
1452
1451
|
createdAt: string;
|
|
@@ -1548,14 +1547,6 @@ export interface AiPromptSummary {
|
|
|
1548
1547
|
icon?: string | null;
|
|
1549
1548
|
}
|
|
1550
1549
|
|
|
1551
|
-
export interface AiPromptTool {
|
|
1552
|
-
toolName: string;
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
export interface AiPromptToolInput {
|
|
1556
|
-
toolName: string;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
1550
|
export interface AiTokenBudgetStatus {
|
|
1560
1551
|
/** @format int32 */
|
|
1561
1552
|
limit: number;
|
|
@@ -1601,13 +1592,6 @@ export interface AiTokenUsageWindowPaginated {
|
|
|
1601
1592
|
count: number;
|
|
1602
1593
|
}
|
|
1603
1594
|
|
|
1604
|
-
export interface AiToolCatalogItem {
|
|
1605
|
-
toolName: string;
|
|
1606
|
-
displayName: string;
|
|
1607
|
-
description: string;
|
|
1608
|
-
isWriteTool: boolean;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
1595
|
export interface AiUpdatedBy {
|
|
1612
1596
|
/** @format uuid */
|
|
1613
1597
|
id: string;
|
|
@@ -5046,6 +5030,11 @@ export interface LoanDocumentFolderPermission {
|
|
|
5046
5030
|
readScope: LoanDocumentFolderPermissionReadScopeEnum;
|
|
5047
5031
|
}
|
|
5048
5032
|
|
|
5033
|
+
export interface LoanDocumentFolderPermissionFilter {
|
|
5034
|
+
role: LoanDocumentFolderPermissionFilterRoleEnum;
|
|
5035
|
+
minimumPermissionLevel: LoanDocumentFolderPermissionFilterMinimumPermissionLevelEnum;
|
|
5036
|
+
}
|
|
5037
|
+
|
|
5049
5038
|
export interface LoanDocumentFolderPermissionRequest {
|
|
5050
5039
|
role: LoanDocumentFolderPermissionRequestRoleEnum;
|
|
5051
5040
|
level: LoanDocumentFolderPermissionRequestLevelEnum;
|
|
@@ -5057,6 +5046,7 @@ export interface LoanDocumentFolderSearchCriteria {
|
|
|
5057
5046
|
isActive?: boolean | null;
|
|
5058
5047
|
isSystemDefault?: boolean | null;
|
|
5059
5048
|
role?: LoanRole | null;
|
|
5049
|
+
permissions?: LoanDocumentFolderPermissionFilter[] | null;
|
|
5060
5050
|
}
|
|
5061
5051
|
|
|
5062
5052
|
export interface LoanDocumentFolderSummary {
|
|
@@ -8043,10 +8033,6 @@ export interface UpdateAiPromptRequest {
|
|
|
8043
8033
|
inputHint?: string | null;
|
|
8044
8034
|
isFeatured?: boolean | null;
|
|
8045
8035
|
icon?: string | null;
|
|
8046
|
-
}
|
|
8047
|
-
|
|
8048
|
-
export interface UpdateAiPromptToolsRequest {
|
|
8049
|
-
tools: AiPromptToolInput[];
|
|
8050
8036
|
agentSystemPrompt?: string | null;
|
|
8051
8037
|
}
|
|
8052
8038
|
|
|
@@ -9316,6 +9302,27 @@ export type LoanDocumentFolderPermissionLevelEnum =
|
|
|
9316
9302
|
|
|
9317
9303
|
export type LoanDocumentFolderPermissionReadScopeEnum = "Own" | "All";
|
|
9318
9304
|
|
|
9305
|
+
export type LoanDocumentFolderPermissionFilterRoleEnum =
|
|
9306
|
+
| "Borrower"
|
|
9307
|
+
| "CoBorrower"
|
|
9308
|
+
| "NonBorrower"
|
|
9309
|
+
| "LoanOfficer"
|
|
9310
|
+
| "LoanProcessor"
|
|
9311
|
+
| "LoanOfficerAssistant"
|
|
9312
|
+
| "SupportingLoanOfficer"
|
|
9313
|
+
| "BuyerAgent"
|
|
9314
|
+
| "SellerAgent"
|
|
9315
|
+
| "TitleInsuranceAgent"
|
|
9316
|
+
| "EscrowAgent"
|
|
9317
|
+
| "SettlementAgent"
|
|
9318
|
+
| "Admin";
|
|
9319
|
+
|
|
9320
|
+
export type LoanDocumentFolderPermissionFilterMinimumPermissionLevelEnum =
|
|
9321
|
+
| "None"
|
|
9322
|
+
| "Read"
|
|
9323
|
+
| "Write"
|
|
9324
|
+
| "Manage";
|
|
9325
|
+
|
|
9319
9326
|
export type LoanDocumentFolderPermissionRequestRoleEnum =
|
|
9320
9327
|
| "Borrower"
|
|
9321
9328
|
| "CoBorrower"
|
|
@@ -10029,7 +10036,15 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
10029
10036
|
property instanceof Array ? property : [property];
|
|
10030
10037
|
|
|
10031
10038
|
for (const formItem of propertyContent) {
|
|
10032
|
-
|
|
10039
|
+
// React Native files are plain { uri, name, type } objects, not Blob/File.
|
|
10040
|
+
const isReactNativeFile =
|
|
10041
|
+
!!formItem &&
|
|
10042
|
+
typeof formItem === "object" &&
|
|
10043
|
+
"uri" in formItem &&
|
|
10044
|
+
"name" in formItem &&
|
|
10045
|
+
"type" in formItem;
|
|
10046
|
+
const isFileType =
|
|
10047
|
+
isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
|
|
10033
10048
|
formData.append(
|
|
10034
10049
|
key,
|
|
10035
10050
|
isFileType ? formItem : this.stringifyFormItem(formItem),
|
|
@@ -10091,7 +10106,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
10091
10106
|
|
|
10092
10107
|
/**
|
|
10093
10108
|
* @title The Big POS API
|
|
10094
|
-
* @version v3.
|
|
10109
|
+
* @version v3.21.0
|
|
10095
10110
|
* @termsOfService https://www.thebigpos.com/terms-of-use/
|
|
10096
10111
|
* @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
|
|
10097
10112
|
*/
|
|
@@ -10590,52 +10605,6 @@ export class Api<
|
|
|
10590
10605
|
...params,
|
|
10591
10606
|
}),
|
|
10592
10607
|
|
|
10593
|
-
/**
|
|
10594
|
-
* No description
|
|
10595
|
-
*
|
|
10596
|
-
* @tags AiAdminPrompt
|
|
10597
|
-
* @name GetAiTools
|
|
10598
|
-
* @summary List available agent tools and their settings schema
|
|
10599
|
-
* @request GET:/api/ai/prompts/tools
|
|
10600
|
-
* @secure
|
|
10601
|
-
* @response `200` `(AiToolCatalogItem)[]` OK
|
|
10602
|
-
*/
|
|
10603
|
-
getAiTools: (params: RequestParams = {}) =>
|
|
10604
|
-
this.request<AiToolCatalogItem[], any>({
|
|
10605
|
-
path: `/api/ai/prompts/tools`,
|
|
10606
|
-
method: "GET",
|
|
10607
|
-
secure: true,
|
|
10608
|
-
format: "json",
|
|
10609
|
-
...params,
|
|
10610
|
-
}),
|
|
10611
|
-
|
|
10612
|
-
/**
|
|
10613
|
-
* No description
|
|
10614
|
-
*
|
|
10615
|
-
* @tags AiAdminPrompt
|
|
10616
|
-
* @name UpdateAiPromptTools
|
|
10617
|
-
* @summary Replace the prompt's agent tool configuration
|
|
10618
|
-
* @request PUT:/api/ai/prompts/{id}/tools
|
|
10619
|
-
* @secure
|
|
10620
|
-
* @response `200` `AiPrompt` OK
|
|
10621
|
-
* @response `400` `ProblemDetails` Bad Request
|
|
10622
|
-
* @response `404` `ProblemDetails` Not Found
|
|
10623
|
-
*/
|
|
10624
|
-
updateAiPromptTools: (
|
|
10625
|
-
id: string,
|
|
10626
|
-
data: UpdateAiPromptToolsRequest,
|
|
10627
|
-
params: RequestParams = {},
|
|
10628
|
-
) =>
|
|
10629
|
-
this.request<AiPrompt, ProblemDetails>({
|
|
10630
|
-
path: `/api/ai/prompts/${id}/tools`,
|
|
10631
|
-
method: "PUT",
|
|
10632
|
-
body: data,
|
|
10633
|
-
secure: true,
|
|
10634
|
-
type: "application/json",
|
|
10635
|
-
format: "json",
|
|
10636
|
-
...params,
|
|
10637
|
-
}),
|
|
10638
|
-
|
|
10639
10608
|
/**
|
|
10640
10609
|
* No description
|
|
10641
10610
|
*
|
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
|
-
}
|