UNPKG

@woocommerce/data

Version:
39 lines 1.52 kB
import { ItemType, Item, ProductItem, Query, ItemID } from './types'; export declare function setItem(itemType: ItemType, id: ItemID, item: Item): { type: "SET_ITEM"; id: ItemID; item: Item; itemType: ItemType; }; export declare function setItems(itemType: ItemType, query: Query, items: Item[], totalCount?: number): { type: "SET_ITEMS"; items: Item[]; itemType: ItemType; query: Partial<import("..").BaseQueryParams>; totalCount: number | undefined; }; export declare function setItemsTotalCount(itemType: ItemType, query: Query, totalCount: number): { type: "SET_ITEMS_TOTAL_COUNT"; itemType: ItemType; query: Partial<import("..").BaseQueryParams>; totalCount: number; }; export declare function setError(itemType: ItemType | 'createProductFromTemplate', query: Record<string, unknown>, error: unknown): { type: "SET_ERROR"; itemType: ItemType | "createProductFromTemplate"; query: Record<string, unknown>; error: unknown; }; export declare function updateProductStock(product: Partial<ProductItem> & { id: ProductItem['id']; }, quantity: number): Generator<unknown, boolean, unknown>; export declare function createProductFromTemplate(itemFields: { template_name: string; status: string; }, query: Query): Generator<unknown, { id: ProductItem['id']; }, { id: ProductItem['id']; }>; export type Action = ReturnType<typeof setItem | typeof setItems | typeof setItemsTotalCount | typeof setError>; //# sourceMappingURL=actions.d.ts.map