From 5524675656ad0b4483a5b4ed9047fa8b384a5423 Mon Sep 17 00:00:00 2001 From: Vini Andrade Date: Tue, 2 Jun 2020 11:50:51 +0200 Subject: [PATCH] Improve channel config types Signed-off-by: Vini Andrade --- types/stream-chat/index.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/types/stream-chat/index.d.ts b/types/stream-chat/index.d.ts index 1fb666c11..d2ec3d785 100644 --- a/types/stream-chat/index.d.ts +++ b/types/stream-chat/index.d.ts @@ -387,9 +387,9 @@ export class Channel { url_enrichment: boolean; message_retention: string; max_message_length: number; - automod: string; - automod_behavior: string; - commands: object[]; + automod: ChannelConfigAutomodTypes; + automod_behavior: ChannelConfigAutomodBehaviorTypes; + commands: CommandVariants[]; }; sendMessage(message: Message): Promise; sendFile( @@ -959,6 +959,8 @@ export interface ChannelConfigDBFields { updated_at: string; } +export type ChannelConfigAutomodTypes = 'disabled' | 'simple' | 'AI'; +export type ChannelConfigAutomodBehaviorTypes = 'flag' | 'block'; export interface ChannelConfigFields { name: string; typing_events: boolean; @@ -972,7 +974,7 @@ export interface ChannelConfigFields { max_message_length: number; uploads: boolean; url_enrichment: boolean; - automod: 'disabled' | 'simple' | 'AI'; + automod: ChannelConfigAutomodTypes; automod_behavior: 'flag' | 'block'; }