@cometchat/chat-sdk-javascript 4.0.14 → 4.1.1

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
@@ -12,6 +12,27 @@
12
12
  export as namespace CometChatNotifications;
13
13
 
14
14
  export class CometChat {
15
+ static AIAssistantBaseEvent: typeof AIAssistantBaseEvent;
16
+ static AIAssistantRunStartedEvent: typeof AIAssistantRunStartedEvent;
17
+ static AIAssistantRunFinishedEvent: typeof AIAssistantRunFinishedEvent;
18
+ static AIAssistantMessageStartedEvent: typeof AIAssistantMessageStartedEvent;
19
+ static AIAssistantMessageEndedEvent: typeof AIAssistantMessageEndedEvent;
20
+ static AIAssistantContentReceivedEvent: typeof AIAssistantContentReceivedEvent;
21
+ static AIAssistantToolStartedEvent: typeof AIAssistantToolStartedEvent;
22
+ static AIAssistantToolEndedEvent: typeof AIAssistantToolEndedEvent;
23
+ static AIAssistantToolArgumentEvent: typeof AIAssistantToolArgumentEvent;
24
+ static AIAssistantToolResultEvent: typeof AIAssistantToolResultEvent;
25
+ static AI_ASSISTANT_EVENTS: {
26
+ RUN_STARTED: string;
27
+ RUN_FINISHED: string;
28
+ TEXT_MESSAGE_START: string;
29
+ TEXT_MESSAGE_END: string;
30
+ TEXT_MESSAGE_CONTENT: string;
31
+ TOOL_CALL_STARTED: string;
32
+ TOOL_CALL_ENDED: string;
33
+ TOOL_CALL_RESULT: string;
34
+ TOOL_CALL_ARGUMENT: string;
35
+ };
15
36
  static GroupType: typeof GroupType;
16
37
  static GroupMemberScope: typeof GroupMemberScope;
17
38
  static ResponseConstants: {
@@ -305,6 +326,9 @@ export class CometChat {
305
326
  AUDIO: string;
306
327
  FILE: string;
307
328
  CUSTOM: string;
329
+ ASSISTANT: string;
330
+ TOOL_RESULT: string;
331
+ TOOL_ARGUMENTS: string;
308
332
  };
309
333
  CATEGORY: {
310
334
  MESSAGE: string;
@@ -312,6 +336,7 @@ export class CometChat {
312
336
  CALL: string;
313
337
  CUSTOM: string;
314
338
  INTERACTIVE: string;
339
+ AGENTIC: string;
315
340
  };
316
341
  RECEIVER_TYPE: {
317
342
  USER: string;
@@ -348,6 +373,15 @@ export class CometChat {
348
373
  ELEMENT_ID: string;
349
374
  INTERACTED_AT: string;
350
375
  ELEMENT_IDS: string;
376
+ RUN_ID: string;
377
+ THREAD_ID: string;
378
+ TOOL_CALLS: string;
379
+ FUNCTION: string;
380
+ NAME: string;
381
+ ARGUMENTS: string;
382
+ TOOL_CALL_ID: string;
383
+ DISPLAY_NAME: string;
384
+ EXECUTION_TEXT: string;
351
385
  };
352
386
  KNOWN_MEDIA_TYPE: {
353
387
  IMAGE: any[];
@@ -398,6 +432,7 @@ export class CometChat {
398
432
  HAS_REACTIONS: string;
399
433
  MENTIONED_UIDS: string;
400
434
  ATTACHMENT_TYPES: string;
435
+ WITH_PARENT: string;
401
436
  };
402
437
  };
403
438
  };
@@ -982,6 +1017,7 @@ export class CometChat {
982
1017
  };
983
1018
  static GoalType: typeof GoalType;
984
1019
  static AttachmentType: typeof AttachmentType;
1020
+ static ModerationStatus: typeof ModerationStatus;
985
1021
  static CometChatException: typeof CometChatException;
986
1022
  static TextMessage: typeof TextMessage;
987
1023
  static MediaMessage: typeof MediaMessage;
@@ -996,6 +1032,14 @@ export class CometChat {
996
1032
  static Interaction: typeof Interaction;
997
1033
  static InteractionReceipt: typeof InteractionReceipt;
998
1034
  static MessageReceipt: typeof MessageReceipt;
1035
+ static AIAssistantMessage: typeof AIAssistantMessage;
1036
+ static AIToolCall: typeof AIToolCall;
1037
+ static AIToolCallFunction: typeof AIToolCallFunction;
1038
+ static AIAssistantMessageData: typeof AIAssistantMessageData;
1039
+ static AIToolResultMessage: typeof AIToolResultMessage;
1040
+ static AIToolResultMessageData: typeof AIToolResultMessageData;
1041
+ static AIToolArgumentMessage: typeof AIToolArgumentMessage;
1042
+ static AIToolArgumentMessageData: typeof AIToolArgumentMessageData;
999
1043
  static Group: typeof Group;
1000
1044
  static User: typeof User;
1001
1045
  static GroupMember: typeof GroupMember;
@@ -1037,6 +1081,7 @@ export class CometChat {
1037
1081
  static CallListener: typeof CallListener;
1038
1082
  static ConnectionListener: typeof ConnectionListener;
1039
1083
  static LoginListener: typeof LoginListener;
1084
+ static AIAssistantListener: typeof AIAssistantListener;
1040
1085
  static CallController: typeof CallController;
1041
1086
  static CometChatHelper: typeof CometChatHelper;
1042
1087
  static Attachment: typeof Attachment;
@@ -1049,6 +1094,9 @@ export class CometChat {
1049
1094
  AUDIO: string;
1050
1095
  FILE: string;
1051
1096
  CUSTOM: string;
1097
+ ASSISTANT: string;
1098
+ TOOL_RESULT: string;
1099
+ TOOL_ARGUMENTS: string;
1052
1100
  };
1053
1101
  static CATEGORY_MESSAGE: string;
1054
1102
  static CATEGORY_ACTION: string;
@@ -1768,6 +1816,21 @@ export class CometChat {
1768
1816
  * @memberof CometChat
1769
1817
  */
1770
1818
  static removeCallListener(name: string): void;
1819
+ /**
1820
+ *
1821
+ * Function to add an AI Assistant Listener.
1822
+ * @param {string} name
1823
+ * @param {AIAssistantListener} aiAssistantListener
1824
+ * @memberof CometChat
1825
+ */
1826
+ static addAIAssistantListener(name: string, aiAssistantListener: AIAssistantListener): void;
1827
+ /**
1828
+ *
1829
+ * Function to remove an AI Assistant Listener.
1830
+ * @param {string} name
1831
+ * @memberof CometChat
1832
+ */
1833
+ static removeAIAssistantListener(name: string): void;
1771
1834
  /**
1772
1835
  *
1773
1836
  * Function to add a User Listener.
@@ -2312,6 +2375,9 @@ export class MediaMessage extends BaseMessage implements Message {
2312
2375
  AUDIO: string;
2313
2376
  FILE: string;
2314
2377
  CUSTOM: string;
2378
+ ASSISTANT: string;
2379
+ TOOL_RESULT: string;
2380
+ TOOL_ARGUMENTS: string;
2315
2381
  };
2316
2382
  /** @private */ static readonly RECEIVER_TYPE: {
2317
2383
  USER: string;
@@ -2323,6 +2389,7 @@ export class MediaMessage extends BaseMessage implements Message {
2323
2389
  CALL: string;
2324
2390
  CUSTOM: string;
2325
2391
  INTERACTIVE: string;
2392
+ AGENTIC: string;
2326
2393
  };
2327
2394
  private url;
2328
2395
  private file;
@@ -2407,6 +2474,13 @@ export class MediaMessage extends BaseMessage implements Message {
2407
2474
  * Set the tags for the message.
2408
2475
  */
2409
2476
  setTags(tags: Array<String>): void;
2477
+ /**
2478
+ * Gets the moderation status of the message.
2479
+ * @description If the message is not moderated, it returns "unmoderated".
2480
+ * If the message is moderated, it returns the status of the moderation.
2481
+ * @returns {ModerationStatus}
2482
+ */
2483
+ getModerationStatus(): ModerationStatus;
2410
2484
  }
2411
2485
 
2412
2486
  /**
@@ -2798,6 +2872,13 @@ export class TextMessage extends BaseMessage implements Message {
2798
2872
  * Set the tags for the message.
2799
2873
  */
2800
2874
  setTags(tags: Array<String>): void;
2875
+ /**
2876
+ * Gets the moderation status of the message.
2877
+ * @description If the message is not moderated, it returns "unmoderated".
2878
+ * If the message is moderated, it returns the status of the moderation.
2879
+ * @returns {ModerationStatus}
2880
+ */
2881
+ getModerationStatus(): ModerationStatus;
2801
2882
  }
2802
2883
 
2803
2884
  export const constants: {
@@ -2962,6 +3043,9 @@ export const MessageConstatnts: {
2962
3043
  AUDIO: string;
2963
3044
  FILE: string;
2964
3045
  CUSTOM: string;
3046
+ ASSISTANT: string;
3047
+ TOOL_RESULT: string;
3048
+ TOOL_ARGUMENTS: string;
2965
3049
  };
2966
3050
  CATEGORY: {
2967
3051
  MESSAGE: string;
@@ -2969,6 +3053,7 @@ export const MessageConstatnts: {
2969
3053
  CALL: string;
2970
3054
  CUSTOM: string;
2971
3055
  INTERACTIVE: string;
3056
+ AGENTIC: string;
2972
3057
  };
2973
3058
  RECEIVER_TYPE: {
2974
3059
  USER: string;
@@ -3005,6 +3090,15 @@ export const MessageConstatnts: {
3005
3090
  ELEMENT_ID: string;
3006
3091
  INTERACTED_AT: string;
3007
3092
  ELEMENT_IDS: string;
3093
+ RUN_ID: string;
3094
+ THREAD_ID: string;
3095
+ TOOL_CALLS: string;
3096
+ FUNCTION: string;
3097
+ NAME: string;
3098
+ ARGUMENTS: string;
3099
+ TOOL_CALL_ID: string;
3100
+ DISPLAY_NAME: string;
3101
+ EXECUTION_TEXT: string;
3008
3102
  };
3009
3103
  KNOWN_MEDIA_TYPE: {
3010
3104
  IMAGE: any[];
@@ -3055,6 +3149,7 @@ export const MessageConstatnts: {
3055
3149
  HAS_REACTIONS: string;
3056
3150
  MENTIONED_UIDS: string;
3057
3151
  ATTACHMENT_TYPES: string;
3152
+ WITH_PARENT: string;
3058
3153
  };
3059
3154
  };
3060
3155
  };
@@ -3072,7 +3167,8 @@ export enum MessageCategory {
3072
3167
  MESSAGE = "message",
3073
3168
  CALL = "call",
3074
3169
  CUSTOM = "custom",
3075
- INTERACTIVE = "interactive"
3170
+ INTERACTIVE = "interactive",
3171
+ AGENTIC = "agentic"
3076
3172
  }
3077
3173
  export enum GoalType {
3078
3174
  ANY_ACTION = "anyAction",
@@ -3856,6 +3952,23 @@ export enum AttachmentType {
3856
3952
  AUDIO = "audio",
3857
3953
  FILE = "file"
3858
3954
  }
3955
+ export enum ModerationStatus {
3956
+ PENDING = "pending",
3957
+ APPROVED = "approved",
3958
+ DISAPPROVED = "disapproved",
3959
+ UNMODERATED = "unmoderated"
3960
+ }
3961
+ export const AI_ASSISTANT_EVENTS: {
3962
+ RUN_STARTED: string;
3963
+ RUN_FINISHED: string;
3964
+ TEXT_MESSAGE_START: string;
3965
+ TEXT_MESSAGE_END: string;
3966
+ TEXT_MESSAGE_CONTENT: string;
3967
+ TOOL_CALL_STARTED: string;
3968
+ TOOL_CALL_ENDED: string;
3969
+ TOOL_CALL_RESULT: string;
3970
+ TOOL_CALL_ARGUMENT: string;
3971
+ };
3859
3972
 
3860
3973
  /**
3861
3974
  *
@@ -4119,174 +4232,198 @@ export class MessageListener {
4119
4232
  * This event is triggered when a message is read by all members in a group.
4120
4233
  */
4121
4234
  onMessagesReadByAll?: Function;
4235
+ /**
4236
+ * This event is triggered when a message is moderated.
4237
+ */
4238
+ onMessageModerated?: Function;
4239
+ /**
4240
+ * This event is triggered when an AI tool result is received.
4241
+ */
4242
+ onAIToolResultReceived?: Function;
4243
+ /**
4244
+ * This event is triggered when an AI tool argument is received.
4245
+ */
4246
+ onAIToolArgumentsReceived?: Function;
4247
+ /**
4248
+ * This event is triggered when an AI assistant message is received.
4249
+ */
4250
+ onAIAssistantMessageReceived?: Function;
4122
4251
  constructor(...args: any[]);
4123
4252
  }
4124
4253
  export class CallListener {
4125
4254
  /**
4126
4255
  * This event is triggered when an incoming call is received.
4127
- */
4256
+ */
4128
4257
  onIncomingCallReceived?: Function;
4129
4258
  /**
4130
4259
  * This event is triggered when an outgoing call is accepted.
4131
- */
4260
+ */
4132
4261
  onOutgoingCallAccepted?: Function;
4133
4262
  /**
4134
4263
  * This event is triggered when an outgoing call is rejected.
4135
- */
4264
+ */
4136
4265
  onOutgoingCallRejected?: Function;
4137
4266
  /**
4138
4267
  * This event is triggered when an incoming call is cancelled.
4139
- */
4268
+ */
4140
4269
  onIncomingCallCancelled?: Function;
4141
4270
  /**
4142
4271
  * This event is triggered when call is ended.
4143
- */
4272
+ */
4144
4273
  onCallEndedMessageReceived?: Function;
4145
4274
  constructor(...args: any[]);
4146
4275
  }
4276
+ export class AIAssistantListener {
4277
+ /**
4278
+ * This event is triggered when an AI assistant event is received.
4279
+ * @param event - The AI assistant event that was received
4280
+ */
4281
+ onAIAssistantEventReceived?: (event: AIAssistantBaseEvent) => void;
4282
+ constructor(...args: any[]);
4283
+ }
4147
4284
  export class UserListener {
4148
4285
  /**
4149
4286
  * This event is triggered when a user comes online.
4150
- */
4287
+ */
4151
4288
  onUserOnline?: Function;
4152
4289
  /**
4153
4290
  * This event is triggered when a user goes offline.
4154
- */
4291
+ */
4155
4292
  onUserOffline?: Function;
4156
4293
  constructor(...args: any[]);
4157
4294
  }
4158
4295
  export class GroupListener {
4159
4296
  /**
4160
4297
  * This event is triggered when a user joins a group.
4161
- */
4298
+ */
4162
4299
  onGroupMemberJoined?: Function;
4163
4300
  /**
4164
4301
  * This event is triggered when a group member leaves the group.
4165
- */
4302
+ */
4166
4303
  onGroupMemberLeft?: Function;
4167
4304
  /**
4168
4305
  * This event is triggered when a group member is kicked from the group.
4169
- */
4306
+ */
4170
4307
  onGroupMemberKicked?: Function;
4171
4308
  /**
4172
4309
  * This event is triggered when a group member is banned from the group.
4173
- */
4310
+ */
4174
4311
  onGroupMemberBanned?: Function;
4175
4312
  /**
4176
4313
  * This event is triggered when a group member is unbanned from the group.
4177
- */
4314
+ */
4178
4315
  onGroupMemberUnbanned?: Function;
4179
4316
  /**
4180
4317
  * This event is triggered when scope of a group member is changed.
4181
- */
4318
+ */
4182
4319
  onGroupMemberScopeChanged?: Function;
4183
4320
  /**
4184
4321
  * This event is triggered when a user is added in the group.
4185
- */
4322
+ */
4186
4323
  onGroupMemberAddedToGroup: Function;
4187
4324
  constructor(...args: any[]);
4188
4325
  }
4189
4326
  export class OngoingCallListener {
4190
4327
  /**
4191
4328
  * @internal
4192
- */
4329
+ */
4193
4330
  onYouLeft?: Function;
4194
4331
  /**
4195
4332
  * @internal
4196
- */
4333
+ */
4197
4334
  onYouJoined?: Function;
4198
4335
  /**
4199
4336
  * This event is triggered when a user joins the call.
4200
- */
4337
+ */
4201
4338
  onUserJoined?: Function;
4202
4339
  /**
4203
4340
  * This event is triggered when a user leaves the call.
4204
- */
4341
+ */
4205
4342
  onUserLeft?: Function;
4206
4343
  /**
4207
4344
  * This event is triggered when the participant list of the call changes.
4208
- */
4345
+ */
4209
4346
  onUserListUpdated?: Function;
4210
4347
  /**
4211
4348
  * This event is triggered when the media device list changes.
4212
- */
4349
+ */
4213
4350
  onMediaDeviceListUpdated?: Function;
4214
4351
  /**
4215
4352
  * This event is triggered when someone starts recording the call.
4216
- */
4353
+ */
4217
4354
  onRecordingStarted?: Function;
4218
4355
  /**
4219
4356
  * This event is triggered when someone stops recording the call.
4220
- */
4357
+ */
4221
4358
  onRecordingStopped?: Function;
4222
4359
  /**
4223
4360
  * This event is triggered when someone starts sharing their screen in the call.
4224
- */
4361
+ */
4225
4362
  onScreenShareStarted?: Function;
4226
4363
  /**
4227
4364
  * This event is triggered when someone stops sharing their screen in the call.
4228
- */
4365
+ */
4229
4366
  onScreenShareStopped?: Function;
4230
4367
  /**
4231
4368
  * This event is triggered when a user is muted.
4232
- */
4369
+ */
4233
4370
  onUserMuted?: Function;
4234
4371
  /**
4235
4372
  * This event is triggered when an audio call is switched to a video call.
4236
- */
4373
+ */
4237
4374
  onCallSwitchedToVideo?: Function;
4238
4375
  /**
4239
4376
  * This event is triggered when the call is ended.
4240
- */
4377
+ */
4241
4378
  onCallEnded?: Function;
4242
4379
  /**
4243
4380
  * This event is triggered when an error occurs.
4244
- */
4381
+ */
4245
4382
  onError?: Function;
4246
4383
  constructor(...args: any[]);
4247
4384
  }
4248
4385
  export class LoginListener {
4249
4386
  /**
4250
4387
  * This event is triggered when the user login is successful.
4251
- */
4388
+ */
4252
4389
  loginSuccess?: Function;
4253
4390
  /**
4254
4391
  * This event is triggered when the user login fails.
4255
- */
4392
+ */
4256
4393
  loginFailure?: Function;
4257
4394
  /**
4258
4395
  * This event is triggered when the user logout is successful.
4259
- */
4396
+ */
4260
4397
  logoutSuccess?: Function;
4261
4398
  /**
4262
4399
  * This event is triggered when the user logout fails.
4263
- */
4400
+ */
4264
4401
  logoutFailure?: Function;
4265
4402
  constructor(...args: any[]);
4266
4403
  }
4267
4404
  export class ConnectionListener {
4268
4405
  /**
4269
4406
  * This event is triggered when the WebSocket connection is in connected state.
4270
- */
4407
+ */
4271
4408
  onConnected?: Function;
4272
4409
  /**
4273
4410
  * This event is triggered when the WebSocket connection is in connecting state.
4274
- */
4411
+ */
4275
4412
  inConnecting?: Function;
4276
4413
  /**
4277
4414
  * This event is triggered when the WebSocket connection is in disconnected state.
4278
- */
4415
+ */
4279
4416
  onDisconnected?: Function;
4280
4417
  /**
4281
4418
  * This event is triggered when the WebSocket connection is in feature throttled state.
4282
- */
4419
+ */
4283
4420
  onFeatureThrottled?: Function;
4284
4421
  constructor(...args: any[]);
4285
4422
  }
4286
4423
  /** @internal */
4287
4424
  export interface EventListener {
4288
4425
  _name: string;
4289
- _eventListener?: MessageListener | UserListener | OngoingCallListener | CallListener | GroupListener | LoginListener | ConnectionListener;
4426
+ _eventListener?: MessageListener | UserListener | OngoingCallListener | CallListener | GroupListener | LoginListener | ConnectionListener | AIAssistantListener;
4290
4427
  }
4291
4428
  /** @internal */
4292
4429
  export class Listener implements EventListener {
@@ -4331,6 +4468,12 @@ export class UserLoginListener extends Listener implements EventListener {
4331
4468
  constructor(name: string, loginEventHandler?: LoginListener, cursor?: number, callback?: Function);
4332
4469
  }
4333
4470
  /** @internal */
4471
+ export class AssistantsListener extends Listener implements EventListener {
4472
+ _cursor?: number;
4473
+ _eventListener: AIAssistantListener;
4474
+ constructor(name: string, aiEventHandler?: AIAssistantListener, cursor?: number, callback?: Function);
4475
+ }
4476
+ /** @internal */
4334
4477
  export class WSConnectionListener extends Listener implements EventListener {
4335
4478
  _cursor?: number;
4336
4479
  _eventListener: ConnectionListener;
@@ -4350,6 +4493,9 @@ export class Call extends BaseMessage implements Message {
4350
4493
  AUDIO: string;
4351
4494
  FILE: string;
4352
4495
  CUSTOM: string;
4496
+ ASSISTANT: string;
4497
+ TOOL_RESULT: string;
4498
+ TOOL_ARGUMENTS: string;
4353
4499
  };
4354
4500
  static readonly RECEIVER_TYPE: {
4355
4501
  USER: string;
@@ -4361,6 +4507,7 @@ export class Call extends BaseMessage implements Message {
4361
4507
  CALL: string;
4362
4508
  CUSTOM: string;
4363
4509
  INTERACTIVE: string;
4510
+ AGENTIC: string;
4364
4511
  };
4365
4512
  static readonly ACTION_TYPE: {
4366
4513
  TYPE_MEMBER_JOINED: string;
@@ -4642,6 +4789,9 @@ export class Action extends BaseMessage implements Message {
4642
4789
  AUDIO: string;
4643
4790
  FILE: string;
4644
4791
  CUSTOM: string;
4792
+ ASSISTANT: string;
4793
+ TOOL_RESULT: string;
4794
+ TOOL_ARGUMENTS: string;
4645
4795
  };
4646
4796
  static readonly RECEIVER_TYPE: {
4647
4797
  USER: string;
@@ -4653,6 +4803,7 @@ export class Action extends BaseMessage implements Message {
4653
4803
  CALL: string;
4654
4804
  CUSTOM: string;
4655
4805
  INTERACTIVE: string;
4806
+ AGENTIC: string;
4656
4807
  };
4657
4808
  static readonly ACTION_TYPE: {
4658
4809
  TYPE_MEMBER_JOINED: string;
@@ -5582,6 +5733,10 @@ export class MessagesRequest {
5582
5733
  * @return {Array<AttachmentTypes>}
5583
5734
  */
5584
5735
  getAttachmentTypes(): Array<AttachmentType>;
5736
+ /**
5737
+ * Gets the flag indicating whether to fetch messages with parent message information.
5738
+ */
5739
+ isWithParent(): boolean;
5585
5740
  /**
5586
5741
  * Get list of next messages based on the parameters specified in MessagesRequestBuilder class. The Developer need to call this method repeatedly using the same object of MessagesRequest class to get paginated list of message.
5587
5742
  * @returns {Promise<BaseMessage[] | []>}
@@ -5623,6 +5778,7 @@ export class MessagesRequestBuilder {
5623
5778
  /** @private */ HasReactions?: boolean;
5624
5779
  /** @private */ mentionedUIDs?: Array<String>;
5625
5780
  /** @private */ attachmentTypes?: Array<AttachmentType>;
5781
+ /** @private */ WithParent?: boolean;
5626
5782
  /**
5627
5783
  * A method to set limit for the number of messages returned in a single iteration. A maximum of 100 messages can fetched in a single iteration.
5628
5784
  * @param {number} limit
@@ -5791,6 +5947,12 @@ export class MessagesRequestBuilder {
5791
5947
  * @returns
5792
5948
  */
5793
5949
  setAttachmentTypes(attachmentTypes: Array<AttachmentType>): this;
5950
+ /**
5951
+ * This method will set the flag indicating whether to fetch messages with parent message information.
5952
+ * @param {boolean} withParent
5953
+ * @returns {this}
5954
+ */
5955
+ withParent(withParent?: boolean): this;
5794
5956
  /**
5795
5957
  * This method will return an object of the MessagesRequest class.
5796
5958
  * @returns {MessagesRequest}
@@ -6883,6 +7045,9 @@ export class InteractiveMessage extends BaseMessage implements Message {
6883
7045
  AUDIO: string;
6884
7046
  FILE: string;
6885
7047
  CUSTOM: string;
7048
+ ASSISTANT: string;
7049
+ TOOL_RESULT: string;
7050
+ TOOL_ARGUMENTS: string;
6886
7051
  };
6887
7052
  /** @private */ static readonly RECEIVER_TYPE: {
6888
7053
  USER: string;
@@ -6894,6 +7059,7 @@ export class InteractiveMessage extends BaseMessage implements Message {
6894
7059
  CALL: string;
6895
7060
  CUSTOM: string;
6896
7061
  INTERACTIVE: string;
7062
+ AGENTIC: string;
6897
7063
  };
6898
7064
  private interactiveData;
6899
7065
  private interactionGoal;
@@ -7311,6 +7477,325 @@ export class MessageReceipt {
7311
7477
  setReceiptType(receiptType?: string): void;
7312
7478
  }
7313
7479
 
7480
+ /**
7481
+ *
7482
+ * @module AIAssistantMessage
7483
+ */
7484
+ export class AIAssistantMessageData {
7485
+ runId: string;
7486
+ threadId: string;
7487
+ text: string;
7488
+ constructor(runId: string, threadId: string, text: string);
7489
+ getRunId(): string;
7490
+ setRunId(runId: string): void;
7491
+ getThreadId(): string;
7492
+ setThreadId(threadId: string): void;
7493
+ getText(): string;
7494
+ setText(text: string): void;
7495
+ }
7496
+ export class AIAssistantMessage extends BaseMessage implements Message {
7497
+ protected data?: any;
7498
+ protected aiAssistantMessageData?: AIAssistantMessageData;
7499
+ constructor(receiverId: string, receiverType: string);
7500
+ /**
7501
+ * Method to get sender of the message.
7502
+ * @returns {User}
7503
+ */
7504
+ getSender(): User;
7505
+ /**
7506
+ * Method to get receiver of the message.
7507
+ * @returns {User | Group}
7508
+ */
7509
+ getReceiver(): User | Group;
7510
+ /**
7511
+ * Method to get data of the message.
7512
+ * @returns {AIAssistantMessageData}
7513
+ */
7514
+ getAssistantMessageData(): AIAssistantMessageData;
7515
+ /**
7516
+ * Method to set data of the message.
7517
+ * @param {AIAssistantMessageData} data
7518
+ */
7519
+ setAssistantMessageData(data: AIAssistantMessageData): void;
7520
+ /**
7521
+ * Method to get data of the message.
7522
+ * @returns {Object}
7523
+ */
7524
+ getData(): any;
7525
+ /**
7526
+ * Get the tags of the message.
7527
+ * @returns {Array<String>}
7528
+ */
7529
+ getTags(): Array<String>;
7530
+ /**
7531
+ * @param {Array<String>} tags
7532
+ * Set the tags for the message.
7533
+ */
7534
+ setTags(tags: Array<String>): void;
7535
+ }
7536
+
7537
+ /**
7538
+ *
7539
+ * @module AIToolResultMessage
7540
+ */
7541
+ export class AIToolResultMessageData {
7542
+ runId: string;
7543
+ threadId: string;
7544
+ text: string;
7545
+ toolCallId: string;
7546
+ constructor(runId: string, threadId: string, text: string, toolCallId: string);
7547
+ /**
7548
+ * Get the run ID of the tool result message.
7549
+ * @returns {string}
7550
+ */
7551
+ getRunId(): string;
7552
+ /**
7553
+ * Set the run ID of the tool result message.
7554
+ * @param {string} runId
7555
+ */
7556
+ setRunId(runId: string): void;
7557
+ /**
7558
+ * Get the thread ID of the tool result message.
7559
+ * @returns {string}
7560
+ */
7561
+ getThreadId(): string;
7562
+ /**
7563
+ * Set the thread ID of the tool result message.
7564
+ * @param {string} threadId
7565
+ */
7566
+ setThreadId(threadId: string): void;
7567
+ /**
7568
+ * Get the text of the tool result message.
7569
+ * @returns {string}
7570
+ */
7571
+ getText(): string;
7572
+ /**
7573
+ * Set the text of the tool result message.
7574
+ * @param {string} text
7575
+ */
7576
+ setText(text: string): void;
7577
+ /**
7578
+ * Get the tool call ID of the tool result message.
7579
+ * @returns {string}
7580
+ */
7581
+ getToolCallId(): string;
7582
+ /**
7583
+ * Set the tool call ID of the tool result message.
7584
+ * @param {string} toolCallId
7585
+ */
7586
+ setToolCallId(toolCallId: string): void;
7587
+ }
7588
+ export class AIToolResultMessage extends BaseMessage implements Message {
7589
+ protected data?: any;
7590
+ protected toolMessageData?: AIToolResultMessageData;
7591
+ constructor(receiverId: string, receiverType: string);
7592
+ /**
7593
+ * Method to get sender of the message.
7594
+ * @returns {User}
7595
+ */
7596
+ getSender(): User;
7597
+ /**
7598
+ * Method to get receiver of the message.
7599
+ * @returns {User | Group}
7600
+ */
7601
+ getReceiver(): User | Group;
7602
+ /**
7603
+ * Method to get data of the message.
7604
+ * @returns {AIToolResultMessageData}
7605
+ */
7606
+ getToolResultMessageData(): AIToolResultMessageData;
7607
+ /**
7608
+ * Method to set data of the message.
7609
+ * @param {AIAssistantMessageData} data
7610
+ */
7611
+ setToolResultMessageData(data: AIToolResultMessageData): void;
7612
+ /**
7613
+ * Method to get data of the message.
7614
+ * @returns {Object}
7615
+ */
7616
+ getData(): any;
7617
+ /**
7618
+ * Get the tags of the message.
7619
+ * @returns {Array<String>}
7620
+ */
7621
+ getTags(): Array<String>;
7622
+ /**
7623
+ * @param {Array<String>} tags
7624
+ * Set the tags for the message.
7625
+ */
7626
+ setTags(tags: Array<String>): void;
7627
+ }
7628
+
7629
+ /**
7630
+ *
7631
+ * @module AIToolArgumentMessage
7632
+ */
7633
+ export class AIToolCallFunction {
7634
+ name: string;
7635
+ arguments: string;
7636
+ constructor(name: string, args: string);
7637
+ /**
7638
+ * Get the name of the function.
7639
+ * @returns {string}
7640
+ */
7641
+ getName(): string;
7642
+ /**
7643
+ * Set the name of the function.
7644
+ * @param {string} name
7645
+ */
7646
+ setName(name: string): void;
7647
+ /**
7648
+ * Get the arguments of the function.
7649
+ * @returns {string}
7650
+ */
7651
+ getArguments(): string;
7652
+ /**
7653
+ * Set the arguments of the function.
7654
+ * @param {string} args
7655
+ */
7656
+ setArguments(args: string): void;
7657
+ }
7658
+ export class AIToolCall {
7659
+ id: string;
7660
+ type: string;
7661
+ displayName?: string;
7662
+ executionText?: string;
7663
+ function: AIToolCallFunction;
7664
+ constructor(id: string, type: string, functionObj: AIToolCallFunction, displayName?: string, executionText?: string);
7665
+ /**
7666
+ * Get the id of the tool call.
7667
+ * @returns {string}
7668
+ */
7669
+ getId(): string;
7670
+ /**
7671
+ * Set the id of the tool call.
7672
+ * @param {string} id
7673
+ */
7674
+ setId(id: string): void;
7675
+ /**
7676
+ * Get the type of the tool call.
7677
+ * @returns {string}
7678
+ */
7679
+ getType(): string;
7680
+ /**
7681
+ * Set the type of the tool call.
7682
+ * @param {string} type
7683
+ */
7684
+ setType(type: string): void;
7685
+ /**
7686
+ * Get the function associated with the tool call.
7687
+ * @returns {AIToolCallFunction}
7688
+ */
7689
+ getFunction(): AIToolCallFunction;
7690
+ /**
7691
+ * Set the function associated with the tool call.
7692
+ * @param {AIToolCallFunction} functionObj
7693
+ */
7694
+ setFunction(functionObj: AIToolCallFunction): void;
7695
+ /**
7696
+ * Get the display name of the tool call.
7697
+ * @returns {string | undefined}
7698
+ */
7699
+ getDisplayName(): string | undefined;
7700
+ /**
7701
+ * Set the display name of the tool call.
7702
+ * @param {string} displayName
7703
+ */
7704
+ setDisplayName(displayName: string): void;
7705
+ /**
7706
+ * Get the execution text of the tool call.
7707
+ * @returns {string | undefined}
7708
+ */
7709
+ getExecutionText(): string | undefined;
7710
+ /**
7711
+ * Set the execution text of the tool call.
7712
+ * @param {string} executionText
7713
+ */
7714
+ setExecutionText(executionText: string): void;
7715
+ /**
7716
+ * Convert the tool call to a JSON object.
7717
+ * @returns {Object}
7718
+ */
7719
+ static fromJSON(json: any): AIToolCall;
7720
+ static fromArray(array: Array<any>): Array<AIToolCall>;
7721
+ }
7722
+ export class AIToolArgumentMessageData {
7723
+ runId: string;
7724
+ threadId: string;
7725
+ toolCalls?: Array<AIToolCall>;
7726
+ constructor(runId: string, threadId: string, toolCalls?: Array<AIToolCall>);
7727
+ /**
7728
+ * Get the run ID of the tool argument message.
7729
+ * @returns {string}
7730
+ */
7731
+ getRunId(): string;
7732
+ /**
7733
+ * Set the run ID of the tool argument message.
7734
+ * @param {string} runId
7735
+ */
7736
+ setRunId(runId: string): void;
7737
+ /**
7738
+ * Get the thread ID of the tool argument message.
7739
+ * @returns {string}
7740
+ */
7741
+ getThreadId(): string;
7742
+ /**
7743
+ * Set the thread ID of the tool argument message.
7744
+ * @param {string} threadId
7745
+ */
7746
+ setThreadId(threadId: string): void;
7747
+ /**
7748
+ * Get the tool calls associated with the tool argument message.
7749
+ * @returns {Array<AIToolCall> | undefined}
7750
+ */
7751
+ getToolCalls(): Array<AIToolCall> | undefined;
7752
+ /**
7753
+ * Set the tool calls associated with the tool argument message.
7754
+ * @param {Array<AIToolCall>} toolCalls
7755
+ */
7756
+ setToolCalls(toolCalls: Array<AIToolCall>): void;
7757
+ }
7758
+ export class AIToolArgumentMessage extends BaseMessage implements Message {
7759
+ protected data?: any;
7760
+ protected aiToolArgumentMessageData?: AIToolArgumentMessageData;
7761
+ constructor(receiverId: string, receiverType: string);
7762
+ /**
7763
+ * Method to get sender of the message.
7764
+ * @returns {User}
7765
+ */
7766
+ getSender(): User;
7767
+ /**
7768
+ * Method to get receiver of the message.
7769
+ * @returns {User | Group}
7770
+ */
7771
+ getReceiver(): User | Group;
7772
+ /**
7773
+ * Method to get data of the message.
7774
+ * @returns {AIToolArgumentMessageData}
7775
+ */
7776
+ getToolArgumentMessageData(): AIToolArgumentMessageData;
7777
+ /**
7778
+ * Method to set data of the message.
7779
+ * @param {AIToolArgumentMessageData} data
7780
+ */
7781
+ setToolArgumentMessageData(data: AIToolArgumentMessageData): void;
7782
+ /**
7783
+ * Method to get data of the message.
7784
+ * @returns {Object}
7785
+ */
7786
+ getData(): any;
7787
+ /**
7788
+ * Get the tags of the message.
7789
+ * @returns {Array<String>}
7790
+ */
7791
+ getTags(): Array<String>;
7792
+ /**
7793
+ * @param {Array<String>} tags
7794
+ * Set the tags for the message.
7795
+ */
7796
+ setTags(tags: Array<String>): void;
7797
+ }
7798
+
7314
7799
  /** Push Notification Preferences Enums */
7315
7800
  export enum MessagesOptions {
7316
7801
  DONT_SUBSCRIBE,
@@ -7810,3 +8295,391 @@ export class RTCUser {
7810
8295
  setResource(resource: string): void;
7811
8296
  getResource(): string;
7812
8297
  }
8298
+
8299
+ /**
8300
+ * Base interface for all assistant event data
8301
+ * @internal
8302
+ */
8303
+ export interface AssistantBaseEventData {
8304
+ timestamp: number;
8305
+ runId: string;
8306
+ threadId: string;
8307
+ [key: string]: any;
8308
+ }
8309
+ /**
8310
+ * Base class for stream events in CometChat SDK
8311
+ */
8312
+ export class AIAssistantBaseEvent<T extends AssistantBaseEventData = AssistantBaseEventData> {
8313
+ /**
8314
+ * The type of the stream event
8315
+ */
8316
+ type: string;
8317
+ /**
8318
+ * The conversation ID associated with the event
8319
+ */
8320
+ conversationId: string;
8321
+ /**
8322
+ * The message ID associated with the event
8323
+ */
8324
+ messageId: string;
8325
+ /**
8326
+ * The parent message ID (if applicable)
8327
+ */
8328
+ patentMessageId: string;
8329
+ /**
8330
+ * Additional data associated with the event
8331
+ */
8332
+ data: T;
8333
+ /**
8334
+ * Constructor for BaseStreamEvent
8335
+ * @param type - The type of the stream event
8336
+ * @param conversationId - The conversation ID
8337
+ * @param messageId - The message ID
8338
+ * @param patentMessageId - The parent message ID
8339
+ * @param data - Additional data with timestamp
8340
+ */
8341
+ constructor(type: string, conversationId: string, messageId: string, patentMessageId: string, data: T);
8342
+ /**
8343
+ * Get the type of the stream event
8344
+ * @returns The type as a string
8345
+ */
8346
+ getType(): string;
8347
+ /**
8348
+ * Set the type of the stream event
8349
+ * @param type - The type to set
8350
+ */
8351
+ setType(type: string): void;
8352
+ /**
8353
+ * Get the conversation ID
8354
+ * @returns The conversation ID as a string
8355
+ */
8356
+ getConversationId(): string;
8357
+ /**
8358
+ * Set the conversation ID
8359
+ * @param conversationId - The conversation ID to set
8360
+ */
8361
+ setConversationId(conversationId: string): void;
8362
+ /**
8363
+ * Get the message ID
8364
+ * @returns The message ID as a string
8365
+ */
8366
+ getMessageId(): string;
8367
+ /**
8368
+ * Set the message ID
8369
+ * @param messageId - The message ID to set
8370
+ */
8371
+ setMessageId(messageId: string): void;
8372
+ /**
8373
+ * Get the parent message ID
8374
+ * @returns The parent message ID as a string
8375
+ */
8376
+ getPatentMessageId(): string;
8377
+ /**
8378
+ * Set the parent message ID
8379
+ * @param patentMessageId - The parent message ID to set
8380
+ */
8381
+ setPatentMessageId(patentMessageId: string): void;
8382
+ /**
8383
+ * Get the data object
8384
+ * @returns The data object
8385
+ */
8386
+ getData(): T;
8387
+ /**
8388
+ * Set the data object
8389
+ * @param data - The data object to set
8390
+ */
8391
+ setData(data: T): void;
8392
+ /**
8393
+ * Get the timestamp from the data object
8394
+ * @returns The timestamp as a number
8395
+ */
8396
+ getTimestamp(): number;
8397
+ /**
8398
+ * Set the timestamp in the data object
8399
+ * @param timestamp - The timestamp to set
8400
+ */
8401
+ setTimestamp(timestamp: number): void;
8402
+ /**
8403
+ * Get the run ID from the data object
8404
+ * @returns The run ID as a string
8405
+ */
8406
+ getRunId(): string;
8407
+ /**
8408
+ * Set the run ID in the data object
8409
+ * @param runId - The run ID to set
8410
+ */
8411
+ setRunId(runId: string): void;
8412
+ /**
8413
+ * Get the thread ID from the data object
8414
+ * @returns The thread ID as a string
8415
+ */
8416
+ getThreadId(): string;
8417
+ /**
8418
+ * Set the thread ID in the data object
8419
+ * @param threadId - The thread ID to set
8420
+ */
8421
+ setThreadId(threadId: string): void;
8422
+ /**
8423
+ * Convert the event to a JSON object
8424
+ * @returns JSON representation of the event
8425
+ */
8426
+ toJSON(): object;
8427
+ /**
8428
+ * Create a BaseStreamEvent from a JSON object
8429
+ * @param json - The JSON object to create the event from
8430
+ * @returns A new BaseStreamEvent instance
8431
+ */
8432
+ static fromJSON(json: any): AIAssistantBaseEvent;
8433
+ }
8434
+
8435
+ /**
8436
+ * Data structure for run events (run_started, run_finished)
8437
+ * @internal
8438
+ */
8439
+ export interface AssistantRunStartedEventData extends AssistantBaseEventData {
8440
+ [key: string]: any;
8441
+ }
8442
+ export class AIAssistantRunStartedEvent extends AIAssistantBaseEvent<AssistantRunStartedEventData> {
8443
+ constructor(conversationId: string, messageId: string, patentMessageId: string, data: AssistantRunStartedEventData);
8444
+ }
8445
+
8446
+ /**
8447
+ * Data structure for run events (run_started, run_finished)
8448
+ * @internal
8449
+ */
8450
+ export interface AssistantRunFinishedEventData extends AssistantBaseEventData {
8451
+ [key: string]: any;
8452
+ }
8453
+ export class AIAssistantRunFinishedEvent extends AIAssistantBaseEvent<AssistantRunFinishedEventData> {
8454
+ constructor(conversationId: string, messageId: string, patentMessageId: string, data: AssistantRunFinishedEventData);
8455
+ }
8456
+
8457
+ /**
8458
+ * Data structure for message events (text_message_start, text_message_end)
8459
+ * @internal
8460
+ */
8461
+ export interface AssistantMessageStartedEventData extends AssistantBaseEventData {
8462
+ role: string;
8463
+ [key: string]: any;
8464
+ }
8465
+ export class AIAssistantMessageStartedEvent extends AIAssistantBaseEvent<AssistantMessageStartedEventData> {
8466
+ constructor(conversationId: string, messageId: string, patentMessageId: string, data: AssistantMessageStartedEventData);
8467
+ /**
8468
+ * Returns the role of the event
8469
+ * @returns {string | undefined} The role of the event
8470
+ */
8471
+ getRole(): string | undefined;
8472
+ /**
8473
+ * Sets the role of the event
8474
+ * @param {string} role - The role to set
8475
+ */
8476
+ setRole(role: string): void;
8477
+ }
8478
+
8479
+ /**
8480
+ * Data structure for message events (text_message_start, text_message_end)
8481
+ * @internal
8482
+ */
8483
+ export interface AssistantMessageEndedEventData extends AssistantBaseEventData {
8484
+ [key: string]: any;
8485
+ }
8486
+ export class AIAssistantMessageEndedEvent extends AIAssistantBaseEvent<AssistantMessageEndedEventData> {
8487
+ constructor(conversationId: string, messageId: string, patentMessageId: string, data: AssistantMessageEndedEventData);
8488
+ }
8489
+
8490
+ /**
8491
+ * Data structure for content events (text_message_content)
8492
+ * @internal
8493
+ */
8494
+ export interface AssistantContentEventData extends AssistantBaseEventData {
8495
+ delta: string;
8496
+ [key: string]: any;
8497
+ }
8498
+ /**
8499
+ * Event class for text message content received from assistant
8500
+ */
8501
+ export class AIAssistantContentReceivedEvent extends AIAssistantBaseEvent<AssistantContentEventData> {
8502
+ constructor(conversationId: string, messageId: string, patentMessageId: string, data: AssistantContentEventData);
8503
+ /**
8504
+ * Gets the delta value for the content received event
8505
+ * @returns The delta string
8506
+ */
8507
+ getDelta(): string;
8508
+ /**
8509
+ * Sets the delta value for the content received event
8510
+ * @param delta - The delta string to set
8511
+ */
8512
+ setDelta(delta: string): void;
8513
+ }
8514
+
8515
+ /**
8516
+ * Data structure for tool call started events
8517
+ * @internal
8518
+ */
8519
+ export interface AssistantToolStartedEventData extends AssistantBaseEventData {
8520
+ toolCallId: string;
8521
+ toolCallName: string;
8522
+ displayName: string;
8523
+ executionText: string;
8524
+ [key: string]: any;
8525
+ }
8526
+ /**
8527
+ * Event class for tool call started events
8528
+ */
8529
+ export class AIAssistantToolStartedEvent extends AIAssistantBaseEvent<AssistantToolStartedEventData> {
8530
+ constructor(conversationId: string, messageId: string, patentMessageId: string, data: AssistantToolStartedEventData);
8531
+ /**
8532
+ * Gets the tool call ID for the tool started event
8533
+ * @returns The tool call ID
8534
+ */
8535
+ getToolCallId(): string;
8536
+ /**
8537
+ * Sets the tool call ID for the tool started event
8538
+ * @param toolCallId - The tool call ID to set
8539
+ */
8540
+ setToolCallId(toolCallId: string): void;
8541
+ /**
8542
+ * Gets the tool call name for the tool started event
8543
+ * @returns The tool call name
8544
+ */
8545
+ getToolCallName(): string;
8546
+ /**
8547
+ * Sets the tool call name for the tool started event
8548
+ * @param toolCallName - The tool call name to set
8549
+ */
8550
+ setToolCallName(toolCallName: string): void;
8551
+ /**
8552
+ * Gets the display name for the tool started event
8553
+ * @returns The display name
8554
+ */
8555
+ getDisplayName(): string;
8556
+ /**
8557
+ * Sets the display name for the tool started event
8558
+ * @param displayName - The display name to set
8559
+ */
8560
+ setDisplayName(displayName: string): void;
8561
+ /**
8562
+ * Gets the execution text for the tool started event
8563
+ * @returns The execution text
8564
+ */
8565
+ getExecutionText(): string;
8566
+ /**
8567
+ * Sets the execution text for the tool started event
8568
+ * @param executionText - The execution text to set
8569
+ */
8570
+ setExecutionText(executionText: string): void;
8571
+ }
8572
+
8573
+ /**
8574
+ * Data structure for tool call argument events
8575
+ * @internal
8576
+ */
8577
+ export interface AssistantToolArgumentEventData extends AssistantBaseEventData {
8578
+ toolCallId: string;
8579
+ delta: string;
8580
+ [key: string]: any;
8581
+ }
8582
+ /**
8583
+ * Event class for tool call argument events
8584
+ */
8585
+ export class AIAssistantToolArgumentEvent extends AIAssistantBaseEvent<AssistantToolArgumentEventData> {
8586
+ constructor(conversationId: string, messageId: string, patentMessageId: string, data: AssistantToolArgumentEventData);
8587
+ /**
8588
+ * Gets the tool call ID for the tool argument event
8589
+ * @returns The tool call ID
8590
+ */
8591
+ getToolCallId(): string;
8592
+ /**
8593
+ * Sets the tool call ID for the tool argument event
8594
+ * @param toolCallId - The tool call ID to set
8595
+ */
8596
+ setToolCallId(toolCallId: string): void;
8597
+ /**
8598
+ * Gets the delta value for the tool argument event
8599
+ * @returns The delta string
8600
+ */
8601
+ getDelta(): string;
8602
+ /**
8603
+ * Sets the delta value for the tool argument event
8604
+ * @param delta - The delta string to set
8605
+ */
8606
+ setDelta(delta: string): void;
8607
+ }
8608
+
8609
+ /**
8610
+ * Data structure for tool call ended events
8611
+ * @internal
8612
+ */
8613
+ export interface AssistantToolEndedEventData extends AssistantBaseEventData {
8614
+ toolCallId: string;
8615
+ [key: string]: any;
8616
+ }
8617
+ /**
8618
+ * Event class for tool call ended events
8619
+ */
8620
+ export class AIAssistantToolEndedEvent extends AIAssistantBaseEvent<AssistantToolEndedEventData> {
8621
+ constructor(conversationId: string, messageId: string, patentMessageId: string, data: AssistantToolEndedEventData);
8622
+ /**
8623
+ * Gets the tool call ID for the tool ended event
8624
+ * @returns The tool call ID
8625
+ */
8626
+ getToolCallId(): string;
8627
+ /**
8628
+ * Sets the tool call ID for the tool ended event
8629
+ * @param toolCallId - The tool call ID to set
8630
+ */
8631
+ setToolCallId(toolCallId: string): void;
8632
+ /**
8633
+ * Converts the event to a JSON representation
8634
+ * @returns The JSON representation of the event
8635
+ */
8636
+ static fromJSON(json: any): AIAssistantToolEndedEvent;
8637
+ }
8638
+
8639
+ /**
8640
+ * Data structure for tool call result events
8641
+ * @internal
8642
+ */
8643
+ export interface AssistantToolResultEventData extends AssistantBaseEventData {
8644
+ toolCallId: string;
8645
+ content: string;
8646
+ role: string;
8647
+ [key: string]: any;
8648
+ }
8649
+ /**
8650
+ * Event class for tool call result events
8651
+ */
8652
+ export class AIAssistantToolResultEvent extends AIAssistantBaseEvent<AssistantToolResultEventData> {
8653
+ constructor(conversationId: string, messageId: string, patentMessageId: string, data: AssistantToolResultEventData);
8654
+ /**
8655
+ * Gets the tool call ID for the tool result event
8656
+ * @returns The tool call ID
8657
+ */
8658
+ getToolCallId(): string;
8659
+ /**
8660
+ * Sets the tool call ID for the tool result event
8661
+ * @param toolCallId - The tool call ID to set
8662
+ */
8663
+ setToolCallId(toolCallId: string): void;
8664
+ /**
8665
+ * Gets the content of the tool result event
8666
+ * @returns The content string
8667
+ */
8668
+ getContent(): string;
8669
+ /**
8670
+ * Sets the content of the tool result event
8671
+ * @param content - The content string to set
8672
+ */
8673
+ setContent(content: string): void;
8674
+ /**
8675
+ * Returns the role of the event
8676
+ * @returns {string | undefined} The role of the event
8677
+ */
8678
+ getRole(): string;
8679
+ /**
8680
+ * Sets the role of the event
8681
+ * @param {string} role - The role to set
8682
+ */
8683
+ setRole(role: string): void;
8684
+ }
8685
+