@cometchat/chat-sdk-javascript 4.0.0-beta2 → 4.0.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/{dist/index.d.ts → CometChat.d.ts} +111 -0
- package/CometChat.js +1 -0
- package/{dist/javascript-chat-sdk/LICENSE.md → LICENSE.md} +1 -1
- package/{dist/javascript-chat-sdk/README.md → README.md} +2 -2
- package/package.json +31 -42
- package/dist/.DS_Store +0 -0
- package/dist/CometChat.js +0 -1
- package/dist/javascript-chat-sdk/.git/COMMIT_EDITMSG +0 -1
- package/dist/javascript-chat-sdk/.git/FETCH_HEAD +0 -4
- package/dist/javascript-chat-sdk/.git/HEAD +0 -1
- package/dist/javascript-chat-sdk/.git/ORIG_HEAD +0 -1
- package/dist/javascript-chat-sdk/.git/config +0 -19
- package/dist/javascript-chat-sdk/.git/description +0 -1
- package/dist/javascript-chat-sdk/.git/hooks/applypatch-msg.sample +0 -15
- package/dist/javascript-chat-sdk/.git/hooks/commit-msg.sample +0 -24
- package/dist/javascript-chat-sdk/.git/hooks/fsmonitor-watchman.sample +0 -174
- package/dist/javascript-chat-sdk/.git/hooks/post-update.sample +0 -8
- package/dist/javascript-chat-sdk/.git/hooks/pre-applypatch.sample +0 -14
- package/dist/javascript-chat-sdk/.git/hooks/pre-commit.sample +0 -49
- package/dist/javascript-chat-sdk/.git/hooks/pre-merge-commit.sample +0 -13
- package/dist/javascript-chat-sdk/.git/hooks/pre-push.sample +0 -53
- package/dist/javascript-chat-sdk/.git/hooks/pre-rebase.sample +0 -169
- package/dist/javascript-chat-sdk/.git/hooks/pre-receive.sample +0 -24
- package/dist/javascript-chat-sdk/.git/hooks/prepare-commit-msg.sample +0 -42
- package/dist/javascript-chat-sdk/.git/hooks/push-to-checkout.sample +0 -78
- package/dist/javascript-chat-sdk/.git/hooks/update.sample +0 -128
- package/dist/javascript-chat-sdk/.git/index +0 -0
- package/dist/javascript-chat-sdk/.git/info/exclude +0 -6
- package/dist/javascript-chat-sdk/.git/logs/HEAD +0 -13
- package/dist/javascript-chat-sdk/.git/logs/refs/heads/master +0 -1
- package/dist/javascript-chat-sdk/.git/logs/refs/heads/master-v3 +0 -3
- package/dist/javascript-chat-sdk/.git/logs/refs/heads/master-v4 +0 -4
- package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/HEAD +0 -1
- package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/master-v3 +0 -2
- package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/master-v4 +0 -2
- package/dist/javascript-chat-sdk/.git/logs/refs/stash +0 -1
- package/dist/javascript-chat-sdk/.git/objects/09/b9e17d9a0acd55c3644f4cfa19b1c40a139018 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/0f/2d8999b370e8ddb236f767aa565b2aa72a6b21 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/15/7f5161e31be14c74df7907c9c5046fbbea4461 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/17/89200f3f5621f9df6d08d1071c59557ce5a29d +0 -0
- package/dist/javascript-chat-sdk/.git/objects/26/1de108a0253f54cf37e8a072f7f5f0098c7e89 +0 -4
- package/dist/javascript-chat-sdk/.git/objects/43/7ffc94a259dcd818cca308ab60a2780714092d +0 -1
- package/dist/javascript-chat-sdk/.git/objects/4e/6ab6a981ea6dccdb60b6438d7ca142aef269fc +0 -0
- package/dist/javascript-chat-sdk/.git/objects/5e/04a3d79cebcc2b02c14ea807f839ea73d44461 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/65/bbff4d1cccc12285ea1c59a6f2082552f0d034 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/6a/a6ef178cb2e3775bb149aba99ace8399525da6 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/6b/e1ffe406de9ebb698ea891315b2b1459160029 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/6b/efb8e9de892be7ecee5d39c30c0aa17d43d727 +0 -2
- package/dist/javascript-chat-sdk/.git/objects/6e/f136ca41bbb5684639947fa121b7eebb795592 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/87/96f6311621c3ee4fc8d37eeec64a6c94e3e6ca +0 -0
- package/dist/javascript-chat-sdk/.git/objects/8b/2d226d44814b7265b68ab7953a87cd44d77965 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/9c/bc4afb06153fd276e240e709984bf1099386ba +0 -0
- package/dist/javascript-chat-sdk/.git/objects/a9/6c6710dfb57871b6eccda3a94d83990ba94d9f +0 -0
- package/dist/javascript-chat-sdk/.git/objects/ad/1b70a4bb12b3fe2e6306d2b0922582036f4e42 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/c1/655387f263ec50dbef8042099eead57dfe00c2 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/e0/ad85d968302e5447402ed4d0bc8ace931b9167 +0 -0
- package/dist/javascript-chat-sdk/.git/objects/e8/0b03094191c92690d5bb92b4271058f188efd1 +0 -1
- package/dist/javascript-chat-sdk/.git/objects/f0/cc86624ec0504ed24dcd6a7b2cdee917b73395 +0 -2
- package/dist/javascript-chat-sdk/.git/objects/f9/95e0e3dc98868eb6404f8cdd84632ae140e1ff +0 -2
- package/dist/javascript-chat-sdk/.git/objects/fb/d9b82e03d33337a8d2606fc9e2f1652ffda3de +0 -0
- package/dist/javascript-chat-sdk/.git/objects/pack/pack-efd6261f29a0c404693064c4a255aada38ddab72.idx +0 -0
- package/dist/javascript-chat-sdk/.git/objects/pack/pack-efd6261f29a0c404693064c4a255aada38ddab72.pack +0 -0
- package/dist/javascript-chat-sdk/.git/packed-refs +0 -107
- package/dist/javascript-chat-sdk/.git/refs/heads/master +0 -1
- package/dist/javascript-chat-sdk/.git/refs/heads/master-v3 +0 -1
- package/dist/javascript-chat-sdk/.git/refs/heads/master-v4 +0 -1
- package/dist/javascript-chat-sdk/.git/refs/remotes/origin/HEAD +0 -1
- package/dist/javascript-chat-sdk/.git/refs/remotes/origin/master-v3 +0 -1
- package/dist/javascript-chat-sdk/.git/refs/remotes/origin/master-v4 +0 -1
- package/dist/javascript-chat-sdk/.git/refs/stash +0 -1
- package/dist/javascript-chat-sdk/.gitignore +0 -2
- package/dist/javascript-chat-sdk/CometChat.d.ts +0 -4732
- package/dist/javascript-chat-sdk/CometChat.js +0 -1
- package/dist/javascript-chat-sdk/package.json +0 -36
- package/dist/package.json +0 -36
- package/dist/type/index.d.ts +0 -10
- package/dist/type/lib/BannedMembersRequest.d.ts +0 -60
- package/dist/type/lib/BlockedUsersRequest.d.ts +0 -67
- package/dist/type/lib/CallSettings.d.ts +0 -429
- package/dist/type/lib/CometChat.d.ts +0 -1955
- package/dist/type/lib/CometChatErrorConstants.d.ts +0 -124
- package/dist/type/lib/CometChatHelper.d.ts +0 -26
- package/dist/type/lib/Constants.d.ts +0 -953
- package/dist/type/lib/ConversationRequest.d.ts +0 -89
- package/dist/type/lib/GroupMembersRequest.d.ts +0 -61
- package/dist/type/lib/GroupsRequest.d.ts +0 -78
- package/dist/type/lib/Helper.d.ts +0 -46
- package/dist/type/lib/ListenerHandlers.d.ts +0 -101
- package/dist/type/lib/MessagesRequest.d.ts +0 -188
- package/dist/type/lib/UsersRequest.d.ts +0 -142
- package/dist/type/lib/WebSockets/WSConnectionHelper.d.ts +0 -41
- package/dist/type/lib/WebSockets/WSConstants.d.ts +0 -71
- package/dist/type/lib/WebSockets/WSHelper.d.ts +0 -3
- package/dist/type/lib/controllers/CallController.d.ts +0 -151
- package/dist/type/lib/controllers/ConversationController.d.ts +0 -14
- package/dist/type/lib/controllers/GroupMemberController.d.ts +0 -10
- package/dist/type/lib/controllers/GroupsController.d.ts +0 -9
- package/dist/type/lib/controllers/MessageController.d.ts +0 -18
- package/dist/type/lib/controllers/PresenceController.d.ts +0 -0
- package/dist/type/lib/controllers/TypingNotificationController.d.ts +0 -14
- package/dist/type/lib/controllers/UserAuthController.d.ts +0 -10
- package/dist/type/lib/controllers/UsersController.d.ts +0 -9
- package/dist/type/lib/localStore/KeyStore.d.ts +0 -45
- package/dist/type/lib/localStore/MessageListenerEventMaping.d.ts +0 -56
- package/dist/type/lib/localStore/MessagesStore.d.ts +0 -72
- package/dist/type/lib/localStore/UserStore.d.ts +0 -72
- package/dist/type/lib/localStore/store.d.ts +0 -61
- package/dist/type/lib/models/Action.d.ts +0 -159
- package/dist/type/lib/models/AppSettings.d.ts +0 -135
- package/dist/type/lib/models/BaseMessage.d.ts +0 -259
- package/dist/type/lib/models/CCExtension.d.ts +0 -15
- package/dist/type/lib/models/Call.d.ts +0 -159
- package/dist/type/lib/models/CometChatAuthEvent.d.ts +0 -25
- package/dist/type/lib/models/CometChatEvent.d.ts +0 -25
- package/dist/type/lib/models/CometChatMessageEvent.d.ts +0 -9
- package/dist/type/lib/models/CometChatPingEvent.d.ts +0 -6
- package/dist/type/lib/models/CometChatPresenceEvent.d.ts +0 -15
- package/dist/type/lib/models/CometChatReceiptEvent.d.ts +0 -14
- package/dist/type/lib/models/CometChatTransientEvent.d.ts +0 -11
- package/dist/type/lib/models/CometChatTypingEvent.d.ts +0 -14
- package/dist/type/lib/models/ConversationModel.d.ts +0 -73
- package/dist/type/lib/models/CustomError.d.ts +0 -13
- package/dist/type/lib/models/CustomMessage.d.ts +0 -71
- package/dist/type/lib/models/ErrorModel.d.ts +0 -12
- package/dist/type/lib/models/Group.d.ts +0 -190
- package/dist/type/lib/models/GroupMember.d.ts +0 -43
- package/dist/type/lib/models/Listner.d.ts +0 -258
- package/dist/type/lib/models/MediaDevice.d.ts +0 -36
- package/dist/type/lib/models/MediaMessage.d.ts +0 -115
- package/dist/type/lib/models/MessageReceipt.d.ts +0 -99
- package/dist/type/lib/models/RTCUser.d.ts +0 -18
- package/dist/type/lib/models/TextMessage.d.ts +0 -84
- package/dist/type/lib/models/TransientMessage.d.ts +0 -48
- package/dist/type/lib/models/TypingNotification.d.ts +0 -52
- package/dist/type/lib/models/UserModel.d.ts +0 -175
- package/dist/type/lib/models/UserPresence.d.ts +0 -0
- package/dist/type/lib/models/attachment.d.ts +0 -74
- package/dist/type/lib/rest-api/EndPointUtils.d.ts +0 -9
- package/dist/type/lib/rest-api/EndpointFactory.d.ts +0 -28
- package/dist/type/lib/rest-api/HttpHelper.d.ts +0 -10
- package/readme.md +0 -189
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @module Call
|
|
4
|
-
*/
|
|
5
|
-
import { BaseMessage, Message } from "./BaseMessage";
|
|
6
|
-
import { Group } from "./Group";
|
|
7
|
-
import { User } from "./UserModel";
|
|
8
|
-
export declare class Call extends BaseMessage implements Message {
|
|
9
|
-
static readonly TYPE: {
|
|
10
|
-
TEXT: string;
|
|
11
|
-
MEDIA: string;
|
|
12
|
-
IMAGE: string;
|
|
13
|
-
VIDEO: string;
|
|
14
|
-
AUDIO: string;
|
|
15
|
-
FILE: string;
|
|
16
|
-
CUSTOM: string;
|
|
17
|
-
};
|
|
18
|
-
static readonly RECEIVER_TYPE: {
|
|
19
|
-
USER: string;
|
|
20
|
-
GROUP: string;
|
|
21
|
-
};
|
|
22
|
-
static readonly CATEGORY: {
|
|
23
|
-
MESSAGE: string;
|
|
24
|
-
ACTION: string;
|
|
25
|
-
CALL: string;
|
|
26
|
-
CUSTOM: string;
|
|
27
|
-
};
|
|
28
|
-
static readonly ACTION_TYPE: {
|
|
29
|
-
TYPE_MEMBER_JOINED: string;
|
|
30
|
-
TYPE_MEMBER_LEFT: string;
|
|
31
|
-
TYPE_MEMBER_KICKED: string;
|
|
32
|
-
TYPE_MEMBER_BANNED: string;
|
|
33
|
-
TYPE_MEMBER_UNBANNED: string;
|
|
34
|
-
TYPE_MEMBER_INVITED: string;
|
|
35
|
-
TYPE_MEMBER_SCOPE_CHANGED: string;
|
|
36
|
-
TYPE_MESSAGE: string;
|
|
37
|
-
TYPE_MESSAGE_EDITED: string;
|
|
38
|
-
TYPE_MESSAGE_DELETED: string;
|
|
39
|
-
TYPE_MEMBER_ADDED: string;
|
|
40
|
-
};
|
|
41
|
-
private sessionId;
|
|
42
|
-
protected metadata: any;
|
|
43
|
-
protected action: string;
|
|
44
|
-
protected rawData: string;
|
|
45
|
-
protected initiatedAt: number;
|
|
46
|
-
protected joinedAt: number;
|
|
47
|
-
protected data: any;
|
|
48
|
-
protected callInitiator: object;
|
|
49
|
-
protected callReceiver: object;
|
|
50
|
-
/**
|
|
51
|
-
* @memberof {@link CometChat | CometChat }
|
|
52
|
-
* @param receiverId
|
|
53
|
-
* @param type
|
|
54
|
-
* @param receiverType
|
|
55
|
-
* @param category
|
|
56
|
-
*/
|
|
57
|
-
constructor(receiverId: any, type: any, receiverType: any, category?: any);
|
|
58
|
-
/**
|
|
59
|
-
* Get call initiator entity(User)
|
|
60
|
-
* @returns {User}
|
|
61
|
-
*/
|
|
62
|
-
getCallInitiator(): User;
|
|
63
|
-
/**
|
|
64
|
-
* @param {User} user
|
|
65
|
-
* Set details of the call initiator.
|
|
66
|
-
*/
|
|
67
|
-
setCallInitiator(user: User): void;
|
|
68
|
-
/**
|
|
69
|
-
* Get call receiver entity(User/Group)
|
|
70
|
-
* @returns {User | Group}
|
|
71
|
-
*/
|
|
72
|
-
getCallReceiver(): Group | User;
|
|
73
|
-
/**
|
|
74
|
-
* @param {User | Group} receiver
|
|
75
|
-
* Set details of the call receiver.
|
|
76
|
-
*/
|
|
77
|
-
setCallReceiver(receiver: User | Group): void;
|
|
78
|
-
/** @internal */
|
|
79
|
-
getData(): object;
|
|
80
|
-
/** @internal */
|
|
81
|
-
setData(data: object): void;
|
|
82
|
-
/**
|
|
83
|
-
* Get unique session id of the call message.
|
|
84
|
-
* @returns {string}
|
|
85
|
-
*/
|
|
86
|
-
getSessionId(): string;
|
|
87
|
-
/**
|
|
88
|
-
* @param {string} sessionId
|
|
89
|
-
* Set unique session id of the call message.
|
|
90
|
-
*/
|
|
91
|
-
setSessionId(sessionId: string): void;
|
|
92
|
-
/**
|
|
93
|
-
* Get JSONObject of data set by developer.
|
|
94
|
-
* @returns
|
|
95
|
-
*/
|
|
96
|
-
getMetadata(): any;
|
|
97
|
-
/**
|
|
98
|
-
* @param {any} metadata
|
|
99
|
-
* Set metadata of the call message.
|
|
100
|
-
*/
|
|
101
|
-
setMetadata(metadata: any): void;
|
|
102
|
-
/**
|
|
103
|
-
* Get sender of the message.
|
|
104
|
-
* @returns {User}
|
|
105
|
-
*/
|
|
106
|
-
getSender(): User;
|
|
107
|
-
/**
|
|
108
|
-
* Get action of call.
|
|
109
|
-
* @returns {string}
|
|
110
|
-
*/
|
|
111
|
-
getAction(): string;
|
|
112
|
-
/**
|
|
113
|
-
* @param {string} action
|
|
114
|
-
* Set action of call.
|
|
115
|
-
*/
|
|
116
|
-
setAction(action: string): void;
|
|
117
|
-
/**
|
|
118
|
-
* Get Call initiated timestamp.
|
|
119
|
-
* @returns {number}
|
|
120
|
-
*/
|
|
121
|
-
getInitiatedAt(): number;
|
|
122
|
-
/**
|
|
123
|
-
* @param {number} initiatedAt
|
|
124
|
-
* Set call initiated timestamp.
|
|
125
|
-
*/
|
|
126
|
-
setInitiatedAt(initiatedAt: number): void;
|
|
127
|
-
/**
|
|
128
|
-
* Get Call join timestamp.
|
|
129
|
-
* @returns {number}
|
|
130
|
-
*/
|
|
131
|
-
getJoinedAt(): number;
|
|
132
|
-
/**
|
|
133
|
-
* @param {number} joinedAt
|
|
134
|
-
* Set call join timestamp.
|
|
135
|
-
*/
|
|
136
|
-
setJoinedAt(joinedAt: number): void;
|
|
137
|
-
/**
|
|
138
|
-
* Get raw JSON data of the call message.
|
|
139
|
-
* @returns {any}
|
|
140
|
-
*/
|
|
141
|
-
getRawData(): any;
|
|
142
|
-
/**
|
|
143
|
-
* @param {any} rawData
|
|
144
|
-
* Set raw JSON data of the call message.
|
|
145
|
-
*/
|
|
146
|
-
setRawData(rawData: any): void;
|
|
147
|
-
/**
|
|
148
|
-
* @internal
|
|
149
|
-
* @param {string} receiverUid
|
|
150
|
-
* @param {string} text
|
|
151
|
-
* @param {string} senderUid
|
|
152
|
-
* @param {string} receiverType
|
|
153
|
-
* @memberof Actions
|
|
154
|
-
*/
|
|
155
|
-
static callFromJSON(rawMessage: any): Call | Message;
|
|
156
|
-
private getSenderFromData;
|
|
157
|
-
private getCallInitiatedByFromData;
|
|
158
|
-
private getCallReceivedByFromData;
|
|
159
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CometChatEvent } from "./CometChatEvent";
|
|
2
|
-
export declare class CometChatAuthEvent extends CometChatEvent {
|
|
3
|
-
protected status: string;
|
|
4
|
-
protected code: string;
|
|
5
|
-
protected auth: string;
|
|
6
|
-
protected deviceId: string;
|
|
7
|
-
protected presenceSubscription: string;
|
|
8
|
-
protected params: Object;
|
|
9
|
-
constructor(appId: string, receiver: string, receiverType: string, sender: string, deviceId: string);
|
|
10
|
-
getStatus(): string;
|
|
11
|
-
setStatus(status: string): void;
|
|
12
|
-
getCode(): string;
|
|
13
|
-
setCode(code: string): void;
|
|
14
|
-
setAuth(auth: string): void;
|
|
15
|
-
getAuth(): string;
|
|
16
|
-
setPresenceSubscription(presenceSubscription: string): void;
|
|
17
|
-
getPresenceSubscription(): string;
|
|
18
|
-
setDeviceId(deviceId: string): void;
|
|
19
|
-
getdeviceId(): string;
|
|
20
|
-
setExtraParmaeters(params: Object): void;
|
|
21
|
-
getExtraParameters(): Object;
|
|
22
|
-
getAsString(): string;
|
|
23
|
-
getAsJSONObject(): Object;
|
|
24
|
-
static getAuthEventFromJSON(message: any): CometChatAuthEvent;
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare class CometChatEvent {
|
|
2
|
-
protected appId: string;
|
|
3
|
-
protected receiver: string;
|
|
4
|
-
protected receiverType: string;
|
|
5
|
-
protected type: string;
|
|
6
|
-
protected deviceId: string;
|
|
7
|
-
protected sender: string;
|
|
8
|
-
protected messageSender: string;
|
|
9
|
-
constructor(appId: string, receiver: string, receiverType: string, sender: string, deviceId: string, messageSender?: string);
|
|
10
|
-
getAppId(): string;
|
|
11
|
-
setAppId(appId: string): void;
|
|
12
|
-
getReceiver(): string;
|
|
13
|
-
setReceiver(receiver: string): void;
|
|
14
|
-
getSender(): string;
|
|
15
|
-
setSender(sender: string): void;
|
|
16
|
-
getReceiverType(): string;
|
|
17
|
-
setReceiverType(receiverType: string): void;
|
|
18
|
-
getType(): string;
|
|
19
|
-
setType(type: string): void;
|
|
20
|
-
getDeviceId(): string;
|
|
21
|
-
setDeviceId(deviceId: string): void;
|
|
22
|
-
getMessageSender(): string;
|
|
23
|
-
setMessageSender(messageSender: string): void;
|
|
24
|
-
protected getCometChatEventJSON(): Object;
|
|
25
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseMessage } from "./BaseMessage";
|
|
2
|
-
import { CometChatEvent } from "./CometChatEvent";
|
|
3
|
-
export declare class CometChatMessageEvent extends CometChatEvent {
|
|
4
|
-
protected message: BaseMessage;
|
|
5
|
-
constructor(appId: string, receiver: string, receiverType: string, sender: string, deviceId: string);
|
|
6
|
-
getMessage(): BaseMessage;
|
|
7
|
-
setMessage(message: BaseMessage): void;
|
|
8
|
-
static getMessageEventFromJSON(message: any): CometChatMessageEvent;
|
|
9
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CometChatEvent } from "./CometChatEvent";
|
|
2
|
-
export declare class CometChatPingEvent extends CometChatEvent {
|
|
3
|
-
constructor(appId: string, receiver: string, receiverType: string, sender: string, deviceId: string);
|
|
4
|
-
getAsString(): string;
|
|
5
|
-
getAsJSONObject(): Object;
|
|
6
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CometChatEvent } from "./CometChatEvent";
|
|
2
|
-
import { User } from "./UserModel";
|
|
3
|
-
export declare class CometChatPresenceEvent extends CometChatEvent {
|
|
4
|
-
protected action: string;
|
|
5
|
-
protected user: User;
|
|
6
|
-
protected timestamp: number;
|
|
7
|
-
constructor(appId: string, receiver: string, receiverType: string, sender: string, deviceId: string);
|
|
8
|
-
getAction(): string;
|
|
9
|
-
setAction(action: string): void;
|
|
10
|
-
getUser(): User;
|
|
11
|
-
setUser(user: User): void;
|
|
12
|
-
getTimestamp(): number;
|
|
13
|
-
setTimestamp(timestamp: number): void;
|
|
14
|
-
static getPresenceEventFromJSON(message: any): CometChatPresenceEvent;
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CometChatEvent } from "./CometChatEvent";
|
|
2
|
-
import { MessageReceipt } from "./MessageReceipt";
|
|
3
|
-
export declare class CometChatReceiptEvent extends CometChatEvent {
|
|
4
|
-
protected action: string;
|
|
5
|
-
protected receipt: MessageReceipt;
|
|
6
|
-
constructor(appId: string, receiver: string, receiverType: string, sender: string, deviceId: string, messageSender?: string);
|
|
7
|
-
getAction(): string;
|
|
8
|
-
setAction(action: string): void;
|
|
9
|
-
getMessageReceipt(): MessageReceipt;
|
|
10
|
-
setMessageReceipt(receipt: MessageReceipt): void;
|
|
11
|
-
getAsString(): string;
|
|
12
|
-
getAsJSONObject(): Object;
|
|
13
|
-
static getReceiptEventFromJSON(message: any): CometChatReceiptEvent;
|
|
14
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CometChatEvent } from "./CometChatEvent";
|
|
2
|
-
import { TransientMessage } from "./TransientMessage";
|
|
3
|
-
export declare class CometChatTransientEvent extends CometChatEvent {
|
|
4
|
-
protected transientMessage: TransientMessage;
|
|
5
|
-
constructor(appId: string, receiver: string, receiverType: string, sender: string, deviceId: string);
|
|
6
|
-
getTransientMessage(): TransientMessage;
|
|
7
|
-
setTransientMessage(transientMessage: TransientMessage): void;
|
|
8
|
-
getAsString(): string;
|
|
9
|
-
getAsJSONObject(): Object;
|
|
10
|
-
static getTransientEventFromJSON(message: any): CometChatTransientEvent;
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CometChatEvent } from "./CometChatEvent";
|
|
2
|
-
import { TypingIndicator } from "./TypingNotification";
|
|
3
|
-
export declare class CometChatTypingEvent extends CometChatEvent {
|
|
4
|
-
protected action: string;
|
|
5
|
-
protected typingIndicator: TypingIndicator;
|
|
6
|
-
constructor(appId: string, receiver: string, receiverType: string, sender: string, deviceId: string);
|
|
7
|
-
getAction(): string;
|
|
8
|
-
setAction(action: string): void;
|
|
9
|
-
getTypingIndicator(): TypingIndicator;
|
|
10
|
-
setTypingIndicator(typing: TypingIndicator): void;
|
|
11
|
-
getAsString(): string;
|
|
12
|
-
getAsJSONObject(): Object;
|
|
13
|
-
static getTypingEventFromJSON(message: any): CometChatTypingEvent;
|
|
14
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @module Conversation
|
|
4
|
-
*/
|
|
5
|
-
import { User } from './UserModel';
|
|
6
|
-
import { Group } from './Group';
|
|
7
|
-
import { TextMessage } from './TextMessage';
|
|
8
|
-
import { MediaMessage } from './MediaMessage';
|
|
9
|
-
import { CustomMessage } from './CustomMessage';
|
|
10
|
-
export declare class Conversation {
|
|
11
|
-
protected conversationId: string;
|
|
12
|
-
protected conversationType: string;
|
|
13
|
-
protected lastMessage: TextMessage | MediaMessage | CustomMessage | any;
|
|
14
|
-
protected conversationWith: User | Group;
|
|
15
|
-
protected unreadMessageCount: number;
|
|
16
|
-
protected tags: Array<String>;
|
|
17
|
-
constructor(conversationId: string, conversationType: string, lastMessage: TextMessage | MediaMessage | CustomMessage | any, conversationWith: User | Group, unreadMessageCount: number, tags: Array<String>);
|
|
18
|
-
/**
|
|
19
|
-
* Method to set conversation ID of the conversation.
|
|
20
|
-
* @param {string} conversationId
|
|
21
|
-
*/
|
|
22
|
-
setConversationId(conversationId: string): void;
|
|
23
|
-
/**
|
|
24
|
-
* Method to set conversation type of the conversation.
|
|
25
|
-
* @param {string} conversationId
|
|
26
|
-
*/
|
|
27
|
-
setConversationType(conversationType: string): void;
|
|
28
|
-
/**
|
|
29
|
-
* Method to set last message of the conversation.
|
|
30
|
-
* @param {TextMessage | MediaMessage | CustomMessage | any} conversationId
|
|
31
|
-
*/
|
|
32
|
-
setLastMessage(lastMessage: TextMessage | MediaMessage | CustomMessage | any): void;
|
|
33
|
-
/**
|
|
34
|
-
* Method to set conversationWith of the conversation.
|
|
35
|
-
* @param {User | Group} conversationId
|
|
36
|
-
*/
|
|
37
|
-
setConversationWith(conversationWith: User | Group): void;
|
|
38
|
-
/**
|
|
39
|
-
* Method to set unread message count of the conversation.
|
|
40
|
-
* @param {number} conversationId
|
|
41
|
-
*/
|
|
42
|
-
setUnreadMessageCount(unreadMessageCount: number): void;
|
|
43
|
-
/**
|
|
44
|
-
* Method to get conversation ID of the conversation.
|
|
45
|
-
* @returns {string}
|
|
46
|
-
*/
|
|
47
|
-
getConversationId(): string;
|
|
48
|
-
/**
|
|
49
|
-
* Method to get conversation type of the conversation.
|
|
50
|
-
* @returns {string}
|
|
51
|
-
*/
|
|
52
|
-
getConversationType(): string;
|
|
53
|
-
/**
|
|
54
|
-
* Method to get last message of the conversation.
|
|
55
|
-
* @returns {TextMessage | MediaMessage | CustomMessage | any}
|
|
56
|
-
*/
|
|
57
|
-
getLastMessage(): TextMessage | MediaMessage | CustomMessage | any;
|
|
58
|
-
/**
|
|
59
|
-
* Method to get conversationWith of the conversation.
|
|
60
|
-
* @returns {User | Group}
|
|
61
|
-
*/
|
|
62
|
-
getConversationWith(): User | Group;
|
|
63
|
-
/**
|
|
64
|
-
* Method to get unread message count of the conversation.
|
|
65
|
-
* @returns {number}
|
|
66
|
-
*/
|
|
67
|
-
getUnreadMessageCount(): number;
|
|
68
|
-
/**
|
|
69
|
-
* Method to get tags of conversation.
|
|
70
|
-
* @returns {Array<String>}
|
|
71
|
-
*/
|
|
72
|
-
getTags(): Array<String>;
|
|
73
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @module CometChatException
|
|
4
|
-
* @implements {ErrorModel}
|
|
5
|
-
*/
|
|
6
|
-
import { ErrorModel } from "./ErrorModel";
|
|
7
|
-
export declare class CometChatException implements ErrorModel {
|
|
8
|
-
code?: string | number;
|
|
9
|
-
name?: string;
|
|
10
|
-
message?: string;
|
|
11
|
-
details?: string;
|
|
12
|
-
constructor(errorModel: ErrorModel);
|
|
13
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @module CustomMessage
|
|
4
|
-
*/
|
|
5
|
-
import { BaseMessage, Message } from "./BaseMessage";
|
|
6
|
-
import { User } from "./UserModel";
|
|
7
|
-
import { Group } from "./Group";
|
|
8
|
-
export declare class CustomMessage extends BaseMessage implements Message {
|
|
9
|
-
private customData;
|
|
10
|
-
private subType;
|
|
11
|
-
private data?;
|
|
12
|
-
private tags?;
|
|
13
|
-
constructor(...args: any[]);
|
|
14
|
-
/**
|
|
15
|
-
* Method to get custom data of the message.
|
|
16
|
-
* @returns {Object}
|
|
17
|
-
*/
|
|
18
|
-
getCustomData(): Object;
|
|
19
|
-
/**
|
|
20
|
-
* Method to set custom data of the message.
|
|
21
|
-
* @param {Object} customData
|
|
22
|
-
*/
|
|
23
|
-
setCustomData(customData: Object): void;
|
|
24
|
-
/**
|
|
25
|
-
* Method to get sender of the message.
|
|
26
|
-
* @returns {User}
|
|
27
|
-
*/
|
|
28
|
-
getSender(): User;
|
|
29
|
-
/**
|
|
30
|
-
* Method to get receiver of the message.
|
|
31
|
-
* @returns {User | Group}
|
|
32
|
-
*/
|
|
33
|
-
getReceiver(): User | Group;
|
|
34
|
-
/**
|
|
35
|
-
* Methhod to get sub type of the message.
|
|
36
|
-
* @returns {string}
|
|
37
|
-
*/
|
|
38
|
-
getSubType(): string;
|
|
39
|
-
/**
|
|
40
|
-
* Method to set sub type of the message.
|
|
41
|
-
* @param {string} subType
|
|
42
|
-
*/
|
|
43
|
-
setSubType(subType: string): void;
|
|
44
|
-
/**
|
|
45
|
-
* Method to get metadata of the message.
|
|
46
|
-
* @returns {Object}
|
|
47
|
-
*/
|
|
48
|
-
getMetadata(): Object;
|
|
49
|
-
/**
|
|
50
|
-
* Method to set metadata of the message.
|
|
51
|
-
* @param {Object} metadata
|
|
52
|
-
*/
|
|
53
|
-
setMetadata(metadata: Object): void;
|
|
54
|
-
/**
|
|
55
|
-
* Method to get data of the message.
|
|
56
|
-
* @returns
|
|
57
|
-
*/
|
|
58
|
-
getData(): any;
|
|
59
|
-
/**
|
|
60
|
-
* Get the tags of the message.
|
|
61
|
-
* @returns {Array<String>}
|
|
62
|
-
*/
|
|
63
|
-
getTags(): Array<String>;
|
|
64
|
-
/**
|
|
65
|
-
* @param {Array<String>} tags
|
|
66
|
-
* Set the tags for the message.
|
|
67
|
-
*/
|
|
68
|
-
setTags(tags: Array<String>): void;
|
|
69
|
-
private getSenderFromData;
|
|
70
|
-
private getReceiverFromData;
|
|
71
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @module Group
|
|
4
|
-
*/
|
|
5
|
-
import { GroupType } from "../Constants";
|
|
6
|
-
export declare class Group {
|
|
7
|
-
/** @private */ static readonly TYPE: typeof GroupType;
|
|
8
|
-
/** @private */ static readonly Type: typeof GroupType;
|
|
9
|
-
private guid;
|
|
10
|
-
private name;
|
|
11
|
-
private type;
|
|
12
|
-
private password;
|
|
13
|
-
private icon;
|
|
14
|
-
private description;
|
|
15
|
-
private owner;
|
|
16
|
-
private metadata;
|
|
17
|
-
private createdAt;
|
|
18
|
-
private updatedAt;
|
|
19
|
-
private hasJoined;
|
|
20
|
-
private wsChannel;
|
|
21
|
-
private scope;
|
|
22
|
-
private joinedAt;
|
|
23
|
-
private membersCount;
|
|
24
|
-
private tags;
|
|
25
|
-
/**
|
|
26
|
-
* Creates an instance of Group.
|
|
27
|
-
* @param {string} guid
|
|
28
|
-
* @param {string} name
|
|
29
|
-
* @param {GroupType} type
|
|
30
|
-
* @param {string} [passsword]
|
|
31
|
-
* @param {string} [icon]
|
|
32
|
-
* @param {string} [description]
|
|
33
|
-
* @memberof Group
|
|
34
|
-
*/
|
|
35
|
-
constructor(guid: string, name?: string, type?: GroupType | string, passsword?: string, icon?: string, description?: string, hasJoined?: boolean);
|
|
36
|
-
/**
|
|
37
|
-
* Method to get GUID of the group.
|
|
38
|
-
* @returns {string}
|
|
39
|
-
*/
|
|
40
|
-
getGuid(): string;
|
|
41
|
-
/**
|
|
42
|
-
* Method to set GUID of the group.
|
|
43
|
-
* @param {string} guid
|
|
44
|
-
*/
|
|
45
|
-
setGuid(guid: string): void;
|
|
46
|
-
/**
|
|
47
|
-
* Method to get name of the group.
|
|
48
|
-
* @returns {string}
|
|
49
|
-
*/
|
|
50
|
-
getName(): string;
|
|
51
|
-
/**
|
|
52
|
-
* Method to set name of the group.
|
|
53
|
-
* @param {string} name
|
|
54
|
-
*/
|
|
55
|
-
setName(name: string): void;
|
|
56
|
-
/**
|
|
57
|
-
* Method to get the type of the group.
|
|
58
|
-
* @returns {GroupType | string}
|
|
59
|
-
*/
|
|
60
|
-
getType(): GroupType | string;
|
|
61
|
-
/**
|
|
62
|
-
* Method to set the type of the group.
|
|
63
|
-
* @param {GroupType | string} type
|
|
64
|
-
*/
|
|
65
|
-
setType(type: GroupType | string): void;
|
|
66
|
-
/**
|
|
67
|
-
* Method to get password of the group.
|
|
68
|
-
* @returns {string}
|
|
69
|
-
*/
|
|
70
|
-
getPassword(): string;
|
|
71
|
-
/**
|
|
72
|
-
* Method to set password of the group.
|
|
73
|
-
* @param {string} password
|
|
74
|
-
*/
|
|
75
|
-
setPassword(password: string): void;
|
|
76
|
-
/**
|
|
77
|
-
* Method to get icon of the group.
|
|
78
|
-
* @returns {string}
|
|
79
|
-
*/
|
|
80
|
-
getIcon(): string;
|
|
81
|
-
/**
|
|
82
|
-
* Method to set icon of the group.
|
|
83
|
-
* @param {string} icon
|
|
84
|
-
*/
|
|
85
|
-
setIcon(icon: string): void;
|
|
86
|
-
/**
|
|
87
|
-
* Method to get description of the group.
|
|
88
|
-
* @returns {string}
|
|
89
|
-
*/
|
|
90
|
-
getDescription(): string;
|
|
91
|
-
/**
|
|
92
|
-
* Method to set description of the group.
|
|
93
|
-
* @param {string} description
|
|
94
|
-
*/
|
|
95
|
-
setDescription(description: string): void;
|
|
96
|
-
/**
|
|
97
|
-
* Method to get owner of the group.
|
|
98
|
-
* @returns {string}
|
|
99
|
-
*/
|
|
100
|
-
getOwner(): string;
|
|
101
|
-
/**
|
|
102
|
-
* Method to set owner of the group.
|
|
103
|
-
* @param {string} owner
|
|
104
|
-
*/
|
|
105
|
-
setOwner(owner: string): void;
|
|
106
|
-
/**
|
|
107
|
-
* Method to get metadata of the group.
|
|
108
|
-
* @returns {string}
|
|
109
|
-
*/
|
|
110
|
-
getMetadata(): string;
|
|
111
|
-
/**
|
|
112
|
-
* Method to set metadata of the group.
|
|
113
|
-
* @param {string} metadata
|
|
114
|
-
*/
|
|
115
|
-
setMetadata(metadata: string): void;
|
|
116
|
-
/**
|
|
117
|
-
* Method to get the created at timestamp of the group.
|
|
118
|
-
* @returns {number}
|
|
119
|
-
*/
|
|
120
|
-
getCreatedAt(): number;
|
|
121
|
-
/**
|
|
122
|
-
* Method to set the created at timestamp of the group.
|
|
123
|
-
* @param {number} createdAt
|
|
124
|
-
*/
|
|
125
|
-
setCreatedAt(createdAt: number): void;
|
|
126
|
-
/**
|
|
127
|
-
* Method to get the updated at timestamp of the group.
|
|
128
|
-
* @returns {number}
|
|
129
|
-
*/
|
|
130
|
-
getUpdatedAt(): number;
|
|
131
|
-
/**
|
|
132
|
-
* Method to set updated at timestamp of the group.
|
|
133
|
-
* @param {number} updatedAt
|
|
134
|
-
*/
|
|
135
|
-
setUpdatedAt(updatedAt: number): void;
|
|
136
|
-
/**
|
|
137
|
-
* Method to get the joinedAt of the group.
|
|
138
|
-
* @returns {boolean}
|
|
139
|
-
*/
|
|
140
|
-
getHasJoined(): boolean;
|
|
141
|
-
/**
|
|
142
|
-
* Method to set the joinedAt of the group.
|
|
143
|
-
* @param {boolean} hasJoined
|
|
144
|
-
*/
|
|
145
|
-
setHasJoined(hasJoined: boolean): void;
|
|
146
|
-
/** @private */
|
|
147
|
-
getWsChannel(): any;
|
|
148
|
-
/** @private */
|
|
149
|
-
setWsChannel(wsChannel: any): void;
|
|
150
|
-
/**
|
|
151
|
-
* Method to set scope of the logged-in user in the group.
|
|
152
|
-
* @param {string} scope
|
|
153
|
-
*/
|
|
154
|
-
setScope(scope: string): void;
|
|
155
|
-
/**
|
|
156
|
-
* Method to get scope of the logged-in user.
|
|
157
|
-
* @returns {string}
|
|
158
|
-
*/
|
|
159
|
-
getScope(): string;
|
|
160
|
-
/**
|
|
161
|
-
* Method to get joinedAt timestamp of the logged-in user.
|
|
162
|
-
* @returns {string}
|
|
163
|
-
*/
|
|
164
|
-
getJoinedAt(): string;
|
|
165
|
-
/**
|
|
166
|
-
* Method to set joinedAt timestamp of the logged-in user in the group.
|
|
167
|
-
* @param {string} joinedAt
|
|
168
|
-
*/
|
|
169
|
-
setJoinedAt(joinedAt: string): void;
|
|
170
|
-
/**
|
|
171
|
-
* Method to get members count of the group.
|
|
172
|
-
* @returns {number}
|
|
173
|
-
*/
|
|
174
|
-
getMembersCount(): number;
|
|
175
|
-
/**
|
|
176
|
-
* Method to set members count of the group.
|
|
177
|
-
* @param {number} membersCount
|
|
178
|
-
*/
|
|
179
|
-
setMembersCount(membersCount: number): void;
|
|
180
|
-
/**
|
|
181
|
-
* Method to set tags of the group.
|
|
182
|
-
* @param {string[]} tags
|
|
183
|
-
*/
|
|
184
|
-
setTags(tags: Array<String>): void;
|
|
185
|
-
/**
|
|
186
|
-
* Method to get tags of the group.
|
|
187
|
-
* @returns {string[]}
|
|
188
|
-
*/
|
|
189
|
-
getTags(): Array<String>;
|
|
190
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @module GroupMember
|
|
4
|
-
*/
|
|
5
|
-
import { User } from "./UserModel";
|
|
6
|
-
import { GroupMemberScope } from "../Constants";
|
|
7
|
-
export declare class GroupMember extends User {
|
|
8
|
-
private static readonly GroupMemberScope;
|
|
9
|
-
private scope;
|
|
10
|
-
private joinedAt;
|
|
11
|
-
private guid;
|
|
12
|
-
constructor(uid: string, scope?: string);
|
|
13
|
-
/**
|
|
14
|
-
* Method to set scope of the group member.
|
|
15
|
-
* @param {GroupMemberScope} scope
|
|
16
|
-
*/
|
|
17
|
-
setScope(scope: GroupMemberScope): void;
|
|
18
|
-
/**
|
|
19
|
-
* Method to set joinedAt of the group member.
|
|
20
|
-
* @param {number} joinedAt
|
|
21
|
-
*/
|
|
22
|
-
setJoinedAt(joinedAt: number): void;
|
|
23
|
-
/**
|
|
24
|
-
* Method to set guid of the group member.
|
|
25
|
-
* @param {string} guid
|
|
26
|
-
*/
|
|
27
|
-
setGuid(guid: string): void;
|
|
28
|
-
/**
|
|
29
|
-
* Method to get scope of the group member.
|
|
30
|
-
* @returns {string}
|
|
31
|
-
*/
|
|
32
|
-
getScope(): string;
|
|
33
|
-
/**
|
|
34
|
-
* Method to get joinedAt of the group member.
|
|
35
|
-
* @returns {number}
|
|
36
|
-
*/
|
|
37
|
-
getJoinedAt(): number;
|
|
38
|
-
/**
|
|
39
|
-
* Method to get guid of the group member.
|
|
40
|
-
* @returns {string}
|
|
41
|
-
*/
|
|
42
|
-
getGuid(): string;
|
|
43
|
-
}
|