mattermost-redux
Version:
Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client
56 lines (55 loc) • 2.06 kB
TypeScript
import { DispatchFunc, GetStateFunc } from "../types/actions";
import { UserThreadList } from "../types/threads";
export declare function getThreads(userId: string, teamId: string, { before, after, perPage, unread }?: {
before?: string | undefined;
after?: string | undefined;
perPage?: number | undefined;
unread?: boolean | undefined;
}): (dispatch: DispatchFunc, getState: GetStateFunc) => Promise<{
error: any;
data?: undefined;
} | {
data: UserThreadList;
error?: undefined;
}>;
export declare function getThreadMentionCountsByChannel(teamId: string): (dispatch: DispatchFunc, getState: GetStateFunc) => Promise<{
error: any;
data?: undefined;
} | {
data: Record<string, number>;
error?: undefined;
}>;
export declare function getThread(userId: string, teamId: string, threadId: string, extended?: boolean): (dispatch: DispatchFunc, getState: GetStateFunc) => Promise<{
error: any;
data?: undefined;
} | {
data: {
is_following: boolean;
id: string;
reply_count: number;
last_reply_at: number;
last_viewed_at: number;
participants: (import("../types/users").UserProfile | {
id: string;
})[];
post: import("../types/posts").Post;
unread_replies: number;
unread_mentions: number;
};
error?: undefined;
}>;
export declare function markAllThreadsInTeamRead(userId: string, teamId: string): (dispatch: DispatchFunc, getState: GetStateFunc) => Promise<{
error: any;
} | {
error?: undefined;
}>;
export declare function updateThreadRead(userId: string, teamId: string, threadId: string, timestamp: number): (dispatch: DispatchFunc, getState: GetStateFunc) => Promise<{
error: any;
} | {
error?: undefined;
}>;
export declare function setThreadFollow(userId: string, teamId: string, threadId: string, newState: boolean): (dispatch: DispatchFunc, getState: GetStateFunc) => Promise<{
error: any;
} | {
error?: undefined;
}>;