stream-chat 5.6.0 → 6.0.0

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 (40) hide show
  1. package/README.md +21 -13
  2. package/dist/browser.es.js +120 -123
  3. package/dist/browser.es.js.map +1 -1
  4. package/dist/browser.full-bundle.min.js +1 -1
  5. package/dist/browser.full-bundle.min.js.map +1 -1
  6. package/dist/browser.js +120 -123
  7. package/dist/browser.js.map +1 -1
  8. package/dist/index.es.js +120 -123
  9. package/dist/index.es.js.map +1 -1
  10. package/dist/index.js +120 -123
  11. package/dist/index.js.map +1 -1
  12. package/dist/types/channel.d.ts +123 -123
  13. package/dist/types/channel.d.ts.map +1 -1
  14. package/dist/types/channel_state.d.ts +41 -41
  15. package/dist/types/channel_state.d.ts.map +1 -1
  16. package/dist/types/client.d.ts +161 -161
  17. package/dist/types/client.d.ts.map +1 -1
  18. package/dist/types/client_state.d.ts +6 -6
  19. package/dist/types/client_state.d.ts.map +1 -1
  20. package/dist/types/connection.d.ts +10 -10
  21. package/dist/types/connection.d.ts.map +1 -1
  22. package/dist/types/connection_fallback.d.ts +7 -7
  23. package/dist/types/connection_fallback.d.ts.map +1 -1
  24. package/dist/types/insights.d.ts +2 -2
  25. package/dist/types/token_manager.d.ts +6 -6
  26. package/dist/types/token_manager.d.ts.map +1 -1
  27. package/dist/types/types.d.ts +330 -232
  28. package/dist/types/types.d.ts.map +1 -1
  29. package/dist/types/utils.d.ts +2 -2
  30. package/dist/types/utils.d.ts.map +1 -1
  31. package/package.json +2 -2
  32. package/src/channel.ts +191 -289
  33. package/src/channel_state.ts +54 -219
  34. package/src/client.ts +246 -521
  35. package/src/client_state.ts +6 -6
  36. package/src/connection.ts +7 -22
  37. package/src/connection_fallback.ts +7 -21
  38. package/src/token_manager.ts +6 -6
  39. package/src/types.ts +432 -483
  40. package/src/utils.ts +7 -11
