@cometchat/chat-sdk-javascript 4.0.0 → 4.0.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.
Files changed (72) hide show
  1. package/{dist/index.d.ts → CometChat.d.ts} +444 -32
  2. package/CometChat.js +1 -0
  3. package/LICENSE.md +3 -0
  4. package/{readme.md → README.md} +8 -8
  5. package/package.json +31 -42
  6. package/dist/CometChat.js +0 -1
  7. package/dist/package.json +0 -36
  8. package/dist/type/index.d.ts +0 -10
  9. package/dist/type/lib/BannedMembersRequest.d.ts +0 -60
  10. package/dist/type/lib/BlockedUsersRequest.d.ts +0 -67
  11. package/dist/type/lib/CallSettings.d.ts +0 -429
  12. package/dist/type/lib/CometChat.d.ts +0 -1975
  13. package/dist/type/lib/CometChatErrorConstants.d.ts +0 -124
  14. package/dist/type/lib/CometChatHelper.d.ts +0 -26
  15. package/dist/type/lib/Constants.d.ts +0 -973
  16. package/dist/type/lib/ConversationRequest.d.ts +0 -89
  17. package/dist/type/lib/GroupMembersRequest.d.ts +0 -61
  18. package/dist/type/lib/GroupsRequest.d.ts +0 -78
  19. package/dist/type/lib/Helper.d.ts +0 -47
  20. package/dist/type/lib/ListenerHandlers.d.ts +0 -101
  21. package/dist/type/lib/MessagesRequest.d.ts +0 -188
  22. package/dist/type/lib/UsersRequest.d.ts +0 -142
  23. package/dist/type/lib/WebSockets/WSConnectionHelper.d.ts +0 -41
  24. package/dist/type/lib/WebSockets/WSConstants.d.ts +0 -71
  25. package/dist/type/lib/WebSockets/WSHelper.d.ts +0 -3
  26. package/dist/type/lib/controllers/CallController.d.ts +0 -151
  27. package/dist/type/lib/controllers/ConversationController.d.ts +0 -14
  28. package/dist/type/lib/controllers/GroupMemberController.d.ts +0 -10
  29. package/dist/type/lib/controllers/GroupsController.d.ts +0 -9
  30. package/dist/type/lib/controllers/MessageController.d.ts +0 -18
  31. package/dist/type/lib/controllers/PresenceController.d.ts +0 -0
  32. package/dist/type/lib/controllers/TypingNotificationController.d.ts +0 -14
  33. package/dist/type/lib/controllers/UserAuthController.d.ts +0 -10
  34. package/dist/type/lib/controllers/UsersController.d.ts +0 -9
  35. package/dist/type/lib/localStore/KeyStore.d.ts +0 -45
  36. package/dist/type/lib/localStore/MessageListenerEventMaping.d.ts +0 -56
  37. package/dist/type/lib/localStore/MessagesStore.d.ts +0 -72
  38. package/dist/type/lib/localStore/UserStore.d.ts +0 -72
  39. package/dist/type/lib/localStore/store.d.ts +0 -61
  40. package/dist/type/lib/models/Action.d.ts +0 -159
  41. package/dist/type/lib/models/AppSettings.d.ts +0 -135
  42. package/dist/type/lib/models/BaseMessage.d.ts +0 -259
  43. package/dist/type/lib/models/CCExtension.d.ts +0 -15
  44. package/dist/type/lib/models/Call.d.ts +0 -159
  45. package/dist/type/lib/models/CometChatAuthEvent.d.ts +0 -25
  46. package/dist/type/lib/models/CometChatEvent.d.ts +0 -25
  47. package/dist/type/lib/models/CometChatMessageEvent.d.ts +0 -9
  48. package/dist/type/lib/models/CometChatPingEvent.d.ts +0 -6
  49. package/dist/type/lib/models/CometChatPresenceEvent.d.ts +0 -15
  50. package/dist/type/lib/models/CometChatReceiptEvent.d.ts +0 -14
  51. package/dist/type/lib/models/CometChatTransientEvent.d.ts +0 -11
  52. package/dist/type/lib/models/CometChatTypingEvent.d.ts +0 -14
  53. package/dist/type/lib/models/ConversationModel.d.ts +0 -73
  54. package/dist/type/lib/models/CustomError.d.ts +0 -13
  55. package/dist/type/lib/models/CustomMessage.d.ts +0 -71
  56. package/dist/type/lib/models/ErrorModel.d.ts +0 -12
  57. package/dist/type/lib/models/Group.d.ts +0 -190
  58. package/dist/type/lib/models/GroupMember.d.ts +0 -43
  59. package/dist/type/lib/models/Listner.d.ts +0 -258
  60. package/dist/type/lib/models/MediaDevice.d.ts +0 -36
  61. package/dist/type/lib/models/MediaMessage.d.ts +0 -115
  62. package/dist/type/lib/models/MessageReceipt.d.ts +0 -99
  63. package/dist/type/lib/models/RTCUser.d.ts +0 -18
  64. package/dist/type/lib/models/TextMessage.d.ts +0 -84
  65. package/dist/type/lib/models/TransientMessage.d.ts +0 -48
  66. package/dist/type/lib/models/TypingNotification.d.ts +0 -52
  67. package/dist/type/lib/models/UserModel.d.ts +0 -177
  68. package/dist/type/lib/models/UserPresence.d.ts +0 -0
  69. package/dist/type/lib/models/attachment.d.ts +0 -74
  70. package/dist/type/lib/rest-api/EndPointUtils.d.ts +0 -9
  71. package/dist/type/lib/rest-api/EndpointFactory.d.ts +0 -28
  72. package/dist/type/lib/rest-api/HttpHelper.d.ts +0 -10
