stream-chat 9.45.3 → 9.45.5
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.js +8 -6
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +8 -6
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +8 -6
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/moderation.d.ts +3 -2
- package/package.json +1 -1
- package/src/moderation.ts +6 -2
|
@@ -133,8 +133,7 @@ export declare class Moderation {
|
|
|
133
133
|
videos?: string[];
|
|
134
134
|
}, configKey: string, options?: {
|
|
135
135
|
force_sync?: boolean;
|
|
136
|
-
|
|
137
|
-
}): Promise<CheckResponse>;
|
|
136
|
+
}, testMode?: boolean): Promise<CheckResponse>;
|
|
138
137
|
/**
|
|
139
138
|
* Experimental: Check user profile
|
|
140
139
|
*
|
|
@@ -173,10 +172,12 @@ export declare class Moderation {
|
|
|
173
172
|
* @param {Array} moderationPayload.texts array Array of texts to be checked for moderation
|
|
174
173
|
* @param {Array} moderationPayload.images array Array of images to be checked for moderation
|
|
175
174
|
* @param {Array} moderationPayload.videos array Array of videos to be checked for moderation
|
|
175
|
+
* @param {object} moderationPayload.custom object Additional custom data to attach to the moderation review queue item
|
|
176
176
|
* @param {Array<CustomCheckFlag>} flags Array of CustomCheckFlag to be passed to flag the entity
|
|
177
177
|
* @returns
|
|
178
178
|
*/
|
|
179
179
|
addCustomFlags(entityType: string, entityID: string, entityCreatorID: string, moderationPayload: {
|
|
180
|
+
custom?: Record<string, any>;
|
|
180
181
|
images?: string[];
|
|
181
182
|
texts?: string[];
|
|
182
183
|
videos?: string[];
|
package/package.json
CHANGED
package/src/moderation.ts
CHANGED
|
@@ -281,8 +281,8 @@ export class Moderation {
|
|
|
281
281
|
configKey: string,
|
|
282
282
|
options?: {
|
|
283
283
|
force_sync?: boolean;
|
|
284
|
-
test_mode?: boolean;
|
|
285
284
|
},
|
|
285
|
+
testMode?: boolean,
|
|
286
286
|
) {
|
|
287
287
|
return await this.client.post<CheckResponse>(
|
|
288
288
|
this.client.baseURL + `/api/v2/moderation/check`,
|
|
@@ -293,6 +293,7 @@ export class Moderation {
|
|
|
293
293
|
moderation_payload: moderationPayload,
|
|
294
294
|
config_key: configKey,
|
|
295
295
|
options,
|
|
296
|
+
test_mode: testMode,
|
|
296
297
|
},
|
|
297
298
|
);
|
|
298
299
|
}
|
|
@@ -346,8 +347,8 @@ export class Moderation {
|
|
|
346
347
|
'user_profile:default',
|
|
347
348
|
{
|
|
348
349
|
force_sync: true,
|
|
349
|
-
test_mode: true,
|
|
350
350
|
},
|
|
351
|
+
true,
|
|
351
352
|
);
|
|
352
353
|
}
|
|
353
354
|
|
|
@@ -360,6 +361,7 @@ export class Moderation {
|
|
|
360
361
|
* @param {Array} moderationPayload.texts array Array of texts to be checked for moderation
|
|
361
362
|
* @param {Array} moderationPayload.images array Array of images to be checked for moderation
|
|
362
363
|
* @param {Array} moderationPayload.videos array Array of videos to be checked for moderation
|
|
364
|
+
* @param {object} moderationPayload.custom object Additional custom data to attach to the moderation review queue item
|
|
363
365
|
* @param {Array<CustomCheckFlag>} flags Array of CustomCheckFlag to be passed to flag the entity
|
|
364
366
|
* @returns
|
|
365
367
|
*/
|
|
@@ -368,6 +370,8 @@ export class Moderation {
|
|
|
368
370
|
entityID: string,
|
|
369
371
|
entityCreatorID: string,
|
|
370
372
|
moderationPayload: {
|
|
373
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
374
|
+
custom?: Record<string, any>;
|
|
371
375
|
images?: string[];
|
|
372
376
|
texts?: string[];
|
|
373
377
|
videos?: string[];
|