@loczer/storefront-sdk 0.240.0 → 0.241.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/pkg/booking-engine/dist/models/{Product.shared-C_HehlKK.js → Product.shared-VisFafx-.js} +6 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-asset-CFAxfmRW.js → base-asset-BuqI-BM_.js} +2 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-booking-CZOR9kya.js → base-booking-gCY-ZP5p.js} +2 -2
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-product-QYQBl0fQ.js → base-product-r04ZJglB.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{cart-inputs-D1KobIdr.js → cart-inputs-ps94yuAR.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-B-Vmdlxo.js → insurance-XwIj1m3Z.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/{schemas-lb2iTDMd.js → schemas-7yx45S2o.js} +6 -6
- package/dist/components/Footer/businessHoursStatus.js +1 -1
- package/dist/index.d.ts +13 -6
- package/dist/index.js +6 -6
- package/dist/lib/booking-period.d.ts.map +1 -1
- package/dist/lib/booking-period.js +12 -12
- package/dist/lib/booking.js +2 -2
- package/dist/lib/checkoutSubmit.js +3 -3
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.js +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,11 @@ var c = s.enum([
|
|
|
9
9
|
"bike",
|
|
10
10
|
"e-bike",
|
|
11
11
|
"accessory"
|
|
12
|
-
]), l = "bike", u = s.enum(["variant_selector", "variants_as_products"]), d = s.union([
|
|
12
|
+
]), l = "bike", u = s.enum(["variant_selector", "variants_as_products"]), d = s.union([
|
|
13
|
+
s.string().trim().url(),
|
|
14
|
+
s.string().trim().regex(/^[a-f0-9]{24}$/i),
|
|
15
|
+
s.string().trim().regex(/^\/catalog-demo\/[a-z0-9-]+\.svg$/)
|
|
16
|
+
]), f = "variant_code", p = 3, m = s.string().trim().min(1, "Variant code is required").max(3, "Variant code must be 3 characters or less");
|
|
13
17
|
function h(e) {
|
|
14
18
|
return e.trim().toLowerCase() === f;
|
|
15
19
|
}
|
|
@@ -40,6 +44,7 @@ var g = s.object({
|
|
|
40
44
|
insuredValueMinor: i.default(0)
|
|
41
45
|
}), b = s.object({
|
|
42
46
|
_id: o,
|
|
47
|
+
catalogDemoBatchId: e.optional(),
|
|
43
48
|
kind: c,
|
|
44
49
|
name: r,
|
|
45
50
|
description: r.optional(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { booleanNumberRecordSchema as e, identifierSchema as t, isoDateTimeSchema as n, objectIdStringSchema as r } from "../models/types-ynW5hdp8.js";
|
|
2
2
|
import { productIdSchema as i } from "./product-id-ChdStzgp.js";
|
|
3
|
-
import { productVariantIdentifierSchema as a } from "../models/Product.shared-
|
|
3
|
+
import { productVariantIdentifierSchema as a } from "../models/Product.shared-VisFafx-.js";
|
|
4
4
|
import { z as o } from "zod";
|
|
5
5
|
//#region ../booking-engine/dist/schemas/base-asset.js
|
|
6
6
|
var s = o.enum([
|
|
@@ -10,6 +10,7 @@ var s = o.enum([
|
|
|
10
10
|
"blocked"
|
|
11
11
|
]), c = r.transform((e) => e.toLowerCase()), l = o.object({
|
|
12
12
|
_id: c,
|
|
13
|
+
catalogDemoBatchId: t.optional(),
|
|
13
14
|
productId: i,
|
|
14
15
|
shopId: t,
|
|
15
16
|
status: s,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { identifierSchema as e, isoDateTimeSchema as t, objectIdStringSchema as n } from "../models/types-ynW5hdp8.js";
|
|
2
2
|
import { moneyMinorSchema as r } from "./money-CVoCY4of.js";
|
|
3
3
|
import { productIdSchema as i } from "./product-id-ChdStzgp.js";
|
|
4
|
-
import { productKindSchema as a } from "../models/Product.shared-
|
|
4
|
+
import { productKindSchema as a } from "../models/Product.shared-VisFafx-.js";
|
|
5
5
|
import { bookingReferenceSchema as o } from "./booking-reference-DLKcpIa4.js";
|
|
6
6
|
import { richTextSchema as s } from "./rich-text-DTRh7U3z.js";
|
|
7
7
|
import { cancellationPolicySchema as c } from "./booking-engine-configuration-CxKlxKCo.js";
|
|
8
|
-
import { bookingInsuranceSnapshotSchema as l } from "./insurance-
|
|
8
|
+
import { bookingInsuranceSnapshotSchema as l } from "./insurance-XwIj1m3Z.js";
|
|
9
9
|
import { z as u } from "zod";
|
|
10
10
|
//#region ../booking-engine/dist/schemas/base-booking.js
|
|
11
11
|
var d = u.enum([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { identifierSchema as e } from "../models/types-ynW5hdp8.js";
|
|
2
2
|
import { moneyMinorSchema as t } from "./money-CVoCY4of.js";
|
|
3
3
|
import { productIdSchema as n } from "./product-id-ChdStzgp.js";
|
|
4
|
-
import "../models/Product.shared-
|
|
4
|
+
import "../models/Product.shared-VisFafx-.js";
|
|
5
5
|
import { richTextSchema as r } from "./rich-text-DTRh7U3z.js";
|
|
6
6
|
import { isoDateSchema as i, timeOfDaySchema as a } from "./shop-opening-hours-BlLD1gfz.js";
|
|
7
7
|
import { fulfillmentModeSchema as o } from "./public-booking-engine-configuration-BwWn9aK0.js";
|
package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-B-Vmdlxo.js → insurance-XwIj1m3Z.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { identifierSchema as e, isoDateTimeSchema as t } from "../models/types-ynW5hdp8.js";
|
|
2
2
|
import { moneyMinorSchema as n } from "./money-CVoCY4of.js";
|
|
3
3
|
import { productIdSchema as r } from "./product-id-ChdStzgp.js";
|
|
4
|
-
import { productKindSchema as i } from "../models/Product.shared-
|
|
4
|
+
import { productKindSchema as i } from "../models/Product.shared-VisFafx-.js";
|
|
5
5
|
import { z as a } from "zod";
|
|
6
6
|
//#region ../booking-engine/dist/schemas/insurance.js
|
|
7
7
|
var o = a.enum(["sharelock", "morio"]), s = a.enum(["storefront", "staff"]), c = a.object({
|
|
@@ -2,16 +2,16 @@ import { createLocalizedStringEntry as e, getLocalizedStringValue as t, localize
|
|
|
2
2
|
import { currencyCodeSchema as a, currencyMinorUnitDigits as o, majorToMinor as s, minorToMajor as c, moneyMinorSchema as l, signedMoneyMinorSchema as u } from "./schemas/money-CVoCY4of.js";
|
|
3
3
|
import { priceSchema as d, priceUnitSchema as f } from "./models/Price-DCAgqkKh.js";
|
|
4
4
|
import { productIdSchema as p } from "./schemas/product-id-ChdStzgp.js";
|
|
5
|
-
import { DEFAULT_PRODUCT_KIND as m, PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as h, PRODUCT_VARIANT_CODE_MAX_LENGTH as g, accessoryProductSchema as _, bikeProductSchema as v, eBikeProductSchema as y, isProductVariantCodeIdentifierKind as b, productInsuranceSchema as x, productKindSchema as S, productSchema as C, productStorefrontDisplayModeSchema as w, productVariantAttributeSchema as T, productVariantCodeSchema as E, productVariantIdentifierSchema as D, productVariantSchema as O } from "./models/Product.shared-
|
|
5
|
+
import { DEFAULT_PRODUCT_KIND as m, PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as h, PRODUCT_VARIANT_CODE_MAX_LENGTH as g, accessoryProductSchema as _, bikeProductSchema as v, eBikeProductSchema as y, isProductVariantCodeIdentifierKind as b, productInsuranceSchema as x, productKindSchema as S, productSchema as C, productStorefrontDisplayModeSchema as w, productVariantAttributeSchema as T, productVariantCodeSchema as E, productVariantIdentifierSchema as D, productVariantSchema as O } from "./models/Product.shared-VisFafx-.js";
|
|
6
6
|
import { BOOKING_REFERENCE_COUNTER_MIN_DIGITS as k, BOOKING_REFERENCE_REGEX as A, BOOKING_REFERENCE_YEAR_MONTH_REGEX as j, bookingReferenceSchema as M, bookingReferenceYearMonthSchema as N, formatBookingReference as P, formatBookingReferenceYearMonth as F } from "./schemas/booking-reference-DLKcpIa4.js";
|
|
7
7
|
import { richTextJsonDocSchema as I, richTextSchema as L, richTextVersionSchema as R } from "./schemas/rich-text-DTRh7U3z.js";
|
|
8
8
|
import { isoDateSchema as z, shopConfigurationSchema as B, shopExtraTimeSlotRuleSchema as V, shopOpeningDayIndexSchema as H, shopOpeningDaySchema as U, shopOpeningHoursOverrideSchema as W, shopOpeningHoursPeriodSchema as G, shopOpeningSlotSchema as K, timeOfDaySchema as q } from "./schemas/shop-opening-hours-BlLD1gfz.js";
|
|
9
9
|
import { DEFAULT_CANCELLATION_POLICY as J, DEFAULT_PAYMENT_POLICIES as Y, cancellationPolicySchema as X, cancellationPolicyTierSchema as Z, paymentPoliciesSchema as Q } from "./schemas/booking-engine-configuration-CxKlxKCo.js";
|
|
10
10
|
import { fulfillmentModeSchema as $, publicBookingEngineConfigurationSchema as ee, publicCheckoutConfigurationSchema as te, publicCheckoutDynamicOptionsSchema as ne } from "./schemas/public-booking-engine-configuration-BwWn9aK0.js";
|
|
11
|
-
import { DEFAULT_BOOKING_DELIVERY_OPTION as re, bookingCustomerInputSchema as ie, bookingDeliveryOptionSchema as ae, bookingScheduleInputSchema as oe, cartItemInputSchema as se, createBookingInputBaseSchema as ce, createBookingInputSchema as le, resolveBookingDeliveryOption as ue, validateBookingDeliveryAddress as de } from "./schemas/cart-inputs-
|
|
12
|
-
import { bookingInsuranceConsentSourceSchema as fe, bookingInsuranceItemSnapshotSchema as pe, bookingInsuranceSnapshotSchema as me, buildBookingInsuranceSnapshot as he, calculateInsuranceCalendarDays as ge, insuranceProviderSchema as _e } from "./schemas/insurance-
|
|
11
|
+
import { DEFAULT_BOOKING_DELIVERY_OPTION as re, bookingCustomerInputSchema as ie, bookingDeliveryOptionSchema as ae, bookingScheduleInputSchema as oe, cartItemInputSchema as se, createBookingInputBaseSchema as ce, createBookingInputSchema as le, resolveBookingDeliveryOption as ue, validateBookingDeliveryAddress as de } from "./schemas/cart-inputs-ps94yuAR.js";
|
|
12
|
+
import { bookingInsuranceConsentSourceSchema as fe, bookingInsuranceItemSnapshotSchema as pe, bookingInsuranceSnapshotSchema as me, buildBookingInsuranceSnapshot as he, calculateInsuranceCalendarDays as ge, insuranceProviderSchema as _e } from "./schemas/insurance-XwIj1m3Z.js";
|
|
13
13
|
import { resolveOpeningHoursForDate as ve, resolveOpeningHoursPeriodForDate as ye } from "./utils/opening-hours-period-TCyLhzZw.js";
|
|
14
|
-
import "./schemas/base-product-
|
|
15
|
-
import { assetIdSchema as be, baseAssetSchema as xe, baseAssetStatusSchema as Se } from "./schemas/base-asset-
|
|
16
|
-
import { baseBookingItemSchema as Ce, baseBookingSchema as we, baseBookingStateSchema as Te } from "./schemas/base-booking-
|
|
14
|
+
import "./schemas/base-product-r04ZJglB.js";
|
|
15
|
+
import { assetIdSchema as be, baseAssetSchema as xe, baseAssetStatusSchema as Se } from "./schemas/base-asset-BuqI-BM_.js";
|
|
16
|
+
import { baseBookingItemSchema as Ce, baseBookingSchema as we, baseBookingStateSchema as Te } from "./schemas/base-booking-gCY-ZP5p.js";
|
|
17
17
|
export { k as BOOKING_REFERENCE_COUNTER_MIN_DIGITS, A as BOOKING_REFERENCE_REGEX, j as BOOKING_REFERENCE_YEAR_MONTH_REGEX, re as DEFAULT_BOOKING_DELIVERY_OPTION, J as DEFAULT_CANCELLATION_POLICY, Y as DEFAULT_PAYMENT_POLICIES, m as DEFAULT_PRODUCT_KIND, h as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, g as PRODUCT_VARIANT_CODE_MAX_LENGTH, _ as accessoryProductSchema, be as assetIdSchema, xe as baseAssetSchema, Se as baseAssetStatusSchema, Ce as baseBookingItemSchema, we as baseBookingSchema, Te as baseBookingStateSchema, v as bikeProductSchema, ie as bookingCustomerInputSchema, ae as bookingDeliveryOptionSchema, fe as bookingInsuranceConsentSourceSchema, pe as bookingInsuranceItemSnapshotSchema, me as bookingInsuranceSnapshotSchema, M as bookingReferenceSchema, N as bookingReferenceYearMonthSchema, oe as bookingScheduleInputSchema, he as buildBookingInsuranceSnapshot, ge as calculateInsuranceCalendarDays, X as cancellationPolicySchema, Z as cancellationPolicyTierSchema, se as cartItemInputSchema, ce as createBookingInputBaseSchema, le as createBookingInputSchema, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, y as eBikeProductSchema, P as formatBookingReference, F as formatBookingReferenceYearMonth, $ as fulfillmentModeSchema, t as getLocalizedStringValue, _e as insuranceProviderSchema, b as isProductVariantCodeIdentifierKind, z as isoDateSchema, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, Q as paymentPoliciesSchema, d as priceSchema, f as priceUnitSchema, p as productIdSchema, x as productInsuranceSchema, S as productKindSchema, C as productSchema, w as productStorefrontDisplayModeSchema, T as productVariantAttributeSchema, E as productVariantCodeSchema, D as productVariantIdentifierSchema, O as productVariantSchema, ee as publicBookingEngineConfigurationSchema, te as publicCheckoutConfigurationSchema, ne as publicCheckoutDynamicOptionsSchema, ue as resolveBookingDeliveryOption, ve as resolveOpeningHoursForDate, ye as resolveOpeningHoursPeriodForDate, I as richTextJsonDocSchema, L as richTextSchema, R as richTextVersionSchema, B as shopConfigurationSchema, V as shopExtraTimeSlotRuleSchema, H as shopOpeningDayIndexSchema, U as shopOpeningDaySchema, W as shopOpeningHoursOverrideSchema, G as shopOpeningHoursPeriodSchema, K as shopOpeningSlotSchema, u as signedMoneyMinorSchema, q as timeOfDaySchema, de as validateBookingDeliveryAddress };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveOpeningHoursForDate as e } from "../../chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js";
|
|
2
|
-
import "../../chunks/pkg/booking-engine/dist/schemas-
|
|
2
|
+
import "../../chunks/pkg/booking-engine/dist/schemas-7yx45S2o.js";
|
|
3
3
|
import { businessDateStringToDate as t, calendarDateToBusinessDateString as n, instantToBusinessDateTimeParts as r, normalizeBusinessDateString as i, parseTimeToMinutes as a } from "../../lib/booking-period.js";
|
|
4
4
|
//#region src/components/Footer/businessHoursStatus.ts
|
|
5
5
|
var o = 370, s = (e, r) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -209,6 +209,7 @@ export declare type AccessoryProduct = StorefrontPublicAccessoryProduct & {
|
|
|
209
209
|
|
|
210
210
|
export declare const accessoryProductSchema: z.ZodObject<{
|
|
211
211
|
_id: z.ZodString;
|
|
212
|
+
catalogDemoBatchId: z.ZodOptional<z.ZodString>;
|
|
212
213
|
name: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
213
214
|
value: z.ZodString;
|
|
214
215
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -224,7 +225,7 @@ export declare const accessoryProductSchema: z.ZodObject<{
|
|
|
224
225
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
225
226
|
autoTranslated: z.ZodOptional<z.ZodBoolean>;
|
|
226
227
|
}, z.core.$loose>>>;
|
|
227
|
-
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
|
|
228
|
+
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>>;
|
|
228
229
|
depositAmount: z.ZodDefault<z.ZodNumber>;
|
|
229
230
|
insurance: z.ZodDefault<z.ZodObject<{
|
|
230
231
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -299,6 +300,7 @@ export declare type BaseAsset = z.infer<typeof baseAssetSchema>;
|
|
|
299
300
|
|
|
300
301
|
export declare const baseAssetSchema: z.ZodObject<{
|
|
301
302
|
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
303
|
+
catalogDemoBatchId: z.ZodOptional<z.ZodString>;
|
|
302
304
|
productId: z.ZodString;
|
|
303
305
|
shopId: z.ZodString;
|
|
304
306
|
status: z.ZodEnum<{
|
|
@@ -461,6 +463,7 @@ export declare type BikeProduct = Omit<StorefrontPublicBikeProduct, "kind"> & {
|
|
|
461
463
|
|
|
462
464
|
export declare const bikeProductSchema: z.ZodObject<{
|
|
463
465
|
_id: z.ZodString;
|
|
466
|
+
catalogDemoBatchId: z.ZodOptional<z.ZodString>;
|
|
464
467
|
name: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
465
468
|
value: z.ZodString;
|
|
466
469
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -476,7 +479,7 @@ export declare const bikeProductSchema: z.ZodObject<{
|
|
|
476
479
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
477
480
|
autoTranslated: z.ZodOptional<z.ZodBoolean>;
|
|
478
481
|
}, z.core.$loose>>>;
|
|
479
|
-
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
|
|
482
|
+
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>>;
|
|
480
483
|
prices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
481
484
|
value: z.ZodNumber;
|
|
482
485
|
unit: z.ZodEnum<{
|
|
@@ -1764,6 +1767,7 @@ export declare const downloadContractSaleDocumentPdfRequestSchema: z.ZodObject<{
|
|
|
1764
1767
|
|
|
1765
1768
|
export declare const eBikeProductSchema: z.ZodObject<{
|
|
1766
1769
|
_id: z.ZodString;
|
|
1770
|
+
catalogDemoBatchId: z.ZodOptional<z.ZodString>;
|
|
1767
1771
|
name: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1768
1772
|
value: z.ZodString;
|
|
1769
1773
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -1779,7 +1783,7 @@ export declare const eBikeProductSchema: z.ZodObject<{
|
|
|
1779
1783
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
1780
1784
|
autoTranslated: z.ZodOptional<z.ZodBoolean>;
|
|
1781
1785
|
}, z.core.$loose>>>;
|
|
1782
|
-
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
|
|
1786
|
+
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>>;
|
|
1783
1787
|
prices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1784
1788
|
value: z.ZodNumber;
|
|
1785
1789
|
unit: z.ZodEnum<{
|
|
@@ -2793,6 +2797,7 @@ declare type ProductPriceBadgeProps = {
|
|
|
2793
2797
|
|
|
2794
2798
|
export declare const productSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2795
2799
|
_id: z.ZodString;
|
|
2800
|
+
catalogDemoBatchId: z.ZodOptional<z.ZodString>;
|
|
2796
2801
|
name: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2797
2802
|
value: z.ZodString;
|
|
2798
2803
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -2808,7 +2813,7 @@ export declare const productSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2808
2813
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
2809
2814
|
autoTranslated: z.ZodOptional<z.ZodBoolean>;
|
|
2810
2815
|
}, z.core.$loose>>>;
|
|
2811
|
-
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
|
|
2816
|
+
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>>;
|
|
2812
2817
|
prices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2813
2818
|
value: z.ZodNumber;
|
|
2814
2819
|
unit: z.ZodEnum<{
|
|
@@ -2856,6 +2861,7 @@ export declare const productSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2856
2861
|
kind: z.ZodLiteral<"bike">;
|
|
2857
2862
|
}, z.core.$strip>, z.ZodObject<{
|
|
2858
2863
|
_id: z.ZodString;
|
|
2864
|
+
catalogDemoBatchId: z.ZodOptional<z.ZodString>;
|
|
2859
2865
|
name: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2860
2866
|
value: z.ZodString;
|
|
2861
2867
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -2871,7 +2877,7 @@ export declare const productSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2871
2877
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
2872
2878
|
autoTranslated: z.ZodOptional<z.ZodBoolean>;
|
|
2873
2879
|
}, z.core.$loose>>>;
|
|
2874
|
-
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
|
|
2880
|
+
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>>;
|
|
2875
2881
|
prices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2876
2882
|
value: z.ZodNumber;
|
|
2877
2883
|
unit: z.ZodEnum<{
|
|
@@ -2919,6 +2925,7 @@ export declare const productSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2919
2925
|
kind: z.ZodLiteral<"e-bike">;
|
|
2920
2926
|
}, z.core.$strip>, z.ZodObject<{
|
|
2921
2927
|
_id: z.ZodString;
|
|
2928
|
+
catalogDemoBatchId: z.ZodOptional<z.ZodString>;
|
|
2922
2929
|
name: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2923
2930
|
value: z.ZodString;
|
|
2924
2931
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -2934,7 +2941,7 @@ export declare const productSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2934
2941
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
2935
2942
|
autoTranslated: z.ZodOptional<z.ZodBoolean>;
|
|
2936
2943
|
}, z.core.$loose>>>;
|
|
2937
|
-
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
|
|
2944
|
+
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>>;
|
|
2938
2945
|
depositAmount: z.ZodDefault<z.ZodNumber>;
|
|
2939
2946
|
insurance: z.ZodDefault<z.ZodObject<{
|
|
2940
2947
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
package/dist/index.js
CHANGED
|
@@ -3,18 +3,18 @@ import { createLocalizedStringEntry as e, getLocalizedStringValue as t, localize
|
|
|
3
3
|
import { currencyCodeSchema as a, currencyMinorUnitDigits as o, majorToMinor as s, minorToMajor as c, moneyMinorSchema as l, signedMoneyMinorSchema as u } from "./chunks/pkg/booking-engine/dist/schemas/money-CVoCY4of.js";
|
|
4
4
|
import { priceSchema as d, priceUnitSchema as f } from "./chunks/pkg/booking-engine/dist/models/Price-DCAgqkKh.js";
|
|
5
5
|
import { productIdSchema as p } from "./chunks/pkg/booking-engine/dist/schemas/product-id-ChdStzgp.js";
|
|
6
|
-
import { DEFAULT_PRODUCT_KIND as m, PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as h, PRODUCT_VARIANT_CODE_MAX_LENGTH as g, accessoryProductSchema as _, bikeProductSchema as v, eBikeProductSchema as y, isProductVariantCodeIdentifierKind as b, productInsuranceSchema as x, productKindSchema as S, productSchema as C, productStorefrontDisplayModeSchema as w, productVariantAttributeSchema as T, productVariantCodeSchema as E, productVariantIdentifierSchema as D, productVariantSchema as O } from "./chunks/pkg/booking-engine/dist/models/Product.shared-
|
|
6
|
+
import { DEFAULT_PRODUCT_KIND as m, PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as h, PRODUCT_VARIANT_CODE_MAX_LENGTH as g, accessoryProductSchema as _, bikeProductSchema as v, eBikeProductSchema as y, isProductVariantCodeIdentifierKind as b, productInsuranceSchema as x, productKindSchema as S, productSchema as C, productStorefrontDisplayModeSchema as w, productVariantAttributeSchema as T, productVariantCodeSchema as E, productVariantIdentifierSchema as D, productVariantSchema as O } from "./chunks/pkg/booking-engine/dist/models/Product.shared-VisFafx-.js";
|
|
7
7
|
import { BOOKING_REFERENCE_COUNTER_MIN_DIGITS as k, BOOKING_REFERENCE_REGEX as A, BOOKING_REFERENCE_YEAR_MONTH_REGEX as j, bookingReferenceSchema as M, bookingReferenceYearMonthSchema as N, formatBookingReference as P, formatBookingReferenceYearMonth as F } from "./chunks/pkg/booking-engine/dist/schemas/booking-reference-DLKcpIa4.js";
|
|
8
8
|
import { richTextJsonDocSchema as I, richTextSchema as L, richTextVersionSchema as R } from "./chunks/pkg/booking-engine/dist/schemas/rich-text-DTRh7U3z.js";
|
|
9
9
|
import { isoDateSchema as z, shopConfigurationSchema as B, shopExtraTimeSlotRuleSchema as V, shopOpeningDayIndexSchema as H, shopOpeningDaySchema as U, shopOpeningHoursOverrideSchema as W, shopOpeningHoursPeriodSchema as G, shopOpeningSlotSchema as K, timeOfDaySchema as q } from "./chunks/pkg/booking-engine/dist/schemas/shop-opening-hours-BlLD1gfz.js";
|
|
10
10
|
import { DEFAULT_CANCELLATION_POLICY as J, DEFAULT_PAYMENT_POLICIES as Y, cancellationPolicySchema as X, cancellationPolicyTierSchema as Z, paymentPoliciesSchema as Q } from "./chunks/pkg/booking-engine/dist/schemas/booking-engine-configuration-CxKlxKCo.js";
|
|
11
11
|
import { fulfillmentModeSchema as $, publicBookingEngineConfigurationSchema as ee, publicCheckoutConfigurationSchema as te, publicCheckoutDynamicOptionsSchema as ne } from "./chunks/pkg/booking-engine/dist/schemas/public-booking-engine-configuration-BwWn9aK0.js";
|
|
12
|
-
import { DEFAULT_BOOKING_DELIVERY_OPTION as re, bookingCustomerInputSchema as ie, bookingDeliveryOptionSchema as ae, bookingScheduleInputSchema as oe, cartItemInputSchema as se, createBookingInputBaseSchema as ce, createBookingInputSchema as le, resolveBookingDeliveryOption as ue, validateBookingDeliveryAddress as de } from "./chunks/pkg/booking-engine/dist/schemas/cart-inputs-
|
|
13
|
-
import { bookingInsuranceConsentSourceSchema as fe, bookingInsuranceItemSnapshotSchema as pe, bookingInsuranceSnapshotSchema as me, buildBookingInsuranceSnapshot as he, calculateInsuranceCalendarDays as ge, insuranceProviderSchema as _e } from "./chunks/pkg/booking-engine/dist/schemas/insurance-
|
|
12
|
+
import { DEFAULT_BOOKING_DELIVERY_OPTION as re, bookingCustomerInputSchema as ie, bookingDeliveryOptionSchema as ae, bookingScheduleInputSchema as oe, cartItemInputSchema as se, createBookingInputBaseSchema as ce, createBookingInputSchema as le, resolveBookingDeliveryOption as ue, validateBookingDeliveryAddress as de } from "./chunks/pkg/booking-engine/dist/schemas/cart-inputs-ps94yuAR.js";
|
|
13
|
+
import { bookingInsuranceConsentSourceSchema as fe, bookingInsuranceItemSnapshotSchema as pe, bookingInsuranceSnapshotSchema as me, buildBookingInsuranceSnapshot as he, calculateInsuranceCalendarDays as ge, insuranceProviderSchema as _e } from "./chunks/pkg/booking-engine/dist/schemas/insurance-XwIj1m3Z.js";
|
|
14
14
|
import { resolveOpeningHoursForDate as ve, resolveOpeningHoursPeriodForDate as ye } from "./chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js";
|
|
15
|
-
import { assetIdSchema as be, baseAssetSchema as xe, baseAssetStatusSchema as Se } from "./chunks/pkg/booking-engine/dist/schemas/base-asset-
|
|
16
|
-
import { baseBookingItemSchema as Ce, baseBookingSchema as we, baseBookingStateSchema as Te } from "./chunks/pkg/booking-engine/dist/schemas/base-booking-
|
|
17
|
-
import "./chunks/pkg/booking-engine/dist/schemas-
|
|
15
|
+
import { assetIdSchema as be, baseAssetSchema as xe, baseAssetStatusSchema as Se } from "./chunks/pkg/booking-engine/dist/schemas/base-asset-BuqI-BM_.js";
|
|
16
|
+
import { baseBookingItemSchema as Ce, baseBookingSchema as we, baseBookingStateSchema as Te } from "./chunks/pkg/booking-engine/dist/schemas/base-booking-gCY-ZP5p.js";
|
|
17
|
+
import "./chunks/pkg/booking-engine/dist/schemas-7yx45S2o.js";
|
|
18
18
|
import { STOREFRONT_HERO_MODES as Ee, storefrontCheckoutModeSchema as De, storefrontConfigurationSchema as Oe, storefrontContentSchema as ke, storefrontFaqAdditionalLinkSchema as Ae, storefrontFaqItemSchema as je, storefrontFaqSchema as Me, storefrontFulfillmentModeSchema as Ne, storefrontHeroModeSchema as Pe, storefrontInformationSchema as Fe, storefrontLocalizedRichTextSchema as Ie, storefrontModalMessageSchema as Le, storefrontModulesSchema as Re, storefrontReviewsModuleSchema as ze, storefrontRichTextSchema as Be, storefrontSettingsSchema as Ve, storefrontShopSchema as He, storefrontStatusSchema as Ue, storefrontWorkspaceSchema as We } from "./storefrontSchemas.js";
|
|
19
19
|
import { BOOKING_SEARCH_KEYS as Ge, TIME_OPTIONS as Ke, applyBookingParamsToSearch as qe, createBookingPeriodConfigFromBookingEngineConfiguration as Je, createBookingPeriodConfigFromShopConfiguration as Ye, createBookingPeriodConfigFromStorefrontConfiguration as Xe, getBookingParamsFromSearch as Ze, getBookingSessionStorageKey as Qe, getDefaultBookingParams as $e, getDefaultBookingParamsForStorefrontConfiguration as et, pickBookingSearchParams as tt, readBookingSearchParamsFromSessionStorage as nt, readBookingSearchParamsFromStorage as rt, resolveBookingSearchParams as it, resolveBookingSearchParamsFromSessionStorage as at, writeBookingSearchParamsToSessionStorage as ot, writeBookingSearchParamsToStorage as st } from "./lib/booking.js";
|
|
20
20
|
import { getLocalizedEntry as ct, getLocalizedValue as lt } from "./localization.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booking-period.d.ts","sourceRoot":"","sources":["../../src/lib/booking-period.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAE/C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,OAAO,CAAA;IACZ,YAAY,EAAE,gBAAgB,EAAE,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,oBAAoB,G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bsoX.js";
|
|
2
2
|
import { resolveOpeningHoursForDate as t } from "../chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js";
|
|
3
|
-
import "../chunks/pkg/booking-engine/dist/schemas-
|
|
3
|
+
import "../chunks/pkg/booking-engine/dist/schemas-7yx45S2o.js";
|
|
4
4
|
//#region src/lib/booking-period.ts
|
|
5
5
|
var n = /* @__PURE__ */ e({
|
|
6
6
|
adjustBookingPeriod: () => M,
|
|
@@ -149,7 +149,7 @@ var n = /* @__PURE__ */ e({
|
|
|
149
149
|
let n = e.startMinutes, r = e.endMinutes - o;
|
|
150
150
|
return r < n ? !1 : t >= n && t <= r;
|
|
151
151
|
}) : !1;
|
|
152
|
-
}, y = s.days.find((e) => !e.isClosed && e.openingSlots.length)?.day ?? s.days[0]?.day ?? 0, b = c.days.find((e) => !e.isClosed && e.openingSlots.length)?.day ?? c.days[0]?.day ?? 0, x = Math.ceil(Math.max(0, s.defaultOpeningMinutes) / o) * o, S = g(y) ?? x, C = S
|
|
152
|
+
}, y = s.days.find((e) => !e.isClosed && e.openingSlots.length)?.day ?? s.days[0]?.day ?? 0, b = c.days.find((e) => !e.isClosed && e.openingSlots.length)?.day ?? c.days[0]?.day ?? 0, x = Math.ceil(Math.max(0, s.defaultOpeningMinutes) / o) * o, S = g(y) ?? x, C = S, w = Math.floor(Math.max(0, s.defaultClosingMinutes - o) / o) * o, T = _(y) ?? w;
|
|
153
153
|
(!Number.isFinite(C) || C > T) && (C = S), Number.isFinite(C) || (C = Math.max(0, s.defaultOpeningMinutes));
|
|
154
154
|
let E = Math.max(0, C), D = Math.max(E, T);
|
|
155
155
|
return {
|
|
@@ -242,20 +242,20 @@ var n = /* @__PURE__ */ e({
|
|
|
242
242
|
minutesFromMidnight: r
|
|
243
243
|
};
|
|
244
244
|
}, D = (e) => {
|
|
245
|
-
let t = e.referenceDate ?? /* @__PURE__ */ new Date(), n = h(e.config), { baseDate:
|
|
246
|
-
startDate:
|
|
247
|
-
startTime:
|
|
248
|
-
endDate:
|
|
249
|
-
endTime:
|
|
245
|
+
let t = e.referenceDate ?? /* @__PURE__ */ new Date(), n = h(e.config), { baseDate: i } = E(t, n), a = new Date(i.getTime()), o = new Date(i.getTime()), s = C(a), c = s ? A(s) : n.defaultWeekday, l = n.getFirstStartMinutesForWeekday(c, null, { dateString: s }), u = typeof l == "number" ? r(l) : n.defaultStartTime, d = n.defaultEndTime, f = M({
|
|
246
|
+
startDate: a,
|
|
247
|
+
startTime: u,
|
|
248
|
+
endDate: o,
|
|
249
|
+
endTime: d
|
|
250
250
|
}, {
|
|
251
251
|
referenceDate: t,
|
|
252
252
|
config: e.config
|
|
253
|
-
}),
|
|
253
|
+
}), p = f.startDateString ? k(f.startDateString) : a, m = f.shouldResetEnd ? new Date(p.getTime()) : f.endDateString ? k(f.endDateString) : o, g = f.startTime ?? u, _ = f.endTime ?? d;
|
|
254
254
|
return {
|
|
255
|
-
startDate: new Date(
|
|
256
|
-
startTime:
|
|
257
|
-
endDate: new Date(
|
|
258
|
-
endTime:
|
|
255
|
+
startDate: new Date(p.getTime()),
|
|
256
|
+
startTime: g,
|
|
257
|
+
endDate: new Date(m.getTime()),
|
|
258
|
+
endTime: _
|
|
259
259
|
};
|
|
260
260
|
}, O = (e, t) => {
|
|
261
261
|
if (e) return typeof e == "string" ? S(e) : C(e);
|
package/dist/lib/booking.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DEFAULT_BOOKING_DELIVERY_OPTION as e } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-
|
|
2
|
-
import "../chunks/pkg/booking-engine/dist/schemas-
|
|
1
|
+
import { DEFAULT_BOOKING_DELIVERY_OPTION as e } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-ps94yuAR.js";
|
|
2
|
+
import "../chunks/pkg/booking-engine/dist/schemas-7yx45S2o.js";
|
|
3
3
|
import { getDefaultBookingPeriod as t, parseTimeToMinutes as n } from "./booking-period.js";
|
|
4
4
|
import { format as r } from "date-fns";
|
|
5
5
|
//#region src/lib/booking.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { productKindSchema as e } from "../chunks/pkg/booking-engine/dist/models/Product.shared-
|
|
1
|
+
import { productKindSchema as e } from "../chunks/pkg/booking-engine/dist/models/Product.shared-VisFafx-.js";
|
|
2
2
|
import { bookingReferenceSchema as t } from "../chunks/pkg/booking-engine/dist/schemas/booking-reference-DLKcpIa4.js";
|
|
3
|
-
import { DEFAULT_BOOKING_DELIVERY_OPTION as n, bookingScheduleInputSchema as r } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-
|
|
4
|
-
import "../chunks/pkg/booking-engine/dist/schemas-
|
|
3
|
+
import { DEFAULT_BOOKING_DELIVERY_OPTION as n, bookingScheduleInputSchema as r } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-ps94yuAR.js";
|
|
4
|
+
import "../chunks/pkg/booking-engine/dist/schemas-7yx45S2o.js";
|
|
5
5
|
import { storefrontFulfillmentModeSchema as i } from "../storefrontSchemas.js";
|
|
6
6
|
import { z as a } from "zod";
|
|
7
7
|
//#region src/lib/checkoutSubmit.ts
|