@base44-preview/sdk 0.8.52-pr.297.7590c31 → 0.8.52-pr.297.e5cedd8
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.
|
@@ -51,8 +51,10 @@ export interface AiGatewayModuleConfig {
|
|
|
51
51
|
* against the provider directly, no separate account, API key, or billing
|
|
52
52
|
* setup with the underlying model provider required.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
54
|
+
* `connection()` takes an optional `provider`, and each provider serves a different API:
|
|
55
|
+
*
|
|
56
|
+
* - `openai` (default): OpenAI-compatible chat completions and image endpoints.
|
|
57
|
+
* - `typesafe`: structured evaluations with the `jev` model.
|
|
56
58
|
*
|
|
57
59
|
* Call `connection()` from a backend function rather than the browser. This
|
|
58
60
|
* keeps your instructions, tools, and business logic server-side, and lets
|
|
@@ -89,8 +91,8 @@ export interface AiGatewayModuleConfig {
|
|
|
89
91
|
*
|
|
90
92
|
* The mode determines which token `connection()` returns:
|
|
91
93
|
*
|
|
92
|
-
* - **
|
|
93
|
-
* - **
|
|
94
|
+
* - **User authentication** (`base44.aiGateway`): Returns the signed-in app user's token.
|
|
95
|
+
* - **Service role authentication** (`base44.asServiceRole.aiGateway`): Returns the service-role token instead. Use it from backend functions: apps that restrict Core integrations, the default for new apps, reject user-token gateway calls on public apps. It also works when there's no signed-in user, such as from a scheduled automation.
|
|
94
96
|
*
|
|
95
97
|
* ## Billing and limits
|
|
96
98
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@base44-preview/sdk",
|
|
3
|
-
"version": "0.8.52-pr.297.
|
|
3
|
+
"version": "0.8.52-pr.297.e5cedd8",
|
|
4
4
|
"description": "JavaScript SDK for Base44 API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "tsc",
|
|
13
|
-
"lint": "eslint src",
|
|
14
13
|
"test": "npm run test:types && vitest run",
|
|
15
14
|
"test:types": "tsc --noEmit -p tsconfig.type-tests.json",
|
|
16
15
|
"test:unit": "vitest run tests/unit",
|
|
@@ -26,29 +25,11 @@
|
|
|
26
25
|
"create-docs:process": "node scripts/mintlify-post-processing/file-processing/file-processing.js"
|
|
27
26
|
},
|
|
28
27
|
"dependencies": {
|
|
29
|
-
"axios": "^1.
|
|
28
|
+
"axios": "^1.20.0",
|
|
30
29
|
"partysocket": "^0.0.23",
|
|
31
30
|
"socket.io-client": "^4.8.3",
|
|
32
31
|
"uuid": "^13.0.2"
|
|
33
32
|
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@types/hast": "^3.0.4",
|
|
36
|
-
"@types/node": "^25.0.1",
|
|
37
|
-
"@types/unist": "^3.0.3",
|
|
38
|
-
"@typescript-eslint/parser": "^8.51.0",
|
|
39
|
-
"@vitest/coverage-istanbul": "^4.1.9",
|
|
40
|
-
"@vitest/coverage-v8": "^4.1.9",
|
|
41
|
-
"@vitest/ui": "^4.1.9",
|
|
42
|
-
"dotenv": "^16.3.1",
|
|
43
|
-
"eslint": "^9.39.2",
|
|
44
|
-
"eslint-plugin-import": "^2.32.0",
|
|
45
|
-
"nock": "^13.4.0",
|
|
46
|
-
"typedoc": "^0.28.14",
|
|
47
|
-
"typedoc-plugin-markdown": "^4.9.0",
|
|
48
|
-
"typescript": "^5.3.2",
|
|
49
|
-
"typescript-eslint": "^8.51.0",
|
|
50
|
-
"vitest": "^4.1.9"
|
|
51
|
-
},
|
|
52
33
|
"keywords": [
|
|
53
34
|
"base44",
|
|
54
35
|
"api",
|
|
@@ -58,10 +39,11 @@
|
|
|
58
39
|
"license": "MIT",
|
|
59
40
|
"repository": {
|
|
60
41
|
"type": "git",
|
|
61
|
-
"url": "git+https://github.com/base44/javascript-sdk.git"
|
|
42
|
+
"url": "git+https://github.com/base44/javascript-sdk.git",
|
|
43
|
+
"directory": "packages/sdk"
|
|
62
44
|
},
|
|
63
45
|
"bugs": {
|
|
64
46
|
"url": "https://github.com/base44/javascript-sdk/issues"
|
|
65
47
|
},
|
|
66
|
-
"homepage": "https://github.com/base44/javascript-sdk#readme"
|
|
48
|
+
"homepage": "https://github.com/base44/javascript-sdk/tree/main/packages/sdk#readme"
|
|
67
49
|
}
|