82 lines
2.6 KiB
JavaScript
82 lines
2.6 KiB
JavaScript
import { o as object, d as boolean, e as enum_, s as string, u as unknown, n as number, b as array, f as union, c as pipe, g as null_, h as url, j as integer } from "./index.DD7qm8S6.js";
|
|
import { C as CATALOG_VISIBILITIES } from "./cart2.js";
|
|
const WCStoreCartItemTotalsSchema = object({
|
|
"currency_code": string(),
|
|
"currency_decimal_separator": string(),
|
|
"currency_minor_unit": number(),
|
|
"currency_prefix": string(),
|
|
"currency_suffix": string(),
|
|
"currency_symbol": string(),
|
|
"currency_thousand_separator": string(),
|
|
"line_subtotal": string(),
|
|
"line_subtotal_tax": string(),
|
|
"line_total": string(),
|
|
"line_total_tax": string()
|
|
});
|
|
const WCStoreCartItemSchema = object({
|
|
"backorders_allowed": boolean(),
|
|
"catalog_visibility": enum_(CATALOG_VISIBILITIES),
|
|
"description": string(),
|
|
"extensions": unknown(),
|
|
"id": number(),
|
|
"images": array(unknown()),
|
|
"item_data": array(unknown()),
|
|
"key": string(),
|
|
"low_stock_remaining": union([null_()]),
|
|
"name": string(),
|
|
"permalink": pipe(string(), url()),
|
|
"prices": unknown(),
|
|
"quantity": number(),
|
|
"quantity_limits": unknown(),
|
|
"short_description": string(),
|
|
"show_backorder_badge": boolean(),
|
|
"sku": string(),
|
|
"sold_individually": boolean(),
|
|
"totals": WCStoreCartItemTotalsSchema,
|
|
"type": string(),
|
|
"variation": array(unknown())
|
|
});
|
|
const WCStoreCartTotalsSchema = object({
|
|
"currency_code": string(),
|
|
"currency_decimal_separator": string(),
|
|
"currency_minor_unit": number(),
|
|
"currency_prefix": string(),
|
|
"currency_suffix": string(),
|
|
"currency_symbol": string(),
|
|
"currency_thousand_separator": string(),
|
|
"tax_lines": array(unknown()),
|
|
"total_discount": string(),
|
|
"total_discount_tax": string(),
|
|
"total_fees": string(),
|
|
"total_fees_tax": string(),
|
|
"total_items": string(),
|
|
"total_items_tax": string(),
|
|
"total_price": string(),
|
|
"total_shipping": union([string(), null_()]),
|
|
"total_shipping_tax": union([string(), null_()]),
|
|
"total_tax": string()
|
|
});
|
|
const WCStoreCartSchema = object({
|
|
billing_address: unknown(),
|
|
coupons: unknown(),
|
|
cross_sells: unknown(),
|
|
errors: unknown(),
|
|
extensions: unknown(),
|
|
fees: unknown(),
|
|
has_calculated_shipping: unknown(),
|
|
items: array(WCStoreCartItemSchema),
|
|
items_count: pipe(number(), integer()),
|
|
items_weight: unknown(),
|
|
needs_payment: unknown(),
|
|
needs_shipping: unknown(),
|
|
payment_methods: unknown(),
|
|
payment_requirements: unknown(),
|
|
shipping_address: unknown(),
|
|
shipping_rates: unknown(),
|
|
totals: WCStoreCartTotalsSchema
|
|
});
|
|
export {
|
|
WCStoreCartSchema as W,
|
|
WCStoreCartItemSchema as a
|
|
};
|
|
//# sourceMappingURL=cart.js.map
|