@cometchat/chat-sdk-javascript 4.1.7 → 4.1.9
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 +7 -47
- package/CometChat.js +1 -1
- package/package.json +1 -1
package/CometChat.d.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
export as namespace CometChat;
|
|
12
12
|
export as namespace CometChatNotifications;
|
|
13
13
|
|
|
14
|
+
export const DEFAULT_TIMEOUT = 45;
|
|
14
15
|
export class CometChat {
|
|
15
16
|
static AIAssistantBaseEvent: typeof AIAssistantBaseEvent;
|
|
16
17
|
static AIAssistantRunStartedEvent: typeof AIAssistantRunStartedEvent;
|
|
@@ -22,7 +23,6 @@ export class CometChat {
|
|
|
22
23
|
static AIAssistantToolEndedEvent: typeof AIAssistantToolEndedEvent;
|
|
23
24
|
static AIAssistantToolArgumentEvent: typeof AIAssistantToolArgumentEvent;
|
|
24
25
|
static AIAssistantToolResultEvent: typeof AIAssistantToolResultEvent;
|
|
25
|
-
static SecureMediaMode: typeof SecureMediaMode;
|
|
26
26
|
static AI_ASSISTANT_EVENTS: {
|
|
27
27
|
RUN_STARTED: string;
|
|
28
28
|
RUN_FINISHED: string;
|
|
@@ -1737,10 +1737,11 @@ export class CometChat {
|
|
|
1737
1737
|
/**
|
|
1738
1738
|
* Function to initiate a user/group call.
|
|
1739
1739
|
* @param {Call} call
|
|
1740
|
+
* @param {number} [timeout] - Optional call timeout in seconds. Defaults to {@link DEFAULT_TIMEOUT} seconds.
|
|
1740
1741
|
* @returns {Promise<Call>}
|
|
1741
1742
|
* @memberof CometChat
|
|
1742
1743
|
*/
|
|
1743
|
-
static initiateCall(call: Call | any): Promise<Call>;
|
|
1744
|
+
static initiateCall(call: Call | any, timeout?: number): Promise<Call>;
|
|
1744
1745
|
/**
|
|
1745
1746
|
* Function to accept an incoming user/group call.
|
|
1746
1747
|
* @param {string} sessionid
|
|
@@ -2118,17 +2119,6 @@ export class CometChat {
|
|
|
2118
2119
|
success: boolean;
|
|
2119
2120
|
message: string;
|
|
2120
2121
|
}>;
|
|
2121
|
-
/**
|
|
2122
|
-
* Returns the decoded File Access Token (FAT) for the currently logged-in user, or null if unavailable.
|
|
2123
|
-
* @returns {string | null}
|
|
2124
|
-
*/
|
|
2125
|
-
static getFat(): string | null;
|
|
2126
|
-
/**
|
|
2127
|
-
* Resolves a presigned URL for the given secure media URL using the FAT header approach. Returns the original URL unchanged if header mode is not enabled or the URL does not require secure access.
|
|
2128
|
-
* @param {string} url - The original media URL to resolve.
|
|
2129
|
-
* @returns {Promise<string>}
|
|
2130
|
-
*/
|
|
2131
|
-
static fetchPresignedUrl(url: string): Promise<string>;
|
|
2132
2122
|
}
|
|
2133
2123
|
|
|
2134
2124
|
export class CometChatNotifications {
|
|
@@ -3013,10 +3003,6 @@ export enum StorageMode {
|
|
|
3013
3003
|
LOCAL = "local",
|
|
3014
3004
|
SESSION = "session"
|
|
3015
3005
|
}
|
|
3016
|
-
export enum SecureMediaMode {
|
|
3017
|
-
EMBEDDED = 0,
|
|
3018
|
-
HEADER_BASED = 1
|
|
3019
|
-
}
|
|
3020
3006
|
export const GROUP_MEMBER_SCOPE: {
|
|
3021
3007
|
ADMIN: string;
|
|
3022
3008
|
MODERATOR: string;
|
|
@@ -4603,7 +4589,7 @@ export class Call extends BaseMessage implements Message {
|
|
|
4603
4589
|
ACTION: string;
|
|
4604
4590
|
CALL: string;
|
|
4605
4591
|
CUSTOM: string;
|
|
4606
|
-
INTERACTIVE: string;
|
|
4592
|
+
INTERACTIVE: string;
|
|
4607
4593
|
};
|
|
4608
4594
|
static readonly ACTION_TYPE: {
|
|
4609
4595
|
TYPE_MEMBER_JOINED: string;
|
|
@@ -4757,10 +4743,11 @@ export class CallController {
|
|
|
4757
4743
|
*
|
|
4758
4744
|
* @internal
|
|
4759
4745
|
* @param {Call} call
|
|
4760
|
-
* @
|
|
4746
|
+
* @param {number} [timeout] - Optional call timeout in seconds. Defaults to {@link DEFAULT_TIMEOUT} seconds.
|
|
4747
|
+
* @returns {Promise<Call>}
|
|
4761
4748
|
* @memberof CallController
|
|
4762
4749
|
*/
|
|
4763
|
-
initiateCall(call: Call): Promise<Call>;
|
|
4750
|
+
initiateCall(call: Call, timeout?: number): Promise<Call>;
|
|
4764
4751
|
/**
|
|
4765
4752
|
* @internal
|
|
4766
4753
|
* Method to clear timer.
|
|
@@ -6495,8 +6482,6 @@ export class AppSettings {
|
|
|
6495
6482
|
clientHost: string;
|
|
6496
6483
|
/** @private */
|
|
6497
6484
|
storageMode: StorageMode;
|
|
6498
|
-
/** @private */
|
|
6499
|
-
secureMediaMode: SecureMediaMode;
|
|
6500
6485
|
/**
|
|
6501
6486
|
* @private
|
|
6502
6487
|
* @param {AppSettingsBuilder}
|
|
@@ -6542,11 +6527,6 @@ export class AppSettings {
|
|
|
6542
6527
|
* @returns {StorageMode}
|
|
6543
6528
|
*/
|
|
6544
6529
|
getStorageMode(): StorageMode;
|
|
6545
|
-
/**
|
|
6546
|
-
* Returns the secure media mode (embedded or header-based) set using the `setSecureMediaMode()` of the AppSettingsBuilder.
|
|
6547
|
-
* @returns {SecureMediaMode}
|
|
6548
|
-
*/
|
|
6549
|
-
getSecureMediaMode(): SecureMediaMode;
|
|
6550
6530
|
}
|
|
6551
6531
|
export class AppSettingsBuilder {
|
|
6552
6532
|
/** @private */
|
|
@@ -6565,8 +6545,6 @@ export class AppSettingsBuilder {
|
|
|
6565
6545
|
clientHost: string;
|
|
6566
6546
|
/** @private */
|
|
6567
6547
|
storageMode: StorageMode;
|
|
6568
|
-
/** @private */
|
|
6569
|
-
secureMediaMode: SecureMediaMode;
|
|
6570
6548
|
/**
|
|
6571
6549
|
* A method to subscribe presence for all users.
|
|
6572
6550
|
* @returns
|
|
@@ -6620,12 +6598,6 @@ export class AppSettingsBuilder {
|
|
|
6620
6598
|
* @returns {this}
|
|
6621
6599
|
*/
|
|
6622
6600
|
setStorageMode(storageMode: StorageMode): this;
|
|
6623
|
-
/**
|
|
6624
|
-
* Sets the secure media mode for the app settings.
|
|
6625
|
-
* @param {SecureMediaMode} secureMediaMode - The secure media mode to use.
|
|
6626
|
-
* @returns {this}
|
|
6627
|
-
*/
|
|
6628
|
-
setSecureMediaMode(secureMediaMode: SecureMediaMode): this;
|
|
6629
6601
|
/**
|
|
6630
6602
|
* This method will return an object of the AppSettings class.
|
|
6631
6603
|
* @returns {AppSettings}
|
|
@@ -6654,17 +6626,6 @@ export class CometChatHelper {
|
|
|
6654
6626
|
*/
|
|
6655
6627
|
static getConversationFromMessage(message: TextMessage | MediaMessage | CustomMessage | InteractiveMessage | any): Promise<Conversation>;
|
|
6656
6628
|
static updateMessageWithReactionInfo(baseMessage: BaseMessage, messageReaction: Reaction, action: REACTION_ACTION): BaseMessage | CometChatException;
|
|
6657
|
-
/**
|
|
6658
|
-
* Returns true if header-based secure media mode is active, a valid FAT exists, and the secure media host is configured.
|
|
6659
|
-
* @returns {boolean}
|
|
6660
|
-
*/
|
|
6661
|
-
static isHeaderModeEnabled(): boolean;
|
|
6662
|
-
/**
|
|
6663
|
-
* Returns true if the given URL points to the configured secure media host and requires authenticated access.
|
|
6664
|
-
* @param {string | null} url - The URL to check.
|
|
6665
|
-
* @returns {boolean}
|
|
6666
|
-
*/
|
|
6667
|
-
static requiresSecureAccess(url: string | null): boolean;
|
|
6668
6629
|
}
|
|
6669
6630
|
|
|
6670
6631
|
/**
|
|
@@ -8988,4 +8949,3 @@ export class AIAssistantToolResultEvent extends AIAssistantBaseEvent<AssistantTo
|
|
|
8988
8949
|
*/
|
|
8989
8950
|
setRole(role: string): void;
|
|
8990
8951
|
}
|
|
8991
|
-
|