stream-chat 9.17.0 → 9.18.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/cjs/index.browser.cjs +49 -1
- package/dist/cjs/index.browser.cjs.map +2 -2
- package/dist/cjs/index.node.cjs +49 -1
- package/dist/cjs/index.node.cjs.map +2 -2
- package/dist/esm/index.js +49 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/types/moderation.d.ts +29 -1
- package/dist/types/types.d.ts +140 -0
- package/package.json +1 -1
- package/src/moderation.ts +62 -0
- package/src/types.ts +168 -0
package/dist/esm/index.js
CHANGED
|
@@ -13343,6 +13343,54 @@ var Moderation = class {
|
|
|
13343
13343
|
flags
|
|
13344
13344
|
);
|
|
13345
13345
|
}
|
|
13346
|
+
/**
|
|
13347
|
+
* Create or update a moderation rule
|
|
13348
|
+
* @param {ModerationRuleRequest} rule Rule configuration to be upserted
|
|
13349
|
+
* @returns
|
|
13350
|
+
*/
|
|
13351
|
+
async upsertModerationRule(rule) {
|
|
13352
|
+
return await this.client.post(
|
|
13353
|
+
this.client.baseURL + "/api/v2/moderation/moderation_rule",
|
|
13354
|
+
rule
|
|
13355
|
+
);
|
|
13356
|
+
}
|
|
13357
|
+
/**
|
|
13358
|
+
* Query moderation rules
|
|
13359
|
+
* @param {QueryModerationRulesFilters} filterConditions Filter conditions for querying moderation rules
|
|
13360
|
+
* @param {QueryModerationRulesSort} sort Sort conditions for querying moderation rules
|
|
13361
|
+
* @param {Pager} options Pagination options for querying moderation rules
|
|
13362
|
+
* @returns
|
|
13363
|
+
*/
|
|
13364
|
+
async queryModerationRules(filterConditions = {}, sort = [], options = {}) {
|
|
13365
|
+
return await this.client.post(
|
|
13366
|
+
this.client.baseURL + "/api/v2/moderation/moderation_rules",
|
|
13367
|
+
{
|
|
13368
|
+
filter: filterConditions,
|
|
13369
|
+
sort,
|
|
13370
|
+
...options
|
|
13371
|
+
}
|
|
13372
|
+
);
|
|
13373
|
+
}
|
|
13374
|
+
/**
|
|
13375
|
+
* Get a specific moderation rule by ID
|
|
13376
|
+
* @param {string} id ID of the moderation rule to fetch
|
|
13377
|
+
* @returns
|
|
13378
|
+
*/
|
|
13379
|
+
async getModerationRule(id) {
|
|
13380
|
+
return await this.client.get(
|
|
13381
|
+
this.client.baseURL + "/api/v2/moderation/moderation_rule/" + id
|
|
13382
|
+
);
|
|
13383
|
+
}
|
|
13384
|
+
/**
|
|
13385
|
+
* Delete a moderation rule by ID
|
|
13386
|
+
* @param {string} id ID of the moderation rule to delete
|
|
13387
|
+
* @returns
|
|
13388
|
+
*/
|
|
13389
|
+
async deleteModerationRule(id) {
|
|
13390
|
+
return await this.client.delete(
|
|
13391
|
+
this.client.baseURL + "/api/v2/moderation/moderation_rule/" + id
|
|
13392
|
+
);
|
|
13393
|
+
}
|
|
13346
13394
|
};
|
|
13347
13395
|
|
|
13348
13396
|
// src/thread_manager.ts
|
|
@@ -17114,7 +17162,7 @@ var StreamChat = class _StreamChat {
|
|
|
17114
17162
|
if (this.userAgent) {
|
|
17115
17163
|
return this.userAgent;
|
|
17116
17164
|
}
|
|
17117
|
-
const version = "9.
|
|
17165
|
+
const version = "9.18.0";
|
|
17118
17166
|
const clientBundle = "browser-esm";
|
|
17119
17167
|
let userAgentString = "";
|
|
17120
17168
|
if (this.sdkIdentifier) {
|