@@ -1,177 +0,0 @@
1
- /** @private */
2
- export interface UserObj {
3
- uid: string;
4
- name: string;
5
- authToken: string;
6
- avatar: string;
7
- lastActiveAt: number;
8
- link: string;
9
- metadata: string;
10
- role: string;
11
- status: string;
12
- statusMessage: string;
13
- tags: Array<string>;
14
- deactivatedAt: number;
15
- }
16
- /**
17
- * Implementation of UserObject
18
- */
19
- export declare class User {
20
- private uid;
21
- private name;
22
- private authToken;
23
- private avatar;
24
- private lastActiveAt;
25
- private link;
26
- private metadata;
27
- private role;
28
- private status;
29
- private statusMessage;
30
- private hasBlockedMe;
31
- private blockedByMe;
32
- private tags;
33
- private deactivatedAt;
34
- /**
35
- * Method to get UID of the user.
36
- * @returns {string}
37
- */
38
- getUid(): string;
39
- /**
40
- * Method to set UID of the user.
41
- * @param {string} uid
42
- */
43
- setUid(uid: string): void;
44
- /**
45
- * Method to get name of the user.
46
- * @returns {string}
47
- */
48
- getName(): string;
49
- /**
50
- * Method to set name of the user.
51
- * @param {string} name
52
- */
53
- setName(name: string): void;
54
- /**
55
- * Method to get authToken of the user.
56
- * @returns {string}
57
- */
58
- getAuthToken(): string;
59
- /**
60
- * Method to set authToken of the user.
61
- * @param {string} authToken
62
- */
63
- setAuthToken(authToken: string): void;
64
- /**
65
- * Method to get avatar of the user.
66
- * @returns {string}
67
- */
68
- getAvatar(): string;
69
- /**
70
- * Method to set avatar of the user.
71
- * @param {string} avatar
72
- */
73
- setAvatar(avatar: string): void;
74
- /**
75
- * Method to get last active at timestamp of the user.
76
- * @returns {number}
77
- */
78
- getLastActiveAt(): number;
79
- /**
80
- * Method to set last active at timestamp of the user.
81
- * @param {number} lastActiveAt
82
- */
83
- setLastActiveAt(lastActiveAt: number): void;
84
- /**
85
- * Method to get link of the user.
86
- * @returns {string}
87
- */
88
- getLink(): string;
89
- /**
90
- * Method to set link of the user.
91
- * @param {string} link
92
- */
93
- setLink(link: string): string;
94
- /**
95
- * Method to get metadata of the user.
96
- * @returns {string}
97
- */
98
- getMetadata(): string;
99
- /**
100
- * Method to set metadata of the user.
101
- * @param {string} metadata
102
- */
103
- setMetadata(metadata: string): void;
104
- /**
105
- * Method to get role of the user.
106
- * @returns {string}
107
- */
108
- getRole(): string;
109
- /**
110
- * Method to set role of the user.
111
- * @param {string} role
112
- */
113
- setRole(role: string): void;
114
- /**
115
- * Method to get status of the user.
116
- * @returns {string}
117
- */
118
- getStatus(): string;
119
- /**
120
- * Method to set status of the user.
121
- * @param {string} status
122
- */
123
- setStatus(status: string): void;
124
- /**
125
- * Method to get status message of the user.
126
- * @returns {string}
127
- */
128
- getStatusMessage(): string;
129
- /**
130
- * Method to set status message of the user.
131
- * @param {string} statusMessage
132
- */
133
- setStatusMessage(statusMessage: string): void;
134
- setBlockedByMe(blockedByMe: boolean): void;
135
- /**
136
- * Method to know if the logged-in user has blocked the other user.
137
- * @returns {boolean}
138
- */
139
- getBlockedByMe(): boolean;
140
- setHasBlockedMe(hasBlockedMe: boolean): void;
141
- /**
142
- * Method to know if the logged-in user has been blocked by the other user.
143
- * @returns {boolean}
144
- */
145
- getHasBlockedMe(): boolean;
146
- /**
147
- * Method to set tags of the user.
148
- * @param {string[]} tags
149
- */
150
- setTags(tags: Array<string>): void;
151
- /**
152
- * Method to get tags of the user.
153
- * @returns {string[]}
154
- */
155
- getTags(): Array<string>;
156
- /**
157
- * Method to set deactivatedAt timestamp of a user.
158
- * @param {number} deactivatedAt
159
- */
160
- setDeactivatedAt(deactivatedAt: number): void;
161
- /**
162
- * Method to get deactivatedAt timestamp of a user.
163
- * @returns {number}
164
- */
165
- getDeactivatedAt(): number;
166
- constructor(...userObj: any[]);
167
- }
168
- /** @private */
169
- export declare class Me extends User {
170
- private wsChannel;
171
- private jwt;
172
- private fat;
173
- constructor(userObj: UserObj | any);
174
- getWsChannel(): any;
175
- getJWT(): string;
176
- getFat(): string;
177
- }
File without changes
@@ -1,74 +0,0 @@
1
- export declare class Attachment {
2
- private extension;
3
- private mimeType;
4
- private name;
5
- private size;
6
- private url;
7
- constructor(file: Object);
8
- /**
9
- * Create the file object from the provided JSON Object.
10
- * @private
11
- * @param {Object} file
12
- * @returns {FileObject}
13
- * @memberof FileObject
14
- */
15
- createFileFromJSON(file: Object): Attachment;
16
- /**
17
- * Converts the FileObject to JSON Object.
18
- * @private
19
- * @param {FileObject} fileObject
20
- * @returns {Object}
21
- * @memberof FileObject
22
- */
23
- static toJSON(attachment: Attachment): Object;
24
- /**
25
- * Get extension of the file.
26
- * @returns {string}
27
- */
28
- getExtension(): string;
29
- /**
30
- * Method to set extension of the file.
31
- * @param {string} extension
32
- */
33
- setExtension(extension: string): void;
34
- /**
35
- * Get mime type of the file.
36
- * @returns {string}
37
- */
38
- getMimeType(): string;
39
- /**
40
- * Method to set mimeType of the file.
41
- * @param {string} mimeType
42
- */
43
- setMimeType(mimeType: string): void;
44
- /**
45
- * Get name of the file.
46
- * @returns {string}
47
- */
48
- getName(): string;
49
- /**
50
- * Method to set name of the file.
51
- * @param {string} name
52
- */
53
- setName(name: string): void;
54
- /**
55
- * Get size of the file.
56
- * @returns {string}
57
- */
58
- getSize(): number;
59
- /**
60
- * Method to set size of the file.
61
- * @param {string} name
62
- */
63
- setSize(size: number): void;
64
- /**
65
- * Get URL of the file.
66
- * @returns {string}
67
- */
68
- getUrl(): string;
69
- /**
70
- * Method to set URL of the file.
71
- * @param {string} name
72
- */
73
- setUrl(url: string): void;
74
- }
@@ -1,9 +0,0 @@
1
- /**
2
- *
3
- *
4
- * @export
5
- * @param {string} [endPointName=""]
6
- * @param {object} [params={}]
7
- * @returns
8
- */
9
- export declare function getEndPoint(endPointName?: string, params?: object): Promise<Object>;
@@ -1,28 +0,0 @@
1
- /**
2
- *Endpoint factory class which will give enpoint data to client.
3
- *
4
- * @export
5
- * @class EndpointFactory
6
- */
7
- export declare class EndpointFactory {
8
- baseUrl: string;
9
- apiVersion: string;
10
- adminApiUrl: string;
11
- adminApiVersion: string;
12
- extensionApi: string;
13
- prosodyApi: string;
14
- wsApi: string;
15
- /**
16
- * FIXME: Need to use string templating.
17
- */
18
- /**
19
- * User AuthToken generation Endpoints:
20
- */
21
- private uriEndpoints;
22
- /**
23
- *
24
- * @param endpointName accepts enpoint name
25
- * @returns enpoint object with type, headers,and expected data
26
- */
27
- getEndpointData(endpointName: string): Promise<Object>;
28
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * @export
3
- * @param {string} [endPointName=""]
4
- * @param {object} [params={}]
5
- * @param {*} [data={}]
6
- * @returns
7
- */
8
- export declare function makeApiCall(endPointName?: string, params?: object, data?: any, isFile?: boolean): any;
9
- export declare function makeAdminApiCall(endPointName?: string, params?: object, data?: any, isFile?: boolean): any;
10
- export declare function postData(url?: string, method?: string, data?: any, headers?: any, isFile?: boolean): any;