@base44-preview/sdk 0.8.24-pr.156.b7d6285 → 0.8.24-pr.159.d5c24bd
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
|
/**
|
|
@@ -32,15 +32,6 @@ export interface ConnectorConnectionResponse {
|
|
|
32
32
|
/** Key-value configuration for the connection, or `null` if the connector does not provide one. */
|
|
33
33
|
connectionConfig: Record<string, string> | null;
|
|
34
34
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Connection details for an app-user connector.
|
|
37
|
-
*/
|
|
38
|
-
export interface AppUserConnectorConnectionResponse {
|
|
39
|
-
/** The OAuth access token for the end user's connection. */
|
|
40
|
-
accessToken: string;
|
|
41
|
-
/** Key-value configuration for the connection, or `null` if the connector does not provide one. */
|
|
42
|
-
connectionConfig: Record<string, string> | null;
|
|
43
|
-
}
|
|
44
35
|
/**
|
|
45
36
|
* Connectors module for managing app-scoped OAuth tokens for external services.
|
|
46
37
|
*
|
|
@@ -235,8 +226,6 @@ export interface ConnectorsModule {
|
|
|
235
226
|
/**
|
|
236
227
|
* Retrieves an OAuth access token for an end user's connection to a specific connector.
|
|
237
228
|
*
|
|
238
|
-
* @deprecated Use {@link getCurrentAppUserConnection} instead.
|
|
239
|
-
*
|
|
240
229
|
* Returns the OAuth token string that belongs to the currently authenticated end user
|
|
241
230
|
* for the specified connector.
|
|
242
231
|
*
|
|
@@ -254,27 +243,6 @@ export interface ConnectorsModule {
|
|
|
254
243
|
* ```
|
|
255
244
|
*/
|
|
256
245
|
getCurrentAppUserAccessToken(connectorId: string): Promise<string>;
|
|
257
|
-
/**
|
|
258
|
-
* Retrieves the OAuth access token and connection configuration for an end user's
|
|
259
|
-
* connection to a specific connector.
|
|
260
|
-
*
|
|
261
|
-
* Returns both the OAuth token and any connection-specific configuration that
|
|
262
|
-
* belongs to the currently authenticated end user for the specified connector.
|
|
263
|
-
*
|
|
264
|
-
* @param connectorId - The connector ID (OrgConnector database ID).
|
|
265
|
-
* @returns Promise resolving to an {@link AppUserConnectorConnectionResponse} with `accessToken` and `connectionConfig`.
|
|
266
|
-
*
|
|
267
|
-
* @example
|
|
268
|
-
* ```typescript
|
|
269
|
-
* // Get the end user's connection details for a connector
|
|
270
|
-
* const { accessToken, connectionConfig } = await base44.asServiceRole.connectors.getCurrentAppUserConnection('abc123def');
|
|
271
|
-
*
|
|
272
|
-
* const response = await fetch('https://www.googleapis.com/calendar/v3/calendars/primary/events', {
|
|
273
|
-
* headers: { 'Authorization': `Bearer ${accessToken}` }
|
|
274
|
-
* });
|
|
275
|
-
* ```
|
|
276
|
-
*/
|
|
277
|
-
getCurrentAppUserConnection(connectorId: string): Promise<AppUserConnectorConnectionResponse>;
|
|
278
246
|
}
|
|
279
247
|
/**
|
|
280
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"`, `"gpt_5_4"`, `"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' | 'gpt_5_4' | '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
|
*/
|