@base44-preview/sdk 0.8.20-pr.136.f19f6e0 → 0.8.20-pr.137.2242f71

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.
@@ -181,12 +181,13 @@ export interface AuthModule {
181
181
  * Initiates an OAuth login flow with one of the built-in providers. Requires a browser environment and can't be used in the backend.
182
182
  *
183
183
  * Supported providers:
184
- * - `'google'`: {@link https://developers.google.com/identity/protocols/oauth2 | Google OAuth}. Enabled by default.
185
- * - `'microsoft'`: {@link https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow | Microsoft OAuth}. Enable Microsoft in your app's authentication settings before specifying this provider.
186
- * - `'facebook'`: {@link https://developers.facebook.com/docs/facebook-login | Facebook Login}. Enable Facebook in your app's authentication settings before using.
187
- * - `'apple'`: {@link https://developer.apple.com/sign-in-with-apple/ | Sign in with Apple}. Enable Apple in your app's authentication settings before using this provider.
184
+ * - `'google'` - {@link https://developers.google.com/identity/protocols/oauth2 | Google OAuth}. Enabled by default.
185
+ * - `'microsoft'` - {@link https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow | Microsoft OAuth}. Enable Microsoft in your app's authentication settings before specifying this provider.
186
+ * - `'facebook'` - {@link https://developers.facebook.com/docs/facebook-login | Facebook Login}. Enable Facebook in your app's authentication settings before using.
187
+ * - `'apple'` - {@link https://developer.apple.com/sign-in-with-apple/ | Sign in with Apple}. Enable Apple in your app's authentication settings before using this provider.
188
+ * - `'sso'` - Enterprise SSO. Enable SSO in your app's authentication settings before using this provider.
188
189
  *
189
- * @param provider - The authentication provider to use: `'google'`, `'microsoft'`, `'facebook'`, or `'apple'`.
190
+ * @param provider - The authentication provider to use: `'google'`, `'microsoft'`, `'facebook'`, `'apple'`, or `'sso'`.
190
191
  * @param fromUrl - URL to redirect to after successful authentication. Defaults to `'/'`.
191
192
  *
192
193
  * @example
@@ -207,6 +208,11 @@ export interface AuthModule {
207
208
  * base44.auth.loginWithProvider('apple', '/dashboard');
208
209
  * ```
209
210
  *
211
+ * @example
212
+ * ```typescript
213
+ * // SSO
214
+ * base44.auth.loginWithProvider('sso', '/dashboard');
215
+ * ```
210
216
  */
211
217
  loginWithProvider(provider: string, fromUrl?: string): void;
212
218
  /**
@@ -35,43 +35,13 @@ export interface ConnectorConnectionResponse {
35
35
  /**
36
36
  * Connectors module for managing OAuth tokens for external services.
37
37
  *
38
- * This module allows you to retrieve OAuth access tokens for external services that the app has connected to. Connectors are app-scoped. When an app builder connects an integration like Google Calendar, Slack, or GitHub, all users of the app share that same connection.
38
+ * This module allows you to retrieve OAuth access tokens for external services that the app has connected to. Connectors are app-scoped. When an app builder connects an integration like Google Calendar or Slack, all users of the app share that same connection.
39
39
  *
40
40
  * Unlike the integrations module that provides pre-built functions, connectors give you
41
41
  * raw OAuth tokens so you can call external service APIs directly with full control over
42
42
  * the API calls you make. This is useful when you need custom API interactions that aren't
43
43
  * covered by Base44's pre-built integrations.
44
44
  *
45
- * ## Available connectors
46
- *
47
- * All connectors work through [`getAccessToken()`](#getaccesstoken). Pass the integration type string and use the returned OAuth token to call the external service's API directly.
48
- *
49
- * | Service | Type identifier |
50
- * |---|---|
51
- * | Discord | `discord` |
52
- * | GitHub | `github` |
53
- * | Gmail | `gmail` |
54
- * | Google BigQuery | `googlebigquery` |
55
- * | Google Calendar | `googlecalendar` |
56
- * | Google Docs | `googledocs` |
57
- * | Google Drive | `googledrive` |
58
- * | Google Sheets | `googlesheets` |
59
- * | Google Slides | `googleslides` |
60
- * | HubSpot | `hubspot` |
61
- * | LinkedIn | `linkedin` |
62
- * | Notion | `notion` |
63
- * | Salesforce | `salesforce` |
64
- * | Slack User | `slack` |
65
- * | Slack Bot | `slackbot` |
66
- * | TikTok | `tiktok` |
67
- *
68
- * ### Slack User vs Slack Bot
69
- *
70
- * Base44 provides two separate Slack connectors with different OAuth flows:
71
- *
72
- * - **`slack`** (Slack User): Uses a user token. API calls act as the connected Slack user. Requests user-level scopes such as reading conversations and searching message history. Some organizations restrict user-scope Slack apps.
73
- * - **`slackbot`** (Slack Bot): Uses a bot token. API calls act as a bot with a customizable display name and icon. Requests bot-level scopes, which are more commonly allowed by organizations with stricter security policies. The bot can post to public channels without being invited and supports custom branding per message.
74
- *
75
45
  * ## Authentication Modes
76
46
  *
77
47
  * This module is only available to use with a client in service role authentication mode, which means it can only be used in backend environments.
@@ -90,7 +60,7 @@ export interface ConnectorsModule {
90
60
  * has connected to. This token represents the connected app builder's account
91
61
  * and can be used to make authenticated API calls to that external service on behalf of the app.
92
62
  *
93
- * @param integrationType - The type of integration, such as `'googlecalendar'`, `'slack'`, `'slackbot'`, `'github'`, or `'discord'`.
63
+ * @param integrationType - The type of integration, such as `'googlecalendar'`, `'slack'`, or `'github'`.
94
64
  * @returns Promise resolving to the access token string.
95
65
  *
96
66
  * @example
@@ -112,8 +82,8 @@ export interface ConnectorsModule {
112
82
  *
113
83
  * @example
114
84
  * ```typescript
115
- * // Slack User connection
116
- * // Get Slack user token and list channels
85
+ * // Slack connection
86
+ * // Get Slack OAuth token and list channels
117
87
  * const slackToken = await base44.asServiceRole.connectors.getAccessToken('slack');
118
88
  *
119
89
  * // List all public and private channels
@@ -125,29 +95,6 @@ export interface ConnectorsModule {
125
95
  *
126
96
  * const data = await slackResponse.json();
127
97
  * ```
128
- *
129
- * @example
130
- * ```typescript
131
- * // Slack Bot connection
132
- * // Get Slack bot token and post a message with a custom bot identity
133
- * const botToken = await base44.asServiceRole.connectors.getAccessToken('slackbot');
134
- *
135
- * const response = await fetch('https://slack.com/api/chat.postMessage', {
136
- * method: 'POST',
137
- * headers: {
138
- * 'Authorization': `Bearer ${botToken}`,
139
- * 'Content-Type': 'application/json'
140
- * },
141
- * body: JSON.stringify({
142
- * channel: '#alerts',
143
- * text: 'Deployment to production completed successfully.',
144
- * username: 'Deploy Bot',
145
- * icon_emoji: ':rocket:'
146
- * })
147
- * });
148
- *
149
- * const result = await response.json();
150
- * ```
151
98
  */
152
99
  getAccessToken(integrationType: ConnectorIntegrationType): Promise<string>;
153
100
  /**
@@ -19,7 +19,7 @@ export type IntegrationEndpointFunction = (data: Record<string, any>) => Promise
19
19
  * ```typescript
20
20
  * await base44.integrations.Core.InvokeLLM({
21
21
  * prompt: 'Explain quantum computing',
22
- * model: 'gpt-4'
22
+ * model: 'gpt_5'
23
23
  * });
24
24
  * ```
25
25
  *
@@ -41,6 +41,11 @@ export type IntegrationPackage = {
41
41
  export interface InvokeLLMParams {
42
42
  /** The prompt text to send to the model */
43
43
  prompt: string;
44
+ /** Optionally specify a model to override the app-level model setting for this specific call.
45
+ *
46
+ * Options: `"gpt_5_mini"`, `"gemini_3_flash"`, `"gpt_5"`, `"gemini_3_pro"`, `"claude_sonnet_4_6"`, `"claude_opus_4_6"`
47
+ */
48
+ model?: 'gpt_5_mini' | 'gemini_3_flash' | 'gpt_5' | 'gemini_3_pro' | 'claude_sonnet_4_6' | 'claude_opus_4_6';
44
49
  /** If set to `true`, the LLM will use Google Search, Maps, and News to gather real-time context before answering.
45
50
  * @default false
46
51
  */
@@ -362,7 +367,7 @@ export type IntegrationsModule = {
362
367
  * ```typescript
363
368
  * const response = await base44.integrations.Core.InvokeLLM({
364
369
  * prompt: 'Explain quantum computing',
365
- * model: 'gpt-4'
370
+ * model: 'gpt_5'
366
371
  * });
367
372
  * ```
368
373
  */
@@ -391,7 +396,7 @@ export type IntegrationsModule = {
391
396
  * ```typescript
392
397
  * const response = await base44.integrations.Core.InvokeLLM({
393
398
  * prompt: 'Explain quantum computing',
394
- * model: 'gpt-4'
399
+ * model: 'gpt_5'
395
400
  * });
396
401
  * ```
397
402
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.20-pr.136.f19f6e0",
3
+ "version": "0.8.20-pr.137.2242f71",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",