@base44-preview/sdk 0.8.24-pr.156.8ddb70c → 0.8.24-pr.157.c9c7b51
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.
|
@@ -33,9 +33,6 @@ export function createConnectorsModule(axios, appId) {
|
|
|
33
33
|
connectionConfig: (_a = data.connection_config) !== null && _a !== void 0 ? _a : null,
|
|
34
34
|
};
|
|
35
35
|
},
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated Use getCurrentAppUserConnection(connectorId) and use the returned accessToken (and connectionConfig when needed) instead.
|
|
38
|
-
*/
|
|
39
36
|
async getCurrentAppUserAccessToken(connectorId) {
|
|
40
37
|
if (!connectorId || typeof connectorId !== "string") {
|
|
41
38
|
throw new Error("Connector ID is required and must be a string");
|
|
@@ -44,18 +41,6 @@ export function createConnectorsModule(axios, appId) {
|
|
|
44
41
|
const data = response;
|
|
45
42
|
return data.access_token;
|
|
46
43
|
},
|
|
47
|
-
async getCurrentAppUserConnection(connectorId) {
|
|
48
|
-
var _a;
|
|
49
|
-
if (!connectorId || typeof connectorId !== "string") {
|
|
50
|
-
throw new Error("Connector ID is required and must be a string");
|
|
51
|
-
}
|
|
52
|
-
const response = await axios.get(`/apps/${appId}/app-user-auth/connectors/${connectorId}/token`);
|
|
53
|
-
const data = response;
|
|
54
|
-
return {
|
|
55
|
-
accessToken: data.access_token,
|
|
56
|
-
connectionConfig: (_a = data.connection_config) !== null && _a !== void 0 ? _a : null,
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
44
|
};
|
|
60
45
|
}
|
|
61
46
|
/**
|
|
@@ -226,8 +226,6 @@ export interface ConnectorsModule {
|
|
|
226
226
|
/**
|
|
227
227
|
* Retrieves an OAuth access token for an end user's connection to a specific connector.
|
|
228
228
|
*
|
|
229
|
-
* @deprecated Use {@link getCurrentAppUserConnection} instead.
|
|
230
|
-
*
|
|
231
229
|
* Returns the OAuth token string that belongs to the currently authenticated end user
|
|
232
230
|
* for the specified connector.
|
|
233
231
|
*
|
|
@@ -245,27 +243,6 @@ export interface ConnectorsModule {
|
|
|
245
243
|
* ```
|
|
246
244
|
*/
|
|
247
245
|
getCurrentAppUserAccessToken(connectorId: string): Promise<string>;
|
|
248
|
-
/**
|
|
249
|
-
* Retrieves the OAuth access token and connection configuration for an end user's
|
|
250
|
-
* connection to a specific connector.
|
|
251
|
-
*
|
|
252
|
-
* Returns both the OAuth token and any connection-specific configuration that
|
|
253
|
-
* belongs to the currently authenticated end user for the specified connector.
|
|
254
|
-
*
|
|
255
|
-
* @param connectorId - The connector ID (OrgConnector database ID).
|
|
256
|
-
* @returns Promise resolving to a {@link ConnectorConnectionResponse} with `accessToken` and `connectionConfig`.
|
|
257
|
-
*
|
|
258
|
-
* @example
|
|
259
|
-
* ```typescript
|
|
260
|
-
* // Get the end user's connection details for a connector
|
|
261
|
-
* const { accessToken, connectionConfig } = await base44.asServiceRole.connectors.getCurrentAppUserConnection('abc123def');
|
|
262
|
-
*
|
|
263
|
-
* const response = await fetch('https://www.googleapis.com/calendar/v3/calendars/primary/events', {
|
|
264
|
-
* headers: { 'Authorization': `Bearer ${accessToken}` }
|
|
265
|
-
* });
|
|
266
|
-
* ```
|
|
267
|
-
*/
|
|
268
|
-
getCurrentAppUserConnection(connectorId: string): Promise<ConnectorConnectionResponse>;
|
|
269
246
|
}
|
|
270
247
|
/**
|
|
271
248
|
* User-scoped connectors module for managing app-user OAuth connections.
|
|
@@ -43,9 +43,9 @@ export interface InvokeLLMParams {
|
|
|
43
43
|
prompt: string;
|
|
44
44
|
/** Optionally specify a model to override the app-level model setting for this specific call.
|
|
45
45
|
*
|
|
46
|
-
* Options: `"gpt_5_mini"`, `"gemini_3_flash"`, `"gpt_5"`, `"
|
|
46
|
+
* Options: `"gpt_5_mini"`, `"gemini_3_flash"`, `"gpt_5"`, `"gemini_3.1_pro"`, `"claude_sonnet_4_6"`, `"claude_opus_4_6"`
|
|
47
47
|
*/
|
|
48
|
-
model?: 'gpt_5_mini' | 'gemini_3_flash' | 'gpt_5' | '
|
|
48
|
+
model?: 'gpt_5_mini' | 'gemini_3_flash' | 'gpt_5' | 'gemini_3.1_pro' | 'claude_sonnet_4_6' | 'claude_opus_4_6';
|
|
49
49
|
/** If set to `true`, the LLM will use Google Search, Maps, and News to gather real-time context before answering.
|
|
50
50
|
* @default false
|
|
51
51
|
*/
|