UNPKG

mattermost-redux

Version:

Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client

43 lines (42 loc) 3.53 kB
import type { GlobalState } from '@mattermost/types/store'; import type { Team, TeamMembership, TeamStats } from '@mattermost/types/teams'; import type { UserProfile } from '@mattermost/types/users'; import type { RelationOneToOne } from '@mattermost/types/utilities'; export declare function getCurrentTeamId(state: GlobalState): string; export declare function getTeamByName(state: GlobalState, name: string): Team | undefined; export declare function getTeams(state: GlobalState): Record<string, Team>; export declare function getTeamsInPolicy(): (b: GlobalState, a: { policyId: string; }) => Team[]; export declare function getTeamStats(state: GlobalState): RelationOneToOne<Team, TeamStats>; export declare function getTeamMemberships(state: GlobalState): Record<string, TeamMembership>; export declare function getMembersInTeams(state: GlobalState): RelationOneToOne<Team, RelationOneToOne<UserProfile, TeamMembership>>; export declare const getTeamsList: (state: GlobalState) => Team[]; export declare const getActiveTeamsList: (state: GlobalState) => Team[]; export declare const getCurrentTeam: (state: GlobalState) => Team | undefined; export declare function getTeam(state: GlobalState, id: string): Team | undefined; export declare const getCurrentTeamMembership: (state: GlobalState) => TeamMembership | undefined; export declare const isCurrentUserCurrentTeamAdmin: (state: GlobalState) => boolean; export declare const getCurrentTeamUrl: (state: GlobalState) => string; export declare const getCurrentRelativeTeamUrl: (state: GlobalState) => string; export declare function getRelativeTeamUrl(state: GlobalState, teamId: string): string; export declare const getCurrentTeamStats: (state: GlobalState) => TeamStats | undefined; export declare const getMyTeams: (state: GlobalState) => Team[]; export declare const getMyDeletedTeams: (state: GlobalState) => Team[]; export declare const getMyTeamMember: (state: GlobalState, teamId: string) => TeamMembership | undefined; export declare const getMembersInCurrentTeam: (state: GlobalState) => RelationOneToOne<UserProfile, TeamMembership> | undefined; export declare const getMembersInTeam: (state: GlobalState, teamId: string) => RelationOneToOne<UserProfile, TeamMembership> | undefined; export declare function getTeamMember(state: GlobalState, teamId: string, userId: string): TeamMembership | undefined; export declare const getListableTeamIds: (state: GlobalState) => Array<Team['id']>; export declare const getSortedListableTeams: (state: GlobalState, locale: string) => Team[]; export declare const getJoinableTeamIds: (state: GlobalState) => Array<Team['id']>; export declare const getJoinableTeams: (state: GlobalState) => Team[]; export declare const getSortedJoinableTeams: (state: GlobalState, locale: string) => Team[]; export declare const getMySortedTeamIds: (state: GlobalState, locale: string) => Array<Team['id']>; export declare function getMyTeamsCount(state: GlobalState): number; export declare const getChannelDrawerBadgeCount: (state: GlobalState) => number; export declare const isTeamSameWithCurrentTeam: (state: GlobalState, teamName: string) => boolean; export declare function makeGetBadgeCountForTeamId(): (state: GlobalState, id: string) => number; export declare function searchTeamsInPolicy(teams: Team[], term: string): Team[]; export declare function getTeamIdByChannelId(state: GlobalState, channelId: string): string | undefined; export declare function contentFlaggingEnabledInTeam(state: GlobalState, teamId: string): boolean;