@base44-preview/sdk 0.8.18-pr.79.302a71f → 0.8.18-pr.80.7c5f728

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.
@@ -74,20 +74,23 @@ export interface CreateClientConfig {
74
74
  * Provides access to all SDK modules for interacting with the app.
75
75
  */
76
76
  export interface Base44Client {
77
- /** {@link AgentsModule | Agents module} for managing AI agent conversations. */
78
- agents: AgentsModule;
79
- /** {@link AnalyticsModule | Analytics module} for tracking custom events in your app. */
80
- analytics: AnalyticsModule;
81
- /** {@link AppLogsModule | App logs module} for tracking app usage. */
82
- appLogs: AppLogsModule;
83
- /** {@link AuthModule | Auth module} for user authentication and management. */
84
- auth: AuthModule;
85
77
  /** {@link EntitiesModule | Entities module} for CRUD operations on your data models. */
86
78
  entities: EntitiesModule;
87
- /** {@link FunctionsModule | Functions module} for invoking custom backend functions. */
88
- functions: FunctionsModule;
89
79
  /** {@link IntegrationsModule | Integrations module} for calling pre-built integration endpoints. */
90
80
  integrations: IntegrationsModule;
81
+ /** {@link AuthModule | Auth module} for user authentication and management. */
82
+ auth: AuthModule;
83
+ /** {@link FunctionsModule | Functions module} for invoking custom backend functions. */
84
+ functions: FunctionsModule;
85
+ /** {@link AgentsModule | Agents module} for managing AI agent conversations. */
86
+ agents: AgentsModule;
87
+ /** {@link AppLogsModule | App logs module} for tracking app usage. */
88
+ appLogs: AppLogsModule;
89
+ /**
90
+ * Analytics module for tracking app usage.
91
+ * @internal
92
+ */
93
+ analytics: AnalyticsModule;
91
94
  /** Cleanup function to disconnect WebSocket connections. Call when you're done with the client. */
92
95
  cleanup: () => void;
93
96
  /**
@@ -115,22 +118,22 @@ export interface Base44Client {
115
118
  * @throws {Error} When accessed without providing a serviceToken during client creation
116
119
  */
117
120
  readonly asServiceRole: {
118
- /** {@link AgentsModule | Agents module} with elevated permissions. */
119
- agents: AgentsModule;
120
- /** {@link AppLogsModule | App logs module} with elevated permissions. */
121
- appLogs: AppLogsModule;
122
- /** {@link ConnectorsModule | Connectors module} for OAuth token retrieval. */
123
- connectors: ConnectorsModule;
124
121
  /** {@link EntitiesModule | Entities module} with elevated permissions. */
125
122
  entities: EntitiesModule;
126
- /** {@link FunctionsModule | Functions module} with elevated permissions. */
127
- functions: FunctionsModule;
128
123
  /** {@link IntegrationsModule | Integrations module} with elevated permissions. */
129
124
  integrations: IntegrationsModule;
130
125
  /** {@link SsoModule | SSO module} for generating SSO tokens.
131
126
  * @internal
132
127
  */
133
128
  sso: SsoModule;
129
+ /** {@link ConnectorsModule | Connectors module} for OAuth token retrieval. */
130
+ connectors: ConnectorsModule;
131
+ /** {@link FunctionsModule | Functions module} with elevated permissions. */
132
+ functions: FunctionsModule;
133
+ /** {@link AgentsModule | Agents module} with elevated permissions. */
134
+ agents: AgentsModule;
135
+ /** {@link AppLogsModule | App logs module} with elevated permissions. */
136
+ appLogs: AppLogsModule;
134
137
  /** Cleanup function to disconnect WebSocket connections. */
135
138
  cleanup: () => void;
136
139
  };
@@ -1,38 +1,8 @@
1
- /**
2
- * Properties for analytics events.
3
- *
4
- * Key-value pairs with additional event data. Values can be strings, numbers, booleans, or null.
5
- */
6
1
  export type TrackEventProperties = {
7
2
  [key: string]: string | number | boolean | null | undefined;
8
3
  };
9
- /**
10
- * Parameters for tracking an analytics event.
11
- */
12
4
  export type TrackEventParams = {
13
- /**
14
- * Name of the event to track.
15
- *
16
- * Use descriptive names like `button_click`, `form_submit`, or `purchase_completed`.
17
- */
18
5
  eventName: string;
19
- /**
20
- * Optional key-value pairs with additional event data.
21
- *
22
- * Values can be strings, numbers, booleans, or null.
23
- *
24
- * @example
25
- * ```typescript
26
- * base44.analytics.track({
27
- * eventName: 'add_to_cart',
28
- * properties: {
29
- * product_id: 'prod_123',
30
- * price: 29.99,
31
- * quantity: 2
32
- * }
33
- * });
34
- * ```
35
- */
36
6
  properties?: TrackEventProperties;
37
7
  };
38
8
  export type TrackEventIntrinsicData = {
@@ -67,63 +37,6 @@ export type AnalyticsModuleOptions = {
67
37
  batchSize?: number;
68
38
  heartBeatInterval?: number;
69
39
  };
70
- /**
71
- * Analytics module for tracking custom events in your app.
72
- *
73
- * Use this module to track specific user actions that appear as custom event cards in your [Analytics dashboard](/documentation/performance-and-seo/app-analytics). Track things like button clicks, form submissions, purchases, and feature usage.
74
- *
75
- * Choose clear, descriptive event names in snake_case like `signup_button_click` or `purchase_completed` rather than generic names like `click`. Include relevant context in your properties such as identifiers like `product_id`, measurements like `price`, and flags like `is_first_purchase`.
76
- *
77
- * This module is only available in user authentication mode (`base44.analytics`).
78
- *
79
- * ## Built-in vs Custom Analytics
80
- *
81
- * Your Analytics dashboard shows two types of data:
82
- *
83
- * **Built-in metrics:**
84
- * - Total visits, unique visitors, visit duration, and live visitors.
85
- * - Breakdown cards for country, device, operating system, and referrer.
86
- *
87
- * These begin tracking automatically when {@linkcode createClient | createClient()} is called and continue tracking until the client is cleaned up.
88
- *
89
- * **Custom events:**
90
- * - Each event you track with `track()` appears as its own card in the dashboard.
91
- * - Use these to measure specific actions that matter to your app.
92
- *
93
- * These are tracked when you call the `track()` method.
94
- */
95
- export interface AnalyticsModule {
96
- /**
97
- * Tracks a custom event that appears as a card in your Analytics dashboard.
98
- *
99
- * Each unique event name becomes its own card showing total count and trends over time. This method returns immediately and events are sent in batches in the background.
100
- *
101
- * @param params - Event parameters.
102
- * @param params.eventName - Name of the event. This becomes the card title in your dashboard. Use descriptive names like `'signup_button_click'` or `'purchase_completed'`.
103
- * @param params.properties - Optional data to attach to the event. You can filter and analyze events by these properties in the dashboard.
104
- *
105
- * @example Track a button click
106
- * ```typescript
107
- * // Track a button click
108
- * base44.analytics.track({
109
- * eventName: 'signup_button_click'
110
- * });
111
- * ```
112
- *
113
- * @example Track with properties
114
- * ```typescript
115
- * // Track with properties
116
- * base44.analytics.track({
117
- * eventName: 'add_to_cart',
118
- * properties: {
119
- * product_id: 'prod_123',
120
- * product_name: 'Premium Widget',
121
- * price: 29.99,
122
- * quantity: 2,
123
- * is_first_purchase: true
124
- * }
125
- * });
126
- * ```
127
- */
128
- track(params: TrackEventParams): void;
129
- }
40
+ export type AnalyticsModule = {
41
+ track: (params: TrackEventParams) => void;
42
+ };
@@ -54,8 +54,8 @@ export interface CustomIntegrationCallResponse {
54
54
  * ```typescript
55
55
  * // Call a custom GitHub integration
56
56
  * const response = await base44.integrations.custom.call(
57
- * "github", // integration slug (defined by workspace admin)
58
- * "listIssues", // operation ID from the OpenAPI spec
57
+ * "github", // integration slug (defined by workspace admin)
58
+ * "get:/repos/{owner}/{repo}/issues", // endpoint in method:path format
59
59
  * {
60
60
  * pathParams: { owner: "myorg", repo: "myrepo" },
61
61
  * queryParams: { state: "open", per_page: 100 }
@@ -74,7 +74,7 @@ export interface CustomIntegrationCallResponse {
74
74
  * // Call with request body payload
75
75
  * const response = await base44.integrations.custom.call(
76
76
  * "github",
77
- * "createIssue",
77
+ * "post:/repos/{owner}/{repo}/issues",
78
78
  * {
79
79
  * pathParams: { owner: "myorg", repo: "myrepo" },
80
80
  * payload: {
@@ -91,7 +91,7 @@ export interface CustomIntegrationsModule {
91
91
  * Call a custom integration endpoint.
92
92
  *
93
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").
94
+ * @param operationId - The endpoint identifier in method:path format (e.g., "get:/repos/{owner}/{repo}/issues", "get:/users/{username}").
95
95
  * @param params - Optional parameters including payload, pathParams, queryParams, and headers.
96
96
  * @returns Promise resolving to the integration call response.
97
97
  *
@@ -351,8 +351,8 @@ export type IntegrationsModule = {
351
351
  * @example
352
352
  * ```typescript
353
353
  * const response = await base44.integrations.custom.call(
354
- * "github", // integration slug
355
- * "listIssues", // operation ID
354
+ * "github", // integration slug
355
+ * "get:/repos/{owner}/{repo}/issues", // endpoint in method:path format
356
356
  * {
357
357
  * pathParams: { owner: "myorg", repo: "myrepo" },
358
358
  * queryParams: { state: "open" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.18-pr.79.302a71f",
3
+ "version": "0.8.18-pr.80.7c5f728",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",