UNPKG

@brizy/media-gallery

Version:
46 lines (45 loc) 2.48 kB
import { Action } from "redux"; import { IActionWithPayload } from "~/redux/action"; import { Item } from "./types"; import { ItemId } from "~/types/ItemId"; export declare enum ActionTypes { LoadError = "project:stockPhotos:loadError", LoadSuccess = "project:stockPhotos:loadSuccess", SetSearchValue = "project:stockPhotos:setSearchValue", Search = "project:stockPhotos:search", SelectItem = "project:stockPhotos:selectItem", BulkSelect = "project:stockPhotos:bulkSelect", UnSelectAll = "project:stockPhotos:unselectAll", Prev = "project:stockPhotos:prev", Next = "project:stockPhotos:next", InsertFiles = "project:stockPhotos:insertFiles", InsertFilesError = "project:stockPhotos:insertFilesError" } export type LoadError = IActionWithPayload<ActionTypes.LoadError, string>; export declare const loadError: (payload: LoadError["payload"]) => LoadError; export interface LoadSuccessPayload { items: Item[]; isLastPage: boolean; } export type LoadSuccess = IActionWithPayload<ActionTypes.LoadSuccess, LoadSuccessPayload>; export declare const loadSuccess: (payload: LoadSuccess["payload"]) => LoadSuccess; export type SetSearchValue = IActionWithPayload<ActionTypes.SetSearchValue, string>; export declare const setSearchValue: (payload: SetSearchValue["payload"]) => SetSearchValue; export type Search = IActionWithPayload<ActionTypes.Search, string>; export declare const search: (payload: Search["payload"]) => Search; export type SelectItem = IActionWithPayload<ActionTypes.SelectItem, ItemId>; export declare const selectItem: (payload: SelectItem["payload"]) => SelectItem; export type BulkSelect = Action<ActionTypes.BulkSelect>; export declare const bulkSelect: () => BulkSelect; export type UnSelectAll = Action<ActionTypes.UnSelectAll>; export declare const unSelectAll: () => UnSelectAll; export type Prev = Action<ActionTypes.Prev>; export declare const prev: () => Prev; export type Next = Action<ActionTypes.Next>; export declare const next: () => Next; export type InsertFiles = Action<ActionTypes.InsertFiles>; export declare const insertFiles: () => InsertFiles; export type InsertFilesError = Action<ActionTypes.InsertFilesError>; export declare const insertFilesError: () => InsertFilesError; export type Actions = LoadError | LoadSuccess | SetSearchValue | Search | BulkSelect | SelectItem | UnSelectAll | Prev | Next | InsertFiles | InsertFilesError; export declare const isActions: (a: Action) => a is Actions;