@cometchat/chat-sdk-javascript 4.1.1 → 4.1.2
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 +64 -16
- package/CometChat.js +1 -1
- package/package.json +1 -1
package/CometChat.d.ts
CHANGED
|
@@ -433,6 +433,7 @@ export class CometChat {
|
|
|
433
433
|
MENTIONED_UIDS: string;
|
|
434
434
|
ATTACHMENT_TYPES: string;
|
|
435
435
|
WITH_PARENT: string;
|
|
436
|
+
HIDE_QUOTED_MESSAGES: string;
|
|
436
437
|
};
|
|
437
438
|
};
|
|
438
439
|
};
|
|
@@ -2527,6 +2528,8 @@ export class BaseMessage implements Message {
|
|
|
2527
2528
|
protected unreadRepliesCount: number;
|
|
2528
2529
|
protected mentionedUsers?: User[];
|
|
2529
2530
|
protected mentionedMe?: boolean;
|
|
2531
|
+
protected quotedMessageId?: number;
|
|
2532
|
+
protected quotedMessage?: BaseMessage;
|
|
2530
2533
|
constructor(receiverId: string, messageType: string, receiverType: string, category: MessageCategory);
|
|
2531
2534
|
/**
|
|
2532
2535
|
* Get unread replies count of the message
|
|
@@ -2786,12 +2789,32 @@ export class BaseMessage implements Message {
|
|
|
2786
2789
|
* set the array of reactions in message
|
|
2787
2790
|
* @param {ReactionCount[]} reactions
|
|
2788
2791
|
*/
|
|
2789
|
-
setReactions(reactions:
|
|
2792
|
+
setReactions(reactions: ReactionCount[]): void;
|
|
2790
2793
|
/**
|
|
2791
2794
|
* Get the array of reactions in message
|
|
2792
2795
|
* @returns {ReactionCount[]}
|
|
2793
2796
|
*/
|
|
2794
2797
|
getReactions(): ReactionCount[];
|
|
2798
|
+
/**
|
|
2799
|
+
* Get quoted message ID of the message.
|
|
2800
|
+
* @returns {number}
|
|
2801
|
+
*/
|
|
2802
|
+
getQuotedMessageId(): number;
|
|
2803
|
+
/**
|
|
2804
|
+
* @param {number} value
|
|
2805
|
+
* Set quoted message ID of the message.
|
|
2806
|
+
*/
|
|
2807
|
+
setQuotedMessageId(value: number): void;
|
|
2808
|
+
/**
|
|
2809
|
+
* Get quoted message of the message.
|
|
2810
|
+
* @returns {BaseMessage}
|
|
2811
|
+
*/
|
|
2812
|
+
getQuotedMessage(): BaseMessage;
|
|
2813
|
+
/**
|
|
2814
|
+
* @param {BaseMessage} value
|
|
2815
|
+
* Set quoted message of the message.
|
|
2816
|
+
*/
|
|
2817
|
+
setQuotedMessage(value: BaseMessage): void;
|
|
2795
2818
|
}
|
|
2796
2819
|
|
|
2797
2820
|
/**
|
|
@@ -3150,6 +3173,7 @@ export const MessageConstatnts: {
|
|
|
3150
3173
|
MENTIONED_UIDS: string;
|
|
3151
3174
|
ATTACHMENT_TYPES: string;
|
|
3152
3175
|
WITH_PARENT: string;
|
|
3176
|
+
HIDE_QUOTED_MESSAGES: string;
|
|
3153
3177
|
};
|
|
3154
3178
|
};
|
|
3155
3179
|
};
|
|
@@ -5737,6 +5761,12 @@ export class MessagesRequest {
|
|
|
5737
5761
|
* Gets the flag indicating whether to fetch messages with parent message information.
|
|
5738
5762
|
*/
|
|
5739
5763
|
isWithParent(): boolean;
|
|
5764
|
+
/**
|
|
5765
|
+
* Gets the flag indicating whether to hide quoted messages when fetching messages.
|
|
5766
|
+
*
|
|
5767
|
+
* @return {boolean}
|
|
5768
|
+
*/
|
|
5769
|
+
isHideQuotedMessages(): boolean;
|
|
5740
5770
|
/**
|
|
5741
5771
|
* 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.
|
|
5742
5772
|
* @returns {Promise<BaseMessage[] | []>}
|
|
@@ -5779,6 +5809,7 @@ export class MessagesRequestBuilder {
|
|
|
5779
5809
|
/** @private */ mentionedUIDs?: Array<String>;
|
|
5780
5810
|
/** @private */ attachmentTypes?: Array<AttachmentType>;
|
|
5781
5811
|
/** @private */ WithParent?: boolean;
|
|
5812
|
+
/** @private */ HideQuotedMessages?: boolean;
|
|
5782
5813
|
/**
|
|
5783
5814
|
* 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.
|
|
5784
5815
|
* @param {number} limit
|
|
@@ -5953,6 +5984,12 @@ export class MessagesRequestBuilder {
|
|
|
5953
5984
|
* @returns {this}
|
|
5954
5985
|
*/
|
|
5955
5986
|
withParent(withParent?: boolean): this;
|
|
5987
|
+
/**
|
|
5988
|
+
* A method to hide quoted messages.
|
|
5989
|
+
* @param {boolean} hideQuotedMessages
|
|
5990
|
+
* @returns
|
|
5991
|
+
*/
|
|
5992
|
+
hideQuotedMessages(hideQuotedMessages: boolean): this;
|
|
5956
5993
|
/**
|
|
5957
5994
|
* This method will return an object of the MessagesRequest class.
|
|
5958
5995
|
* @returns {MessagesRequest}
|
|
@@ -8325,7 +8362,7 @@ export class AIAssistantBaseEvent<T extends AssistantBaseEventData = AssistantBa
|
|
|
8325
8362
|
/**
|
|
8326
8363
|
* The parent message ID (if applicable)
|
|
8327
8364
|
*/
|
|
8328
|
-
|
|
8365
|
+
parentMessageId: string;
|
|
8329
8366
|
/**
|
|
8330
8367
|
* Additional data associated with the event
|
|
8331
8368
|
*/
|
|
@@ -8335,10 +8372,10 @@ export class AIAssistantBaseEvent<T extends AssistantBaseEventData = AssistantBa
|
|
|
8335
8372
|
* @param type - The type of the stream event
|
|
8336
8373
|
* @param conversationId - The conversation ID
|
|
8337
8374
|
* @param messageId - The message ID
|
|
8338
|
-
* @param
|
|
8375
|
+
* @param parentMessageId - The parent message ID
|
|
8339
8376
|
* @param data - Additional data with timestamp
|
|
8340
8377
|
*/
|
|
8341
|
-
constructor(type: string, conversationId: string, messageId: string,
|
|
8378
|
+
constructor(type: string, conversationId: string, messageId: string, parentMessageId: string, data: T);
|
|
8342
8379
|
/**
|
|
8343
8380
|
* Get the type of the stream event
|
|
8344
8381
|
* @returns The type as a string
|
|
@@ -8371,14 +8408,26 @@ export class AIAssistantBaseEvent<T extends AssistantBaseEventData = AssistantBa
|
|
|
8371
8408
|
setMessageId(messageId: string): void;
|
|
8372
8409
|
/**
|
|
8373
8410
|
* Get the parent message ID
|
|
8411
|
+
* @deprecated Use getParentMessageId() instead
|
|
8374
8412
|
* @returns The parent message ID as a string
|
|
8375
8413
|
*/
|
|
8376
8414
|
getPatentMessageId(): string;
|
|
8415
|
+
/**
|
|
8416
|
+
* Get the parent message ID
|
|
8417
|
+
* @returns The parent message ID as a string
|
|
8418
|
+
*/
|
|
8419
|
+
getParentMessageId(): string;
|
|
8420
|
+
/**
|
|
8421
|
+
* Set the parent message ID
|
|
8422
|
+
* @deprecated Use setParentMessageId() instead
|
|
8423
|
+
* @param parentMessageId - The parent message ID to set
|
|
8424
|
+
*/
|
|
8425
|
+
setPatentMessageId(parentMessageId: string): void;
|
|
8377
8426
|
/**
|
|
8378
8427
|
* Set the parent message ID
|
|
8379
|
-
* @param
|
|
8428
|
+
* @param parentMessageId - The parent message ID to set
|
|
8380
8429
|
*/
|
|
8381
|
-
|
|
8430
|
+
setParentMessageId(parentMessageId: string): void;
|
|
8382
8431
|
/**
|
|
8383
8432
|
* Get the data object
|
|
8384
8433
|
* @returns The data object
|
|
@@ -8440,7 +8489,7 @@ export interface AssistantRunStartedEventData extends AssistantBaseEventData {
|
|
|
8440
8489
|
[key: string]: any;
|
|
8441
8490
|
}
|
|
8442
8491
|
export class AIAssistantRunStartedEvent extends AIAssistantBaseEvent<AssistantRunStartedEventData> {
|
|
8443
|
-
constructor(conversationId: string, messageId: string,
|
|
8492
|
+
constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantRunStartedEventData);
|
|
8444
8493
|
}
|
|
8445
8494
|
|
|
8446
8495
|
/**
|
|
@@ -8451,7 +8500,7 @@ export interface AssistantRunFinishedEventData extends AssistantBaseEventData {
|
|
|
8451
8500
|
[key: string]: any;
|
|
8452
8501
|
}
|
|
8453
8502
|
export class AIAssistantRunFinishedEvent extends AIAssistantBaseEvent<AssistantRunFinishedEventData> {
|
|
8454
|
-
constructor(conversationId: string, messageId: string,
|
|
8503
|
+
constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantRunFinishedEventData);
|
|
8455
8504
|
}
|
|
8456
8505
|
|
|
8457
8506
|
/**
|
|
@@ -8463,7 +8512,7 @@ export interface AssistantMessageStartedEventData extends AssistantBaseEventData
|
|
|
8463
8512
|
[key: string]: any;
|
|
8464
8513
|
}
|
|
8465
8514
|
export class AIAssistantMessageStartedEvent extends AIAssistantBaseEvent<AssistantMessageStartedEventData> {
|
|
8466
|
-
constructor(conversationId: string, messageId: string,
|
|
8515
|
+
constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantMessageStartedEventData);
|
|
8467
8516
|
/**
|
|
8468
8517
|
* Returns the role of the event
|
|
8469
8518
|
* @returns {string | undefined} The role of the event
|
|
@@ -8484,7 +8533,7 @@ export interface AssistantMessageEndedEventData extends AssistantBaseEventData {
|
|
|
8484
8533
|
[key: string]: any;
|
|
8485
8534
|
}
|
|
8486
8535
|
export class AIAssistantMessageEndedEvent extends AIAssistantBaseEvent<AssistantMessageEndedEventData> {
|
|
8487
|
-
constructor(conversationId: string, messageId: string,
|
|
8536
|
+
constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantMessageEndedEventData);
|
|
8488
8537
|
}
|
|
8489
8538
|
|
|
8490
8539
|
/**
|
|
@@ -8499,7 +8548,7 @@ export interface AssistantContentEventData extends AssistantBaseEventData {
|
|
|
8499
8548
|
* Event class for text message content received from assistant
|
|
8500
8549
|
*/
|
|
8501
8550
|
export class AIAssistantContentReceivedEvent extends AIAssistantBaseEvent<AssistantContentEventData> {
|
|
8502
|
-
constructor(conversationId: string, messageId: string,
|
|
8551
|
+
constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantContentEventData);
|
|
8503
8552
|
/**
|
|
8504
8553
|
* Gets the delta value for the content received event
|
|
8505
8554
|
* @returns The delta string
|
|
@@ -8527,7 +8576,7 @@ export interface AssistantToolStartedEventData extends AssistantBaseEventData {
|
|
|
8527
8576
|
* Event class for tool call started events
|
|
8528
8577
|
*/
|
|
8529
8578
|
export class AIAssistantToolStartedEvent extends AIAssistantBaseEvent<AssistantToolStartedEventData> {
|
|
8530
|
-
constructor(conversationId: string, messageId: string,
|
|
8579
|
+
constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantToolStartedEventData);
|
|
8531
8580
|
/**
|
|
8532
8581
|
* Gets the tool call ID for the tool started event
|
|
8533
8582
|
* @returns The tool call ID
|
|
@@ -8583,7 +8632,7 @@ export interface AssistantToolArgumentEventData extends AssistantBaseEventData {
|
|
|
8583
8632
|
* Event class for tool call argument events
|
|
8584
8633
|
*/
|
|
8585
8634
|
export class AIAssistantToolArgumentEvent extends AIAssistantBaseEvent<AssistantToolArgumentEventData> {
|
|
8586
|
-
constructor(conversationId: string, messageId: string,
|
|
8635
|
+
constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantToolArgumentEventData);
|
|
8587
8636
|
/**
|
|
8588
8637
|
* Gets the tool call ID for the tool argument event
|
|
8589
8638
|
* @returns The tool call ID
|
|
@@ -8618,7 +8667,7 @@ export interface AssistantToolEndedEventData extends AssistantBaseEventData {
|
|
|
8618
8667
|
* Event class for tool call ended events
|
|
8619
8668
|
*/
|
|
8620
8669
|
export class AIAssistantToolEndedEvent extends AIAssistantBaseEvent<AssistantToolEndedEventData> {
|
|
8621
|
-
constructor(conversationId: string, messageId: string,
|
|
8670
|
+
constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantToolEndedEventData);
|
|
8622
8671
|
/**
|
|
8623
8672
|
* Gets the tool call ID for the tool ended event
|
|
8624
8673
|
* @returns The tool call ID
|
|
@@ -8650,7 +8699,7 @@ export interface AssistantToolResultEventData extends AssistantBaseEventData {
|
|
|
8650
8699
|
* Event class for tool call result events
|
|
8651
8700
|
*/
|
|
8652
8701
|
export class AIAssistantToolResultEvent extends AIAssistantBaseEvent<AssistantToolResultEventData> {
|
|
8653
|
-
constructor(conversationId: string, messageId: string,
|
|
8702
|
+
constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantToolResultEventData);
|
|
8654
8703
|
/**
|
|
8655
8704
|
* Gets the tool call ID for the tool result event
|
|
8656
8705
|
* @returns The tool call ID
|
|
@@ -8682,4 +8731,3 @@ export class AIAssistantToolResultEvent extends AIAssistantBaseEvent<AssistantTo
|
|
|
8682
8731
|
*/
|
|
8683
8732
|
setRole(role: string): void;
|
|
8684
8733
|
}
|
|
8685
|
-
|