@base44-preview/sdk 0.8.35-pr.214.6a78f1b → 0.8.35-pr.214.aef73de
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/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type { AuthModule, LoginResponse, RegisterParams, VerifyOtpParams, Change
|
|
|
9
9
|
export type { IntegrationsModule, IntegrationEndpointFunction, CoreIntegrations, InvokeLLMParams, GenerateImageParams, GenerateImageResult, UploadFileParams, UploadFileResult, SendEmailParams, SendEmailResult, ExtractDataFromUploadedFileParams, ExtractDataFromUploadedFileResult, UploadPrivateFileParams, UploadPrivateFileResult, CreateFileSignedUrlParams, CreateFileSignedUrlResult, } from "./modules/integrations.types.js";
|
|
10
10
|
export type { FunctionsModule, FunctionName, FunctionNameRegistry, } from "./modules/functions.types.js";
|
|
11
11
|
export type { AgentsModule, AgentName, AgentNameRegistry, AgentConversation, AgentMessage, AgentMessageReasoning, AgentMessageToolCall, AgentMessageUsage, AgentMessageCustomContext, AgentMessageMetadata, CreateConversationParams, } from "./modules/agents.types.js";
|
|
12
|
-
export type { AiGatewayModule,
|
|
12
|
+
export type { AiGatewayModule, AiGatewayConnection, } from "./modules/ai-gateway.types.js";
|
|
13
13
|
export type { AppLogsModule } from "./modules/app-logs.types.js";
|
|
14
14
|
export type { SsoModule, SsoAccessTokenResponse } from "./modules/sso.types.js";
|
|
15
15
|
export type { ConnectorsModule, UserConnectorsModule, } from "./modules/connectors.types.js";
|
|
@@ -3,7 +3,7 @@ export function createAiGatewayModule({ serverUrl, token, }) {
|
|
|
3
3
|
const connection = () => {
|
|
4
4
|
var _a;
|
|
5
5
|
return ({
|
|
6
|
-
baseURL: `${serverUrl}/api/ai/
|
|
6
|
+
baseURL: `${serverUrl}/api/ai/openai/v1`,
|
|
7
7
|
token: (_a = token !== null && token !== void 0 ? token : getAccessToken()) !== null && _a !== void 0 ? _a : "",
|
|
8
8
|
});
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Contains the base URL and bearer token to use with any OpenAI-compatible client
|
|
5
5
|
* (the OpenAI SDK, Mastra, and others) pointed at the Base44 AI Gateway.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface AiGatewayConnection {
|
|
8
8
|
/** Base URL of the gateway's OpenAI-compatible endpoint. */
|
|
9
9
|
baseURL: string;
|
|
10
10
|
/** Bearer token used to authenticate requests to the gateway. */
|
|
@@ -37,8 +37,10 @@ export interface AiGatewayModule {
|
|
|
37
37
|
*
|
|
38
38
|
* The `token` is the current caller's bearer token: the app user's token for
|
|
39
39
|
* `base44.aiGateway`, or the service-role token for `base44.asServiceRole.aiGateway`.
|
|
40
|
+
* When the caller is unauthenticated, `token` is an empty string and gateway
|
|
41
|
+
* requests will be rejected.
|
|
40
42
|
*
|
|
41
|
-
* @returns The gateway {@linkcode
|
|
43
|
+
* @returns The gateway {@linkcode AiGatewayConnection | connection} (`baseURL` and `token`).
|
|
42
44
|
*
|
|
43
45
|
* @example
|
|
44
46
|
* ```typescript
|
|
@@ -59,5 +61,5 @@ export interface AiGatewayModule {
|
|
|
59
61
|
* });
|
|
60
62
|
* ```
|
|
61
63
|
*/
|
|
62
|
-
connection():
|
|
64
|
+
connection(): AiGatewayConnection;
|
|
63
65
|
}
|