@base44-preview/sdk 0.8.17-pr.49.b78ce52 → 0.8.17-pr.70.d92fc2a

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.
@@ -72,7 +72,7 @@ export interface AgentMessageMetadata {
72
72
  export interface AgentConversation {
73
73
  /** Unique identifier for the conversation. */
74
74
  id: string;
75
- /** Application ID. */
75
+ /** App ID. */
76
76
  app_id: string;
77
77
  /** Name of the agent in this conversation. */
78
78
  agent_name: string;
@@ -140,7 +140,7 @@ export interface AgentsModuleConfig {
140
140
  axios: AxiosInstance;
141
141
  /** Function to get WebSocket instance for real-time updates (lazy initialization) */
142
142
  getSocket: () => ReturnType<typeof RoomsSocket>;
143
- /** Application ID */
143
+ /** App ID */
144
144
  appId: string;
145
145
  /** Server URL */
146
146
  serverUrl?: string;
@@ -34,16 +34,6 @@ export function createAuthModule(axios, functionsAxiosClient, appId, options) {
34
34
  // Redirect to the login page
35
35
  window.location.href = loginUrl;
36
36
  },
37
- // Redirects the user to a provider's login page
38
- loginWithProvider(provider, fromUrl = "/") {
39
- // Build the full redirect URL
40
- const redirectUrl = new URL(fromUrl, window.location.origin).toString();
41
- // Build the provider login URL (google is the default, so no provider path needed)
42
- const providerPath = provider === "google" ? "" : `/${provider}`;
43
- const loginUrl = `${options.serverUrl}/api/apps/auth${providerPath}/login?app_id=${appId}&from_url=${encodeURIComponent(redirectUrl)}`;
44
- // Redirect to the provider login page
45
- window.location.href = loginUrl;
46
- },
47
37
  // Logout the current user
48
38
  // Removes the token from localStorage and optionally redirects to a URL or reloads the page
49
39
  logout(redirectUrl) {
@@ -171,27 +171,6 @@ export interface AuthModule {
171
171
  * ```
172
172
  */
173
173
  redirectToLogin(nextUrl: string): void;
174
- /**
175
- * Redirects the user to a third-party authentication provider's login page.
176
- *
177
- * Initiates OAuth/SSO login flow with providers like Google, Microsoft, etc. Requires a browser environment and can't be used in the backend.
178
- *
179
- * @param provider - Name of the supported authentication provider (e.g., 'google', 'microsoft').
180
- * @param fromUrl - URL to redirect to after successful authentication. Defaults to '/'.
181
- *
182
- * @example
183
- * ```typescript
184
- * // Login with Google and return to current page
185
- * base44.auth.loginWithProvider('google', window.location.pathname);
186
- * ```
187
- *
188
- * @example
189
- * ```typescript
190
- * // Login with GitHub and redirect to dashboard
191
- * base44.auth.loginWithProvider('microsoft', '/dashboard');
192
- * ```
193
- */
194
- loginWithProvider(provider: string, fromUrl?: string): void;
195
174
  /**
196
175
  * Logs out the current user.
197
176
  *
@@ -11,9 +11,7 @@ export interface ConnectorAccessTokenResponse {
11
11
  /**
12
12
  * Connectors module for managing OAuth tokens for external services.
13
13
  *
14
- * This module allows you to retrieve OAuth access tokens for external services
15
- * that the app has connected to. Use these tokens to make API
16
- * calls to external services.
14
+ * 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.
17
15
  *
18
16
  * Unlike the integrations module that provides pre-built functions, connectors give you
19
17
  * raw OAuth tokens so you can call external service APIs directly with full control over
@@ -26,9 +24,9 @@ export interface ConnectorsModule {
26
24
  /**
27
25
  * Retrieves an OAuth access token for a specific external integration type.
28
26
  *
29
- * Returns the OAuth token string for an external service that the app
30
- * has connected to. You can then use this token to make authenticated API calls
31
- * to that external service.
27
+ * Returns the OAuth token string for an external service that an app builder
28
+ * has connected to. This token represents the connected app builder's account
29
+ * and can be used to make authenticated API calls to that external service on behalf of the app.
32
30
  *
33
31
  * @param integrationType - The type of integration, such as `'googlecalendar'`, `'slack'`, or `'github'`.
34
32
  * @returns Promise resolving to the access token string.
@@ -14,11 +14,6 @@ export interface CustomIntegrationCallParams {
14
14
  * Query string parameters to append to the URL.
15
15
  */
16
16
  queryParams?: Record<string, any>;
17
- /**
18
- * Additional headers to send with this specific request.
19
- * These are merged with the integration's configured headers.
20
- */
21
- headers?: Record<string, string>;
22
17
  }
23
18
  /**
24
19
  * Response from a custom integration call.
@@ -52,18 +47,17 @@ export interface CustomIntegrationCallResponse {
52
47
  *
53
48
  * @example
54
49
  * ```typescript
55
- * // Call a custom GitHub integration
50
+ * // Call a custom CRM integration
56
51
  * const response = await base44.integrations.custom.call(
57
- * "github", // integration slug (defined by workspace admin)
58
- * "listIssues", // operation ID from the OpenAPI spec
52
+ * "my-crm", // integration slug (defined by workspace admin)
53
+ * "get:/contacts", // endpoint: method:path format
59
54
  * {
60
- * pathParams: { owner: "myorg", repo: "myrepo" },
61
- * queryParams: { state: "open", per_page: 100 }
55
+ * queryParams: { limit: 10 }
62
56
  * }
63
57
  * );
64
58
  *
65
59
  * if (response.success) {
66
- * console.log("Issues:", response.data);
60
+ * console.log("Contacts:", response.data);
67
61
  * } else {
68
62
  * console.error("API returned error:", response.status_code);
69
63
  * }
@@ -71,10 +65,10 @@ export interface CustomIntegrationCallResponse {
71
65
  *
72
66
  * @example
73
67
  * ```typescript
74
- * // Call with request body payload
68
+ * // Call with path params and request body payload
75
69
  * const response = await base44.integrations.custom.call(
76
70
  * "github",
77
- * "createIssue",
71
+ * "post:/repos/{owner}/{repo}/issues",
78
72
  * {
79
73
  * pathParams: { owner: "myorg", repo: "myrepo" },
80
74
  * payload: {
@@ -90,9 +84,9 @@ export interface CustomIntegrationsModule {
90
84
  /**
91
85
  * Call a custom integration endpoint.
92
86
  *
93
- * @param slug - The integration's unique identifier (slug), as defined by the workspace admin.
94
- * @param operationId - The operation ID from the OpenAPI spec (e.g., "listIssues", "getUser").
95
- * @param params - Optional parameters including payload, pathParams, queryParams, and headers.
87
+ * @param slug - The integration's unique identifier, as defined by the workspace admin.
88
+ * @param operationId - The endpoint in `method:path` format. For example, `"get:/contacts"`, or `"post:/users/{id}"`. The method is the HTTP verb in lowercase and the path matches the OpenAPI specification.
89
+ * @param params - Optional parameters including payload, pathParams, and queryParams.
96
90
  * @returns Promise resolving to the integration call response.
97
91
  *
98
92
  * @throws {Error} If slug is not provided.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.17-pr.49.b78ce52",
3
+ "version": "0.8.17-pr.70.d92fc2a",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",