@base44-preview/sdk 0.8.23-pr.152.92acbf4 → 0.8.23-pr.154.5b2229d

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.
@@ -65,6 +65,16 @@ export function createAgentsModule({ axios, getSocket, appId, serverUrl, token,
65
65
  return baseUrl;
66
66
  }
67
67
  };
68
+ const getTelegramConnectURL = (agentName) => {
69
+ const baseUrl = `${serverUrl}/api/apps/${appId}/agents/${encodeURIComponent(agentName)}/telegram`;
70
+ const accessToken = token !== null && token !== void 0 ? token : getAccessToken();
71
+ if (accessToken) {
72
+ return `${baseUrl}?token=${accessToken}`;
73
+ }
74
+ else {
75
+ return baseUrl;
76
+ }
77
+ };
68
78
  return {
69
79
  getConversations,
70
80
  getConversation,
@@ -73,5 +83,6 @@ export function createAgentsModule({ axios, getSocket, appId, serverUrl, token,
73
83
  addMessage,
74
84
  subscribeToConversation,
75
85
  getWhatsAppConnectURL,
86
+ getTelegramConnectURL,
76
87
  };
77
88
  }
@@ -374,4 +374,24 @@ export interface AgentsModule {
374
374
  * ```
375
375
  */
376
376
  getWhatsAppConnectURL(agentName: AgentName): string;
377
+ /**
378
+ * Gets Telegram connection URL for an agent.
379
+ *
380
+ * Generates a URL that users can use to connect with the agent through Telegram.
381
+ * The URL includes authentication if a token is available. When the user opens
382
+ * this URL, they are redirected to the agent's Telegram bot with an activation
383
+ * code that securely links their account.
384
+ *
385
+ * @param agentName - The name of the agent.
386
+ * @returns Telegram connection URL.
387
+ *
388
+ * @example
389
+ * ```typescript
390
+ * // Get Telegram connection URL
391
+ * const telegramUrl = base44.agents.getTelegramConnectURL('support-agent');
392
+ * console.log(`Connect through Telegram: ${telegramUrl}`);
393
+ * // User can open this URL to start a Telegram conversation
394
+ * ```
395
+ */
396
+ getTelegramConnectURL(agentName: AgentName): string;
377
397
  }
@@ -175,13 +175,8 @@ export interface CoreIntegrations {
175
175
  /**
176
176
  * Create AI-generated images from text prompts.
177
177
  *
178
- * Images are generated as PNG files at approximately 1024px on the shorter side. The
179
- * exact dimensions vary by aspect ratio.
180
- *
181
- * Prompts that violate the AI provider's content policy will be refused.
182
- *
183
178
  * @param params - Parameters for image generation
184
- * @returns Promise resolving to an object containing the URL of the generated PNG image.
179
+ * @returns Promise resolving to the generated image URL.
185
180
  *
186
181
  * @example
187
182
  * ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.23-pr.152.92acbf4",
3
+ "version": "0.8.23-pr.154.5b2229d",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",