import CRUD_ACTIONS from './crud-actions'; import TYPES from './action-types'; import { IdType, IdQuery, Item, ItemQuery, CrudActionOptions } from './types'; type ResolverOptions = { resourceName: ResourceName; namespace: string; }; export declare function createItemError(query: Partial, error: unknown): { type: TYPES.CREATE_ITEM_ERROR; query: Partial; error: unknown; errorType: CRUD_ACTIONS; }; export declare function createItemRequest(query: Partial): { type: TYPES.CREATE_ITEM_REQUEST; query: Partial; }; export declare function createItemSuccess(key: IdType, item: Item, query: Partial, options?: CrudActionOptions): { type: TYPES.CREATE_ITEM_SUCCESS; key: IdType; item: Item; query: Partial; options: CrudActionOptions | undefined; }; export declare function deleteItemError(key: IdType, error: unknown, force: boolean): { type: TYPES.DELETE_ITEM_ERROR; key: IdType; error: unknown; errorType: CRUD_ACTIONS; force: boolean; }; export declare function deleteItemRequest(key: IdType, force: boolean): { type: TYPES.DELETE_ITEM_REQUEST; key: IdType; force: boolean; }; export declare function deleteItemSuccess(key: IdQuery, force: boolean, item: Item): { type: TYPES.DELETE_ITEM_SUCCESS; key: IdQuery; force: boolean; item: Item; }; export declare function getItemError(key: IdType, error: unknown): { type: TYPES.GET_ITEM_ERROR; key: IdType; error: unknown; errorType: CRUD_ACTIONS; }; export declare function getItemSuccess(key: IdType, item: Item): { type: TYPES.GET_ITEM_SUCCESS; key: IdType; item: Item; }; export declare function getItemsError(query: Partial | undefined, error: unknown): { type: TYPES.GET_ITEMS_ERROR; query: Partial | undefined; error: unknown; errorType: CRUD_ACTIONS; }; export declare function getItemsSuccess(query: Partial | undefined, items: Item[], urlParameters: IdType[]): { type: TYPES.GET_ITEMS_SUCCESS; items: Item[]; query: Partial | undefined; urlParameters: IdType[]; }; export declare function getItemsTotalCountSuccess(query: Partial | undefined, totalCount: number): { type: TYPES.GET_ITEMS_TOTAL_COUNT_SUCCESS; query: Partial | undefined; totalCount: number; }; export declare function getItemsTotalCountError(query: Partial | undefined, error: unknown): { type: TYPES.GET_ITEMS_TOTAL_COUNT_ERROR; query: Partial | undefined; error: unknown; errorType: CRUD_ACTIONS; }; export declare function updateItemError(key: IdType, error: unknown, query: Partial): { type: TYPES.UPDATE_ITEM_ERROR; key: IdType; error: unknown; errorType: CRUD_ACTIONS; query: Partial; }; export declare function updateItemRequest(key: IdType, query: Partial): { type: TYPES.UPDATE_ITEM_REQUEST; key: IdType; query: Partial; }; export declare function updateItemSuccess(key: IdType, item: Item, query: Partial): { type: TYPES.UPDATE_ITEM_SUCCESS; key: IdType; item: Item; query: Partial; }; export declare const createDispatchActions: ({ namespace, resourceName, }: ResolverOptions) => { [x: string]: ((query: Partial, options?: CrudActionOptions) => Generator<{ type: string; request: import("@wordpress/api-fetch/build-types/types").APIFetchOptions; } | { type: TYPES.CREATE_ITEM_ERROR; query: Partial; error: unknown; errorType: CRUD_ACTIONS; } | { type: TYPES.CREATE_ITEM_REQUEST; query: Partial; } | { type: TYPES.CREATE_ITEM_SUCCESS; key: IdType; item: Item; query: Partial; options: CrudActionOptions | undefined; }, ResourceType, ResourceType>) | ((idQuery: IdQuery, force?: boolean) => Generator<{ type: string; request: import("@wordpress/api-fetch/build-types/types").APIFetchOptions; } | { type: TYPES.DELETE_ITEM_ERROR; key: IdType; error: unknown; errorType: CRUD_ACTIONS; force: boolean; } | { type: TYPES.DELETE_ITEM_REQUEST; key: IdType; force: boolean; } | { type: TYPES.DELETE_ITEM_SUCCESS; key: IdQuery; force: boolean; item: Item; }, ResourceType, ResourceType>) | ((idQuery: IdQuery, query: Partial) => Generator<{ type: string; request: import("@wordpress/api-fetch/build-types/types").APIFetchOptions; } | { type: TYPES.UPDATE_ITEM_ERROR; key: IdType; error: unknown; errorType: CRUD_ACTIONS; query: Partial; } | { type: TYPES.UPDATE_ITEM_REQUEST; key: IdType; query: Partial; } | { type: TYPES.UPDATE_ITEM_SUCCESS; key: IdType; item: Item; query: Partial; }, ResourceType, ResourceType>); }; export type Actions = ReturnType; export {}; //# sourceMappingURL=actions.d.ts.map