@base44-preview/sdk 0.8.32-pr.196.8c75df2 → 0.8.32-pr.198.5317b98

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.
@@ -80,11 +80,13 @@ export interface AppUserConnectorConnectionResponse {
80
80
  * | Calendly | `calendly` |
81
81
  * | ClickUp | `clickup` |
82
82
  * | Contentful | `contentful` |
83
+ * | Databricks | `databricks` |
83
84
  * | Discord | `discord` |
84
85
  * | Dropbox | `dropbox` |
85
86
  * | GitHub | `github` |
86
87
  * | GitLab | `gitlab` |
87
88
  * | Gmail | `gmail` |
89
+ * | Google Ads | `googleads` |
88
90
  * | Google Analytics | `google_analytics` |
89
91
  * | Google BigQuery | `googlebigquery` |
90
92
  * | Google Calendar | `googlecalendar` |
@@ -105,10 +107,12 @@ export interface AppUserConnectorConnectionResponse {
105
107
  * | Microsoft OneDrive | `one_drive` |
106
108
  * | Notion | `notion` |
107
109
  * | Outlook | `outlook` |
110
+ * | QuickBooks | `quickbooks` |
108
111
  * | Salesforce | `salesforce` |
109
112
  * | SharePoint | `share_point` |
110
113
  * | Slack User | `slack` |
111
114
  * | Slack Bot | `slackbot` |
115
+ * | Snowflake | `snowflake` |
112
116
  * | Splitwise | `splitwise` |
113
117
  * | Supabase | `supabase` |
114
118
  * | TikTok | `tiktok` |
@@ -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"`, `"gpt_5_4"`, `"gpt_5_5"`, `"gemini_3_1_pro"`, `"claude_sonnet_4_6"`, `"claude_opus_4_6"`, `"claude_opus_4_7"`
46
+ * Options: `"gpt_5_mini"`, `"gemini_3_flash"`, `"gpt_5_4"`, `"gpt_5_5"`, `"gemini_3_1_pro"`, `"claude_sonnet_4_6"`, `"claude_opus_4_6"`, `"claude_opus_4_7"`, `"claude_opus_4_8"`
47
47
  */
48
- model?: 'gpt_5_mini' | 'gemini_3_flash' | 'gpt_5' | 'gpt_5_4' | 'gpt_5_5' | 'gemini_3_1_pro' | 'claude_sonnet_4_6' | 'claude_opus_4_6' | 'claude_opus_4_7';
48
+ model?: 'gpt_5_mini' | 'gemini_3_flash' | 'gpt_5_4' | 'gpt_5_5' | 'gemini_3_1_pro' | 'claude_sonnet_4_6' | 'claude_opus_4_6' | 'claude_opus_4_7' | 'claude_opus_4_8';
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
  */
@@ -1,6 +1,7 @@
1
1
  import axios from "axios";
2
2
  import { isInIFrame } from "./common.js";
3
3
  import { v4 as uuidv4 } from "uuid";
4
+ import { getAnalyticsSessionId } from "../modules/analytics.js";
4
5
  /**
5
6
  * Custom error class for Base44 SDK errors.
6
7
  *
@@ -131,6 +132,16 @@ export function createAxiosClient({ baseURL, headers = {}, token, interceptRespo
131
132
  client.interceptors.request.use((config) => {
132
133
  if (typeof window !== "undefined") {
133
134
  config.headers.set("X-Origin-URL", window.location.href);
135
+ // On unauthenticated clients, attach a stable anonymous visitor id so the
136
+ // backend can support anonymous agent access (conversation grouping +
137
+ // ownership). Authenticated clients are identified by their token instead.
138
+ // Reuses the persisted analytics session id so an anonymous agent
139
+ // conversation and that visitor's analytics events share one identity.
140
+ // (Hardening this id to crypto-strength + decoupling from analytics is a
141
+ // tracked follow-up.)
142
+ if (!token) {
143
+ config.headers.set("X-Base44-Anonymous-Id", getAnalyticsSessionId());
144
+ }
134
145
  }
135
146
  const requestId = uuidv4();
136
147
  config.requestId = requestId;
@@ -1,15 +1,25 @@
1
1
  import { io } from "socket.io-client";
2
2
  import { getAccessToken } from "./auth-utils.js";
3
+ import { getAnalyticsSessionId } from "../modules/analytics.js";
3
4
  const ROOM_LEAVE_GRACE_MS = 250;
4
5
  function initializeSocket(config, handlers) {
5
6
  var _a;
7
+ // On unauthenticated clients, send a stable anonymous visitor id on the
8
+ // handshake so the backend can verify room access for anonymous agent
9
+ // conversations (mirrors the X-Base44-Anonymous-Id HTTP header). Authenticated
10
+ // clients are identified by their token instead.
11
+ const resolvedToken = (_a = config.token) !== null && _a !== void 0 ? _a : getAccessToken();
12
+ const query = {
13
+ app_id: config.appId,
14
+ token: resolvedToken,
15
+ };
16
+ if (!resolvedToken) {
17
+ query.anonymous_id = getAnalyticsSessionId();
18
+ }
6
19
  const socket = io(config.serverUrl, {
7
20
  path: config.mountPath,
8
21
  transports: config.transports,
9
- query: {
10
- app_id: config.appId,
11
- token: (_a = config.token) !== null && _a !== void 0 ? _a : getAccessToken(),
12
- },
22
+ query,
13
23
  });
14
24
  socket.on("connect", async () => {
15
25
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.32-pr.196.8c75df2",
3
+ "version": "0.8.32-pr.198.5317b98",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",