mattermost-redux
Version:
Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client
133 lines (132 loc) • 9.07 kB
TypeScript
import { ActionFunc, DispatchFunc, GetStateFunc } from "../types/actions";
import { UserProfile, UserStatus, GetFilteredUsersStatsOpts, UserCustomStatus } from "../types/users";
export declare function checkMfa(loginId: string): ActionFunc;
export declare function generateMfaSecret(userId: string): ActionFunc;
export declare function createUser(user: UserProfile, token: string, inviteId: string, redirect: string): ActionFunc;
export declare function login(loginId: string, password: string, mfaToken?: string, ldapOnly?: boolean): ActionFunc;
export declare function loginById(id: string, password: string, mfaToken?: string): ActionFunc;
export declare function loadMe(): ActionFunc;
export declare function logout(): ActionFunc;
export declare function getTotalUsersStats(): ActionFunc;
export declare function getFilteredUsersStats(options?: GetFilteredUsersStatsOpts): ActionFunc;
export declare function getProfiles(page?: number, perPage?: number, options?: any): ActionFunc;
export declare function getMissingProfilesByIds(userIds: string[]): ActionFunc;
export declare function getMissingProfilesByUsernames(usernames: string[]): ActionFunc;
export declare function getProfilesByIds(userIds: string[], options?: any): ActionFunc;
export declare function getProfilesByUsernames(usernames: string[]): ActionFunc;
export declare function getProfilesInTeam(teamId: string, page: number, perPage?: number, sort?: string, options?: any): ActionFunc;
export declare function getProfilesNotInTeam(teamId: string, groupConstrained: boolean, page: number, perPage?: number): ActionFunc;
export declare function getProfilesWithoutTeam(page: number, perPage?: number, options?: any): ActionFunc;
export declare function getProfilesInChannel(channelId: string, page: number, perPage?: number, sort?: string, options?: {
active?: boolean;
}): ActionFunc;
export declare function getProfilesInGroupChannels(channelsIds: string[]): ActionFunc;
export declare function getProfilesNotInChannel(teamId: string, channelId: string, groupConstrained: boolean, page: number, perPage?: number): ActionFunc;
export declare function getMe(): ActionFunc;
export declare function updateMyTermsOfServiceStatus(termsOfServiceId: string, accepted: boolean): ActionFunc;
export declare function getProfilesInGroup(groupId: string, page?: number, perPage?: number): ActionFunc;
export declare function getTermsOfService(): ActionFunc;
export declare function promoteGuestToUser(userId: string): ActionFunc;
export declare function demoteUserToGuest(userId: string): ActionFunc;
export declare function createTermsOfService(text: string): ActionFunc;
export declare function getUser(id: string): ActionFunc;
export declare function getUserByUsername(username: string): ActionFunc;
export declare function getUserByEmail(email: string): ActionFunc;
export declare function getStatusesByIdsBatchedDebounced(id: string): (...args: any[]) => void;
export declare function getStatusesByIds(userIds: string[]): ActionFunc;
export declare function getStatus(userId: string): ActionFunc;
export declare function setStatus(status: UserStatus): ActionFunc;
export declare function setCustomStatus(customStatus: UserCustomStatus): ActionFunc;
export declare function unsetCustomStatus(): ActionFunc;
export declare function removeRecentCustomStatus(customStatus: UserCustomStatus): ActionFunc;
export declare function getSessions(userId: string): ActionFunc;
export declare function revokeSession(userId: string, sessionId: string): ActionFunc;
export declare function revokeAllSessionsForUser(userId: string): ActionFunc;
export declare function revokeSessionsForAllUsers(): ActionFunc;
export declare function loadProfilesForDirect(): ActionFunc;
export declare function getUserAudits(userId: string, page?: number, perPage?: number): ActionFunc;
export declare function autocompleteUsers(term: string, teamId?: string, channelId?: string, options?: {
limit: number;
}): ActionFunc;
export declare function searchProfiles(term: string, options?: any): ActionFunc;
export declare function startPeriodicStatusUpdates(): ActionFunc;
export declare function stopPeriodicStatusUpdates(): ActionFunc;
export declare function updateMe(user: UserProfile): ActionFunc;
export declare function patchUser(user: UserProfile): ActionFunc;
export declare function updateUserRoles(userId: string, roles: string): ActionFunc;
export declare function updateUserMfa(userId: string, activate: boolean, code?: string): ActionFunc;
export declare function updateUserPassword(userId: string, currentPassword: string, newPassword: string): ActionFunc;
export declare function updateUserActive(userId: string, active: boolean): ActionFunc;
export declare function verifyUserEmail(token: string): ActionFunc;
export declare function sendVerificationEmail(email: string): ActionFunc;
export declare function resetUserPassword(token: string, newPassword: string): ActionFunc;
export declare function sendPasswordResetEmail(email: string): ActionFunc;
export declare function setDefaultProfileImage(userId: string): ActionFunc;
export declare function uploadProfileImage(userId: string, imageData: any): ActionFunc;
export declare function switchEmailToOAuth(service: string, email: string, password: string, mfaCode?: string): ActionFunc;
export declare function switchOAuthToEmail(currentService: string, email: string, password: string): ActionFunc;
export declare function switchEmailToLdap(email: string, emailPassword: string, ldapId: string, ldapPassword: string, mfaCode?: string): ActionFunc;
export declare function switchLdapToEmail(ldapPassword: string, email: string, emailPassword: string, mfaCode?: string): ActionFunc;
export declare function createUserAccessToken(userId: string, description: string): ActionFunc;
export declare function getUserAccessToken(tokenId: string): ActionFunc;
export declare function getUserAccessTokens(page?: number, perPage?: number): ActionFunc;
export declare function getUserAccessTokensForUser(userId: string, page?: number, perPage?: number): ActionFunc;
export declare function revokeUserAccessToken(tokenId: string): ActionFunc;
export declare function disableUserAccessToken(tokenId: string): ActionFunc;
export declare function enableUserAccessToken(tokenId: string): ActionFunc;
export declare function getKnownUsers(): ActionFunc;
export declare function clearUserAccessTokens(): ActionFunc;
export declare function checkForModifiedUsers(): (dispatch: DispatchFunc, getState: GetStateFunc) => Promise<{
data: boolean;
}>;
declare const _default: {
checkMfa: typeof checkMfa;
generateMfaSecret: typeof generateMfaSecret;
login: typeof login;
logout: typeof logout;
getProfiles: typeof getProfiles;
getProfilesByIds: typeof getProfilesByIds;
getProfilesInTeam: typeof getProfilesInTeam;
getProfilesInChannel: typeof getProfilesInChannel;
getProfilesNotInChannel: typeof getProfilesNotInChannel;
getUser: typeof getUser;
getMe: typeof getMe;
getUserByUsername: typeof getUserByUsername;
getStatus: typeof getStatus;
getStatusesByIds: typeof getStatusesByIds;
getSessions: typeof getSessions;
getTotalUsersStats: typeof getTotalUsersStats;
loadProfilesForDirect: typeof loadProfilesForDirect;
revokeSession: typeof revokeSession;
revokeAllSessionsForUser: typeof revokeAllSessionsForUser;
revokeSessionsForAllUsers: typeof revokeSessionsForAllUsers;
getUserAudits: typeof getUserAudits;
searchProfiles: typeof searchProfiles;
startPeriodicStatusUpdates: typeof startPeriodicStatusUpdates;
stopPeriodicStatusUpdates: typeof stopPeriodicStatusUpdates;
updateMe: typeof updateMe;
updateUserRoles: typeof updateUserRoles;
updateUserMfa: typeof updateUserMfa;
updateUserPassword: typeof updateUserPassword;
updateUserActive: typeof updateUserActive;
verifyUserEmail: typeof verifyUserEmail;
sendVerificationEmail: typeof sendVerificationEmail;
resetUserPassword: typeof resetUserPassword;
sendPasswordResetEmail: typeof sendPasswordResetEmail;
uploadProfileImage: typeof uploadProfileImage;
switchEmailToOAuth: typeof switchEmailToOAuth;
switchOAuthToEmail: typeof switchOAuthToEmail;
switchEmailToLdap: typeof switchEmailToLdap;
switchLdapToEmail: typeof switchLdapToEmail;
getTermsOfService: typeof getTermsOfService;
createTermsOfService: typeof createTermsOfService;
updateMyTermsOfServiceStatus: typeof updateMyTermsOfServiceStatus;
createUserAccessToken: typeof createUserAccessToken;
getUserAccessToken: typeof getUserAccessToken;
getUserAccessTokensForUser: typeof getUserAccessTokensForUser;
revokeUserAccessToken: typeof revokeUserAccessToken;
disableUserAccessToken: typeof disableUserAccessToken;
enableUserAccessToken: typeof enableUserAccessToken;
checkForModifiedUsers: typeof checkForModifiedUsers;
};
export default _default;