20 lines
781 B
JavaScript
20 lines
781 B
JavaScript
import { p as parse, o as object, c as optional, n as number, b as array, s as string } from "./index.BulDzU6h.js";
|
|
const WCStoreCartAddItemArgsItemsSchema = object({
|
|
/** Variation attribute name. */
|
|
attribute: string(),
|
|
/** Variation attribute value. */
|
|
value: string()
|
|
});
|
|
const WCStoreCartAddItemArgsSchema = object({
|
|
/** The basket item product or variation ID. */
|
|
id: optional(number()),
|
|
/** Quantity of this item to add to the basket. */
|
|
quantity: optional(number()),
|
|
/** Chosen attributes (for variations). */
|
|
variation: optional(array(WCStoreCartAddItemArgsItemsSchema))
|
|
});
|
|
const parseWCStoreCartAddItemArgs = (args) => parse(WCStoreCartAddItemArgsSchema, args);
|
|
export {
|
|
parseWCStoreCartAddItemArgs as p
|
|
};
|
|
//# sourceMappingURL=cart-add-item.js.map
|