@stackend/api
Version:
JS bindings to api.stackend.com
44 lines • 1.66 kB
TypeScript
import * as categoryApi from './index';
export declare const REQUEST_AVAILABLE_CATEGORIES = "REQUEST_AVAILABLE_CATEGORIES";
export declare const RECEIVE_AVAILABLE_CATEGORIES = "RECEIVE_AVAILABLE_CATEGORIES";
export declare const INVALIDATE_AVAILABLE_CATEGORIES = "INVALIDATE_AVAILABLE_CATEGORIES";
export declare const CATEGORIES_TOGGLE_SELECTED = "CATEGORIES_TOGGLE_SELECTED";
export declare const CATEGORIES_REMOVE_SELECTION = "CATEGORIES_REMOVE_SELECTION";
export declare type CategoriesActionTypes = 'REQUEST_AVAILABLE_CATEGORIES' | 'RECEIVE_AVAILABLE_CATEGORIES' | 'INVALIDATE_AVAILABLE_CATEGORIES' | 'CATEGORIES_TOGGLE_SELECTED' | 'CATEGORIES_REMOVE_SELECTION';
export declare type CategoriesState = {
[context: string]: {
isFetching: boolean;
didInvalidate: boolean;
available: any;
lastUpdated: number;
selected?: {
[reference: string]: any;
};
};
};
export declare type CategoriesAction = {
type: 'REQUEST_AVAILABLE_CATEGORIES';
context: string;
} | {
type: 'RECEIVE_AVAILABLE_CATEGORIES';
context: string;
available: {
categories: Array<categoryApi.Category>;
};
json: any;
} | {
type: 'INVALIDATE_AVAILABLE_CATEGORIES';
context: string;
} | {
type: 'CATEGORIES_TOGGLE_SELECTED';
context: string;
reference: string;
category: categoryApi.Category;
} | {
type: 'CATEGORIES_REMOVE_SELECTION';
context: string;
reference: string;
};
declare function categories(state: CategoriesState | undefined, action: CategoriesAction): CategoriesState;
export default categories;
//# sourceMappingURL=categoryReducer.d.ts.map