@@ -442,6 +442,7 @@ export type FlagMessageResponse<StreamChatGenerics extends ExtendableGenerics =
442442 reviewed_at ?: string ;
443443 reviewed_by ?: string ;
444444 } ;
445+ review_queue_item_id ?: string ;
445446} ;
446447
447448export type FlagUserResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
@@ -457,6 +458,7 @@ export type FlagUserResponse<StreamChatGenerics extends ExtendableGenerics = Def
457458 reviewed_at ?: string ;
458459 reviewed_by ?: string ;
459460 } ;
461+ review_queue_item_id ?: string ;
460462} ;
461463
462464export type FormatMessageResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = Omit <
@@ -1899,6 +1901,7 @@ export type AsyncModerationOptions = {
18991901
19001902export type AppSettings = {
19011903 agora_options ?: AgoraOptions | null ;
1904+ allowed_flag_reasons ?: string [ ] ;
19021905 apn_config ?: {
19031906 auth_key ?: string ;
19041907 auth_type ?: string ;
@@ -2006,6 +2009,8 @@ export type OGAttachment = {
20062009export type BlockList = {
20072010 name : string ;
20082011 words : string [ ] ;
2012+ type ?: string ;
2013+ validate ?: boolean ;
20092014} ;
20102015
20112016export type ChannelConfig < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = ChannelConfigFields &
@@ -3149,3 +3154,147 @@ export type QueryMessageHistoryResponse<StreamChatGenerics extends ExtendableGen
31493154 next ?: string ;
31503155 prev ?: string ;
31513156} ;
3157+
3158+ // Moderation v2
3159+ export type ModerationPayload = {
3160+ created_at : string ;
3161+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3162+ custom ?: Record < string , any > ;
3163+ images ?: string [ ] ;
3164+ texts ?: string [ ] ;
3165+ videos ?: string [ ] ;
3166+ } ;
3167+
3168+ export type ModV2ReviewStatus = 'complete' | 'flagged' | 'partial' ;
3169+
3170+ export type ModerationFlag = {
3171+ created_at : string ;
3172+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3173+ custom : Record < string , any > ;
3174+ entity_creator_id : string ;
3175+ entity_id : string ;
3176+ entity_type : string ;
3177+ id : string ;
3178+ reason : string ;
3179+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3180+ result : Record < string , any > [ ] ;
3181+ review_queue_item_id : string ;
3182+ updated_at : string ;
3183+ user : UserResponse ;
3184+ moderation_payload ?: ModerationPayload ;
3185+ moderation_payload_hash ?: string ;
3186+ } ;
3187+
3188+ export type ReviewQueueItem = {
3189+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3190+ actions_taken : any [ ] ;
3191+ appealed_by : string ;
3192+ assigned_to : string ;
3193+ completed_at : string ;
3194+ config_key : string ;
3195+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3196+ context : any [ ] ;
3197+ created_at : string ;
3198+ created_by : string ;
3199+ entity_id : string ;
3200+ entity_type : string ;
3201+ flags : ModerationFlag [ ] ;
3202+ has_image : boolean ;
3203+ has_text : boolean ;
3204+ has_video : boolean ;
3205+ id : string ;
3206+ moderation_payload : ModerationPayload ;
3207+ moderation_payload_hash : string ;
3208+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3209+ options : any ;
3210+ recommended_action : string ;
3211+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3212+ results : any ;
3213+ reviewed_at : string ;
3214+ status : string ;
3215+ updated_at : string ;
3216+ } ;
3217+
3218+ export type GetUserModerationReportResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
3219+ user : UserResponse < StreamChatGenerics > ;
3220+ user_blocks ?: Array < {
3221+ blocked_at : string ;
3222+ blocked_by_user_id : string ;
3223+ blocked_user_id : string ;
3224+ } > ;
3225+ user_mutes ?: Mute < StreamChatGenerics > [ ] ;
3226+ } ;
3227+
3228+ export type ReviewQueueFilters = QueryFilters <
3229+ {
3230+ assigned_to ?:
3231+ | RequireOnlyOne < Pick < QueryFilter < ReviewQueueItem [ 'assigned_to' ] > , '$eq' | '$in' > >
3232+ | PrimitiveFilter < ReviewQueueItem [ 'assigned_to' ] > ;
3233+ } & {
3234+ completed_at ?:
3235+ | RequireOnlyOne < Pick < QueryFilter < ReviewQueueItem [ 'completed_at' ] > , '$eq' | '$gt' | '$lt' | '$gte' | '$lte' > >
3236+ | PrimitiveFilter < ReviewQueueItem [ 'completed_at' ] > ;
3237+ } & {
3238+ config_key ?:
3239+ | RequireOnlyOne < Pick < QueryFilter < ReviewQueueItem [ 'config_key' ] > , '$eq' | '$in' > >
3240+ | PrimitiveFilter < ReviewQueueItem [ 'config_key' ] > ;
3241+ } & {
3242+ entity_type ?:
3243+ | RequireOnlyOne < Pick < QueryFilter < ReviewQueueItem [ 'entity_type' ] > , '$eq' | '$in' > >
3244+ | PrimitiveFilter < ReviewQueueItem [ 'entity_type' ] > ;
3245+ } & {
3246+ created_at ?:
3247+ | RequireOnlyOne < Pick < QueryFilter < ReviewQueueItem [ 'created_at' ] > , '$eq' | '$gt' | '$lt' | '$gte' | '$lte' > >
3248+ | PrimitiveFilter < ReviewQueueItem [ 'created_at' ] > ;
3249+ } & {
3250+ id ?:
3251+ | RequireOnlyOne < Pick < QueryFilter < ReviewQueueItem [ 'id' ] > , '$eq' | '$in' > >
3252+ | PrimitiveFilter < ReviewQueueItem [ 'id' ] > ;
3253+ } & {
3254+ entity_id ?:
3255+ | RequireOnlyOne < Pick < QueryFilter < ReviewQueueItem [ 'entity_id' ] > , '$eq' | '$in' > >
3256+ | PrimitiveFilter < ReviewQueueItem [ 'entity_id' ] > ;
3257+ } & {
3258+ reviewed ?: boolean ;
3259+ } & {
3260+ reviewed_at ?:
3261+ | RequireOnlyOne < Pick < QueryFilter < ReviewQueueItem [ 'reviewed_at' ] > , '$eq' | '$gt' | '$lt' | '$gte' | '$lte' > >
3262+ | PrimitiveFilter < ReviewQueueItem [ 'reviewed_at' ] > ;
3263+ } & {
3264+ status ?:
3265+ | RequireOnlyOne < Pick < QueryFilter < ReviewQueueItem [ 'status' ] > , '$eq' | '$in' > >
3266+ | PrimitiveFilter < ReviewQueueItem [ 'status' ] > ;
3267+ } & {
3268+ updated_at ?:
3269+ | RequireOnlyOne < Pick < QueryFilter < ReviewQueueItem [ 'updated_at' ] > , '$eq' | '$gt' | '$lt' | '$gte' | '$lte' > >
3270+ | PrimitiveFilter < ReviewQueueItem [ 'updated_at' ] > ;
3271+ } & {
3272+ has_image ?: boolean ;
3273+ } & {
3274+ has_text ?: boolean ;
3275+ } & {
3276+ has_video ?: boolean ;
3277+ }
3278+ > ;
3279+
3280+ export type ReviewQueueSort =
3281+ | Sort < Pick < ReviewQueueItem , 'id' | 'created_at' | 'updated_at' > >
3282+ | Array < Sort < Pick < ReviewQueueItem , 'id' | 'created_at' | 'updated_at' > > > ;
3283+
3284+ export type ReviewQueuePaginationOptions = Pager ;
3285+
3286+ export type ReviewQueueResponse = {
3287+ items : ReviewQueueItem [ ] ;
3288+ next ?: string ;
3289+ prev ?: string ;
3290+ } ;
3291+
3292+ export type Config = { } ;
3293+
3294+ export type GetConfigResponse = {
3295+ config : Config ;
3296+ } ;
3297+
3298+ export type UpsertConfigResponse = {
3299+ config : Config ;
3300+ } ;
0 commit comments