@cometchat/chat-sdk-javascript 4.0.0-beta1

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.
Files changed (140) hide show
  1. package/dist/.DS_Store +0 -0
  2. package/dist/CometChat.js +1 -0
  3. package/dist/index.d.ts +5894 -0
  4. package/dist/javascript-chat-sdk/.git/COMMIT_EDITMSG +1 -0
  5. package/dist/javascript-chat-sdk/.git/FETCH_HEAD +4 -0
  6. package/dist/javascript-chat-sdk/.git/HEAD +1 -0
  7. package/dist/javascript-chat-sdk/.git/ORIG_HEAD +1 -0
  8. package/dist/javascript-chat-sdk/.git/config +19 -0
  9. package/dist/javascript-chat-sdk/.git/description +1 -0
  10. package/dist/javascript-chat-sdk/.git/hooks/applypatch-msg.sample +15 -0
  11. package/dist/javascript-chat-sdk/.git/hooks/commit-msg.sample +24 -0
  12. package/dist/javascript-chat-sdk/.git/hooks/fsmonitor-watchman.sample +174 -0
  13. package/dist/javascript-chat-sdk/.git/hooks/post-update.sample +8 -0
  14. package/dist/javascript-chat-sdk/.git/hooks/pre-applypatch.sample +14 -0
  15. package/dist/javascript-chat-sdk/.git/hooks/pre-commit.sample +49 -0
  16. package/dist/javascript-chat-sdk/.git/hooks/pre-merge-commit.sample +13 -0
  17. package/dist/javascript-chat-sdk/.git/hooks/pre-push.sample +53 -0
  18. package/dist/javascript-chat-sdk/.git/hooks/pre-rebase.sample +169 -0
  19. package/dist/javascript-chat-sdk/.git/hooks/pre-receive.sample +24 -0
  20. package/dist/javascript-chat-sdk/.git/hooks/prepare-commit-msg.sample +42 -0
  21. package/dist/javascript-chat-sdk/.git/hooks/push-to-checkout.sample +78 -0
  22. package/dist/javascript-chat-sdk/.git/hooks/update.sample +128 -0
  23. package/dist/javascript-chat-sdk/.git/index +0 -0
  24. package/dist/javascript-chat-sdk/.git/info/exclude +6 -0
  25. package/dist/javascript-chat-sdk/.git/logs/HEAD +13 -0
  26. package/dist/javascript-chat-sdk/.git/logs/refs/heads/master +1 -0
  27. package/dist/javascript-chat-sdk/.git/logs/refs/heads/master-v3 +3 -0
  28. package/dist/javascript-chat-sdk/.git/logs/refs/heads/master-v4 +4 -0
  29. package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/HEAD +1 -0
  30. package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/master-v3 +2 -0
  31. package/dist/javascript-chat-sdk/.git/logs/refs/remotes/origin/master-v4 +2 -0
  32. package/dist/javascript-chat-sdk/.git/logs/refs/stash +1 -0
  33. package/dist/javascript-chat-sdk/.git/objects/09/b9e17d9a0acd55c3644f4cfa19b1c40a139018 +0 -0
  34. package/dist/javascript-chat-sdk/.git/objects/0f/2d8999b370e8ddb236f767aa565b2aa72a6b21 +0 -0
  35. package/dist/javascript-chat-sdk/.git/objects/15/7f5161e31be14c74df7907c9c5046fbbea4461 +0 -0
  36. package/dist/javascript-chat-sdk/.git/objects/17/89200f3f5621f9df6d08d1071c59557ce5a29d +0 -0
  37. package/dist/javascript-chat-sdk/.git/objects/26/1de108a0253f54cf37e8a072f7f5f0098c7e89 +4 -0
  38. package/dist/javascript-chat-sdk/.git/objects/43/7ffc94a259dcd818cca308ab60a2780714092d +1 -0
  39. package/dist/javascript-chat-sdk/.git/objects/4e/6ab6a981ea6dccdb60b6438d7ca142aef269fc +0 -0
  40. package/dist/javascript-chat-sdk/.git/objects/5e/04a3d79cebcc2b02c14ea807f839ea73d44461 +0 -0
  41. package/dist/javascript-chat-sdk/.git/objects/65/bbff4d1cccc12285ea1c59a6f2082552f0d034 +0 -0
  42. package/dist/javascript-chat-sdk/.git/objects/6a/a6ef178cb2e3775bb149aba99ace8399525da6 +0 -0
  43. package/dist/javascript-chat-sdk/.git/objects/6b/e1ffe406de9ebb698ea891315b2b1459160029 +0 -0
  44. package/dist/javascript-chat-sdk/.git/objects/6b/efb8e9de892be7ecee5d39c30c0aa17d43d727 +2 -0
  45. package/dist/javascript-chat-sdk/.git/objects/6e/f136ca41bbb5684639947fa121b7eebb795592 +0 -0
  46. package/dist/javascript-chat-sdk/.git/objects/87/96f6311621c3ee4fc8d37eeec64a6c94e3e6ca +0 -0
  47. package/dist/javascript-chat-sdk/.git/objects/8b/2d226d44814b7265b68ab7953a87cd44d77965 +0 -0
  48. package/dist/javascript-chat-sdk/.git/objects/9c/bc4afb06153fd276e240e709984bf1099386ba +0 -0
  49. package/dist/javascript-chat-sdk/.git/objects/a9/6c6710dfb57871b6eccda3a94d83990ba94d9f +0 -0
  50. package/dist/javascript-chat-sdk/.git/objects/ad/1b70a4bb12b3fe2e6306d2b0922582036f4e42 +0 -0
  51. package/dist/javascript-chat-sdk/.git/objects/c1/655387f263ec50dbef8042099eead57dfe00c2 +0 -0
  52. package/dist/javascript-chat-sdk/.git/objects/e0/ad85d968302e5447402ed4d0bc8ace931b9167 +0 -0
  53. package/dist/javascript-chat-sdk/.git/objects/e8/0b03094191c92690d5bb92b4271058f188efd1 +1 -0
  54. package/dist/javascript-chat-sdk/.git/objects/f0/cc86624ec0504ed24dcd6a7b2cdee917b73395 +2 -0
  55. package/dist/javascript-chat-sdk/.git/objects/f9/95e0e3dc98868eb6404f8cdd84632ae140e1ff +2 -0
  56. package/dist/javascript-chat-sdk/.git/objects/fb/d9b82e03d33337a8d2606fc9e2f1652ffda3de +0 -0
  57. package/dist/javascript-chat-sdk/.git/objects/pack/pack-efd6261f29a0c404693064c4a255aada38ddab72.idx +0 -0
  58. package/dist/javascript-chat-sdk/.git/objects/pack/pack-efd6261f29a0c404693064c4a255aada38ddab72.pack +0 -0
  59. package/dist/javascript-chat-sdk/.git/packed-refs +107 -0
  60. package/dist/javascript-chat-sdk/.git/refs/heads/master +1 -0
  61. package/dist/javascript-chat-sdk/.git/refs/heads/master-v3 +1 -0
  62. package/dist/javascript-chat-sdk/.git/refs/heads/master-v4 +1 -0
  63. package/dist/javascript-chat-sdk/.git/refs/remotes/origin/HEAD +1 -0
  64. package/dist/javascript-chat-sdk/.git/refs/remotes/origin/master-v3 +1 -0
  65. package/dist/javascript-chat-sdk/.git/refs/remotes/origin/master-v4 +1 -0
  66. package/dist/javascript-chat-sdk/.git/refs/stash +1 -0
  67. package/dist/javascript-chat-sdk/.gitignore +2 -0
  68. package/dist/javascript-chat-sdk/CometChat.d.ts +4732 -0
  69. package/dist/javascript-chat-sdk/CometChat.js +1 -0
  70. package/dist/javascript-chat-sdk/LICENSE.md +3 -0
  71. package/dist/javascript-chat-sdk/README.md +189 -0
  72. package/dist/javascript-chat-sdk/package.json +36 -0
  73. package/dist/package.json +36 -0
  74. package/dist/type/index.d.ts +10 -0
  75. package/dist/type/lib/BannedMembersRequest.d.ts +60 -0
  76. package/dist/type/lib/BlockedUsersRequest.d.ts +67 -0
  77. package/dist/type/lib/CallSettings.d.ts +429 -0
  78. package/dist/type/lib/CometChat.d.ts +1954 -0
  79. package/dist/type/lib/CometChatErrorConstants.d.ts +124 -0
  80. package/dist/type/lib/CometChatHelper.d.ts +26 -0
  81. package/dist/type/lib/Constants.d.ts +953 -0
  82. package/dist/type/lib/ConversationRequest.d.ts +89 -0
  83. package/dist/type/lib/GroupMembersRequest.d.ts +61 -0
  84. package/dist/type/lib/GroupsRequest.d.ts +78 -0
  85. package/dist/type/lib/Helper.d.ts +46 -0
  86. package/dist/type/lib/ListenerHandlers.d.ts +101 -0
  87. package/dist/type/lib/MessagesRequest.d.ts +188 -0
  88. package/dist/type/lib/UsersRequest.d.ts +142 -0
  89. package/dist/type/lib/WebSockets/WSConnectionHelper.d.ts +41 -0
  90. package/dist/type/lib/WebSockets/WSConstants.d.ts +71 -0
  91. package/dist/type/lib/WebSockets/WSHelper.d.ts +3 -0
  92. package/dist/type/lib/controllers/CallController.d.ts +151 -0
  93. package/dist/type/lib/controllers/ConversationController.d.ts +14 -0
  94. package/dist/type/lib/controllers/GroupMemberController.d.ts +10 -0
  95. package/dist/type/lib/controllers/GroupsController.d.ts +9 -0
  96. package/dist/type/lib/controllers/MessageController.d.ts +18 -0
  97. package/dist/type/lib/controllers/PresenceController.d.ts +0 -0
  98. package/dist/type/lib/controllers/TypingNotificationController.d.ts +14 -0
  99. package/dist/type/lib/controllers/UserAuthController.d.ts +10 -0
  100. package/dist/type/lib/controllers/UsersController.d.ts +9 -0
  101. package/dist/type/lib/localStore/KeyStore.d.ts +45 -0
  102. package/dist/type/lib/localStore/MessageListenerEventMaping.d.ts +56 -0
  103. package/dist/type/lib/localStore/MessagesStore.d.ts +72 -0
  104. package/dist/type/lib/localStore/UserStore.d.ts +72 -0
  105. package/dist/type/lib/localStore/store.d.ts +61 -0
  106. package/dist/type/lib/models/Action.d.ts +159 -0
  107. package/dist/type/lib/models/AppSettings.d.ts +135 -0
  108. package/dist/type/lib/models/BaseMessage.d.ts +259 -0
  109. package/dist/type/lib/models/CCExtension.d.ts +15 -0
  110. package/dist/type/lib/models/Call.d.ts +159 -0
  111. package/dist/type/lib/models/CometChatAuthEvent.d.ts +25 -0
  112. package/dist/type/lib/models/CometChatEvent.d.ts +25 -0
  113. package/dist/type/lib/models/CometChatMessageEvent.d.ts +9 -0
  114. package/dist/type/lib/models/CometChatPingEvent.d.ts +6 -0
  115. package/dist/type/lib/models/CometChatPresenceEvent.d.ts +15 -0
  116. package/dist/type/lib/models/CometChatReceiptEvent.d.ts +14 -0
  117. package/dist/type/lib/models/CometChatTransientEvent.d.ts +11 -0
  118. package/dist/type/lib/models/CometChatTypingEvent.d.ts +14 -0
  119. package/dist/type/lib/models/ConversationModel.d.ts +73 -0
  120. package/dist/type/lib/models/CustomError.d.ts +13 -0
  121. package/dist/type/lib/models/CustomMessage.d.ts +71 -0
  122. package/dist/type/lib/models/ErrorModel.d.ts +12 -0
  123. package/dist/type/lib/models/Group.d.ts +190 -0
  124. package/dist/type/lib/models/GroupMember.d.ts +43 -0
  125. package/dist/type/lib/models/Listner.d.ts +258 -0
  126. package/dist/type/lib/models/MediaDevice.d.ts +36 -0
  127. package/dist/type/lib/models/MediaMessage.d.ts +115 -0
  128. package/dist/type/lib/models/MessageReceipt.d.ts +99 -0
  129. package/dist/type/lib/models/RTCUser.d.ts +18 -0
  130. package/dist/type/lib/models/TextMessage.d.ts +84 -0
  131. package/dist/type/lib/models/TransientMessage.d.ts +48 -0
  132. package/dist/type/lib/models/TypingNotification.d.ts +52 -0
  133. package/dist/type/lib/models/UserModel.d.ts +175 -0
  134. package/dist/type/lib/models/UserPresence.d.ts +0 -0
  135. package/dist/type/lib/models/attachment.d.ts +74 -0
  136. package/dist/type/lib/rest-api/EndPointUtils.d.ts +9 -0
  137. package/dist/type/lib/rest-api/EndpointFactory.d.ts +28 -0
  138. package/dist/type/lib/rest-api/HttpHelper.d.ts +10 -0
  139. package/package.json +48 -0
  140. package/readme.md +189 -0
