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
|
@@ -12393,6 +12393,54 @@ var Moderation = class {
|
|
|
12393
12393
|
flags
|
|
12394
12394
|
);
|
|
12395
12395
|
}
|
|
12396
|
+
/**
|
|
12397
|
+
* Create or update a moderation rule
|
|
12398
|
+
* @param {ModerationRuleRequest} rule Rule configuration to be upserted
|
|
12399
|
+
* @returns
|
|
12400
|
+
*/
|
|
12401
|
+
async upsertModerationRule(rule) {
|
|
12402
|
+
return await this.client.post(
|
|
12403
|
+
this.client.baseURL + "/api/v2/moderation/moderation_rule",
|
|
12404
|
+
rule
|
|
12405
|
+
);
|
|
12406
|
+
}
|
|
12407
|
+
/**
|
|
12408
|
+
* Query moderation rules
|
|
12409
|
+
* @param {QueryModerationRulesFilters} filterConditions Filter conditions for querying moderation rules
|
|
12410
|
+
* @param {QueryModerationRulesSort} sort Sort conditions for querying moderation rules
|
|
12411
|
+
* @param {Pager} options Pagination options for querying moderation rules
|
|
12412
|
+
* @returns
|
|
12413
|
+
*/
|
|
12414
|
+
async queryModerationRules(filterConditions = {}, sort = [], options = {}) {
|
|
12415
|
+
return await this.client.post(
|
|
12416
|
+
this.client.baseURL + "/api/v2/moderation/moderation_rules",
|
|
12417
|
+
{
|
|
12418
|
+
filter: filterConditions,
|
|
12419
|
+
sort,
|
|
12420
|
+
...options
|
|
12421
|
+
}
|
|
12422
|
+
);
|
|
12423
|
+
}
|
|
12424
|
+
/**
|
|
12425
|
+
* Get a specific moderation rule by ID
|
|
12426
|
+
* @param {string} id ID of the moderation rule to fetch
|
|
12427
|
+
* @returns
|
|
12428
|
+
*/
|
|
12429
|
+
async getModerationRule(id) {
|
|
12430
|
+
return await this.client.get(
|
|
12431
|
+
this.client.baseURL + "/api/v2/moderation/moderation_rule/" + id
|
|
12432
|
+
);
|
|
12433
|
+
}
|
|
12434
|
+
/**
|
|
12435
|
+
* Delete a moderation rule by ID
|
|
12436
|
+
* @param {string} id ID of the moderation rule to delete
|
|
12437
|
+
* @returns
|
|
12438
|
+
*/
|
|
12439
|
+
async deleteModerationRule(id) {
|
|
12440
|
+
return await this.client.delete(
|
|
12441
|
+
this.client.baseURL + "/api/v2/moderation/moderation_rule/" + id
|
|
12442
|
+
);
|
|
12443
|
+
}
|
|
12396
12444
|
};
|
|
12397
12445
|
|
|
12398
12446
|
// src/thread_manager.ts
|
|
@@ -16164,7 +16212,7 @@ var StreamChat = class _StreamChat {
|
|
|
16164
16212
|
if (this.userAgent) {
|
|
16165
16213
|
return this.userAgent;
|
|
16166
16214
|
}
|
|
16167
|
-
const version = "9.
|
|
16215
|
+
const version = "9.18.0";
|
|
16168
16216
|
const clientBundle = "browser-cjs";
|
|
16169
16217
|
let userAgentString = "";
|
|
16170
16218
|
if (this.sdkIdentifier) {
|