86 lines
2.8 KiB
JavaScript
86 lines
2.8 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, a as pipe, g as null_, h as url, j as integer } from "./index.DxUTT09Y.js";
|
|
import { C as CATALOG_VISIBILITIES } from "./cart2.js";
|
|
import { W as WCStoreBillingAddressSchema, a as WCStoreShippingAddressSchema } from "./adresses.js";
|
|
import { W as WCStoreCartCouponsSchema } from "./cart-coupons.js";
|
|
import { a as WCStoreShippingRateSchema } from "./couts-livraison.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: WCStoreBillingAddressSchema,
|
|
/** List of applied basket coupons. */
|
|
coupons: array(WCStoreCartCouponsSchema),
|
|
cross_sells: unknown(),
|
|
errors: unknown(),
|
|
extensions: unknown(),
|
|
fees: unknown(),
|
|
has_calculated_shipping: boolean(),
|
|
items: array(WCStoreCartItemSchema),
|
|
items_count: pipe(number(), integer()),
|
|
items_weight: pipe(number(), integer()),
|
|
needs_payment: boolean(),
|
|
needs_shipping: boolean(),
|
|
payment_methods: unknown(),
|
|
payment_requirements: unknown(),
|
|
shipping_address: WCStoreShippingAddressSchema,
|
|
shipping_rates: array(WCStoreShippingRateSchema),
|
|
totals: WCStoreCartTotalsSchema
|
|
});
|
|
export {
|
|
WCStoreCartSchema as W,
|
|
WCStoreCartItemSchema as a
|
|
};
|
|
//# sourceMappingURL=cart.js.map
|