@@ -0,0 +1,142 @@
1
+ import { User } from './models/UserModel';
2
+ export declare class UsersRequest {
3
+ private limit;
4
+ private next_page;
5
+ private current_page;
6
+ private total_pages;
7
+ private static userStore;
8
+ private status;
9
+ private searchKeyword;
10
+ private hideBlockedUsers;
11
+ private friendsOnly;
12
+ private fetchingInProgress;
13
+ private role;
14
+ private roles;
15
+ private tags;
16
+ private withTags;
17
+ private UIDs;
18
+ private sortBy;
19
+ private sortOrder;
20
+ private searchIn;
21
+ private pagination;
22
+ static USER_STATUS: {
23
+ ONLINE: string;
24
+ OFFLINE: string;
25
+ };
26
+ private validateUserBuilder;
27
+ constructor(builder?: UsersRequestBuilder);
28
+ /**
29
+ * Get list of next set of users based on the parameters specified in UsersRequestBuilder class The Developer need to call this method repeatedly using the same object of UsersRequestBuilder class to get paginated list of users.
30
+ * @returns {Promise<User[] | []>}
31
+ */
32
+ fetchNext(): Promise<User[] | []>;
33
+ /**
34
+ * @internal
35
+ */
36
+ getNextData(): any;
37
+ }
38
+ export declare class UsersRequestBuilder {
39
+ /** @private */ limit: number;
40
+ /** @private */ status: string;
41
+ /** @private */ searchKeyword: string;
42
+ /** @private */ shouldHideBlockedUsers: boolean;
43
+ /** @private */ role: string;
44
+ /** @private */ roles: Array<String>;
45
+ /** @private */ tags: Array<String>;
46
+ /** @private */ showFriendsOnly: boolean;
47
+ /** @private */ showTags: boolean;
48
+ /** @private */ UIDs: Array<String>;
49
+ /** @private */ SortBy: string;
50
+ /** @private */ SortOrder: string;
51
+ /** @private */ SearchIn: Array<String>;
52
+ /**
53
+ * A method to set limit for the number of Users returned in a single iteration. A maximum of 100 users can fetched in a single iteration.
54
+ * @param {number} limit
55
+ * @returns
56
+ */
57
+ setLimit(limit: number): this;
58
+ /**
59
+ * A method to get the users belonging to a specific status.
60
+ * @param {string} status
61
+ * @returns
62
+ */
63
+ setStatus(status: string): this;
64
+ /**
65
+ * A method to set the search string based on which the users are to be fetched.
66
+ * @param {string} searchKeyword
67
+ * @returns
68
+ */
69
+ setSearchKeyword(searchKeyword: string): this;
70
+ /**
71
+ * Method to hide blocked users.
72
+ * @param {boolean} hideBlockedUsers
73
+ * @returns
74
+ */
75
+ hideBlockedUsers(hideBlockedUsers: boolean): this;
76
+ /**
77
+ * A method to get the users with the specified role.
78
+ * @param {string} role
79
+ * @returns
80
+ */
81
+ setRole(role: string): this;
82
+ /**
83
+ * A method to get the users with the specified roles.
84
+ * @param {string[]} role
85
+ * @returns
86
+ */
87
+ setRoles(roles: Array<String>): this;
88
+ /**
89
+ * A method to fetch only friends.
90
+ * @param {boolean} friendsOnly
91
+ * @returns
92
+ */
93
+ friendsOnly(friendsOnly: boolean): this;
94
+ /**
95
+ * A method to get the users with the specified tags.
96
+ * @param {string[]} tags
97
+ * @returns
98
+ */
99
+ setTags(tags: Array<String>): this;
100
+ /**
101
+ * A method to get the tags along with the other details of the users.
102
+ * @param {boolean} withTags
103
+ * @returns
104
+ */
105
+ withTags(withTags: boolean): this;
106
+ /**
107
+ * A method to get the users with the specified UIDs.
108
+ * @param {string[]} uids
109
+ * @returns
110
+ */
111
+ setUIDs(uids: Array<String>): this;
112
+ /**
113
+ * A method to get the users sorted by either `name` or `status`.
114
+ * It accepts a string as input.
115
+ * By default the SDK fetches users sorted by `status`.
116
+ * @param {string} sortBy
117
+ * @returns
118
+ */
119
+ sortBy(sortBy: string): this;
120
+ /**
121
+ * A method to get the users sorted either in `asc` or `desc` order.
122
+ * It accepts a string as input.
123
+ * By default the SDK fetches users sorted in `asc` order.
124
+ * @param {string} sortOrder
125
+ * @returns
126
+ */
127
+ sortByOrder(sortOrder: string): this;
128
+ /**
129
+ * A method to set which field the search string should be searched.
130
+ * It accepts an array of string as input.
131
+ * It can be `["name"]`, `["uid"]` or `["name", "uid"]`.
132
+ * By default the SDK searches the search string in `["name", "uid"]`.
133
+ * @param {string[]} searchIn
134
+ * @returns
135
+ */
136
+ searchIn(searchIn: Array<String>): this;
137
+ /**
138
+ * This method will return an object of the UsersRequest class.
139
+ * @returns {UsersRequest}
140
+ */
141
+ build(): UsersRequest;
142
+ }
@@ -0,0 +1,41 @@
1
+ import { Action } from "../models/Action";
2
+ import { BaseMessage } from "../models/BaseMessage";
3
+ import { Call } from "../models/Call";
4
+ import { CometChatAuthEvent } from "../models/CometChatAuthEvent";
5
+ import { CometChatMessageEvent } from "../models/CometChatMessageEvent";
6
+ import { CometChatPresenceEvent } from "../models/CometChatPresenceEvent";
7
+ import { CometChatReceiptEvent } from "../models/CometChatReceiptEvent";
8
+ import { CometChatTransientEvent } from "../models/CometChatTransientEvent";
9
+ import { CometChatTypingEvent } from "../models/CometChatTypingEvent";
10
+ export declare class WSConnectionHelper {
11
+ connection?: any;
12
+ private static pingTimer;
13
+ private static wsConnectionHelper;
14
+ static getInstance(): WSConnectionHelper;
15
+ WSLogin(jwt: any, callback: any): void;
16
+ onOpen(event: any, callback: any): void;
17
+ onClose(event: any, callback: any): void;
18
+ onMessage(event: any): void;
19
+ authenticateUser(jwt: any): void;
20
+ authResponseReceived(event: CometChatAuthEvent): void;
21
+ WSLogout(): void;
22
+ startPingingWS(): void;
23
+ listenForPong(): any;
24
+ clearPingTimer(): void;
25
+ sendOnlineEvent(): void;
26
+ sendOfflineEvent(): void;
27
+ startTypingIndicator(receiverId: string, receiverType: string, metadata: any): void;
28
+ pauseTypingIndicator(receiverId: string, receiverType: string, metadata: any): void;
29
+ markAsRead(receiverId: string, receiverType: string, messageId: string, senderId: string): void;
30
+ markAsDelivered(receiverId: string, receiverType: string, messageId: string, senderId: string): void;
31
+ sendTransientMessage(receiverId: string, receiverType: string, data: any): void;
32
+ publishTypingIndicator(cometchatEvent: CometChatTypingEvent): void;
33
+ publishReceipts(cometchatEvent: CometChatReceiptEvent): void;
34
+ publishPresence(cometchatEvent: CometChatPresenceEvent): void;
35
+ publishMessages(cometchatEvent: CometChatMessageEvent): void;
36
+ publishMessage(message: BaseMessage): void;
37
+ publishCallMessage(message: Call): void;
38
+ publishActionMessage(message: Action): void;
39
+ publishTransientMessage(cometchatEvent: CometChatTransientEvent): void;
40
+ getCometChatEventFromMessage(message: any): CometChatTypingEvent | CometChatReceiptEvent | CometChatAuthEvent | CometChatPresenceEvent | CometChatMessageEvent | CometChatTransientEvent;
41
+ }
@@ -0,0 +1,71 @@
1
+ export declare const WS: {
2
+ protocol: string;
3
+ };
4
+ export declare const READY_STATE: {
5
+ CONNECTING: number;
6
+ OPEN: number;
7
+ CLOSING: number;
8
+ CLOSED: number;
9
+ INVALID_JWT: number;
10
+ };
11
+ export declare const LOGOUT_CODE = 1000;
12
+ export declare const LOGOUT_REASON = "User logged out";
13
+ export declare const TYPING_INDICATOR: {
14
+ TYPE: string;
15
+ ACTION: {
16
+ STARTED: string;
17
+ ENDED: string;
18
+ };
19
+ };
20
+ export declare const TRANSIENT_MESSAGE: {
21
+ TYPE: string;
22
+ };
23
+ export declare const RECEIPTS: {
24
+ TYPE: string;
25
+ ACTION: {
26
+ READ: string;
27
+ DELIVERED: string;
28
+ };
29
+ RECEIPT_TYPE: {
30
+ READ_RECEIPT: string;
31
+ DELIVERY_RECEIPT: string;
32
+ };
33
+ };
34
+ export declare const PRESENCE: {
35
+ TYPE: string;
36
+ ACTION: {
37
+ ONLINE: string;
38
+ AVAILABLE: string;
39
+ OFFLINE: string;
40
+ };
41
+ };
42
+ export declare const MESSAGE: {
43
+ TYPE: string;
44
+ };
45
+ export declare const AUTH: {
46
+ TYPE: string;
47
+ };
48
+ export declare const KEYS: {
49
+ TYPE: string;
50
+ ACTION: string;
51
+ APP_ID: string;
52
+ RECEIVER: string;
53
+ RECEIVER_TYPE: string;
54
+ DEVICE_ID: string;
55
+ BODY: string;
56
+ USER: string;
57
+ METADATA: string;
58
+ MESSAGE_ID: string;
59
+ TIMESTAMP: string;
60
+ STATUS: string;
61
+ CODE: string;
62
+ SENDER: string;
63
+ MESSAGE_SENDER: string;
64
+ PRESENCE_SUBSCRIPTION: string;
65
+ AUTH: string;
66
+ PING: string;
67
+ DATA: string;
68
+ PARAMS: string;
69
+ ACK: string;
70
+ PONG: string;
71
+ };
@@ -0,0 +1,3 @@
1
+ export declare function checkConnection(connection: any): boolean;
2
+ export declare function stringifyMessage(message: any): string;
3
+ export declare function getWSURL(): any;
@@ -0,0 +1,151 @@
1
+ import { Call } from '../models/Call';
2
+ import { UserCallListener, OngoingCallListener } from '../models/Listner';
3
+ import { CallSettings } from '../CallSettings';
4
+ import { MediaDevice } from '../models/MediaDevice';
5
+ export declare class CallController {
6
+ /** @internal */
7
+ TAG: string;
8
+ /** @private */
9
+ static callController: CallController;
10
+ private static callListner;
11
+ private call;
12
+ private timer;
13
+ private CALL_NO_ANSWER_INTERVAL;
14
+ private view;
15
+ private static callScreen;
16
+ private static callSettings;
17
+ private isDev;
18
+ private static deviceList;
19
+ private constructor();
20
+ /** @internal */
21
+ getCallListner(): UserCallListener;
22
+ /** @internal */
23
+ setCallListner(callEventHandler: OngoingCallListener): void;
24
+ static getInstance(): CallController;
25
+ /**
26
+ * returns the ongoing call object or null|undefined
27
+ *
28
+ * @internal
29
+ * @returns {Call}
30
+ * @memberof CallController
31
+ */
32
+ getActiveCall(): Call;
33
+ /**
34
+ * Initialize the call.
35
+ *
36
+ * @internal
37
+ * @param {Call} call
38
+ * @returns
39
+ * @memberof CallController
40
+ */
41
+ initiateCall(call: Call): Promise<Call>;
42
+ /**
43
+ *End the onGoing call
44
+ *
45
+ * @internal
46
+ * @param {boolean} [isInternal]
47
+ * @memberof CallController
48
+ */
49
+ endCall(isInternal?: boolean): void;
50
+ /** @internal */
51
+ onCallStarted(call: Call): Promise<Call>;
52
+ /** @internal */
53
+ endCallSession(): void;
54
+ /** @internal */
55
+ private startCallTimer;
56
+ /** @internal */
57
+ private stopCallTimer;
58
+ /** @internal */
59
+ startCall(callsettings: CallSettings, view: HTMLElement): void;
60
+ /** @internal */
61
+ addListener(): void;
62
+ /** @internal */
63
+ removeListener(): void;
64
+ /** @internal */
65
+ handler(message: any): void;
66
+ private getCallUrl;
67
+ private static getAvailableDeviceArray;
68
+ private static getAvailableDeviceObject;
69
+ /**
70
+ * Method to get all the available audio input devices.
71
+ * @returns {MediaDevice[]}
72
+ */
73
+ getAudioInputDevices(): MediaDevice[];
74
+ /**
75
+ * Method to get all the available audio output devices.
76
+ * @returns {MediaDevice[]}
77
+ */
78
+ getAudioOutputDevices(): MediaDevice[];
79
+ /**
80
+ * Method to get all the available video input devices.
81
+ * @returns {MediaDevice[]}
82
+ */
83
+ getVideoInputDevices(): MediaDevice[];
84
+ /**
85
+ * Method to change the audio input devices.
86
+ * @param {string} deviceId
87
+ * @returns {MediaDevice[]}
88
+ */
89
+ setAudioInputDevice(deviceId: string): void;
90
+ /**
91
+ * Method to change the audio output devices.
92
+ * @param {string} deviceId
93
+ * @returns {MediaDevice[]}
94
+ */
95
+ setAudioOutputDevice(deviceId: string): void;
96
+ /**
97
+ * Method to change the video input devices.
98
+ * @param {string} deviceId
99
+ * @returns {MediaDevice[]}
100
+ */
101
+ setVideoInputDevice(deviceId: string): void;
102
+ /**
103
+ * Method to mute/unmute audio stream.
104
+ * @param {boolean} muteAudio
105
+ */
106
+ muteAudio(muteAudio: boolean): void;
107
+ /**
108
+ * Method to pause/unpause video stream.
109
+ * @param {boolean} pauseVideo
110
+ */
111
+ pauseVideo(pauseVideo: boolean): void;
112
+ /**
113
+ * Method to set mode.
114
+ * @param mode
115
+ */
116
+ setMode(mode: any): void;
117
+ /**
118
+ * Method to start screen share.
119
+ */
120
+ startScreenShare(): void;
121
+ /**
122
+ * Method to stop screen share.
123
+ */
124
+ stopScreenShare(): void;
125
+ /**
126
+ * Method to start call recording.
127
+ */
128
+ startRecording(): void;
129
+ /**
130
+ * Method to stop call recording.
131
+ */
132
+ stopRecording(): void;
133
+ /**
134
+ * Method to switch an audio call to video call.
135
+ */
136
+ switchToVideoCall(): void;
137
+ /**
138
+ * Method to open the virtual background settings.
139
+ */
140
+ openVirtualBackground(): void;
141
+ /**
142
+ * Method to set the background blur. This method takes number as input which decides the blur level of the background.
143
+ */
144
+ setBackgroundBlur(blurLevel: number): void;
145
+ /**
146
+ * Method to set the background image. This method takes either a URL or file Object & sets that image as the background.
147
+ */
148
+ setBackgroundImage(image: string | Object): void;
149
+ /** @internal */
150
+ endSession(): void;
151
+ }
@@ -0,0 +1,14 @@
1
+ import { Conversation } from '../models/ConversationModel';
2
+ import { User } from '../models/UserModel';
3
+ import { TextMessage } from '../models/TextMessage';
4
+ import { MediaMessage } from '../models/MediaMessage';
5
+ import { CustomMessage } from '../models/CustomMessage';
6
+ import { Group } from '../models/Group';
7
+ export declare class ConversationController {
8
+ /**
9
+ *Takes JSONConversation format as an input and returs the CometChatConversation
10
+ *
11
+ * @param user
12
+ */
13
+ static trasformJSONConversation(conversationId: string, conversationType: string, lastMessage: TextMessage | MediaMessage | CustomMessage | any, conversationWith: User | Group, unreadMessageCount: number | any, tags: Array<String>): Conversation | any;
14
+ }
@@ -0,0 +1,10 @@
1
+ import { GroupMember } from '../models/GroupMember';
2
+ export declare class GroupMembersController {
3
+ /**
4
+ * Takes JSONUser format as an input and returs the CometChatUser.
5
+ * @param {*} groupMember
6
+ * @returns {(GroupMember | any)}
7
+ * @memberof GroupMembersController
8
+ */
9
+ static trasformJSONGroupMember(groupMember: any): GroupMember | any;
10
+ }
@@ -0,0 +1,9 @@
1
+ import { Group } from '../models/Group';
2
+ export declare class GroupsController {
3
+ /**
4
+ *Takes JSONGroup format as an input and returs the GroupObject
5
+ *
6
+ * @param user
7
+ */
8
+ static trasformJSONGroup(group: any): Group | any;
9
+ }
@@ -0,0 +1,18 @@
1
+ import { Message } from '../models/BaseMessage';
2
+ import { MessageReceipt } from '../models/MessageReceipt';
3
+ export declare class MessageController {
4
+ /**
5
+ *Takes JSONMessage format as an input and returs the Message|any
6
+ * @param {*} message
7
+ * @returns {(Message|any)}
8
+ * @memberof MessageController
9
+ */
10
+ static trasformJSONMessge(message: Object): Message | any;
11
+ /**
12
+ *Takes JSONMessage format as an input and returs the MessageReceipt[]
13
+ * @param {*} message
14
+ * @returns {MessageReceipt[]}
15
+ * @memberof MessageController
16
+ */
17
+ static getReceiptsFromJSON(message: Object): Promise<MessageReceipt[]>;
18
+ }
@@ -0,0 +1,14 @@
1
+ import { TypingIndicator } from '../models/TypingNotification';
2
+ export declare class TypingNotificationController {
3
+ private static TYPING_STARTED_MAP;
4
+ private static TYPING_ENDED_MAP;
5
+ private static INCOMING_TYPING_STARTED_MAP;
6
+ static addTypingStarted(receiverId: string): void;
7
+ static removeTypingStarted(receiverId: string): void;
8
+ static getTypingStartedMap(receiverId?: string): number;
9
+ static addTypingEnded(receiverId: string): void;
10
+ static removeTypingEnded(receiverId: string): void;
11
+ static getTypingEndedMap(receiverId?: string): number;
12
+ static addIncomingTypingStarted(typingNotification: TypingIndicator): void;
13
+ static removeIncomingTypingStarted(typingNotification: TypingIndicator): void;
14
+ }
@@ -0,0 +1,10 @@
1
+ import { User } from "../models/UserModel";
2
+ export declare class UserAuthController {
3
+ /**
4
+ * Function will authenticate user and will return promise which will eventually retuns user AuthId on successfull auth.
5
+ * @param {User} user accept the user object with uId field needed
6
+ * @returns Promise
7
+ * @memberof UserAuthController
8
+ */
9
+ static authenticateUser(user: User): Promise<boolean>;
10
+ }
@@ -0,0 +1,9 @@
1
+ import { User } from '../models/UserModel';
2
+ export declare class UsersController {
3
+ /**
4
+ *Takes JSONUser format as an input and returs the CometChatUser
5
+ *
6
+ * @param user
7
+ */
8
+ static trasformJSONUser(user: any): User | any;
9
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Wraper for local database.
3
+ *
4
+ * @export
5
+ * @class LocalStorage
6
+ */
7
+ export declare class KeyStore {
8
+ private static KeyStore;
9
+ private keyStore;
10
+ private store?;
11
+ private constructor();
12
+ /**
13
+ * Returns the singleton instace of the class.
14
+ * @returns {UserStore}
15
+ * @memberof UserStore
16
+ */
17
+ static getInstance(): KeyStore;
18
+ /**
19
+ *set the data in local storage with provided key.
20
+ *
21
+ * @param {String} key key with the data is stored in localstorage
22
+ * @param {*} value value provide that will be serialized and stored.
23
+ * @memberof localStorage
24
+ */
25
+ set(key: string, value: any): any;
26
+ /**
27
+ * Delete the individual item from the storage
28
+ * @param key
29
+ */
30
+ remove(key: string): void;
31
+ /**
32
+ *gets the value from the localstorage and provides back to user.
33
+ *
34
+ * @param {string} key
35
+ * @memberof localStorage
36
+ */
37
+ get(key: string): Promise<Object>;
38
+ /**
39
+ *clear the user store.
40
+ *
41
+ * @returns
42
+ * @memberof UserStore
43
+ */
44
+ clearStore(): any;
45
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ *Wraper for local database. with store selector
3
+ *
4
+ * @export
5
+ * @class SettingsStore
6
+ */
7
+ export declare class MessageListnerMaping {
8
+ private static settingsStore;
9
+ private settingsStore;
10
+ private store?;
11
+ private constructor();
12
+ /**
13
+ * Returns the singleton instace of the class.
14
+ * @returns {LocalStorage}
15
+ * @memberof LocalStorage
16
+ */
17
+ static getInstance(): MessageListnerMaping;
18
+ /**
19
+ *set the data in settingsStore with provided key.
20
+ *
21
+ * @param {String} key key with the data is stored in localstorage
22
+ * @param {*} value value provide that will be serialized and stored.
23
+ * @memberof localStorage
24
+ */
25
+ set(key: string, value: any): any;
26
+ /**
27
+ * Delete the individual item from the storage
28
+ * @param key
29
+ */
30
+ remove(key: string): void;
31
+ /**
32
+ *gets the value from the localstorage and provides back to user.
33
+ *
34
+ * @param {string} key
35
+ * @memberof localStorage
36
+ */
37
+ get(key: string): any;
38
+ /**
39
+ * Clear the settingsStore
40
+ */
41
+ clearStore(): any;
42
+ /**
43
+ * clears the current store if not provided.
44
+ *
45
+ * @param {String} [store]
46
+ * @memberof settingsStore
47
+ */
48
+ clear(store?: String): void;
49
+ /**
50
+ *Change the store
51
+ *
52
+ * @param {String} store change the store can be selected ant time.
53
+ * @memberof settingsStore
54
+ */
55
+ selectStore(store?: String): void;
56
+ }
@@ -0,0 +1,72 @@
1
+ /**
2
+ *Wraper for local database. with store selector
3
+ *
4
+ * @export
5
+ * @class LocalStorage
6
+ */
7
+ export declare class MessagesStore {
8
+ private static MessagesStore;
9
+ messagesStore: any;
10
+ private store?;
11
+ private constructor();
12
+ /**
13
+ * Returns the singleton instace of the class.
14
+ * @returns {MessagesStore}
15
+ * @memberof MessagesStore
16
+ */
17
+ static getInstance(): MessagesStore;
18
+ /**
19
+ *set the data in local storage with provided key.
20
+ *
21
+ * @param {String} key key with the data is stored in localstorage
22
+ * @param {*} value value provide that will be serialized and stored.
23
+ * @memberof localStorage
24
+ */
25
+ set(key: string, value: any): any;
26
+ /**
27
+ * Delete the individual item from the storage
28
+ * @param key
29
+ */
30
+ remove(key: string): void;
31
+ /**
32
+ *gets the value from the localstorage and provides back to user.
33
+ *
34
+ * @param {string} key
35
+ * @memberof localStorage
36
+ */
37
+ get(key: string): any;
38
+ /**
39
+ *clear the message store
40
+ *
41
+ * @returns
42
+ * @memberof MessagesStore
43
+ */
44
+ clearStore(): Promise<unknown>;
45
+ /**
46
+ * gets the all messages from the database.
47
+ *
48
+ * @returns {Promise<any>}
49
+ * @memberof MessagesStore
50
+ */
51
+ getAllMessages(): Promise<Object>;
52
+ /**
53
+ * clears the current store if not provided.
54
+ *
55
+ * @param {String} [store]
56
+ * @memberof localStorage
57
+ */
58
+ clear(store?: String): void;
59
+ /**
60
+ *Change the store
61
+ *
62
+ * @param {String} store change the store can be selected ant time.
63
+ * @memberof localStorage
64
+ */
65
+ selectStore(store?: String): void;
66
+ /**
67
+ * Stores the bulk messages to localstorage for future use
68
+ *
69
+ * @param messages accepts the message array and converts it to Object to store in database.
70
+ */
71
+ storeMessages(messages: any): boolean;
72
+ }