UNPKG

@stackend/api

Version:

JS bindings to api.stackend.com

45 lines 1.16 kB
import { AuthBlog, Blog } from './index'; import { AuthObject } from '../user/privileges'; export declare const REQUEST_BLOGS = "REQUEST_BLOGS"; export declare const RECEIVE_BLOGS = "RECEIVE_BLOGS"; export declare const INVALIDATE_BLOGS = "INVALIDATE_BLOGS"; export declare const CLEAR_BLOGS = "CLEAR_BLOGS"; export interface BlogState { isFetching: boolean; didInvalidate: boolean; lastUpdated: number; /** * Blogs */ blogs: { [blogId: number]: Blog; }; /** * Blog id by permalink / blogKey */ idByPermalink: { [blogKey: string]: number; }; /** * AuthObject by blog id */ auth: { [blogId: number]: AuthObject; }; } export declare type BlogActions = { type: typeof REQUEST_BLOGS; } | { type: typeof RECEIVE_BLOGS; entries: Array<Blog>; authBlogs?: Array<AuthBlog>; authObjects?: { [blogId: number]: AuthObject; }; } | { type: typeof INVALIDATE_BLOGS; } | { type: typeof CLEAR_BLOGS; }; export default function blogs(state: BlogState | undefined, action: BlogActions): BlogState; //# sourceMappingURL=blogReducer.d.ts.map