mattermost-redux
Version:
Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client
26 lines (25 loc) • 2.81 kB
TypeScript
import { Channel, ChannelMembership } from "../../types/channels";
import { ChannelCategory, ChannelCategoryType } from "../../types/channel_categories";
import { GlobalState } from "../../types/store";
import { RelationOneToOne } from "../../types/utilities";
export declare function getAllCategoriesByIds(state: GlobalState): RelationOneToOne<ChannelCategory, ChannelCategory>;
export declare function getCategory(state: GlobalState, categoryId: string): ChannelCategory;
export declare function getCategoryInTeamByType(state: GlobalState, teamId: string, categoryType: ChannelCategoryType): ChannelCategory | undefined;
export declare function getCategoryInTeamWithChannel(state: GlobalState, teamId: string, channelId: string): ChannelCategory | undefined;
export declare function getCategoryWhere(state: GlobalState, condition: (category: ChannelCategory) => boolean): ChannelCategory | undefined;
export declare function getCategoryIdsForTeam(state: GlobalState, teamId: string): string[];
export declare function makeGetCategoriesForTeam(): (state: GlobalState, teamId: string) => ChannelCategory[];
export declare function makeFilterArchivedChannels(): (state: GlobalState, channels: Channel[]) => Channel[];
declare function getDefaultAutocloseCutoff(): number;
export declare function legacyMakeFilterAutoclosedDMs(getAutocloseCutoff?: typeof getDefaultAutocloseCutoff): (state: GlobalState, channels: Channel[], categoryType: string) => Channel[];
export declare function makeFilterAutoclosedDMs(): (state: GlobalState, channels: Channel[], categoryType: string) => Channel[];
export declare function makeFilterManuallyClosedDMs(): (state: GlobalState, channels: Channel[]) => Channel[];
export declare function makeCompareChannels(getDisplayName: (channel: Channel) => string, locale: string, myMembers: RelationOneToOne<Channel, ChannelMembership>): (a: Channel, b: Channel) => number;
export declare function makeSortChannelsByName(): (state: GlobalState, channels: Channel[]) => Channel[];
export declare function makeSortChannelsByNameWithDMs(): (state: GlobalState, channels: Channel[]) => Channel[];
export declare function makeSortChannelsByRecency(): (state: GlobalState, channels: Channel[]) => Channel[];
export declare function makeSortChannels(): (state: GlobalState, originalChannels: Channel[], category: ChannelCategory) => Channel[];
export declare function makeGetChannelsForCategory(): (state: GlobalState, category: ChannelCategory) => Channel[];
export declare function makeFilterAndSortChannelsForCategory(): (state: GlobalState, originalChannels: Channel[], category: ChannelCategory) => Channel[];
export declare function makeGetChannelsByCategory(): (state: GlobalState, teamId: string) => RelationOneToOne<ChannelCategory, Channel[]>;
export {};