stream-chat 8.53.0 → 8.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4280,7 +4280,7 @@ var Channel = /*#__PURE__*/function () {
4280
4280
  returnedPage: state.messages,
4281
4281
  logger: this.getClient().logger
4282
4282
  }));
4283
- this.getClient().polls.hydratePollCache(messageSet.messages, true);
4283
+ this.getClient().polls.hydratePollCache(state.messages, true);
4284
4284
  areCapabilitiesChanged = _toConsumableArray__default['default'](state.channel.own_capabilities || []).sort().join() !== _toConsumableArray__default['default'](Array.isArray((_this$data6 = this.data) === null || _this$data6 === void 0 ? void 0 : _this$data6.own_capabilities) ? (_this$data7 = this.data) === null || _this$data7 === void 0 ? void 0 : _this$data7.own_capabilities : []).sort().join();
4285
4285
  this.data = state.channel;
4286
4286
  this.offlineMode = false;
@@ -12654,7 +12654,7 @@ var StreamChat = /*#__PURE__*/function () {
12654
12654
  returnedPage: channelState.messages,
12655
12655
  logger: this.logger
12656
12656
  }));
12657
- this.polls.hydratePollCache(updatedMessagesSet.messages, true);
12657
+ this.polls.hydratePollCache(channelState.messages, true);
12658
12658
  }
12659
12659
 
12660
12660
  channels.push(c);
@@ -15043,7 +15043,7 @@ var StreamChat = /*#__PURE__*/function () {
15043
15043
  }, {
15044
15044
  key: "getUserAgent",
15045
15045
  value: function getUserAgent() {
15046
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.53.0");
15046
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.54.1");
15047
15047
  }
15048
15048
  }, {
15049
15049
  key: "setUserAgent",
@@ -15289,30 +15289,81 @@ var StreamChat = /*#__PURE__*/function () {
15289
15289
 
15290
15290
  return sendUserCustomEvent;
15291
15291
  }()
15292
+ /**
15293
+ * Creates a new block list
15294
+ *
15295
+ * @param {BlockList} blockList - The block list to create
15296
+ * @param {string} blockList.name - The name of the block list
15297
+ * @param {string[]} blockList.words - List of words to block
15298
+ * @param {string} [blockList.team] - Team ID the block list belongs to
15299
+ *
15300
+ * @returns {Promise<APIResponse>} The server response
15301
+ */
15302
+
15292
15303
  }, {
15293
15304
  key: "createBlockList",
15294
15305
  value: function createBlockList(blockList) {
15295
15306
  return this.post("".concat(this.baseURL, "/blocklists"), blockList);
15296
15307
  }
15308
+ /**
15309
+ * Lists all block lists
15310
+ *
15311
+ * @param {Object} [data] - Query parameters
15312
+ * @param {string} [data.team] - Team ID to filter block lists by
15313
+ *
15314
+ * @returns {Promise<APIResponse & {blocklists: BlockListResponse[]}>} Response containing array of block lists
15315
+ */
15316
+
15297
15317
  }, {
15298
15318
  key: "listBlockLists",
15299
- value: function listBlockLists() {
15300
- return this.get("".concat(this.baseURL, "/blocklists"));
15319
+ value: function listBlockLists(data) {
15320
+ return this.get("".concat(this.baseURL, "/blocklists"), data);
15301
15321
  }
15322
+ /**
15323
+ * Gets a specific block list
15324
+ *
15325
+ * @param {string} name - The name of the block list to retrieve
15326
+ * @param {Object} [data] - Query parameters
15327
+ * @param {string} [data.team] - Team ID that blocklist belongs to
15328
+ *
15329
+ * @returns {Promise<APIResponse & {blocklist: BlockListResponse}>} Response containing the block list
15330
+ */
15331
+
15302
15332
  }, {
15303
15333
  key: "getBlockList",
15304
- value: function getBlockList(name) {
15305
- return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
15334
+ value: function getBlockList(name, data) {
15335
+ return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
15306
15336
  }
15337
+ /**
15338
+ * Updates an existing block list
15339
+ *
15340
+ * @param {string} name - The name of the block list to update
15341
+ * @param {Object} data - The update data
15342
+ * @param {string[]} data.words - New list of words to block
15343
+ * @param {string} [data.team] - Team ID that blocklist belongs to
15344
+ *
15345
+ * @returns {Promise<APIResponse>} The server response
15346
+ */
15347
+
15307
15348
  }, {
15308
15349
  key: "updateBlockList",
15309
15350
  value: function updateBlockList(name, data) {
15310
15351
  return this.put("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
15311
15352
  }
15353
+ /**
15354
+ * Deletes a block list
15355
+ *
15356
+ * @param {string} name - The name of the block list to delete
15357
+ * @param {Object} [data] - Query parameters
15358
+ * @param {string} [data.team] - Team ID that blocklist belongs to
15359
+ *
15360
+ * @returns {Promise<APIResponse>} The server response
15361
+ */
15362
+
15312
15363
  }, {
15313
15364
  key: "deleteBlockList",
15314
- value: function deleteBlockList(name) {
15315
- return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
15365
+ value: function deleteBlockList(name, data) {
15366
+ return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
15316
15367
  }
15317
15368
  }, {
15318
15369
  key: "exportChannels",