UNPKG

mattermost-redux

Version:

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

64 lines (63 loc) 6.38 kB
import type { AnyAction } from 'redux'; import type { Team, TeamMembership, TeamMemberWithError, GetTeamMembersOpts, TeamsWithCount, NotPagedTeamSearchOpts, PagedTeamSearchOpts } from '@mattermost/types/teams'; import type { ActionFuncAsync } from 'mattermost-redux/types/actions'; export declare function selectTeam(team: Team | Team['id']): { type: "SELECT_TEAM"; data: string; }; export declare function getMyTeams(): ActionFuncAsync<Team[], import("@mattermost/types/store").GlobalState, AnyAction>; export declare function getMyTeamUnreads(collapsedThreads: boolean): ActionFuncAsync; export declare function getTeam(teamId: string): ActionFuncAsync<Team, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function getTeamByName(teamName: string): ActionFuncAsync<Team, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function getTeams(page?: number, perPage?: number, includeTotalCount?: boolean, excludePolicyConstrained?: boolean): ActionFuncAsync; export declare function searchTeams(term: string, opts: PagedTeamSearchOpts): ActionFuncAsync<Team[]>; export declare function searchTeams(term: string, opts?: NotPagedTeamSearchOpts): ActionFuncAsync<TeamsWithCount>; export declare function createTeam(team: Team): ActionFuncAsync<Team>; export declare function deleteTeam(teamId: string): ActionFuncAsync; export declare function unarchiveTeam(teamId: string): ActionFuncAsync; export declare function updateTeam(team: Team): ActionFuncAsync<Team, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function patchTeam(team: Partial<Team> & { id: string; }): ActionFuncAsync<Team, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function regenerateTeamInviteId(teamId: string): ActionFuncAsync<Team, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function getMyTeamMembers(): ActionFuncAsync<TeamMembership[]>; export declare function getTeamMembers(teamId: string, page?: number, perPage?: number, options?: GetTeamMembersOpts): ActionFuncAsync<TeamMembership[], import("@mattermost/types/store").GlobalState, AnyAction>; export declare function getTeamMember(teamId: string, userId: string): ActionFuncAsync; export declare function getTeamMembersByIds(teamId: string, userIds: string[]): ActionFuncAsync<TeamMembership[]>; export declare function getTeamsForUser(userId: string): ActionFuncAsync<Team[], import("@mattermost/types/store").GlobalState, AnyAction>; export declare function getTeamMembersForUser(userId: string): ActionFuncAsync<TeamMembership[], import("@mattermost/types/store").GlobalState, AnyAction>; export declare function getTeamStats(teamId: string): ActionFuncAsync<import("@mattermost/types/teams").TeamStats, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function addUserToTeamFromInvite(token: string, inviteId: string): ActionFuncAsync<import("@mattermost/types/teams").TeamUnread & { user_id: string; roles: string; delete_at: number; scheme_admin: boolean; scheme_guest: boolean; scheme_user: boolean; }, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function addUserToTeam(teamId: string, userId: string): ActionFuncAsync<TeamMembership>; export declare function addUsersToTeamGracefully(teamId: string, userIds: string[]): ActionFuncAsync<TeamMemberWithError[]>; export declare function removeUserFromTeam(teamId: string, userId: string): ActionFuncAsync; export declare function sendEmailInvitesToTeam(teamId: string, emails: string[]): ActionFuncAsync<import("@mattermost/types/client4").StatusOK, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function sendEmailGuestInvitesToChannels(teamId: string, channelIds: string[], emails: string[], message: string): ActionFuncAsync<import("@mattermost/types/client4").StatusOK, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function sendEmailInvitesToTeamGracefully(teamId: string, emails: string[]): ActionFuncAsync<import("@mattermost/types/teams").TeamInviteWithError[], import("@mattermost/types/store").GlobalState, AnyAction>; export declare function sendEmailGuestInvitesToChannelsGracefully(teamId: string, channelIds: string[], emails: string[], message: string, guestMagicLink?: boolean): ActionFuncAsync<import("@mattermost/types/teams").TeamInviteWithError[], import("@mattermost/types/store").GlobalState, AnyAction>; export declare function sendEmailInvitesToTeamAndChannelsGracefully(teamId: string, channelIds: string[], emails: string[], message: string): ActionFuncAsync<import("@mattermost/types/teams").TeamInviteWithError[], import("@mattermost/types/store").GlobalState, AnyAction>; export declare function getTeamInviteInfo(inviteId: string): ActionFuncAsync<{ display_name: string; description: string; name: string; id: string; }, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function checkIfTeamExists(teamName: string): ActionFuncAsync<boolean>; export declare function setTeamIcon(teamId: string, imageData: File): ActionFuncAsync; export declare function removeTeamIcon(teamId: string): ActionFuncAsync; export declare function updateTeamScheme(teamId: string, schemeId: string): ActionFuncAsync<{ teamId: string; schemeId: string; }>; export declare function updateTeamMemberSchemeRoles(teamId: string, userId: string, isSchemeUser: boolean, isSchemeAdmin: boolean): ActionFuncAsync; export declare function invalidateAllEmailInvites(): ActionFuncAsync<import("@mattermost/types/client4").StatusOK, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function membersMinusGroupMembers(teamID: string, groupIDs: string[], page?: number, perPage?: number): ActionFuncAsync<import("@mattermost/types/groups").UsersWithGroupsAndCount, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function getInProductNotices(teamId: string, client: string, clientVersion: string): ActionFuncAsync<import("@mattermost/types/product_notices").ProductNotices, import("@mattermost/types/store").GlobalState, AnyAction>; export declare function updateNoticesAsViewed(noticeIds: string[]): ActionFuncAsync<import("@mattermost/types/client4").StatusOK, import("@mattermost/types/store").GlobalState, AnyAction>;