UNPKG

@stackend/api

Version:

JS bindings to api.stackend.com

36 lines 1.17 kB
import { Content, GetContentResult } from './index'; export declare const REQUEST_CONTENT = "REQUEST_CONTENT"; export declare const RECEIVE_CONTENT = "RECEIVE_CONTENT"; export declare const RECEIVE_CONTENTS = "RECEIVE_CONTENTS"; export declare const SET_CONTENT = "SET_CONTENT"; export interface CmsState { /** Cms content by id */ byId: { [id: string]: Content; }; idByPermalink: { [permalink: string]: number; }; } export interface RequestContentAction { type: typeof REQUEST_CONTENT; } export interface ReceiveContentAction { type: typeof RECEIVE_CONTENT; id?: number | null; permalink?: string | null; json: GetContentResult; } export interface ReceiveContentsAction { type: typeof RECEIVE_CONTENTS; contents: { [id: number]: Content; }; } export interface SetContentAction { type: typeof SET_CONTENT; content?: Content | null; } export declare type CmsActionTypes = RequestContentAction | ReceiveContentAction | ReceiveContentsAction | SetContentAction; export default function (state: CmsState | undefined, action: CmsActionTypes): CmsState; //# sourceMappingURL=cmsReducer.d.ts.map