@wix/himalaya-cli 0.2004.0 → 0.2005.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +33 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/extensions.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/options.d.ts +4 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/product-details.d.ts +58 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/_shared/types.generated.d.ts +2336 -26
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/addOns.generated.d.ts +169 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/attendance.generated.d.ts +150 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/attributeDefinition.generated.d.ts +124 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/attributeValue.generated.d.ts +107 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/availabilityCalendar.generated.d.ts +66 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/availabilityTimeSlots.generated.d.ts +115 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/bookingFees.generated.d.ts +82 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/bookingPolicies.generated.d.ts +174 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/bookingPolicySnapshots.generated.d.ts +54 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/bookings.generated.d.ts +732 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/bookingsSettings.generated.d.ts +54 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/catalogSearch.generated.d.ts +158 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/categories.generated.d.ts +74 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/categoriesV2.generated.d.ts +122 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/eventTimeSlots.generated.d.ts +76 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/extendedBookings.generated.d.ts +239 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/externalCalendars.generated.d.ts +229 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/index.generated.d.ts +28 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/multiServiceAvailabilityTimeSlots.generated.d.ts +97 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/pricing.generated.d.ts +138 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/relatedProducts.generated.d.ts +78 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/resourceTypes.generated.d.ts +109 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/resources.generated.d.ts +210 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/serviceOptionsAndVariants.generated.d.ts +194 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/services.generated.d.ts +642 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/staffMemberSettings.generated.d.ts +46 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/staffMembers.generated.d.ts +399 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/timeSlotsConfiguration.generated.d.ts +93 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/conferencing.generated.d.ts +200 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/eventViews.generated.d.ts +20 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/events.generated.d.ts +355 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/index.generated.d.ts +6 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/participations.generated.d.ts +98 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/scheduleTimeFrames.generated.d.ts +45 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/schedules.generated.d.ts +123 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/categories.generated.d.ts +15 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/comments.generated.d.ts +32 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/contentRevisions.generated.d.ts +27 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/widgets.generated.d.ts +20 -13
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/abandonedCheckouts.generated.d.ts +215 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/backInStockNotifications.generated.d.ts +148 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/backInStockSettings.generated.d.ts +56 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/cart.generated.d.ts +380 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/cartV2.generated.d.ts +529 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/checkout.generated.d.ts +461 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/checkoutContent.generated.d.ts +27 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/checkoutSettings.generated.d.ts +137 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/checkoutTemplates.generated.d.ts +189 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/contactTaxDetails.generated.d.ts +185 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/currencies.generated.d.ts +62 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/currentCart.generated.d.ts +326 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/currentCartV2.generated.d.ts +442 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/deliveryProfile.generated.d.ts +399 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/deliverySolutions.generated.d.ts +110 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/discountRules.generated.d.ts +186 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/discountsCustomTrigger.generated.d.ts +22 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/draftOrders.generated.d.ts +877 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/draftSubscriptionContracts.generated.d.ts +301 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/ecommerceSettings.generated.d.ts +24 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/giftVouchers.generated.d.ts +73 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/index.generated.d.ts +45 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/localDeliveryOptions.generated.d.ts +99 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/manualTaxMappings.generated.d.ts +207 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orderBilling.generated.d.ts +399 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orderFulfillments.generated.d.ts +137 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orderInvoices.generated.d.ts +80 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orderPaymentRequests.generated.d.ts +171 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orderTransactions.generated.d.ts +167 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orders.generated.d.ts +695 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/ordersSettings.generated.d.ts +39 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/recommendations.generated.d.ts +57 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/shippingOptions.generated.d.ts +144 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/shippoConfigurations.generated.d.ts +178 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/subscriptionContracts.generated.d.ts +209 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/taxCalculation.generated.d.ts +115 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/taxExemptGroups.generated.d.ts +218 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/taxGroups.generated.d.ts +140 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/taxRegions.generated.d.ts +126 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/taxSettings.generated.d.ts +38 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/tipSettings.generated.d.ts +116 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/tippableStaff.generated.d.ts +28 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/tips.generated.d.ts +221 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/totalsCalculator.generated.d.ts +141 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/wishlists.generated.d.ts +57 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/index.generated.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/orders.generated.d.ts +368 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/planBenefits.generated.d.ts +94 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/plans.generated.d.ts +235 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/plansV3.generated.d.ts +266 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/pricingPlansSettings.generated.d.ts +48 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/pricingVariantCategories.generated.d.ts +92 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/brandsV3.generated.d.ts +211 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/catalogImportsV3.generated.d.ts +382 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/catalogVersioning.generated.d.ts +17 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/collections.generated.d.ts +52 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/customizationsV3.generated.d.ts +292 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/index.generated.d.ts +18 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/infoSectionsV3.generated.d.ts +306 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/inventory.generated.d.ts +126 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/inventoryItemsV3.generated.d.ts +389 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/productGroupsV3.generated.d.ts +282 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/products.generated.d.ts +678 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/productsV3.generated.d.ts +1069 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/promotionsV3.generated.d.ts +232 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/readOnlyVariantsV3.generated.d.ts +93 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/ribbonsV3.generated.d.ts +211 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/storesLocationsV3.generated.d.ts +60 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/subscriptionOptions.generated.d.ts +223 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/wishlist.generated.d.ts +37 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +1036 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-calendar.mjs +286 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +23 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +1663 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-pricing-plans.mjs +336 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +1029 -11
- package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +8 -4
- package/dist/cli.mjs +8 -8
- package/guides/importable-sdks.md +1 -0
- package/guides/sdk-reference.json +15672 -8927
- package/guides/wix-api-usage.md +28 -0
- package/package.json +2 -2
|
@@ -316,6 +316,16 @@ export type WixBookingSlotFull = Record<string, unknown> & {
|
|
|
316
316
|
* owner flow-control overrides (so past/locked bookings reschedule). Verified
|
|
317
317
|
* live (200). A bare {newStartDate} 400s ("createSession/scheduleId required").*/
|
|
318
318
|
export declare function rescheduleBooking(bookingId: string, slot: WixBookingSlotFull, revision: string, notify?: boolean): Promise<WixRescheduleBookingResponse>;
|
|
319
|
+
/** A MEMBER reschedules their own booking — the same route as `rescheduleBooking`, but with no
|
|
320
|
+
* owner overrides, so Wix applies the business's reschedule policy, booking window and the
|
|
321
|
+
* new slot's availability. Pass the FULL new slot (from availability) and the booking's
|
|
322
|
+
* current `revision`. A refusal by the policy is an HTTP error. `isBookingPolicyViolation`
|
|
323
|
+
* matches the policy codes seen on other booking writes; a reschedule refusal itself has not
|
|
324
|
+
* been observed live, so treat any 4xx here as "contact the business", not as retryable.
|
|
325
|
+
* `rescheduleBooking` stays the OWNER tool (it skips the policy on purpose).
|
|
326
|
+
* @scope member — a signed-in site member moved their own appointment under the default policy
|
|
327
|
+
* (verified live 2026-12-01, codegen/wix/live scenario bookings/curated-member-flows). */
|
|
328
|
+
export declare function rescheduleMyBooking(bookingId: string, slot: WixBookingSlotFull, revision: string, notify?: boolean): Promise<WixRescheduleBookingResponse>;
|
|
319
329
|
/** Raw v1 availability fields, including capacity for a class or course session. */
|
|
320
330
|
export interface WixAvailabilityEntry {
|
|
321
331
|
slot?: WixBookingSlotFull;
|
|
@@ -395,6 +405,29 @@ export interface WixBookSlotOptions {
|
|
|
395
405
|
/** Sent as `booking.selectedPaymentOption`. Omitted from the request when unset,
|
|
396
406
|
* so a call without it sends exactly the body it always did. */
|
|
397
407
|
selectedPaymentOption?: WixSelectedPaymentOption;
|
|
408
|
+
/** How many people this booking is for (`booking.totalParticipants`). Default 1, which is
|
|
409
|
+
* what every call without it sent. Must fit the slot's `openSpots`. */
|
|
410
|
+
totalParticipants?: number;
|
|
411
|
+
/** For a service with service options and variants (e.g. adult / child prices): how many
|
|
412
|
+
* participants per choice (`booking.participantsChoices`). Sent INSTEAD of
|
|
413
|
+
* `totalParticipants` — Wix takes exactly one of the two. */
|
|
414
|
+
participantsChoices?: WixParticipantsChoices;
|
|
415
|
+
/** The booker's Wix contact id (`booking.contactDetails.contactId`). Pass the member's own
|
|
416
|
+
* `contactId` (from `members/my`) when a signed-in member books: without it the booking is
|
|
417
|
+
* not tied to the member's contact, and calendar `listEventsByMemberId` returns none of the
|
|
418
|
+
* member's sessions (measured live 2026-12-01: 0 events without it, the session with it). */
|
|
419
|
+
contactId?: string;
|
|
420
|
+
}
|
|
421
|
+
/** `booking.participantsChoices`: participant counts per service option choice. */
|
|
422
|
+
export interface WixParticipantsChoices {
|
|
423
|
+
serviceChoices: {
|
|
424
|
+
numberOfParticipants: number;
|
|
425
|
+
choices: {
|
|
426
|
+
optionId: string;
|
|
427
|
+
choiceId?: string;
|
|
428
|
+
custom?: string;
|
|
429
|
+
}[];
|
|
430
|
+
}[];
|
|
398
431
|
}
|
|
399
432
|
/** Book a specific availability slot — POST /bookings/v2/bookings. Pass the FULL
|
|
400
433
|
* slot from queryServiceAvailability + the booker's contact. The v1 createBooking
|
|
@@ -55,6 +55,7 @@ export declare function queryInventory(productId: string): Promise<WixQueryInven
|
|
|
55
55
|
export declare function updateInventory(inventoryItemId: string, inventoryItem: WixInventoryItemWrite): Promise<WixUpdateInventoryResponse>;
|
|
56
56
|
export * from "./display.js";
|
|
57
57
|
export * from "./options.js";
|
|
58
|
+
export * from "./product-details.js";
|
|
58
59
|
/** Forget the resolved Stores catalog version, in this worker and app-wide.
|
|
59
60
|
* Call this when the app points itself at a DIFFERENT Wix site. */
|
|
60
61
|
export declare function forgetCatalogVersion(): void;
|
|
@@ -71,4 +71,7 @@ export declare function resolveVariantId(product: StoreProduct | undefined, sele
|
|
|
71
71
|
* whose `variantsInfo` did not come back — both are the caller's to fix, and both
|
|
72
72
|
* are invisible if this returns a plausible-looking payload instead.
|
|
73
73
|
*/
|
|
74
|
-
export declare function cartOptionsPayload(product: StoreProduct | undefined, options: StoreOption[], selection: StoreOptionSelection
|
|
74
|
+
export declare function cartOptionsPayload(product: StoreProduct | undefined, options: StoreOption[], selection: StoreOptionSelection,
|
|
75
|
+
/** The shopper's custom text, keyed by `productCustomTextFields()[].key` (engraving, gift
|
|
76
|
+
* message). Blank values are left out; check `customTextProblems` before adding. */
|
|
77
|
+
customText?: Record<string, string>): Record<string, unknown> | undefined;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type WixImageSize } from "@wix/himalaya/wix-media";
|
|
2
|
+
import type { StoreProduct } from "./display.js";
|
|
3
|
+
/** A product read from either catalog. `StoreProduct` declares only the fields the display
|
|
4
|
+
* helpers share; these details live in fields it leaves out on purpose (adding them to
|
|
5
|
+
* `StoreProduct` would narrow what existing callers already declare), so a raw read is
|
|
6
|
+
* accepted too. */
|
|
7
|
+
export type StoreProductInput = StoreProduct | Record<string, unknown>;
|
|
8
|
+
/** The product's brand name, or "" when it has none. V1 stores a string, V3 `{ id, name }`. */
|
|
9
|
+
export declare function productBrand(product: StoreProductInput | undefined): string;
|
|
10
|
+
/**
|
|
11
|
+
* The formatted price per unit the store shows next to the price ("4.80 ₪ / 100 g"), or ""
|
|
12
|
+
* when the merchant set none.
|
|
13
|
+
*
|
|
14
|
+
* V3 prices per unit on the VARIANT: pass the chosen `variantId` for its own value; without
|
|
15
|
+
* one, the product's lowest (`pricePerUnitRange.minValue`) is returned. V1 has one value per
|
|
16
|
+
* product, `price.formatted.pricePerUnit`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function productPricePerUnit(product: StoreProductInput | undefined, variantId?: string): string;
|
|
19
|
+
/** One custom text field the shopper fills before adding the product to the cart. */
|
|
20
|
+
export interface StoreCustomTextField {
|
|
21
|
+
/** The key `cartOptionsPayload`'s `customText` map uses (V3 `freeTextSettings.key`, V1 `title`). */
|
|
22
|
+
key: string;
|
|
23
|
+
/** The label to show. */
|
|
24
|
+
title: string;
|
|
25
|
+
/** The cart refuses the line without it. */
|
|
26
|
+
required: boolean;
|
|
27
|
+
/** Length limits, when the merchant set them. */
|
|
28
|
+
minLength?: number;
|
|
29
|
+
maxLength?: number;
|
|
30
|
+
}
|
|
31
|
+
/** The product's custom text fields (engraving, gift message…), in the merchant's order. */
|
|
32
|
+
export declare function productCustomTextFields(product: StoreProductInput | undefined): StoreCustomTextField[];
|
|
33
|
+
/**
|
|
34
|
+
* Why the shopper's custom text cannot go to the cart yet: one message per field that is
|
|
35
|
+
* missing or out of its limits, keyed like the fields. Empty when it can.
|
|
36
|
+
*/
|
|
37
|
+
export declare function customTextProblems(fields: StoreCustomTextField[], text?: Record<string, string>): Record<string, string>;
|
|
38
|
+
/** One gallery entry, image or video. URLs are sized like `productGallery`. */
|
|
39
|
+
export type StoreMediaItem = {
|
|
40
|
+
type: "image";
|
|
41
|
+
url: string;
|
|
42
|
+
} | {
|
|
43
|
+
type: "video";
|
|
44
|
+
/** A playable MP4: the highest resolution at or below `maxVideoHeight`. */
|
|
45
|
+
url: string;
|
|
46
|
+
/** The still frame to show before playing ("" when Wix sent none). */
|
|
47
|
+
posterUrl: string;
|
|
48
|
+
width?: number;
|
|
49
|
+
height?: number;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* EVERY gallery entry in wire order — images AND videos. `productGallery` keeps returning
|
|
53
|
+
* image urls only (its callers render an image pager); a screen that can play video uses this.
|
|
54
|
+
*
|
|
55
|
+
* A video is a playable MP4 url — the highest resolution at or below `maxVideoHeight`
|
|
56
|
+
* (default 720), so a list never streams 1080p — plus its poster frame.
|
|
57
|
+
*/
|
|
58
|
+
export declare function productMedia(product: StoreProductInput | undefined, size?: WixImageSize | null, maxVideoHeight?: number): StoreMediaItem[];
|