[Gekidou] Sidebar Categories (Database only) (#5909)

This commit is contained in:
Shaz Amjad
2022-02-01 00:30:10 +11:00
committed by GitHub
parent aa84ccd808
commit fc29b4b974
24 changed files with 743 additions and 6 deletions

32
types/api/category.d.ts vendored Normal file
View File

@@ -0,0 +1,32 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
type CategorySorting = 'alpha' | 'manual' | 'recent'
type CategoryType = 'channels' | 'direct_messages' | 'favorites' | 'custom'
type CategoryChannel = {
id?: string;
category_id: string;
channel_id: string;
sort_order: number;
}
type Category = {
id: string;
team_id: string;
display_name: string;
sort_order: number;
sorting: CategorySorting;
type: CategoryType;
muted: boolean;
collapsed: boolean;
}
type CategoryWithChannels = Category & {
channel_ids: string[];
}
type CategoriesWithOrder = {
categories: CategoryWithChannels[];
order: string[];
}