@stackend/api
Version:
JS bindings to api.stackend.com
34 lines • 933 B
TypeScript
import { Thunk } from '../api';
import { CmsState } from './cmsReducer';
import { Content } from './index';
/**
* Fetch CMS content
* @param id
* @param permalink
* @returns {Function}
*/
export declare function fetchContent({ id, permalink }: {
id?: number;
permalink?: string;
}): Thunk<Promise<any>>;
export declare function setContent(content: Content): Thunk<any>;
/**
* Receive multiple content objects
* @param contents
*/
export declare function receiveContents(contents: {
[id: number]: Content;
}): Thunk<any>;
/**
* Get cms content by id from the state
* @param state
* @param id
*/
export declare function getContentById(state: CmsState, id: number): Content | null;
/**
* Get cms content by permalink from the state
* @param state
* @param permalink
*/
export declare function getContentByPermalink(state: CmsState, permalink: string): Content | null;
//# sourceMappingURL=cmsActions.d.ts.map