@base44-preview/sdk 0.8.53-pr.330.ac96a75 → 0.8.53-pr.331.bf2d5aa

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.
@@ -5,9 +5,7 @@ export interface AiGatewayConnection {
5
5
  /** Base URL of the selected gateway provider. */
6
6
  baseURL: string;
7
7
  /**
8
- * Bearer token that authenticates the request: the service-role token from
9
- * `base44.asServiceRole.aiGateway`, or the signed-in user's token from
10
- * `base44.aiGateway`. The gateway expects the service-role token.
8
+ * Bearer token that authenticates the request. The mode you call `connection()` from determines whose token it is.
11
9
  */
12
10
  token: string;
13
11
  /**
@@ -92,20 +90,14 @@ export interface AiGatewayModuleConfig {
92
90
  *
93
91
  * The mode determines which token `connection()` returns:
94
92
  *
95
- * - **Service role authentication** (`base44.asServiceRole.aiGateway`): Returns the app's service-role token.
93
+ * - **Service role authentication** (`base44.asServiceRole.aiGateway`): Returns the app's service-role token. Use it server-side. Calls from the browser or with a user's token get a `403` and the error code `ai_gateway_requires_service_role`. It also works when no user is signed in, such as from a scheduled automation.
96
94
  * - **User authentication** (`base44.aiGateway`): Returns the signed-in app user's token. The gateway accepts it only on apps shared privately or with your workspace.
97
95
  *
98
- * Call the gateway server-side with the app's service role, as every example
99
- * here does. Calls from the browser or with a user's token are rejected with a
100
- * `403`, the error code `ai_gateway_requires_service_role`, and the message
101
- * "AI gateway requests must be made server-side using the app's service role.
102
- * Calls from the browser or with a user's token are not allowed." Service role
103
- * also works when there's no signed-in user at all, such as from a scheduled
104
- * automation.
105
- *
106
- * In a backend function, for example, you can check the caller with
107
- * `base44.auth.me()` before calling the gateway, and call the function from
108
- * your page with `base44.functions.invoke()`.
96
+ * The mode decides which token you get and whether the gateway accepts the call.
97
+ * It grants the model no extra reach, because the gateway runs a model and never
98
+ * touches your data. Access to your app's data comes from the `base44.entities`
99
+ * calls you write around the gateway call, so pick the mode for those on their
100
+ * own merits rather than matching this one.
109
101
  *
110
102
  * ## Billing and limits
111
103
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.53-pr.330.ac96a75",
3
+ "version": "0.8.53-pr.331.bf2d5aa",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",