stream-chat 8.53.0 → 8.54.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.
- package/dist/browser.es.js +58 -7
- 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 +58 -7
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +58 -7
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +58 -7
- 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/types.d.ts +2 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +53 -6
- package/src/types.ts +2 -0
package/dist/index.es.js
CHANGED
|
@@ -15015,7 +15015,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15015
15015
|
}, {
|
|
15016
15016
|
key: "getUserAgent",
|
|
15017
15017
|
value: function getUserAgent() {
|
|
15018
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
15018
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.54.0");
|
|
15019
15019
|
}
|
|
15020
15020
|
}, {
|
|
15021
15021
|
key: "setUserAgent",
|
|
@@ -15261,30 +15261,81 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15261
15261
|
|
|
15262
15262
|
return sendUserCustomEvent;
|
|
15263
15263
|
}()
|
|
15264
|
+
/**
|
|
15265
|
+
* Creates a new block list
|
|
15266
|
+
*
|
|
15267
|
+
* @param {BlockList} blockList - The block list to create
|
|
15268
|
+
* @param {string} blockList.name - The name of the block list
|
|
15269
|
+
* @param {string[]} blockList.words - List of words to block
|
|
15270
|
+
* @param {string} [blockList.team] - Team ID the block list belongs to
|
|
15271
|
+
*
|
|
15272
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15273
|
+
*/
|
|
15274
|
+
|
|
15264
15275
|
}, {
|
|
15265
15276
|
key: "createBlockList",
|
|
15266
15277
|
value: function createBlockList(blockList) {
|
|
15267
15278
|
return this.post("".concat(this.baseURL, "/blocklists"), blockList);
|
|
15268
15279
|
}
|
|
15280
|
+
/**
|
|
15281
|
+
* Lists all block lists
|
|
15282
|
+
*
|
|
15283
|
+
* @param {Object} [data] - Query parameters
|
|
15284
|
+
* @param {string} [data.team] - Team ID to filter block lists by
|
|
15285
|
+
*
|
|
15286
|
+
* @returns {Promise<APIResponse & {blocklists: BlockListResponse[]}>} Response containing array of block lists
|
|
15287
|
+
*/
|
|
15288
|
+
|
|
15269
15289
|
}, {
|
|
15270
15290
|
key: "listBlockLists",
|
|
15271
|
-
value: function listBlockLists() {
|
|
15272
|
-
return this.get("".concat(this.baseURL, "/blocklists"));
|
|
15291
|
+
value: function listBlockLists(data) {
|
|
15292
|
+
return this.get("".concat(this.baseURL, "/blocklists"), data);
|
|
15273
15293
|
}
|
|
15294
|
+
/**
|
|
15295
|
+
* Gets a specific block list
|
|
15296
|
+
*
|
|
15297
|
+
* @param {string} name - The name of the block list to retrieve
|
|
15298
|
+
* @param {Object} [data] - Query parameters
|
|
15299
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15300
|
+
*
|
|
15301
|
+
* @returns {Promise<APIResponse & {blocklist: BlockListResponse}>} Response containing the block list
|
|
15302
|
+
*/
|
|
15303
|
+
|
|
15274
15304
|
}, {
|
|
15275
15305
|
key: "getBlockList",
|
|
15276
|
-
value: function getBlockList(name) {
|
|
15277
|
-
return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
|
|
15306
|
+
value: function getBlockList(name, data) {
|
|
15307
|
+
return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15278
15308
|
}
|
|
15309
|
+
/**
|
|
15310
|
+
* Updates an existing block list
|
|
15311
|
+
*
|
|
15312
|
+
* @param {string} name - The name of the block list to update
|
|
15313
|
+
* @param {Object} data - The update data
|
|
15314
|
+
* @param {string[]} data.words - New list of words to block
|
|
15315
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15316
|
+
*
|
|
15317
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15318
|
+
*/
|
|
15319
|
+
|
|
15279
15320
|
}, {
|
|
15280
15321
|
key: "updateBlockList",
|
|
15281
15322
|
value: function updateBlockList(name, data) {
|
|
15282
15323
|
return this.put("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15283
15324
|
}
|
|
15325
|
+
/**
|
|
15326
|
+
* Deletes a block list
|
|
15327
|
+
*
|
|
15328
|
+
* @param {string} name - The name of the block list to delete
|
|
15329
|
+
* @param {Object} [data] - Query parameters
|
|
15330
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15331
|
+
*
|
|
15332
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15333
|
+
*/
|
|
15334
|
+
|
|
15284
15335
|
}, {
|
|
15285
15336
|
key: "deleteBlockList",
|
|
15286
|
-
value: function deleteBlockList(name) {
|
|
15287
|
-
return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
|
|
15337
|
+
value: function deleteBlockList(name, data) {
|
|
15338
|
+
return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15288
15339
|
}
|
|
15289
15340
|
}, {
|
|
15290
15341
|
key: "exportChannels",
|