Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(moderation): update flag_report field name and add more filterin… #894

Merged
merged 1 commit into from
Feb 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export type FlagReport<
message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
user: UserResponse<UserType>;
created_at?: string;
review_details?: Object;
details?: Object;
review_result?: string;
reviewed_at?: string;
reviewed_by?: UserResponse<UserType>;
Expand Down Expand Up @@ -1089,11 +1089,13 @@ export type MessageFlagsFilters = QueryFilters<
>;

export type FlagReportsFiltersOptions = {
channel_cid?: string;
is_reviewed?: boolean;
message_id?: string;
report_id?: string;
review_result?: string;
reviewed_by?: string;
team?: string;
user_id?: string;
};

Expand All @@ -1118,6 +1120,14 @@ export type FlagReportsFilters = QueryFilters<
message_id?:
| RequireOnlyOne<Pick<QueryFilter<FlagReportsFiltersOptions['message_id']>, '$eq' | '$in'>>
| PrimitiveFilter<FlagReportsFiltersOptions['message_id']>;
} & {
channel_cid?:
| RequireOnlyOne<Pick<QueryFilter<FlagReportsFiltersOptions['channel_cid']>, '$eq' | '$in'>>
| PrimitiveFilter<FlagReportsFiltersOptions['channel_cid']>;
} & {
team?:
| RequireOnlyOne<Pick<QueryFilter<FlagReportsFiltersOptions['team']>, '$eq' | '$in'>>
| PrimitiveFilter<FlagReportsFiltersOptions['team']>;
} & {
[Key in keyof Omit<
FlagReportsFiltersOptions,
Expand Down