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
@@ -254,7 +254,7 @@ var ChannelState = /*#__PURE__*/function () {
254
254
  /**
255
255
  * addMessageSorted - Add a message to the state
256
256
  *
257
- * @param {MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} newMessage A new message
257
+ * @param {MessageResponse<StreamChatGenerics>} newMessage A new message
258
258
  * @param {boolean} timestampChanged Whether updating a message with changed created_at value.
259
259
  * @param {boolean} addIfDoesNotExist Add message if it is not in the list, used to prevent out of order updated messages from being added.
260
260
  *
@@ -272,7 +272,7 @@ var ChannelState = /*#__PURE__*/function () {
272
272
  * formatMessage - Takes the message object. Parses the dates, sets __html
273
273
  * and sets the status to received if missing. Returns a message object
274
274
  *
275
- * @param {MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} message a message object
275
+ * @param {MessageResponse<StreamChatGenerics>} message a message object
276
276
  *
277
277
  */
278
278
 
@@ -294,7 +294,7 @@ var ChannelState = /*#__PURE__*/function () {
294
294
  /**
295
295
  * addMessagesSorted - Add the list of messages to state and resorts the messages
296
296
  *
297
- * @param {Array<MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} newMessages A list of messages
297
+ * @param {Array<MessageResponse<StreamChatGenerics>>} newMessages A list of messages
298
298
  * @param {boolean} timestampChanged Whether updating messages with changed created_at value.
299
299
  * @param {boolean} initializing Whether channel is being initialized.
300
300
  * @param {boolean} addIfDoesNotExist Add message if it is not in the list, used to prevent out of order updated messages from being added.
@@ -373,7 +373,7 @@ var ChannelState = /*#__PURE__*/function () {
373
373
  /**
374
374
  * addPinnedMessages - adds messages in pinnedMessages property
375
375
  *
376
- * @param {Array<MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} pinnedMessages A list of pinned messages
376
+ * @param {Array<MessageResponse<StreamChatGenerics>>} pinnedMessages A list of pinned messages
377
377
  *
378
378
  */
379
379
 
@@ -387,7 +387,7 @@ var ChannelState = /*#__PURE__*/function () {
387
387
  /**
388
388
  * addPinnedMessage - adds message in pinnedMessages
389
389
  *
390
- * @param {MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} pinnedMessage message to update
390
+ * @param {MessageResponse<StreamChatGenerics>} pinnedMessage message to update
391
391
  *
392
392
  */
393
393
 
@@ -399,7 +399,7 @@ var ChannelState = /*#__PURE__*/function () {
399
399
  /**
400
400
  * removePinnedMessage - removes pinned message from pinnedMessages
401
401
  *
402
- * @param {MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} message message to remove
402
+ * @param {MessageResponse<StreamChatGenerics>} message message to remove
403
403
  *
404
404
  */
405
405
 
@@ -553,7 +553,7 @@ var ChannelState = /*#__PURE__*/function () {
553
553
  /**
554
554
  * _addToMessageList - Adds a message to a list of messages, tries to update first, appends if message isn't found
555
555
  *
556
- * @param {Array<ReturnType<ChannelState<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>['formatMessage']>>} messages A list of messages
556
+ * @param {Array<ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>>} messages A list of messages
557
557
  * @param message
558
558
  * @param {boolean} timestampChanged Whether updating a message with changed created_at value.
559
559
  * @param {string} sortBy field name to use to sort the messages by
@@ -811,13 +811,14 @@ function isFileWebAPI(uri) {
811
811
  return typeof window !== 'undefined' && 'File' in window && uri instanceof File;
812
812
  }
813
813
 
814
+ function isOwnUser(user) {
815
+ return (user === null || user === void 0 ? void 0 : user.total_unread_count) !== undefined;
816
+ }
817
+
814
818
  function isBlobWebAPI(uri) {
815
819
  return typeof window !== 'undefined' && 'Blob' in window && uri instanceof Blob;
816
820
  }
817
821
 
818
- function isOwnUser(user) {
819
- return (user === null || user === void 0 ? void 0 : user.total_unread_count) !== undefined;
820
- }
821
822
  function isOwnUserBaseProperty(property) {
822
823
  var ownUserBaseProperties = {
823
824
  channel_mutes: true,
@@ -1012,12 +1013,12 @@ var Channel = /*#__PURE__*/function () {
1012
1013
  /**
1013
1014
  * constructor - Create a channel
1014
1015
  *
1015
- * @param {StreamChat<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>} client the chat client
1016
+ * @param {StreamChat<StreamChatGenerics>} client the chat client
1016
1017
  * @param {string} type the type of channel
1017
1018
  * @param {string} [id] the id of the chat
1018
- * @param {ChannelData<ChannelType>} data any additional custom params
1019
+ * @param {ChannelData<StreamChatGenerics>} data any additional custom params
1019
1020
  *
1020
- * @return {Channel<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>} Returns a new uninitialized channel
1021
+ * @return {Channel<StreamChatGenerics>} Returns a new uninitialized channel
1021
1022
  */
1022
1023
  function Channel(client, type, id, data) {
1023
1024
  var _this = this;
@@ -1136,7 +1137,7 @@ var Channel = /*#__PURE__*/function () {
1136
1137
  /**
1137
1138
  * getClient - Get the chat client for this channel. If client.disconnect() was called, this function will error
1138
1139
  *
1139
- * @return {StreamChat<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>}
1140
+ * @return {StreamChat<StreamChatGenerics>}
1140
1141
  */
1141
1142
 
1142
1143
 
@@ -1164,11 +1165,11 @@ var Channel = /*#__PURE__*/function () {
1164
1165
  /**
1165
1166
  * sendMessage - Send a message to this channel
1166
1167
  *
1167
- * @param {Message<AttachmentType, MessageType, UserType>} message The Message object
1168
+ * @param {Message<StreamChatGenerics>} message The Message object
1168
1169
  * @param {boolean} [options.skip_enrich_url] Do not try to enrich the URLs within message
1169
1170
  * @param {boolean} [options.skip_push] Skip sending push notifications
1170
1171
  *
1171
- * @return {Promise<SendMessageAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The Server Response
1172
+ * @return {Promise<SendMessageAPIResponse<StreamChatGenerics>>} The Server Response
1172
1173
  */
1173
1174
 
1174
1175
  }, {
@@ -1232,9 +1233,9 @@ var Channel = /*#__PURE__*/function () {
1232
1233
  /**
1233
1234
  * sendEvent - Send an event on this channel
1234
1235
  *
1235
- * @param {Event<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>} event for example {type: 'message.read'}
1236
+ * @param {Event<StreamChatGenerics>} event for example {type: 'message.read'}
1236
1237
  *
1237
- * @return {Promise<EventAPIResponse<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>>} The Server Response
1238
+ * @return {Promise<EventAPIResponse<StreamChatGenerics>>} The Server Response
1238
1239
  */
1239
1240
 
1240
1241
  }, {
@@ -1272,10 +1273,10 @@ var Channel = /*#__PURE__*/function () {
1272
1273
  /**
1273
1274
  * search - Query messages
1274
1275
  *
1275
- * @param {MessageFilters<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType> | string} query search query or object MongoDB style filters
1276
- * @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'}
1276
+ * @param {MessageFilters<StreamChatGenerics> | string} query search query or object MongoDB style filters
1277
+ * @param {{client_id?: string; connection_id?: string; query?: string; message_filter_conditions?: MessageFilters<StreamChatGenerics>}} options Option object, {user_id: 'tommaso'}
1277
1278
  *
1278
- * @return {Promise<SearchAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} search messages response
1279
+ * @return {Promise<SearchAPIResponse<StreamChatGenerics>>} search messages response
1279
1280
  */
1280
1281
 
1281
1282
  }, {
@@ -1360,12 +1361,12 @@ var Channel = /*#__PURE__*/function () {
1360
1361
  /**
1361
1362
  * queryMembers - Query Members
1362
1363
  *
1363
- * @param {UserFilters<UserType>} filterConditions object MongoDB style filters
1364
- * @param {MemberSort<UserType>} [sort] Sort options, for instance [{created_at: -1}].
1364
+ * @param {UserFilters<StreamChatGenerics>} filterConditions object MongoDB style filters
1365
+ * @param {MemberSort<StreamChatGenerics>} [sort] Sort options, for instance [{created_at: -1}].
1365
1366
  * When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{name: -1}, {created_at: 1}]
1366
1367
  * @param {{ limit?: number; offset?: number }} [options] Option object, {limit: 10, offset:10}
1367
1368
  *
1368
- * @return {Promise<ChannelMemberAPIResponse<UserType>>} Query Members response
1369
+ * @return {Promise<ChannelMemberAPIResponse<StreamChatGenerics>>} Query Members response
1369
1370
  */
1370
1371
 
1371
1372
  }, {
@@ -1427,10 +1428,10 @@ var Channel = /*#__PURE__*/function () {
1427
1428
  * sendReaction - Send a reaction about a message
1428
1429
  *
1429
1430
  * @param {string} messageID the message id
1430
- * @param {Reaction<ReactionType, UserType>} reaction the reaction object for instance {type: 'love'}
1431
+ * @param {Reaction<StreamChatGenerics>} reaction the reaction object for instance {type: 'love'}
1431
1432
  * @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
1432
1433
  *
1433
- * @return {Promise<ReactionAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The Server Response
1434
+ * @return {Promise<ReactionAPIResponse<StreamChatGenerics>>} The Server Response
1434
1435
  */
1435
1436
 
1436
1437
  }, {
@@ -1486,7 +1487,7 @@ var Channel = /*#__PURE__*/function () {
1486
1487
  * @param {string} reactionType the type of reaction that should be removed
1487
1488
  * @param {string} [user_id] the id of the user (used only for server side request) default null
1488
1489
  *
1489
- * @return {Promise<ReactionAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The Server Response
1490
+ * @return {Promise<ReactionAPIResponse<StreamChatGenerics>>} The Server Response
1490
1491
  */
1491
1492
 
1492
1493
  }, {
@@ -1511,10 +1512,10 @@ var Channel = /*#__PURE__*/function () {
1511
1512
  /**
1512
1513
  * update - Edit the channel's custom properties
1513
1514
  *
1514
- * @param {ChannelData<ChannelType>} channelData The object to update the custom properties of this channel with
1515
- * @param {Message<AttachmentType, MessageType, UserType>} [updateMessage] Optional message object for channel members notification
1515
+ * @param {ChannelData<StreamChatGenerics>} channelData The object to update the custom properties of this channel with
1516
+ * @param {Message<StreamChatGenerics>} [updateMessage] Optional message object for channel members notification
1516
1517
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
1517
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1518
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1518
1519
  */
1519
1520
 
1520
1521
  }, {
@@ -1564,9 +1565,9 @@ var Channel = /*#__PURE__*/function () {
1564
1565
  /**
1565
1566
  * updatePartial - partial update channel properties
1566
1567
  *
1567
- * @param {PartialUpdateChannel<ChannelType>} partial update request
1568
+ * @param {PartialUpdateChannel<StreamChatGenerics>} partial update request
1568
1569
  *
1569
- * @return {Promise<PartialUpdateChannelAPIResponse<ChannelType,CommandType, UserType>>}
1570
+ * @return {Promise<PartialUpdateChannelAPIResponse<StreamChatGenerics>>}
1570
1571
  */
1571
1572
 
1572
1573
  }, {
@@ -1601,7 +1602,7 @@ var Channel = /*#__PURE__*/function () {
1601
1602
  * enableSlowMode - enable slow mode
1602
1603
  *
1603
1604
  * @param {number} coolDownInterval the cooldown interval in seconds
1604
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1605
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1605
1606
  */
1606
1607
 
1607
1608
  }, {
@@ -1640,7 +1641,7 @@ var Channel = /*#__PURE__*/function () {
1640
1641
  /**
1641
1642
  * disableSlowMode - disable slow mode
1642
1643
  *
1643
- * @return {Promise<UpdateChannelAPIResponse<ChannelType, AttachmentType, MessageType, ReactionType, UserType>>} The server response
1644
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1644
1645
  */
1645
1646
 
1646
1647
  }, {
@@ -1681,7 +1682,7 @@ var Channel = /*#__PURE__*/function () {
1681
1682
  *
1682
1683
  * @param {boolean} [options.hard_delete] Defines if the channel is hard deleted or not
1683
1684
  *
1684
- * @return {Promise<DeleteChannelAPIResponse<ChannelType, CommandType, UserType>>} The server response
1685
+ * @return {Promise<DeleteChannelAPIResponse<StreamChatGenerics>>} The server response
1685
1686
  */
1686
1687
 
1687
1688
  }, {
@@ -1717,8 +1718,8 @@ var Channel = /*#__PURE__*/function () {
1717
1718
  }()
1718
1719
  /**
1719
1720
  * truncate - Removes all messages from the channel
1720
- * @param {TruncateOptions<AttachmentType, MessageType, UserType>} [options] Defines truncation options
1721
- * @return {Promise<TruncateChannelAPIResponse<ChannelType, CommandType, UserType, MessageType, ReactionType>>} The server response
1721
+ * @param {TruncateOptions<StreamChatGenerics>} [options] Defines truncation options
1722
+ * @return {Promise<TruncateChannelAPIResponse<StreamChatGenerics>>} The server response
1722
1723
  */
1723
1724
 
1724
1725
  }, {
@@ -1755,9 +1756,9 @@ var Channel = /*#__PURE__*/function () {
1755
1756
  /**
1756
1757
  * acceptInvite - accept invitation to the channel
1757
1758
  *
1758
- * @param {InviteOptions<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} [options] The object to update the custom properties of this channel with
1759
+ * @param {InviteOptions<StreamChatGenerics>} [options] The object to update the custom properties of this channel with
1759
1760
  *
1760
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1761
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1761
1762
  */
1762
1763
 
1763
1764
  }, {
@@ -1796,9 +1797,9 @@ var Channel = /*#__PURE__*/function () {
1796
1797
  /**
1797
1798
  * rejectInvite - reject invitation to the channel
1798
1799
  *
1799
- * @param {InviteOptions<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} [options] The object to update the custom properties of this channel with
1800
+ * @param {InviteOptions<StreamChatGenerics>} [options] The object to update the custom properties of this channel with
1800
1801
  *
1801
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1802
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1802
1803
  */
1803
1804
 
1804
1805
  }, {
@@ -1838,9 +1839,9 @@ var Channel = /*#__PURE__*/function () {
1838
1839
  * addMembers - add members to the channel
1839
1840
  *
1840
1841
  * @param {{user_id: string, channel_role?: Role}[]} members An array of members to add to the channel
1841
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
1842
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
1842
1843
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
1843
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1844
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1844
1845
  */
1845
1846
 
1846
1847
  }, {
@@ -1881,9 +1882,9 @@ var Channel = /*#__PURE__*/function () {
1881
1882
  * addModerators - add moderators to the channel
1882
1883
  *
1883
1884
  * @param {string[]} members An array of member identifiers
1884
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
1885
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
1885
1886
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
1886
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1887
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1887
1888
  */
1888
1889
 
1889
1890
  }, {
@@ -1924,9 +1925,9 @@ var Channel = /*#__PURE__*/function () {
1924
1925
  * assignRoles - sets member roles in a channel
1925
1926
  *
1926
1927
  * @param {{channel_role: Role, user_id: string}[]} roles List of role assignments
1927
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
1928
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
1928
1929
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
1929
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1930
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1930
1931
  */
1931
1932
 
1932
1933
  }, {
@@ -1967,9 +1968,9 @@ var Channel = /*#__PURE__*/function () {
1967
1968
  * inviteMembers - invite members to the channel
1968
1969
  *
1969
1970
  * @param {{user_id: string, channel_role?: Role}[]} members An array of members to invite to the channel
1970
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
1971
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
1971
1972
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
1972
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
1973
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
1973
1974
  */
1974
1975
 
1975
1976
  }, {
@@ -2010,9 +2011,9 @@ var Channel = /*#__PURE__*/function () {
2010
2011
  * removeMembers - remove members from channel
2011
2012
  *
2012
2013
  * @param {string[]} members An array of member identifiers
2013
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
2014
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
2014
2015
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
2015
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
2016
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
2016
2017
  */
2017
2018
 
2018
2019
  }, {
@@ -2053,9 +2054,9 @@ var Channel = /*#__PURE__*/function () {
2053
2054
  * demoteModerators - remove moderator role from channel members
2054
2055
  *
2055
2056
  * @param {string[]} members An array of member identifiers
2056
- * @param {Message<AttachmentType, MessageType, UserType>} [message] Optional message object for channel members notification
2057
+ * @param {Message<StreamChatGenerics>} [message] Optional message object for channel members notification
2057
2058
  * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
2058
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
2059
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
2059
2060
  */
2060
2061
 
2061
2062
  }, {
@@ -2095,7 +2096,7 @@ var Channel = /*#__PURE__*/function () {
2095
2096
  /**
2096
2097
  * _update - executes channel update request
2097
2098
  * @param payload Object Update Channel payload
2098
- * @return {Promise<UpdateChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
2099
+ * @return {Promise<UpdateChannelAPIResponse<StreamChatGenerics>>} The server response
2099
2100
  * TODO: introduce new type instead of Object in the next major update
2100
2101
  */
2101
2102
 
@@ -2133,7 +2134,7 @@ var Channel = /*#__PURE__*/function () {
2133
2134
  /**
2134
2135
  * mute - mutes the current channel
2135
2136
  * @param {{ user_id?: string, expiration?: string }} opts expiration in minutes or user_id
2136
- * @return {Promise<MuteChannelAPIResponse<ChannelType, CommandType, UserType>>} The server response
2137
+ * @return {Promise<MuteChannelAPIResponse<StreamChatGenerics>>} The server response
2137
2138
  *
2138
2139
  * example with expiration:
2139
2140
  * await channel.mute({expiration: moment.duration(2, 'weeks')});
@@ -2352,7 +2353,7 @@ var Channel = /*#__PURE__*/function () {
2352
2353
  /**
2353
2354
  * lastMessage - return the last message, takes into account that last few messages might not be perfectly sorted
2354
2355
  *
2355
- * @return {ReturnType<ChannelState<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>['formatMessage']> | undefined} Description
2356
+ * @return {ReturnType<ChannelState<StreamChatGenerics>['formatMessage']> | undefined} Description
2356
2357
  */
2357
2358
 
2358
2359
  }, {
@@ -2377,8 +2378,8 @@ var Channel = /*#__PURE__*/function () {
2377
2378
  /**
2378
2379
  * markRead - Send the mark read event for this user, only works if the `read_events` setting is enabled
2379
2380
  *
2380
- * @param {MarkReadOptions<UserType>} data
2381
- * @return {Promise<EventAPIResponse<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType> | null>} Description
2381
+ * @param {MarkReadOptions<StreamChatGenerics>} data
2382
+ * @return {Promise<EventAPIResponse<StreamChatGenerics> | null>} Description
2382
2383
  */
2383
2384
 
2384
2385
  }, {
@@ -2446,9 +2447,9 @@ var Channel = /*#__PURE__*/function () {
2446
2447
  /**
2447
2448
  * watch - Loads the initial channel state and watches for changes
2448
2449
  *
2449
- * @param {ChannelQueryOptions<ChannelType, CommandType, UserType>} options additional options for the query endpoint
2450
+ * @param {ChannelQueryOptions<StreamChatGenerics>} options additional options for the query endpoint
2450
2451
  *
2451
- * @return {Promise<ChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The server response
2452
+ * @return {Promise<ChannelAPIResponse<StreamChatGenerics>>} The server response
2452
2453
  */
2453
2454
 
2454
2455
  }, {
@@ -2550,9 +2551,9 @@ var Channel = /*#__PURE__*/function () {
2550
2551
  * getReplies - List the message replies for a parent message
2551
2552
  *
2552
2553
  * @param {string} parent_id The message parent id, ie the top of the thread
2553
- * @param {PaginationOptions & { user?: UserResponse<UserType>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
2554
+ * @param {PaginationOptions & { user?: UserResponse<StreamChatGenerics>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
2554
2555
  *
2555
- * @return {Promise<GetRepliesAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} A response with a list of messages
2556
+ * @return {Promise<GetRepliesAPIResponse<StreamChatGenerics>>} A response with a list of messages
2556
2557
  */
2557
2558
 
2558
2559
  }, {
@@ -2594,10 +2595,10 @@ var Channel = /*#__PURE__*/function () {
2594
2595
  /**
2595
2596
  * getPinnedMessages - List list pinned messages of the channel
2596
2597
  *
2597
- * @param {PinnedMessagePaginationOptions & { user?: UserResponse<UserType>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
2598
+ * @param {PinnedMessagePaginationOptions & { user?: UserResponse<StreamChatGenerics>; user_id?: string }} options Pagination params, ie {limit:10, id_lte: 10}
2598
2599
  * @param {PinnedMessagesSort} sort defines sorting direction of pinned messages
2599
2600
  *
2600
- * @return {Promise<GetRepliesAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} A response with a list of messages
2601
+ * @return {Promise<GetRepliesAPIResponse<StreamChatGenerics>>} A response with a list of messages
2601
2602
  */
2602
2603
 
2603
2604
  }, {
@@ -2641,7 +2642,7 @@ var Channel = /*#__PURE__*/function () {
2641
2642
  * @param {string} message_id The message id
2642
2643
  * @param {{ limit?: number; offset?: number }} options The pagination options
2643
2644
  *
2644
- * @return {Promise<GetReactionsAPIResponse<ReactionType, UserType>>} Server response
2645
+ * @return {Promise<GetReactionsAPIResponse<StreamChatGenerics>>} Server response
2645
2646
  */
2646
2647
 
2647
2648
  }, {
@@ -2654,7 +2655,7 @@ var Channel = /*#__PURE__*/function () {
2654
2655
  *
2655
2656
  * @param {string[]} messageIds The ids of the messages to retrieve from this channel
2656
2657
  *
2657
- * @return {Promise<GetMultipleMessagesAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} Server response
2658
+ * @return {Promise<GetMultipleMessagesAPIResponse<StreamChatGenerics>>} Server response
2658
2659
  */
2659
2660
 
2660
2661
  }, {
@@ -2749,7 +2750,7 @@ var Channel = /*#__PURE__*/function () {
2749
2750
  /**
2750
2751
  * create - Creates a new channel
2751
2752
  *
2752
- * @return {Promise<ChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} The Server Response
2753
+ * @return {Promise<ChannelAPIResponse<StreamChatGenerics>>} The Server Response
2753
2754
  */
2754
2755
 
2755
2756
  }, {
@@ -2758,9 +2759,9 @@ var Channel = /*#__PURE__*/function () {
2758
2759
  /**
2759
2760
  * query - Query the API, get messages, members or other channel fields
2760
2761
  *
2761
- * @param {ChannelQueryOptions<ChannelType, CommandType, UserType>} options The query options
2762
+ * @param {ChannelQueryOptions<StreamChatGenerics>} options The query options
2762
2763
  *
2763
- * @return {Promise<ChannelAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} Returns a query response
2764
+ * @return {Promise<ChannelAPIResponse<StreamChatGenerics>>} Returns a query response
2764
2765
  */
2765
2766
  function () {
2766
2767
  var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(options) {
@@ -2836,7 +2837,7 @@ var Channel = /*#__PURE__*/function () {
2836
2837
  * banUser - Bans a user from a channel
2837
2838
  *
2838
2839
  * @param {string} targetUserID
2839
- * @param {BanUserOptions<UserType>} options
2840
+ * @param {BanUserOptions<StreamChatGenerics>} options
2840
2841
  * @returns {Promise<APIResponse>}
2841
2842
  */
2842
2843
 
@@ -3008,7 +3009,7 @@ var Channel = /*#__PURE__*/function () {
3008
3009
  * shadowBan - Shadow bans a user from a channel
3009
3010
  *
3010
3011
  * @param {string} targetUserID
3011
- * @param {BanUserOptions<UserType>} options
3012
+ * @param {BanUserOptions<StreamChatGenerics>} options
3012
3013
  * @returns {Promise<APIResponse>}
3013
3014
  */
3014
3015
 
@@ -3092,8 +3093,8 @@ var Channel = /*#__PURE__*/function () {
3092
3093
  * or
3093
3094
  * channel.on(event => {console.log(event.type)})
3094
3095
  *
3095
- * @param {EventHandler<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType> | EventTypes} callbackOrString The event type to listen for (optional)
3096
- * @param {EventHandler<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>} [callbackOrNothing] The callback to call
3096
+ * @param {EventHandler<StreamChatGenerics> | EventTypes} callbackOrString The event type to listen for (optional)
3097
+ * @param {EventHandler<StreamChatGenerics>} [callbackOrNothing] The callback to call
3097
3098
  */
3098
3099
 
3099
3100
  }, {
@@ -3919,7 +3920,6 @@ var StableWSConnection = /*#__PURE__*/function () {
3919
3920
  _this.isHealthy = healthy;
3920
3921
 
3921
3922
  if (_this.isHealthy) {
3922
- //@ts-expect-error
3923
3923
  _this.client.dispatchEvent({
3924
3924
  type: 'connection.changed',
3925
3925
  online: _this.isHealthy
@@ -3930,7 +3930,7 @@ var StableWSConnection = /*#__PURE__*/function () {
3930
3930
 
3931
3931
 
3932
3932
  setTimeout(function () {
3933
- if (_this.isHealthy) return; //@ts-expect-error
3933
+ if (_this.isHealthy) return;
3934
3934
 
3935
3935
  _this.client.dispatchEvent({
3936
3936
  type: 'connection.changed',
@@ -4898,7 +4898,7 @@ function TokenManager(secret) {
4898
4898
  * Token provider should return a token string or a promise which resolves to string token.
4899
4899
  *
4900
4900
  * @param {TokenOrProvider} tokenOrProvider
4901
- * @param {UserResponse<UserType>} user
4901
+ * @param {UserResponse<StreamChatGenerics>} user
4902
4902
  */
4903
4903
  ;
4904
4904
 
@@ -5390,7 +5390,6 @@ var WSConnectionFallback = /*#__PURE__*/function () {
5390
5390
 
5391
5391
 
5392
5392
  if (this.state === ConnectionState.Connecting && state === ConnectionState.Connected) {
5393
- //@ts-expect-error
5394
5393
  this.client.dispatchEvent({
5395
5394
  type: 'connection.changed',
5396
5395
  online: true
@@ -5398,7 +5397,6 @@ var WSConnectionFallback = /*#__PURE__*/function () {
5398
5397
  }
5399
5398
 
5400
5399
  if (state === ConnectionState.Closed || state === ConnectionState.Disconnected) {
5401
- //@ts-expect-error
5402
5400
  this.client.dispatchEvent({
5403
5401
  type: 'connection.changed',
5404
5402
  online: false
@@ -6691,9 +6689,9 @@ var StreamChat = /*#__PURE__*/function () {
6691
6689
  /**
6692
6690
  * setGuestUser - Setup a temporary guest user
6693
6691
  *
6694
- * @param {UserResponse<UserType>} user Data about this user. IE {name: "john"}
6692
+ * @param {UserResponse<StreamChatGenerics>} user Data about this user. IE {name: "john"}
6695
6693
  *
6696
- * @return {ConnectAPIResponse<ChannelType, CommandType, UserType>} Returns a promise that resolves when the connection is setup
6694
+ * @return {ConnectAPIResponse<StreamChatGenerics>} Returns a promise that resolves when the connection is setup
6697
6695
  */
6698
6696
  function () {
6699
6697
  var _setGuestUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(user) {
@@ -6781,8 +6779,8 @@ var StreamChat = /*#__PURE__*/function () {
6781
6779
  * or
6782
6780
  * client.on(event => {console.log(event.type)})
6783
6781
  *
6784
- * @param {EventHandler<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType> | string} callbackOrString The event type to listen for (optional)
6785
- * @param {EventHandler<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>} [callbackOrNothing] The callback to call
6782
+ * @param {EventHandler<StreamChatGenerics> | string} callbackOrString The event type to listen for (optional)
6783
+ * @param {EventHandler<StreamChatGenerics>} [callbackOrNothing] The callback to call
6786
6784
  *
6787
6785
  * @return {{ unsubscribe: () => void }} Description
6788
6786
  */
@@ -7117,8 +7115,7 @@ var StreamChat = /*#__PURE__*/function () {
7117
7115
 
7118
7116
  this.logger('info', 'client:connect() - WS failed, fallback to longpoll', {
7119
7117
  tags: ['connection', 'client']
7120
- }); // @ts-expect-error
7121
-
7118
+ });
7122
7119
  this.dispatchEvent({
7123
7120
  type: 'transport.changed',
7124
7121
  mode: 'longpoll'
@@ -7184,12 +7181,12 @@ var StreamChat = /*#__PURE__*/function () {
7184
7181
  /**
7185
7182
  * queryUsers - Query users and watch user presence
7186
7183
  *
7187
- * @param {UserFilters<UserType>} filterConditions MongoDB style filter conditions
7188
- * @param {UserSort<UserType>} sort Sort options, for instance [{last_active: -1}].
7184
+ * @param {UserFilters<StreamChatGenerics>} filterConditions MongoDB style filter conditions
7185
+ * @param {UserSort<StreamChatGenerics>} sort Sort options, for instance [{last_active: -1}].
7189
7186
  * When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{last_active: -1}, {created_at: 1}]
7190
7187
  * @param {UserOptions} options Option object, {presence: true}
7191
7188
  *
7192
- * @return {Promise<APIResponse & { users: Array<UserResponse<UserType>> }>} User Query Response
7189
+ * @return {Promise<{ users: Array<UserResponse<StreamChatGenerics>> }>} User Query Response
7193
7190
  */
7194
7191
 
7195
7192
  }, {
@@ -7254,7 +7251,7 @@ var StreamChat = /*#__PURE__*/function () {
7254
7251
  * @param {BannedUsersSort} sort Sort options [{created_at: 1}].
7255
7252
  * @param {BannedUsersPaginationOptions} options Option object, {limit: 10, offset:0}
7256
7253
  *
7257
- * @return {Promise<BannedUsersResponse<ChannelType, CommandType, UserType>>} Ban Query Response
7254
+ * @return {Promise<BannedUsersResponse<StreamChatGenerics>>} Ban Query Response
7258
7255
  */
7259
7256
 
7260
7257
  }, {
@@ -7303,7 +7300,7 @@ var StreamChat = /*#__PURE__*/function () {
7303
7300
  * @param {MessageFlagsFilters} filterConditions MongoDB style filter conditions
7304
7301
  * @param {MessageFlagsPaginationOptions} options Option object, {limit: 10, offset:0}
7305
7302
  *
7306
- * @return {Promise<MessageFlagsResponse<ChannelType, CommandType, UserType>>} Message Flags Response
7303
+ * @return {Promise<MessageFlagsResponse<StreamChatGenerics>>} Message Flags Response
7307
7304
  */
7308
7305
 
7309
7306
  }, {
@@ -7346,14 +7343,14 @@ var StreamChat = /*#__PURE__*/function () {
7346
7343
  /**
7347
7344
  * queryChannels - Query channels
7348
7345
  *
7349
- * @param {ChannelFilters<ChannelType, CommandType, UserType>} filterConditions object MongoDB style filters
7350
- * @param {ChannelSort<ChannelType>} [sort] Sort options, for instance {created_at: -1}.
7346
+ * @param {ChannelFilters<StreamChatGenerics>} filterConditions object MongoDB style filters
7347
+ * @param {ChannelSort<StreamChatGenerics>} [sort] Sort options, for instance {created_at: -1}.
7351
7348
  * When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{last_updated: -1}, {created_at: 1}]
7352
7349
  * @param {ChannelOptions} [options] Options object
7353
7350
  * @param {ChannelStateOptions} [stateOptions] State options object. These options will only be used for state management and won't be sent in the request.
7354
7351
  * - stateOptions.skipInitialization - Skips the initialization of the state for the channels matching the ids in the list.
7355
7352
  *
7356
- * @return {Promise<APIResponse & { channels: Array<ChannelAPIResponse<AttachmentType,ChannelType,CommandType,MessageType,ReactionType,UserType>>}> } search channels response
7353
+ * @return {Promise<{ channels: Array<ChannelAPIResponse<AStreamChatGenerics>>}> } search channels response
7357
7354
  */
7358
7355
 
7359
7356
  }, {
@@ -7469,11 +7466,11 @@ var StreamChat = /*#__PURE__*/function () {
7469
7466
  /**
7470
7467
  * search - Query messages
7471
7468
  *
7472
- * @param {ChannelFilters<ChannelType, CommandType, UserType>} filterConditions MongoDB style filter conditions
7473
- * @param {MessageFilters<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType> | string} query search query or object MongoDB style filters
7474
- * @param {SearchOptions<MessageType>} [options] Option object, {user_id: 'tommaso'}
7469
+ * @param {ChannelFilters<StreamChatGenerics>} filterConditions MongoDB style filter conditions
7470
+ * @param {MessageFilters<StreamChatGenerics> | string} query search query or object MongoDB style filters
7471
+ * @param {SearchOptions<StreamChatGenerics>} [options] Option object, {user_id: 'tommaso'}
7475
7472
  *
7476
- * @return {Promise<SearchAPIResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>>} search messages response
7473
+ * @return {Promise<SearchAPIResponse<StreamChatGenerics>>} search messages response
7477
7474
  */
7478
7475
 
7479
7476
  }, {
@@ -7617,7 +7614,7 @@ var StreamChat = /*#__PURE__*/function () {
7617
7614
  *
7618
7615
  * @param {string} [userID] User ID. Only works on serverside
7619
7616
  *
7620
- * @return {APIResponse & Device<UserType>[]} Array of devices
7617
+ * @return {Device<StreamChatGenerics>[]} Array of devices
7621
7618
  */
7622
7619
 
7623
7620
  }, {
@@ -7745,7 +7742,7 @@ var StreamChat = /*#__PURE__*/function () {
7745
7742
  * await channel.create() to assign an ID to channel
7746
7743
  *
7747
7744
  * @param {string} channelType The channel type
7748
- * @param {string | ChannelData<ChannelType> | null} [channelIDOrCustom] The channel ID, you can leave this out if you want to create a conversation channel
7745
+ * @param {string | ChannelData<StreamChatGenerics> | null} [channelIDOrCustom] The channel ID, you can leave this out if you want to create a conversation channel
7749
7746
  * @param {object} [custom] Custom data to attach to the channel
7750
7747
  *
7751
7748
  * @return {channel} The channel object, initialize it using channel.watch()
@@ -7801,10 +7798,10 @@ var StreamChat = /*#__PURE__*/function () {
7801
7798
  /**
7802
7799
  * partialUpdateUser - Update the given user object
7803
7800
  *
7804
- * @param {PartialUserUpdate<UserType>} partialUserObject which should contain id and any of "set" or "unset" params;
7801
+ * @param {PartialUserUpdate<StreamChatGenerics>} partialUserObject which should contain id and any of "set" or "unset" params;
7805
7802
  * example: {id: "user1", set:{field: value}, unset:["field2"]}
7806
7803
  *
7807
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>} list of updated users
7804
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
7808
7805
  */
7809
7806
  function () {
7810
7807
  var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(partialUserObject) {
@@ -7835,9 +7832,9 @@ var StreamChat = /*#__PURE__*/function () {
7835
7832
  /**
7836
7833
  * upsertUsers - Batch upsert the list of users
7837
7834
  *
7838
- * @param {UserResponse<UserType>[]} users list of users
7835
+ * @param {UserResponse<StreamChatGenerics>[]} users list of users
7839
7836
  *
7840
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>}
7837
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
7841
7838
  */
7842
7839
 
7843
7840
  }, {
@@ -7923,8 +7920,8 @@ var StreamChat = /*#__PURE__*/function () {
7923
7920
  *
7924
7921
  * updateUsers - Batch update the list of users
7925
7922
  *
7926
- * @param {UserResponse<UserType>[]} users list of users
7927
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>}
7923
+ * @param {UserResponse<StreamChatGenerics>[]} users list of users
7924
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
7928
7925
  */
7929
7926
 
7930
7927
  }, {
@@ -7933,9 +7930,9 @@ var StreamChat = /*#__PURE__*/function () {
7933
7930
  /**
7934
7931
  * upsertUser - Update or Create the given user object
7935
7932
  *
7936
- * @param {UserResponse<UserType>} userObject user object, the only required field is the user id. IE {id: "myuser"} is valid
7933
+ * @param {UserResponse<StreamChatGenerics>} userObject user object, the only required field is the user id. IE {id: "myuser"} is valid
7937
7934
  *
7938
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>}
7935
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
7939
7936
  */
7940
7937
  function upsertUser(userObject) {
7941
7938
  return this.upsertUsers([userObject]);
@@ -7945,8 +7942,8 @@ var StreamChat = /*#__PURE__*/function () {
7945
7942
  *
7946
7943
  * updateUser - Update or Create the given user object
7947
7944
  *
7948
- * @param {UserResponse<UserType>} userObject user object, the only required field is the user id. IE {id: "myuser"} is valid
7949
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>}
7945
+ * @param {UserResponse<StreamChatGenerics>} userObject user object, the only required field is the user id. IE {id: "myuser"} is valid
7946
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
7950
7947
  */
7951
7948
 
7952
7949
  }, {
@@ -7955,9 +7952,9 @@ var StreamChat = /*#__PURE__*/function () {
7955
7952
  /**
7956
7953
  * partialUpdateUsers - Batch partial update of users
7957
7954
  *
7958
- * @param {PartialUserUpdate<UserType>[]} users list of partial update requests
7955
+ * @param {PartialUserUpdate<StreamChatGenerics>[]} users list of partial update requests
7959
7956
  *
7960
- * @return {Promise<APIResponse & { users: { [key: string]: UserResponse<UserType> } }>}
7957
+ * @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
7961
7958
  */
7962
7959
  function () {
7963
7960
  var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(users) {
@@ -8146,7 +8143,7 @@ var StreamChat = /*#__PURE__*/function () {
8146
8143
  /** banUser - bans a user from all channels
8147
8144
  *
8148
8145
  * @param {string} targetUserID
8149
- * @param {BanUserOptions<UserType>} [options]
8146
+ * @param {BanUserOptions<StreamChatGenerics>} [options]
8150
8147
  * @returns {Promise<APIResponse>}
8151
8148
  */
8152
8149
 
@@ -8220,7 +8217,7 @@ var StreamChat = /*#__PURE__*/function () {
8220
8217
  /** shadowBan - shadow bans a user from all channels
8221
8218
  *
8222
8219
  * @param {string} targetUserID
8223
- * @param {BanUserOptions<UserType>} [options]
8220
+ * @param {BanUserOptions<StreamChatGenerics>} [options]
8224
8221
  * @returns {Promise<APIResponse>}
8225
8222
  */
8226
8223
 
@@ -8295,8 +8292,8 @@ var StreamChat = /*#__PURE__*/function () {
8295
8292
  *
8296
8293
  * @param {string} targetID
8297
8294
  * @param {string} [userID] Only used with serverside auth
8298
- * @param {MuteUserOptions<UserType>} [options]
8299
- * @returns {Promise<MuteUserResponse<ChannelType, CommandType, UserType>>}
8295
+ * @param {MuteUserOptions<StreamChatGenerics>} [options]
8296
+ * @returns {Promise<MuteUserResponse<StreamChatGenerics>>}
8300
8297
  */
8301
8298
 
8302
8299
  }, {
@@ -8563,7 +8560,7 @@ var StreamChat = /*#__PURE__*/function () {
8563
8560
  * @param {FlagReportsFilters} filterConditions MongoDB style filter conditions
8564
8561
  * @param {FlagReportsPaginationOptions} options Option object, {limit: 10, offset:0}
8565
8562
  *
8566
- * @return {Promise<FlagReportsResponse<ChannelType, CommandType, UserType>>} Flag Reports Response
8563
+ * @return {Promise<FlagReportsResponse<StreamChatGenerics>>} Flag Reports Response
8567
8564
  */
8568
8565
 
8569
8566
  }, {
@@ -8699,7 +8696,7 @@ var StreamChat = /*#__PURE__*/function () {
8699
8696
  * @deprecated use markChannelsRead instead
8700
8697
  *
8701
8698
  * markAllRead - marks all channels for this user as read
8702
- * @param {MarkAllReadOptions<UserType>} [data]
8699
+ * @param {MarkAllReadOptions<StreamChatGenerics>} [data]
8703
8700
  *
8704
8701
  * @return {Promise<APIResponse>}
8705
8702
  */
@@ -8711,7 +8708,7 @@ var StreamChat = /*#__PURE__*/function () {
8711
8708
  * markChannelsRead - marks channels read -
8712
8709
  * it accepts a map of cid:messageid pairs, if messageid is empty, the whole channel will be marked as read
8713
8710
  *
8714
- * @param {MarkChannelsReadOptions <UserType>} [data]
8711
+ * @param {MarkChannelsReadOptions <StreamChatGenerics>} [data]
8715
8712
  *
8716
8713
  * @return {Promise<APIResponse>}
8717
8714
  */
@@ -8801,7 +8798,7 @@ var StreamChat = /*#__PURE__*/function () {
8801
8798
  * @param {string} messageId
8802
8799
  * @param {string} language
8803
8800
  *
8804
- * @return {APIResponse & MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>} Response that includes the message
8801
+ * @return {MessageResponse<StreamChatGenerics>} Response that includes the message
8805
8802
  */
8806
8803
 
8807
8804
  }, {
@@ -8920,11 +8917,11 @@ var StreamChat = /*#__PURE__*/function () {
8920
8917
  /**
8921
8918
  * updateMessage - Update the given message
8922
8919
  *
8923
- * @param {Omit<MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>, 'mentioned_users'> & { mentioned_users?: string[] }} message object, id needs to be specified
8920
+ * @param {Omit<MessageResponse<StreamChatGenerics>, 'mentioned_users'> & { mentioned_users?: string[] }} message object, id needs to be specified
8924
8921
  * @param {string | { id: string }} [userId]
8925
8922
  * @param {boolean} [options.skip_enrich_url] Do not try to enrich the URLs within message
8926
8923
  *
8927
- * @return {APIResponse & { message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType> }} Response that includes the message
8924
+ * @return {{ message: MessageResponse<StreamChatGenerics> }} Response that includes the message
8928
8925
  */
8929
8926
 
8930
8927
  }, {
@@ -9001,13 +8998,13 @@ var StreamChat = /*#__PURE__*/function () {
9001
8998
  *
9002
8999
  * @param {string} id the message id
9003
9000
  *
9004
- * @param {PartialUpdateMessage<MessageType>} partialMessageObject which should contain id and any of "set" or "unset" params;
9001
+ * @param {PartialUpdateMessage<StreamChatGenerics>} partialMessageObject which should contain id and any of "set" or "unset" params;
9005
9002
  * example: {id: "user1", set:{text: "hi"}, unset:["color"]}
9006
9003
  * @param {string | { id: string }} [userId]
9007
9004
  *
9008
9005
  * @param {boolean} [options.skip_enrich_url] Do not try to enrich the URLs within message
9009
9006
  *
9010
- * @return {APIResponse & { message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType> }} Response that includes the updated message
9007
+ * @return {{ message: MessageResponse<StreamChatGenerics> }} Response that includes the updated message
9011
9008
  */
9012
9009
 
9013
9010
  }, {
@@ -9125,7 +9122,7 @@ var StreamChat = /*#__PURE__*/function () {
9125
9122
  }, {
9126
9123
  key: "getUserAgent",
9127
9124
  value: function getUserAgent() {
9128
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.6.0");
9125
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.0.0");
9129
9126
  }
9130
9127
  }, {
9131
9128
  key: "setUserAgent",