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/browser.es.js +60 -9
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +60 -9
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +60 -9
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +60 -9
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +58 -3
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/poll_manager.d.ts +2 -2
- package/dist/types/poll_manager.d.ts.map +1 -1
- package/dist/types/types.d.ts +43 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +1 -1
- package/src/client.ts +54 -7
- package/src/poll_manager.ts +5 -1
- package/src/types.ts +43 -0
package/dist/browser.es.js
CHANGED
|
@@ -4251,7 +4251,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
4251
4251
|
returnedPage: state.messages,
|
|
4252
4252
|
logger: this.getClient().logger
|
|
4253
4253
|
}));
|
|
4254
|
-
this.getClient().polls.hydratePollCache(
|
|
4254
|
+
this.getClient().polls.hydratePollCache(state.messages, true);
|
|
4255
4255
|
areCapabilitiesChanged = _toConsumableArray(state.channel.own_capabilities || []).sort().join() !== _toConsumableArray(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();
|
|
4256
4256
|
this.data = state.channel;
|
|
4257
4257
|
this.offlineMode = false;
|
|
@@ -12623,7 +12623,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12623
12623
|
returnedPage: channelState.messages,
|
|
12624
12624
|
logger: this.logger
|
|
12625
12625
|
}));
|
|
12626
|
-
this.polls.hydratePollCache(
|
|
12626
|
+
this.polls.hydratePollCache(channelState.messages, true);
|
|
12627
12627
|
}
|
|
12628
12628
|
|
|
12629
12629
|
channels.push(c);
|
|
@@ -15012,7 +15012,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15012
15012
|
}, {
|
|
15013
15013
|
key: "getUserAgent",
|
|
15014
15014
|
value: function getUserAgent() {
|
|
15015
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
15015
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.54.1");
|
|
15016
15016
|
}
|
|
15017
15017
|
}, {
|
|
15018
15018
|
key: "setUserAgent",
|
|
@@ -15258,30 +15258,81 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15258
15258
|
|
|
15259
15259
|
return sendUserCustomEvent;
|
|
15260
15260
|
}()
|
|
15261
|
+
/**
|
|
15262
|
+
* Creates a new block list
|
|
15263
|
+
*
|
|
15264
|
+
* @param {BlockList} blockList - The block list to create
|
|
15265
|
+
* @param {string} blockList.name - The name of the block list
|
|
15266
|
+
* @param {string[]} blockList.words - List of words to block
|
|
15267
|
+
* @param {string} [blockList.team] - Team ID the block list belongs to
|
|
15268
|
+
*
|
|
15269
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15270
|
+
*/
|
|
15271
|
+
|
|
15261
15272
|
}, {
|
|
15262
15273
|
key: "createBlockList",
|
|
15263
15274
|
value: function createBlockList(blockList) {
|
|
15264
15275
|
return this.post("".concat(this.baseURL, "/blocklists"), blockList);
|
|
15265
15276
|
}
|
|
15277
|
+
/**
|
|
15278
|
+
* Lists all block lists
|
|
15279
|
+
*
|
|
15280
|
+
* @param {Object} [data] - Query parameters
|
|
15281
|
+
* @param {string} [data.team] - Team ID to filter block lists by
|
|
15282
|
+
*
|
|
15283
|
+
* @returns {Promise<APIResponse & {blocklists: BlockListResponse[]}>} Response containing array of block lists
|
|
15284
|
+
*/
|
|
15285
|
+
|
|
15266
15286
|
}, {
|
|
15267
15287
|
key: "listBlockLists",
|
|
15268
|
-
value: function listBlockLists() {
|
|
15269
|
-
return this.get("".concat(this.baseURL, "/blocklists"));
|
|
15288
|
+
value: function listBlockLists(data) {
|
|
15289
|
+
return this.get("".concat(this.baseURL, "/blocklists"), data);
|
|
15270
15290
|
}
|
|
15291
|
+
/**
|
|
15292
|
+
* Gets a specific block list
|
|
15293
|
+
*
|
|
15294
|
+
* @param {string} name - The name of the block list to retrieve
|
|
15295
|
+
* @param {Object} [data] - Query parameters
|
|
15296
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15297
|
+
*
|
|
15298
|
+
* @returns {Promise<APIResponse & {blocklist: BlockListResponse}>} Response containing the block list
|
|
15299
|
+
*/
|
|
15300
|
+
|
|
15271
15301
|
}, {
|
|
15272
15302
|
key: "getBlockList",
|
|
15273
|
-
value: function getBlockList(name) {
|
|
15274
|
-
return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
|
|
15303
|
+
value: function getBlockList(name, data) {
|
|
15304
|
+
return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15275
15305
|
}
|
|
15306
|
+
/**
|
|
15307
|
+
* Updates an existing block list
|
|
15308
|
+
*
|
|
15309
|
+
* @param {string} name - The name of the block list to update
|
|
15310
|
+
* @param {Object} data - The update data
|
|
15311
|
+
* @param {string[]} data.words - New list of words to block
|
|
15312
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15313
|
+
*
|
|
15314
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15315
|
+
*/
|
|
15316
|
+
|
|
15276
15317
|
}, {
|
|
15277
15318
|
key: "updateBlockList",
|
|
15278
15319
|
value: function updateBlockList(name, data) {
|
|
15279
15320
|
return this.put("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15280
15321
|
}
|
|
15322
|
+
/**
|
|
15323
|
+
* Deletes a block list
|
|
15324
|
+
*
|
|
15325
|
+
* @param {string} name - The name of the block list to delete
|
|
15326
|
+
* @param {Object} [data] - Query parameters
|
|
15327
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15328
|
+
*
|
|
15329
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15330
|
+
*/
|
|
15331
|
+
|
|
15281
15332
|
}, {
|
|
15282
15333
|
key: "deleteBlockList",
|
|
15283
|
-
value: function deleteBlockList(name) {
|
|
15284
|
-
return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
|
|
15334
|
+
value: function deleteBlockList(name, data) {
|
|
15335
|
+
return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15285
15336
|
}
|
|
15286
15337
|
}, {
|
|
15287
15338
|
key: "exportChannels",
|