UNPKG

@woocommerce/data

Version:
34 lines 1.66 kB
import TYPES from './action-types'; import { IdQuery, IdType, Item } from '../crud/types'; import type { BatchUpdateRequest, BatchUpdateResponse, GenerateRequest } from './types'; import CRUD_ACTIONS from './crud-actions'; import { Product, ProductProductAttribute, ProductDefaultAttribute } from '../products/types'; export declare function generateProductVariationsError(key: IdType, error: unknown): { type: TYPES.GENERATE_VARIATIONS_ERROR; key: IdType; error: unknown; errorType: CRUD_ACTIONS; }; export declare function generateProductVariationsRequest(key: IdType): { type: TYPES.GENERATE_VARIATIONS_REQUEST; key: IdType; }; export declare function generateProductVariationsSuccess(key: IdType): { type: TYPES.GENERATE_VARIATIONS_SUCCESS; key: IdType; }; export declare const generateProductVariations: (idQuery: IdQuery, productData: { type?: string; attributes: ProductProductAttribute[]; default_attributes?: ProductDefaultAttribute[]; meta_data?: Product['meta_data']; }, data: GenerateRequest, saveAttributes?: boolean) => Generator<any, Item, Item>; export declare function batchUpdateProductVariationsError(key: IdType, error: unknown): { type: TYPES.BATCH_UPDATE_VARIATIONS_ERROR; key: IdType; error: unknown; errorType: string; }; export declare function batchUpdateProductVariations(idQuery: IdQuery, data: BatchUpdateRequest): Generator<unknown, BatchUpdateResponse, BatchUpdateResponse>; export type Actions = ReturnType<typeof generateProductVariationsRequest | typeof generateProductVariationsError | typeof generateProductVariationsSuccess>; //# sourceMappingURL=actions.d.ts.map