package/dist/browser.js CHANGED
@@ -274,7 +274,7 @@ var ChannelState = /*#__PURE__*/function () {
274
274
  /**
275
275
  * addMessageSorted - Add a message to the state
276
276
  *
277
- * @param {MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} newMessage A new message
277
+ * @param {MessageResponse<StreamChatGenerics>} newMessage A new message
278
278
  * @param {boolean} timestampChanged Whether updating a message with changed created_at value.
279
279
  * @param {boolean} addIfDoesNotExist Add message if it is not in the list, used to prevent out of order updated messages from being added.
280
280
  *
@@ -292,7 +292,7 @@ var ChannelState = /*#__PURE__*/function () {
292
292
  * formatMessage - Takes the message object. Parses the dates, sets __html
293
293
  * and sets the status to received if missing. Returns a message object
294
294
  *
295
- * @param {MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} message a message object
295
+ * @param {MessageResponse<StreamChatGenerics>} message a message object
296
296
  *
297
297
  */
298
298
 
@@ -314,7 +314,7 @@ var ChannelState = /*#__PURE__*/function () {
314
314
  /**
315
315
  * addMessagesSorted - Add the list of messages to state and resorts the messages
316
316
  *
317
- * @param {Array<MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} newMessages A list of messages
317
+ * @param {Array<MessageResponse<StreamChatGenerics>>} newMessages A list of messages
318
318
  * @param {boolean} timestampChanged Whether updating messages with changed created_at value.
319
319
  * @param {boolean} initializing Whether channel is being initialized.
320
320
  * @param {boolean} addIfDoesNotExist Add message if it is not in the list, used to prevent out of order updated messages from being added.
@@ -393,7 +393,7 @@ var ChannelState = /*#__PURE__*/function () {
393
393
  /**
394
394
  * addPinnedMessages - adds messages in pinnedMessages property
395
395
  *
396
- * @param {Array<MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} pinnedMessages A list of pinned messages
396
+ * @param {Array<MessageResponse<StreamChatGenerics>>} pinnedMessages A list of pinned messages
397
397
  *
398
398
  */
399
399
 
@@ -407,7 +407,7 @@ var ChannelState = /*#__PURE__*/function () {
407
407
  /**
408
408
  * addPinnedMessage - adds message in pinnedMessages
409
409
  *
410
- * @param {MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} pinnedMessage message to update
410
+ * @param {MessageResponse<StreamChatGenerics>} pinnedMessage message to update
411
411
  *
412
412
  */
413
413
 
@@ -419,7 +419,7 @@ var ChannelState = /*#__PURE__*/function () {
419
419
  /**
420
420
  * removePinnedMessage - removes pinned message from pinnedMessages
421
421
  *
422
- * @param {MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} message message to remove
422
+ * @param {MessageResponse<StreamChatGenerics>} message message to remove
423
423
  *
424
424
  */
425
425
 
@@ -573,7 +573,7 @@ var ChannelState = /*#__PURE__*/function () {
573
573
  /**
574
574
  * _addToMessageList - Adds a message to a list of messages, tries to update first, appends if message isn't found
575
575
  *
576
- * @param {Array<ReturnType<ChannelState<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>['formatMessage']>>} messages A list of messages
576
+ * @param {Array<ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>>} messages A list of messages
577
577
  * @param message
578
578
  * @param {boolean} timestampChanged Whether updating a message with changed created_at value.
579
579
  * @param {string} sortBy field name to use to sort the messages by
@@ -831,13 +831,14 @@ function isFileWebAPI(uri) {
831
831
  return typeof window !== 'undefined' && 'File' in window && uri instanceof File;
832
832
  }
833
833
 
834
+ function isOwnUser(user) {
835
+ return (user === null || user === void 0 ? void 0 : user.total_unread_count) !== undefined;
836
+ }
837
+
834
838
  function isBlobWebAPI(uri) {
835
839
  return typeof window !== 'undefined' && 'Blob' in window && uri instanceof Blob;
836
840
  }
837
841
 
838
- function isOwnUser(user) {
839
- return (user === null || user === void 0 ? void 0 : user.total_unread_count) !== undefined;
840
- }
841
842
  function isOwnUserBaseProperty(property) {
842
843
  var ownUserBaseProperties = {
843
844
  channel_mutes: true,
@@ -1032,12 +1033,12 @@ var Channel = /*#__PURE__*/function () {
1032
1033
  /**
1033
1034
  * constructor - Create a channel
1034
1035
  *
1035
- * @param {StreamChat<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>} client the chat client
1036
+ * @param {StreamChat<StreamChatGenerics>} client the chat client
1036
1037
  * @param {string} type the type of channel
1037
1038
  * @param {string} [id] the id of the chat
1038
- * @param {ChannelData<ChannelType>} data any additional custom params
1039
+ * @param {ChannelData<StreamChatGenerics>} data any additional custom params
1039
1040
  *
1040
- * @return {Channel<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>} Returns a new uninitialized channel
1041
+ * @return {Channel<StreamChatGenerics>} Returns a new uninitialized channel
1041
1042
  */
1042
1043
  function Channel(client, type, id, data) {
1043
1044
  var _this = this;
@@ -1156,7 +1157,7 @@ var Channel = /*#__PURE__*/function () {
1156
1157
  /**
1157
1158
  * getClient - Get the chat client for this channel. If client.disconnect() was called, this function will error
1158
1159
  *
1159
- * @return {StreamChat<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>}
1160
+ * @return {StreamChat<StreamChatGenerics>}
1160
1161
  */
1161
1162
 
1162
1163
 
@@ -1184,11 +1185,11 @@ var Channel = /*#__PURE__*/function () {
1184
1185
  /**
1185
1186
  * sendMessage - Send a message to this channel
1186
1187
  *
1187
- * @param {Message<AttachmentType, MessageType, UserType>} message The Message object
1188
+ * @param {Message<StreamChatGenerics>} message The Message object
1188
1189
  * @param {boolean} [options.skip_enrich_url] Do not try to enrich the URLs within message
1189
1190
  * @param {boolean} [options.skip_push] Skip sending push notifications
1190
1191
  *
1191
- * @return {Promise<SendMessageAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The Server Response
1192
+ * @return {Promise<SendMessageAPIResponse<StreamChatGenerics>>} The Server Response
1192
1193
  */
1193
1194
 
1194
1195
  }, {
@@ -1252,9 +1253,9 @@ var Channel = /*#__PURE__*/function () {
1252
1253
  /**
1253
1254
  * sendEvent - Send an event on this channel
1254
1255
  *
1255
- * @param {Event<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>} event for example {type: 'message.read'}
1256
+ * @param {Event<StreamChatGenerics>} event for example {type: 'message.read'}
1256
1257
  *
1257
- * @return {Promise<EventAPIResponse<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>>} The Server Response
1258
+ * @return {Promise<EventAPIResponse<StreamChatGenerics>>} The Server Response
1258
1259
  */
1259
1260
 
1260
1261
  }, {
@@ -1292,10 +1293,10 @@ var Channel = /*#__PURE__*/function () {
1292
1293
  /**
1293
1294
  * search - Query messages
1294
1295
  *
1295
- * @param {MessageFilters<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType> | string} query search query or object MongoDB style filters
1296
- * @param {{client_id?: string; connection_id?: string; query?: string; message_filter_conditions?: MessageFilters<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>}} options Option object, {user_id: 'tommaso'}
1296
+ * @param {MessageFilters<StreamChatGenerics> | string} query search query or object MongoDB style filters
1297
+ * @param {{client_id?: string; connection_id?: string; query?: string; message_filter_conditions?: MessageFilters<StreamChatGenerics>}} options Option object, {user_id: 'tommaso'}
1297
1298
  *
1298
- * @return {Promise<SearchAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} search messages response
1299
+ * @return {Promise<SearchAPIResponse<StreamChatGenerics>>} search messages response
1299
1300
  */
1300
1301
 
1301
1302
  }, {
@@ -1380,12 +1381,12 @@ var Channel = /*#__PURE__*/function () {
1380
1381
  /**
1381
1382
  * queryMembers - Query Members
1382
1383
  *
1383
- * @param {UserFilters<UserType>} filterConditions object MongoDB style filters
1384
- * @param {MemberSort<UserType>} [sort] Sort options, for instance [{created_at: -1}].
1384
+ * @param {UserFilters<StreamChatGenerics>} filterConditions object MongoDB style filters
1385
+ * @param {MemberSort<StreamChatGenerics>} [sort] Sort options, for instance [{created_at: -1}].
1385
1386
  * When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{name: -1}, {created_at: 1}]
1386
1387
  * @param {{ limit?: number; offset?: number }} [options] Option object, {limit: 10, offset:10}
1387
1388
  *
1388
- * @return {Promise<ChannelMemberAPIResponse<UserType>>} Query Members response
1389
+ * @return {Promise<ChannelMemberAPIResponse<StreamChatGenerics>>} Query Members response
1389
1390
  */
1390
1391
 
1391
1392
  }, {
@@ -1447,10 +1448,10 @@ var Channel = /*#__PURE__*/function () {
1447
1448
  * sendReaction - Send a reaction about a message
1448
1449
  *
1449
1450
  * @param {string} messageID the message id
1450
- * @param {Reaction<ReactionType, UserType>} reaction the reaction object for instance {type: 'love'}
1451
+ * @param {Reaction<StreamChatGenerics>} reaction the reaction object for instance {type: 'love'}
1451
1452
  * @param {{ enforce_unique?: boolean, skip_push?: boolean }} [options] Option object, {enforce_unique: true, skip_push: true} to override any existing reaction or skip sending push notifications
1452
1453
  *
1453
- * @return {Promise<ReactionAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The Server Response
1454
+ * @return {Promise<ReactionAPIResponse<StreamChatGenerics>>} The Server Response
1454
1455
  */
1455
1456
 
1456
1457
  }, {
@@ -1506,7 +1507,7 @@ var Channel = /*#__PURE__*/function () {
1506
1507
  * @param {string} reactionType the type of reaction that should be removed
1507
1508
  * @param {string} [user_id] the id of the user (used only for server side request) default null
1508
1509
  *
1509
- * @return {Promise<ReactionAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The Server Response
1510
+ * @return {Promise<ReactionAPIResponse<StreamChatGenerics>>} The Server Response
1510
1511
  */
1511
1512
 
1512
1513
  }, {
@@ -1531,10 +1532,10 @@ var Channel = /*#__PURE__*/function () {
1531
1532
  /**
1532
1533
  * update - Edit the channel's custom properties
1533
1534
  *
1534
- * @param {ChannelData<ChannelType>} channelData The object to update the custom properties of this channel with
1535
- * @param {Message<AttachmentType, MessageType, UserType>} [updateMessage] Optional message object for channel members notification
1535
+ * @param {ChannelData<StreamChatGenerics>} channelData The object to update the custom properties of this channel with
1536
+ * @param {Message<StreamChatGenerics>} [updateMessage] Optional message object for channel members notification
1536
1537
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
1537
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1538
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1538
1539
  */
1539
1540
 
1540
1541
  }, {
@@ -1584,9 +1585,9 @@ var Channel = /*#__PURE__*/function () {
1584
1585
  /**
1585
1586
  * updatePartial - partial update channel properties
1586
1587
  *
1587
- * @param {PartialUpdateChannel<ChannelType>} partial update request
1588
+ * @param {PartialUpdateChannel<StreamChatGenerics>} partial update request
1588
1589
  *
1589
- * @return {Promise<PartialUpdateChannelAPIResponse<ChannelType,CommandType, UserType>>}
1590
+ * @return {Promise<PartialUpdateChannelAPIResponse<StreamChatGenerics>>}
1590
1591
  */
1591
1592
 
1592
1593
  }, {
@@ -1621,7 +1622,7 @@ var Channel = /*#__PURE__*/function () {
1621
1622
  * enableSlowMode - enable slow mode
1622
1623
  *
1623
1624
  * @param {number} coolDownInterval the cooldown interval in seconds
1624
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1625
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1625
1626
  */
1626
1627
 
1627
1628
  }, {
@@ -1660,7 +1661,7 @@ var Channel = /*#__PURE__*/function () {
1660
1661
  /**
1661
1662
  * disableSlowMode - disable slow mode
1662
1663
  *
1663
- * @return {Promise<UpdateChannelAPIResponse<ChannelType, AttachmentType, MessageType, ReactionType, UserType>>} The server response
1664
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1664
1665
  */
1665
1666
 
1666
1667
  }, {
@@ -1701,7 +1702,7 @@ var Channel = /*#__PURE__*/function () {
1701
1702
  *
1702
1703
  * @param {boolean} [options.hard_delete] Defines if the channel is hard deleted or not
1703
1704
  *
1704
- * @return {Promise<DeleteChannelAPIResponse<ChannelType, CommandType, UserType>>} The server response
1705
+ * @return {Promise<DeleteChannelAPIResponse<StreamChatGenerics>>} The server response
1705
1706
  */
1706
1707
 
1707
1708
  }, {
@@ -1737,8 +1738,8 @@ var Channel = /*#__PURE__*/function () {
1737
1738
  }()
1738
1739
  /**
1739
1740
  * truncate - Removes all messages from the channel
1740
- * @param {TruncateOptions<AttachmentType, MessageType, UserType>} [options] Defines truncation options
1741
- * @return {Promise<TruncateChannelAPIResponse<ChannelType, CommandType, UserType, MessageType, ReactionType>>} The server response
1741
+ * @param {TruncateOptions<StreamChatGenerics>} [options] Defines truncation options
1742
+ * @return {Promise<TruncateChannelAPIResponse<StreamChatGenerics>>} The server response
1742
1743
  */
1743
1744
 
1744
1745
  }, {
@@ -1775,9 +1776,9 @@ var Channel = /*#__PURE__*/function () {
1775
1776
  /**
1776
1777
  * acceptInvite - accept invitation to the channel
1777
1778
  *
1778
- * @param {InviteOptions<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} [options] The object to update the custom properties of this channel with
1779
+ * @param {InviteOptions<StreamChatGenerics>} [options] The object to update the custom properties of this channel with
1779
1780
  *
1780
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1781
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1781
1782
  */
1782
1783
 
1783
1784
  }, {
@@ -1816,9 +1817,9 @@ var Channel = /*#__PURE__*/function () {
1816
1817
  /**
1817
1818
  * rejectInvite - reject invitation to the channel
1818
1819
  *
1819
- * @param {InviteOptions<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} [options] The object to update the custom properties of this channel with
1820
+ * @param {InviteOptions<StreamChatGenerics>} [options] The object to update the custom properties of this channel with
1820
1821
  *
1821
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1822
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1822
1823
  */
1823
1824
 
1824
1825
  }, {
@@ -1858,9 +1859,9 @@ var Channel = /*#__PURE__*/function () {
1858
1859
  * addMembers - add members to the channel
1859
1860
  *
1860
1861
  * @param {{user_id: string, channel_role?: Role}[]} members An array of members to add to the channel
1861
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
1862
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
1862
1863
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
1863
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1864
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1864
1865
  */
1865
1866
 
1866
1867
  }, {
@@ -1901,9 +1902,9 @@ var Channel = /*#__PURE__*/function () {
1901
1902
  * addModerators - add moderators to the channel
1902
1903
  *
1903
1904
  * @param {string[]} members An array of member identifiers
1904
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
1905
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
1905
1906
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
1906
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1907
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1907
1908
  */
1908
1909
 
1909
1910
  }, {
@@ -1944,9 +1945,9 @@ var Channel = /*#__PURE__*/function () {
1944
1945
  * assignRoles - sets member roles in a channel
1945
1946
  *
1946
1947
  * @param {{channel_role: Role, user_id: string}[]} roles List of role assignments
1947
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
1948
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
1948
1949
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
1949
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1950
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1950
1951
  */
1951
1952
 
1952
1953
  }, {
@@ -1987,9 +1988,9 @@ var Channel = /*#__PURE__*/function () {
1987
1988
  * inviteMembers - invite members to the channel
1988
1989
  *
1989
1990
  * @param {{user_id: string, channel_role?: Role}[]} members An array of members to invite to the channel
1990
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
1991
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
1991
1992
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
1992
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1993
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1993
1994
  */
1994
1995
 
1995
1996
  }, {
@@ -2030,9 +2031,9 @@ var Channel = /*#__PURE__*/function () {
2030
2031
  * removeMembers - remove members from channel
2031
2032
  *
2032
2033
  * @param {string[]} members An array of member identifiers
2033
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
2034
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
2034
2035
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
2035
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
2036
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
2036
2037
  */
2037
2038
 
2038
2039
  }, {
@@ -2073,9 +2074,9 @@ var Channel = /*#__PURE__*/function () {
2073
2074
  * demoteModerators - remove moderator role from channel members
2074
2075
  *
2075
2076
  * @param {string[]} members An array of member identifiers
2076
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
2077
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
2077
2078
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
2078
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
2079
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
2079
2080
  */
2080
2081
 
2081
2082
  }, {
@@ -2115,7 +2116,7 @@ var Channel = /*#__PURE__*/function () {
2115
2116
  /**
2116
2117
  * _update - executes channel update request
2117
2118
  * @param payload Object Update Channel payload
2118
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
2119
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
2119
2120
  * TODO: introduce new type instead of Object in the next major update
2120
2121
  */
2121
2122
 
@@ -2153,7 +2154,7 @@ var Channel = /*#__PURE__*/function () {
2153
2154
  /**
2154
2155
  * mute - mutes the current channel
2155
2156
  * @param {{ user_id?: string, expiration?: string }} opts expiration in minutes or user_id
2156
- * @return {Promise<MuteChannelAPIResponse<ChannelType, CommandType, UserType>>} The server response
2157
+ * @return {Promise<MuteChannelAPIResponse<StreamChatGenerics>>} The server response
2157
2158
  *
2158
2159
  * example with expiration:
2159
2160
  * await channel.mute({expiration: moment.duration(2, 'weeks')});
@@ -2372,7 +2373,7 @@ var Channel = /*#__PURE__*/function () {
2372
2373
  /**
2373
2374
  * lastMessage - return the last message, takes into account that last few messages might not be perfectly sorted
2374
2375
  *
2375
- * @return {ReturnType<ChannelState<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>['formatMessage']> | undefined} Description
2376
+ * @return {ReturnType<ChannelState<StreamChatGenerics>['formatMessage']> | undefined} Description
2376
2377
  */
2377
2378
 
2378
2379
  }, {
@@ -2397,8 +2398,8 @@ var Channel = /*#__PURE__*/function () {
2397
2398
  /**
2398
2399
  * markRead - Send the mark read event for this user, only works if the `read_events` setting is enabled
2399
2400
  *
2400
- * @param {MarkReadOptions<UserType>} data
2401
- * @return {Promise<EventAPIResponse<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType> | null>} Description
2401
+ * @param {MarkReadOptions<StreamChatGenerics>} data
2402
+ * @return {Promise<EventAPIResponse<StreamChatGenerics> | null>} Description
2402
2403
  */
2403
2404
 
2404
2405
  }, {
@@ -2466,9 +2467,9 @@ var Channel = /*#__PURE__*/function () {
2466
2467
  /**
2467
2468
  * watch - Loads the initial channel state and watches for changes
2468
2469
  *
2469
- * @param {ChannelQueryOptions<ChannelType, CommandType, UserType>} options additional options for the query endpoint
2470
+ * @param {ChannelQueryOptions<StreamChatGenerics>} options additional options for the query endpoint
2470
2471
  *
2471
- * @return {Promise<ChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
2472
+ * @return {Promise<ChannelAPIResponse<StreamChatGenerics>>} The server response
2472
2473
  */
2473
2474
 
2474
2475
  }, {
@@ -2570,9 +2571,9 @@ var Channel = /*#__PURE__*/function () {
2570
2571
  * getReplies - List the message replies for a parent message
2571
2572
  *
2572
2573
  * @param {string} parent_id The message parent id, ie the top of the thread
2573
- * @param {PaginationOptions & { user?: UserResponse<UserType>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
2574
+ * @param {PaginationOptions & { user?: UserResponse<StreamChatGenerics>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
2574
2575
  *
2575
- * @return {Promise<GetRepliesAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} A response with a list of messages
2576
+ * @return {Promise<GetRepliesAPIResponse<StreamChatGenerics>>} A response with a list of messages
2576
2577
  */
2577
2578
 
2578
2579
  }, {
@@ -2614,10 +2615,10 @@ var Channel = /*#__PURE__*/function () {
2614
2615
  /**
2615
2616
  * getPinnedMessages - List list pinned messages of the channel
2616
2617
  *
2617
- * @param {PinnedMessagePaginationOptions & { user?: UserResponse<UserType>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
2618
+ * @param {PinnedMessagePaginationOptions & { user?: UserResponse<StreamChatGenerics>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
2618
2619
  * @param {PinnedMessagesSort} sort defines sorting direction of pinned messages
2619
2620
  *
2620
- * @return {Promise<GetRepliesAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} A response with a list of messages
2621
+ * @return {Promise<GetRepliesAPIResponse<StreamChatGenerics>>} A response with a list of messages
2621
2622
  */
2622
2623
 
2623
2624
  }, {
@@ -2661,7 +2662,7 @@ var Channel = /*#__PURE__*/function () {
2661
2662
  * @param {string} message_id The message id
2662
2663
  * @param {{ limit?: number; offset?: number }} options The pagination options
2663
2664
  *
2664
- * @return {Promise<GetReactionsAPIResponse<ReactionType, UserType>>} Server response
2665
+ * @return {Promise<GetReactionsAPIResponse<StreamChatGenerics>>} Server response
2665
2666
  */
2666
2667
 
2667
2668
  }, {
@@ -2674,7 +2675,7 @@ var Channel = /*#__PURE__*/function () {
2674
2675
  *
2675
2676
  * @param {string[]} messageIds The ids of the messages to retrieve from this channel
2676
2677
  *
2677
- * @return {Promise<GetMultipleMessagesAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} Server response
2678
+ * @return {Promise<GetMultipleMessagesAPIResponse<StreamChatGenerics>>} Server response
2678
2679
  */
2679
2680
 
2680
2681
  }, {
@@ -2769,7 +2770,7 @@ var Channel = /*#__PURE__*/function () {
2769
2770
  /**
2770
2771
  * create - Creates a new channel
2771
2772
  *
2772
- * @return {Promise<ChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The Server Response
2773
+ * @return {Promise<ChannelAPIResponse<StreamChatGenerics>>} The Server Response
2773
2774
  */
2774
2775
 
2775
2776
  }, {
@@ -2778,9 +2779,9 @@ var Channel = /*#__PURE__*/function () {
2778
2779
  /**
2779
2780
  * query - Query the API, get messages, members or other channel fields
2780
2781
  *
2781
- * @param {ChannelQueryOptions<ChannelType, CommandType, UserType>} options The query options
2782
+ * @param {ChannelQueryOptions<StreamChatGenerics>} options The query options
2782
2783
  *
2783
- * @return {Promise<ChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} Returns a query response
2784
+ * @return {Promise<ChannelAPIResponse<StreamChatGenerics>>} Returns a query response
2784
2785
  */
2785
2786
  function () {
2786
2787
  var _query = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee31(options) {
@@ -2856,7 +2857,7 @@ var Channel = /*#__PURE__*/function () {
2856
2857
  * banUser - Bans a user from a channel
2857
2858
  *
2858
2859
  * @param {string} targetUserID
2859
- * @param {BanUserOptions<UserType>} options
2860
+ * @param {BanUserOptions<StreamChatGenerics>} options
2860
2861
  * @returns {Promise<APIResponse>}
2861
2862
  */
2862
2863
 
@@ -3028,7 +3029,7 @@ var Channel = /*#__PURE__*/function () {
3028
3029
  * shadowBan - Shadow bans a user from a channel
3029
3030
  *
3030
3031
  * @param {string} targetUserID
3031
- * @param {BanUserOptions<UserType>} options
3032
+ * @param {BanUserOptions<StreamChatGenerics>} options
3032
3033
  * @returns {Promise<APIResponse>}
3033
3034
  */
3034
3035
 
@@ -3112,8 +3113,8 @@ var Channel = /*#__PURE__*/function () {
3112
3113
  * or
3113
3114
  * channel.on(event => {console.log(event.type)})
3114
3115
  *
3115
- * @param {EventHandler<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType> | EventTypes} callbackOrString The event type to listen for (optional)
3116
- * @param {EventHandler<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>} [callbackOrNothing] The callback to call
3116
+ * @param {EventHandler<StreamChatGenerics> | EventTypes} callbackOrString The event type to listen for (optional)
3117
+ * @param {EventHandler<StreamChatGenerics>} [callbackOrNothing] The callback to call
3117
3118
  */
3118
3119
 
3119
3120
  }, {
@@ -3939,7 +3940,6 @@ var StableWSConnection = /*#__PURE__*/function () {
3939
3940
  _this.isHealthy = healthy;
3940
3941
 
3941
3942
  if (_this.isHealthy) {
3942
- //@ts-expect-error
3943
3943
  _this.client.dispatchEvent({
3944
3944
  type: 'connection.changed',
3945
3945
  online: _this.isHealthy
@@ -3950,7 +3950,7 @@ var StableWSConnection = /*#__PURE__*/function () {
3950
3950
 
3951
3951
 
3952
3952
  setTimeout(function () {
3953
- if (_this.isHealthy) return; //@ts-expect-error
3953
+ if (_this.isHealthy) return;
3954
3954
 
3955
3955
  _this.client.dispatchEvent({
3956
3956
  type: 'connection.changed',
@@ -4918,7 +4918,7 @@ function TokenManager(secret) {
4918
4918
  * Token provider should return a token string or a promise which resolves to string token.
4919
4919
  *
4920
4920
  * @param {TokenOrProvider} tokenOrProvider
4921
- * @param {UserResponse<UserType>} user
4921
+ * @param {UserResponse<StreamChatGenerics>} user
4922
4922
  */
4923
4923
  ;
4924
4924
 
@@ -5410,7 +5410,6 @@ var WSConnectionFallback = /*#__PURE__*/function () {
5410
5410
 
5411
5411
 
5412
5412
  if (this.state === ConnectionState.Connecting && state === ConnectionState.Connected) {
5413
- //@ts-expect-error
5414
5413
  this.client.dispatchEvent({
5415
5414
  type: 'connection.changed',
5416
5415
  online: true
@@ -5418,7 +5417,6 @@ var WSConnectionFallback = /*#__PURE__*/function () {
5418
5417
  }
5419
5418
 
5420
5419
  if (state === ConnectionState.Closed || state === ConnectionState.Disconnected) {
5421
- //@ts-expect-error
5422
5420
  this.client.dispatchEvent({
5423
5421
  type: 'connection.changed',
5424
5422
  online: false
@@ -6711,9 +6709,9 @@ var StreamChat = /*#__PURE__*/function () {
6711
6709
  /**
6712
6710
  * setGuestUser - Setup a temporary guest user
6713
6711
  *
6714
- * @param {UserResponse<UserType>} user Data about this user. IE {name: "john"}
6712
+ * @param {UserResponse<StreamChatGenerics>} user Data about this user. IE {name: "john"}
6715
6713
  *
6716
- * @return {ConnectAPIResponse<ChannelType, CommandType, UserType>} Returns a promise that resolves when the connection is setup
6714
+ * @return {ConnectAPIResponse<StreamChatGenerics>} Returns a promise that resolves when the connection is setup
6717
6715
  */
6718
6716
  function () {
6719
6717
  var _setGuestUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee14(user) {
@@ -6801,8 +6799,8 @@ var StreamChat = /*#__PURE__*/function () {
6801
6799
  * or
6802
6800
  * client.on(event => {console.log(event.type)})
6803
6801
  *
6804
- * @param {EventHandler<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType> | string} callbackOrString The event type to listen for (optional)
6805
- * @param {EventHandler<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>} [callbackOrNothing] The callback to call
6802
+ * @param {EventHandler<StreamChatGenerics> | string} callbackOrString The event type to listen for (optional)
6803
+ * @param {EventHandler<StreamChatGenerics>} [callbackOrNothing] The callback to call
6806
6804
  *
6807
6805
  * @return {{ unsubscribe: () => void }} Description
6808
6806
  */
@@ -7137,8 +7135,7 @@ var StreamChat = /*#__PURE__*/function () {
7137
7135
 
7138
7136
  this.logger('info', 'client:connect() - WS failed, fallback to longpoll', {
7139
7137
  tags: ['connection', 'client']
7140
- }); // @ts-expect-error
7141
-
7138
+ });
7142
7139
  this.dispatchEvent({
7143
7140
  type: 'transport.changed',
7144
7141
  mode: 'longpoll'
@@ -7204,12 +7201,12 @@ var StreamChat = /*#__PURE__*/function () {
7204
7201
  /**
7205
7202
  * queryUsers - Query users and watch user presence
7206
7203
  *
7207
- * @param {UserFilters<UserType>} filterConditions MongoDB style filter conditions
7208
- * @param {UserSort<UserType>} sort Sort options, for instance [{last_active: -1}].
7204
+ * @param {UserFilters<StreamChatGenerics>} filterConditions MongoDB style filter conditions
7205
+ * @param {UserSort<StreamChatGenerics>} sort Sort options, for instance [{last_active: -1}].
7209
7206
  * When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{last_active: -1}, {created_at: 1}]
7210
7207
  * @param {UserOptions} options Option object, {presence: true}
7211
7208
  *
7212
- * @return {Promise<APIResponse & { users: Array<UserResponse<UserType>> }>} User Query Response
7209
+ * @return {Promise<{ users: Array<UserResponse<StreamChatGenerics>> }>} User Query Response
7213
7210
  */
7214
7211
 
7215
7212
  }, {
@@ -7274,7 +7271,7 @@ var StreamChat = /*#__PURE__*/function () {
7274
7271
  * @param {BannedUsersSort} sort Sort options [{created_at: 1}].
7275
7272
  * @param {BannedUsersPaginationOptions} options Option object, {limit: 10, offset:0}
7276
7273
  *
7277
- * @return {Promise<BannedUsersResponse<ChannelType, CommandType, UserType>>} Ban Query Response
7274
+ * @return {Promise<BannedUsersResponse<StreamChatGenerics>>} Ban Query Response
7278
7275
  */
7279
7276
 
7280
7277
  }, {
@@ -7323,7 +7320,7 @@ var StreamChat = /*#__PURE__*/function () {
7323
7320
  * @param {MessageFlagsFilters} filterConditions MongoDB style filter conditions
7324
7321
  * @param {MessageFlagsPaginationOptions} options Option object, {limit: 10, offset:0}
7325
7322
  *
7326
- * @return {Promise<MessageFlagsResponse<ChannelType, CommandType, UserType>>} Message Flags Response
7323
+ * @return {Promise<MessageFlagsResponse<StreamChatGenerics>>} Message Flags Response
7327
7324
  */
7328
7325
 
7329
7326
  }, {
@@ -7366,14 +7363,14 @@ var StreamChat = /*#__PURE__*/function () {
7366
7363
  /**
7367
7364
  * queryChannels - Query channels
7368
7365
  *
7369
- * @param {ChannelFilters<ChannelType, CommandType, UserType>} filterConditions object MongoDB style filters
7370
- * @param {ChannelSort<ChannelType>} [sort] Sort options, for instance {created_at: -1}.
7366
+ * @param {ChannelFilters<StreamChatGenerics>} filterConditions object MongoDB style filters
7367
+ * @param {ChannelSort<StreamChatGenerics>} [sort] Sort options, for instance {created_at: -1}.
7371
7368
  * When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{last_updated: -1}, {created_at: 1}]
7372
7369
  * @param {ChannelOptions} [options] Options object
7373
7370
  * @param {ChannelStateOptions} [stateOptions] State options object. These options will only be used for state management and won't be sent in the request.
7374
7371
  * - stateOptions.skipInitialization - Skips the initialization of the state for the channels matching the ids in the list.
7375
7372
  *
7376
- * @return {Promise<APIResponse & { channels: Array<ChannelAPIResponse<AttachmentType,ChannelType,CommandType,MessageType,ReactionType,UserType>>}> } search channels response
7373
+ * @return {Promise<{ channels: Array<ChannelAPIResponse<AStreamChatGenerics>>}> } search channels response
7377
7374
  */
7378
7375
 
7379
7376
  }, {
@@ -7489,11 +7486,11 @@ var StreamChat = /*#__PURE__*/function () {
7489
7486
  /**
7490
7487
  * search - Query messages
7491
7488
  *
7492
- * @param {ChannelFilters<ChannelType, CommandType, UserType>} filterConditions MongoDB style filter conditions
7493
- * @param {MessageFilters<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType> | string} query search query or object MongoDB style filters
7494
- * @param {SearchOptions<MessageType>} [options] Option object, {user_id: 'tommaso'}
7489
+ * @param {ChannelFilters<StreamChatGenerics>} filterConditions MongoDB style filter conditions
7490
+ * @param {MessageFilters<StreamChatGenerics> | string} query search query or object MongoDB style filters
7491
+ * @param {SearchOptions<StreamChatGenerics>} [options] Option object, {user_id: 'tommaso'}
7495
7492
  *
7496
- * @return {Promise<SearchAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} search messages response
7493
+ * @return {Promise<SearchAPIResponse<StreamChatGenerics>>} search messages response
7497
7494
  */
7498
7495
 
7499
7496
  }, {
@@ -7637,7 +7634,7 @@ var StreamChat = /*#__PURE__*/function () {
7637
7634
  *
7638
7635
  * @param {string} [userID] User ID. Only works on serverside
7639
7636
  *
7640
- * @return {APIResponse & Device<UserType>[]} Array of devices
7637
+ * @return {Device<StreamChatGenerics>[]} Array of devices
7641
7638
  */
7642
7639
 
7643
7640
  }, {
@@ -7765,7 +7762,7 @@ var StreamChat = /*#__PURE__*/function () {
7765
7762
  * await channel.create() to assign an ID to channel
7766
7763
  *
7767
7764
  * @param {string} channelType The channel type
7768
- * @param {string | ChannelData<ChannelType> | null} [channelIDOrCustom] The channel ID, you can leave this out if you want to create a conversation channel
7765
+ * @param {string | ChannelData<StreamChatGenerics> | null} [channelIDOrCustom] The channel ID, you can leave this out if you want to create a conversation channel
7769
7766
  * @param {object} [custom] Custom data to attach to the channel
7770
7767
  *
7771
7768
  * @return {channel} The channel object, initialize it using channel.watch()
@@ -7821,10 +7818,10 @@ var StreamChat = /*#__PURE__*/function () {
7821
7818
  /**
7822
7819
  * partialUpdateUser - Update the given user object
7823
7820
  *
7824
- * @param {PartialUserUpdate<UserType>} partialUserObject which should contain id and any of "set" or "unset" params;
7821
+ * @param {PartialUserUpdate<StreamChatGenerics>} partialUserObject which should contain id and any of "set" or "unset" params;
7825
7822
  * example: {id: "user1", set:{field: value}, unset:["field2"]}
7826
7823
  *
7827
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>} list of updated users
7824
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
7828
7825
  */
7829
7826
  function () {
7830
7827
  var _partialUpdateUser = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee25(partialUserObject) {
@@ -7855,9 +7852,9 @@ var StreamChat = /*#__PURE__*/function () {
7855
7852
  /**
7856
7853
  * upsertUsers - Batch upsert the list of users
7857
7854
  *
7858
- * @param {UserResponse<UserType>[]} users list of users
7855
+ * @param {UserResponse<StreamChatGenerics>[]} users list of users
7859
7856
  *
7860
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>}
7857
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
7861
7858
  */
7862
7859
 
7863
7860
  }, {
@@ -7943,8 +7940,8 @@ var StreamChat = /*#__PURE__*/function () {
7943
7940
  *
7944
7941
  * updateUsers - Batch update the list of users
7945
7942
  *
7946
- * @param {UserResponse<UserType>[]} users list of users
7947
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>}
7943
+ * @param {UserResponse<StreamChatGenerics>[]} users list of users
7944
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
7948
7945
  */
7949
7946
 
7950
7947
  }, {
@@ -7953,9 +7950,9 @@ var StreamChat = /*#__PURE__*/function () {
7953
7950
  /**
7954
7951
  * upsertUser - Update or Create the given user object
7955
7952
  *
7956
- * @param {UserResponse<UserType>} userObject user object, the only required field is the user id. IE {id: "myuser"} is valid
7953
+ * @param {UserResponse<StreamChatGenerics>} userObject user object, the only required field is the user id. IE {id: "myuser"} is valid
7957
7954
  *
7958
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>}
7955
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
7959
7956
  */
7960
7957
  function upsertUser(userObject) {
7961
7958
  return this.upsertUsers([userObject]);
@@ -7965,8 +7962,8 @@ var StreamChat = /*#__PURE__*/function () {
7965
7962
  *
7966
7963
  * updateUser - Update or Create the given user object
7967
7964
  *
7968
- * @param {UserResponse<UserType>} userObject user object, the only required field is the user id. IE {id: "myuser"} is valid
7969
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>}
7965
+ * @param {UserResponse<StreamChatGenerics>} userObject user object, the only required field is the user id. IE {id: "myuser"} is valid
7966
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
7970
7967
  */
7971
7968
 
7972
7969
  }, {
@@ -7975,9 +7972,9 @@ var StreamChat = /*#__PURE__*/function () {
7975
7972
  /**
7976
7973
  * partialUpdateUsers - Batch partial update of users
7977
7974
  *
7978
- * @param {PartialUserUpdate<UserType>[]} users list of partial update requests
7975
+ * @param {PartialUserUpdate<StreamChatGenerics>[]} users list of partial update requests
7979
7976
  *
7980
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>}
7977
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
7981
7978
  */
7982
7979
  function () {
7983
7980
  var _partialUpdateUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee27(users) {
@@ -8166,7 +8163,7 @@ var StreamChat = /*#__PURE__*/function () {
8166
8163
  /** banUser - bans a user from all channels
8167
8164
  *
8168
8165
  * @param {string} targetUserID
8169
- * @param {BanUserOptions<UserType>} [options]
8166
+ * @param {BanUserOptions<StreamChatGenerics>} [options]
8170
8167
  * @returns {Promise<APIResponse>}
8171
8168
  */
8172
8169
 
@@ -8240,7 +8237,7 @@ var StreamChat = /*#__PURE__*/function () {
8240
8237
  /** shadowBan - shadow bans a user from all channels
8241
8238
  *
8242
8239
  * @param {string} targetUserID
8243
- * @param {BanUserOptions<UserType>} [options]
8240
+ * @param {BanUserOptions<StreamChatGenerics>} [options]
8244
8241
  * @returns {Promise<APIResponse>}
8245
8242
  */
8246
8243
 
@@ -8315,8 +8312,8 @@ var StreamChat = /*#__PURE__*/function () {
8315
8312
  *
8316
8313
  * @param {string} targetID
8317
8314
  * @param {string} [userID] Only used with serverside auth
8318
- * @param {MuteUserOptions<UserType>} [options]
8319
- * @returns {Promise<MuteUserResponse<ChannelType, CommandType, UserType>>}
8315
+ * @param {MuteUserOptions<StreamChatGenerics>} [options]
8316
+ * @returns {Promise<MuteUserResponse<StreamChatGenerics>>}
8320
8317
  */
8321
8318
 
8322
8319
  }, {
@@ -8583,7 +8580,7 @@ var StreamChat = /*#__PURE__*/function () {
8583
8580
  * @param {FlagReportsFilters} filterConditions MongoDB style filter conditions
8584
8581
  * @param {FlagReportsPaginationOptions} options Option object, {limit: 10, offset:0}
8585
8582
  *
8586
- * @return {Promise<FlagReportsResponse<ChannelType, CommandType, UserType>>} Flag Reports Response
8583
+ * @return {Promise<FlagReportsResponse<StreamChatGenerics>>} Flag Reports Response
8587
8584
  */
8588
8585
 
8589
8586
  }, {
@@ -8719,7 +8716,7 @@ var StreamChat = /*#__PURE__*/function () {
8719
8716
  * @deprecated use markChannelsRead instead
8720
8717
  *
8721
8718
  * markAllRead - marks all channels for this user as read
8722
- * @param {MarkAllReadOptions<UserType>} [data]
8719
+ * @param {MarkAllReadOptions<StreamChatGenerics>} [data]
8723
8720
  *
8724
8721
  * @return {Promise<APIResponse>}
8725
8722
  */
@@ -8731,7 +8728,7 @@ var StreamChat = /*#__PURE__*/function () {
8731
8728
  * markChannelsRead - marks channels read -
8732
8729
  * it accepts a map of cid:messageid pairs, if messageid is empty, the whole channel will be marked as read
8733
8730
  *
8734
- * @param {MarkChannelsReadOptions <UserType>} [data]
8731
+ * @param {MarkChannelsReadOptions <StreamChatGenerics>} [data]
8735
8732
  *
8736
8733
  * @return {Promise<APIResponse>}
8737
8734
  */
@@ -8821,7 +8818,7 @@ var StreamChat = /*#__PURE__*/function () {
8821
8818
  * @param {string} messageId
8822
8819
  * @param {string} language
8823
8820
  *
8824
- * @return {APIResponse & MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} Response that includes the message
8821
+ * @return {MessageResponse<StreamChatGenerics>} Response that includes the message
8825
8822
  */
8826
8823
 
8827
8824
  }, {
@@ -8940,11 +8937,11 @@ var StreamChat = /*#__PURE__*/function () {
8940
8937
  /**
8941
8938
  * updateMessage - Update the given message
8942
8939
  *
8943
- * @param {Omit<MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>, 'mentioned_users'> & { mentioned_users?: string[] }} message object, id needs to be specified
8940
+ * @param {Omit<MessageResponse<StreamChatGenerics>, 'mentioned_users'> & { mentioned_users?: string[] }} message object, id needs to be specified
8944
8941
  * @param {string | { id: string }} [userId]
8945
8942
  * @param {boolean} [options.skip_enrich_url] Do not try to enrich the URLs within message
8946
8943
  *
8947
- * @return {APIResponse & { message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType> }} Response that includes the message
8944
+ * @return {{ message: MessageResponse<StreamChatGenerics> }} Response that includes the message
8948
8945
  */
8949
8946
 
8950
8947
  }, {
@@ -9021,13 +9018,13 @@ var StreamChat = /*#__PURE__*/function () {
9021
9018
  *
9022
9019
  * @param {string} id the message id
9023
9020
  *
9024
- * @param {PartialUpdateMessage<MessageType>} partialMessageObject which should contain id and any of "set" or "unset" params;
9021
+ * @param {PartialUpdateMessage<StreamChatGenerics>} partialMessageObject which should contain id and any of "set" or "unset" params;
9025
9022
  * example: {id: "user1", set:{text: "hi"}, unset:["color"]}
9026
9023
  * @param {string | { id: string }} [userId]
9027
9024
  *
9028
9025
  * @param {boolean} [options.skip_enrich_url] Do not try to enrich the URLs within message
9029
9026
  *
9030
- * @return {APIResponse & { message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType> }} Response that includes the updated message
9027
+ * @return {{ message: MessageResponse<StreamChatGenerics> }} Response that includes the updated message
9031
9028
  */
9032
9029
 
9033
9030
  }, {
@@ -9145,7 +9142,7 @@ var StreamChat = /*#__PURE__*/function () {
9145
9142
  }, {
9146
9143
  key: "getUserAgent",
9147
9144
  value: function getUserAgent() {
9148
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.6.0");
9145
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.0.0");
9149
9146
  }
9150
9147
  }, {
9151
9148
  key: "setUserAgent",