@cometchat/chat-sdk-javascript 4.1.10 → 4.1.11

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.
package/CometChat.d.ts CHANGED
@@ -755,6 +755,7 @@ export class CometChat {
755
755
  KEY_APP_ID: string;
756
756
  KEY_DEVICE_ID: string;
757
757
  KEY_SESSION_ID: string;
758
+ KEY_INTEGRATION_SOURCE: string;
758
759
  KEY_MESSAGE_LISTENER_LIST: string;
759
760
  };
760
761
  static SDKHeader: {
@@ -1321,6 +1322,16 @@ export class CometChat {
1321
1322
  * @memberof CometChat
1322
1323
  */
1323
1324
  static init(appId: any, appSettings: AppSettings): Promise<boolean>;
1325
+ /**
1326
+ * Initialize CometChat from a cometchat-settings.json object.
1327
+ * Used by AI agent skills for file-based integration.
1328
+ * Persists integrationSource = "ai-agent" for telemetry attribution.
1329
+ * @internal
1330
+ * @param {CometChatSettings} settings - Parsed cometchat-settings.json object
1331
+ * @returns {Promise<boolean>}
1332
+ * @memberof CometChat
1333
+ */
1334
+ static initFromSettings(settings: CometChatSettings): Promise<boolean>;
1324
1335
  /**
1325
1336
  * Function to check whether CometChat class initialized before.
1326
1337
  * @returns {boolean}
@@ -2358,6 +2369,35 @@ export class CometChatNotifications {
2358
2369
  } | string>;
2359
2370
  }
2360
2371
 
2372
+ /**
2373
+ * Interface representing the shape of the `cometchat-settings.json` file.
2374
+ * Used by the file-based init overload for skills-driven integrations.
2375
+ *
2376
+ * The Chat SDK reads `appId`, `region`, and `chatSDK` fields.
2377
+ * The `credentials`, `callsSDK`, and `uiKit` fields are reserved for other layers.
2378
+ *
2379
+ * @internal
2380
+ * @module CometChatSettings
2381
+ */
2382
+ export interface CometChatSettings {
2383
+ appId: string;
2384
+ region: string;
2385
+ credentials?: {
2386
+ authKey?: string;
2387
+ };
2388
+ chatSDK?: {
2389
+ presenceSubscription?: {
2390
+ type?: string;
2391
+ roles?: string[];
2392
+ };
2393
+ autoEstablishSocketConnection?: boolean;
2394
+ adminHost?: string | null;
2395
+ clientHost?: string | null;
2396
+ };
2397
+ callsSDK?: Record<string, unknown>;
2398
+ uiKit?: Record<string, unknown>;
2399
+ }
2400
+
2361
2401
  /**
2362
2402
  *
2363
2403
  * @module CometChatException
@@ -3161,8 +3201,13 @@ export const LOCAL_STORE: {
3161
3201
  KEY_APP_ID: string;
3162
3202
  KEY_DEVICE_ID: string;
3163
3203
  KEY_SESSION_ID: string;
3204
+ KEY_INTEGRATION_SOURCE: string;
3164
3205
  KEY_MESSAGE_LISTENER_LIST: string;
3165
3206
  };
3207
+ export const INTEGRATION_SOURCE: {
3208
+ AI_AGENT: string;
3209
+ MANUAL: string;
3210
+ };
3166
3211
  export const ResponseConstants: {
3167
3212
  RESPONSE_KEYS: {
3168
3213
  KEY_DATA: string;
@@ -7433,6 +7478,10 @@ export class InteractiveMessage extends BaseMessage implements Message {
7433
7478
  GROUP: string;
7434
7479
  };
7435
7480
  /** @private */ static readonly CATEGORY: {
7481
+ /**
7482
+ * Method to set interaction goal of interactive message.
7483
+ * @param {InteractionGoal} interactionGoal
7484
+ */
7436
7485
  MESSAGE: string;
7437
7486
  ACTION: string;
7438
7487
  CALL: string;
@@ -7440,12 +7489,7 @@ export class InteractiveMessage extends BaseMessage implements Message {
7440
7489
  INTERACTIVE: string;
7441
7490
  AGENTIC: string;
7442
7491
  };
7443
- private interactiveData;
7444
- private interactionGoal;
7445
7492
  protected data?: Object;
7446
- private interactions?;
7447
- private tags?;
7448
- private allowSenderInteraction?;
7449
7493
  constructor(...args: any[]);
7450
7494
  /**
7451
7495
  * Method to get sender of the message.