Skip to content

Commit

Permalink
Improve channel config types
Browse files Browse the repository at this point in the history
Signed-off-by: Vini Andrade <vini.andrade.dev@gmail.com>
  • Loading branch information
vini-btc committed Jun 2, 2020
1 parent 27ae876 commit 5524675
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions types/stream-chat/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<SendMessageAPIResponse>;
sendFile(
Expand Down Expand Up @@ -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;
Expand All @@ -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';
}

Expand Down

0 comments on commit 5524675

Please sign in to comment.