@wix/bookings 1.0.1743 → 1.0.1744

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.
Files changed (31) hide show
  1. package/_sdk-exports/context-booking-checkout-context/runtime.d.ts +7 -6
  2. package/_sdk-exports/context-booking-checkout-context/runtime.js +2 -2
  3. package/_sdk-exports/context-service-context/runtime.d.ts +49 -2
  4. package/_sdk-exports/context-service-context/runtime.js +2 -2
  5. package/_sdk-exports/context-services-context/runtime.js +1 -1
  6. package/_sdk-exports/context-time-slots-context/runtime.d.ts +12 -0
  7. package/build/cjs/context-booking-checkout-context.d.ts +7 -6
  8. package/build/cjs/context-booking-checkout-context.js +1261 -1237
  9. package/build/cjs/context-booking-checkout-context.js.map +1 -1
  10. package/build/cjs/context-service-context.d.ts +49 -2
  11. package/build/cjs/context-service-context.js +1386 -1385
  12. package/build/cjs/context-service-context.js.map +1 -1
  13. package/build/cjs/context-services-context.js +1 -1
  14. package/build/cjs/context-services-context.js.map +1 -1
  15. package/build/cjs/context-time-slots-context.d.ts +12 -0
  16. package/build/es/context-booking-checkout-context.d.mts +7 -6
  17. package/build/es/context-booking-checkout-context.mjs +1261 -1237
  18. package/build/es/context-booking-checkout-context.mjs.map +1 -1
  19. package/build/es/context-service-context.d.mts +49 -2
  20. package/build/es/context-service-context.mjs +1386 -1385
  21. package/build/es/context-service-context.mjs.map +1 -1
  22. package/build/es/context-services-context.mjs +1 -1
  23. package/build/es/context-services-context.mjs.map +1 -1
  24. package/build/es/context-time-slots-context.d.mts +12 -0
  25. package/build/internal/cjs/context-booking-checkout-context.d.ts +7 -6
  26. package/build/internal/cjs/context-service-context.d.ts +49 -2
  27. package/build/internal/cjs/context-time-slots-context.d.ts +12 -0
  28. package/build/internal/es/context-booking-checkout-context.d.mts +7 -6
  29. package/build/internal/es/context-service-context.d.mts +49 -2
  30. package/build/internal/es/context-time-slots-context.d.mts +12 -0
  31. package/package.json +2 -2
@@ -336,7 +336,7 @@ interface ServiceOptionOptionSpecificDataOneOf {
336
336
  customData?: CustomServiceOption;
337
337
  durationData?: DurationServiceOption;
338
338
  }
339
- declare enum ServiceOptionType {
339
+ declare enum ServiceOptionType$1 {
340
340
  /** There is no information about the option type. */
341
341
  UNKNOWN = "UNKNOWN",
342
342
  /**
@@ -369,7 +369,7 @@ declare enum ServiceOptionType {
369
369
  DURATION_RANGE = "DURATION_RANGE"
370
370
  }
371
371
  /** @enumType */
372
- type ServiceOptionTypeWithLiterals = ServiceOptionType | 'UNKNOWN' | 'CUSTOM' | 'STAFF_MEMBER' | 'DURATION' | 'DATE_TIME' | 'NUMBER_OF_PARTICIPANTS' | 'DURATION_RANGE';
372
+ type ServiceOptionTypeWithLiterals = ServiceOptionType$1 | 'UNKNOWN' | 'CUSTOM' | 'STAFF_MEMBER' | 'DURATION' | 'DATE_TIME' | 'NUMBER_OF_PARTICIPANTS' | 'DURATION_RANGE';
373
373
  interface CustomServiceOption {
374
374
  /**
375
375
  * Name of the service option. For example, `Age group`, `Location`, `Equipment`,
@@ -3334,6 +3334,33 @@ interface OfferedDay {
3334
3334
  day: string;
3335
3335
  }
3336
3336
  //#endregion
3337
+ //#region src/domains/pricing-options/pricing-options.d.ts
3338
+ /**
3339
+ * `LOCATION` (variable price per business location) is `@internal` in the SDK's public typings
3340
+ * but comes over the wire, so it is spelled out beside the generated literals.
3341
+ */
3342
+ type ServiceOptionType = ServiceOptionTypeWithLiterals | 'LOCATION';
3343
+ interface PricingOptionChoice {
3344
+ choiceId: string | null;
3345
+ label: string | null;
3346
+ /** Localized, e.g. "€110". */
3347
+ price: string | null;
3348
+ /** Raw amount from the SDK, for totals math; convert at the use site. */
3349
+ priceAmount?: string | null;
3350
+ durationMinutes?: number | null;
3351
+ /** `label` falls back to a formatted duration, losing whether a name was set. */
3352
+ durationName?: string | null;
3353
+ /** `LOCATION` options only: the business location this choice prices. */
3354
+ businessLocationId?: string | null;
3355
+ }
3356
+ interface PricingOption {
3357
+ optionId: string | null;
3358
+ type: ServiceOptionType | null;
3359
+ /** `STAFF_MEMBER` options have none; `null` means the caller supplies a generic heading. */
3360
+ name: string | null;
3361
+ choices: PricingOptionChoice[];
3362
+ }
3363
+ //#endregion
3337
3364
  //#region src/domains/service-price/format-service-price.d.ts
3338
3365
  interface ServicePriceData {
3339
3366
  rateType: RateTypeWithLiterals | null;
@@ -3371,11 +3398,23 @@ interface ServiceBookability {
3371
3398
  }
3372
3399
  //#endregion
3373
3400
  //#region src/api/adapters/staff-member/staff-member.d.ts
3401
+ /**
3402
+ * Where a staff member has working hours, derived server-side from their WORKING_HOURS
3403
+ * calendar events. Returned only when `STAFF_WORKING_HOURS_LOCATIONS` is requested (see
3404
+ * `SERVICE_CONDITIONAL_FIELDS`); the public `@wix/bookings` typings don't declare it yet, so
3405
+ * it's read through this narrow shape.
3406
+ */
3407
+ interface StaffLocationCoverage {
3408
+ availableAtAllLocations: boolean;
3409
+ locationIds: string[];
3410
+ }
3374
3411
  interface StaffMemberItem {
3375
3412
  staffMemberId: string;
3376
3413
  name: string | null;
3377
3414
  image: Image | null;
3378
3415
  isSelected: boolean;
3416
+ /** Absent when the coverage wasn't returned — callers treat that as "works everywhere". */
3417
+ locationCoverage?: StaffLocationCoverage;
3379
3418
  }
3380
3419
  //#endregion
3381
3420
  //#region src/domains/course-availability/course-availability.d.ts
@@ -3517,6 +3556,8 @@ interface ServiceContextValue {
3517
3556
  isVariedService: boolean;
3518
3557
  /** Null when not VARIED, not loaded yet, or failed (a failed refetch keeps the last value). */
3519
3558
  serviceOptionsAndVariants: ServiceOptionsAndVariants | null;
3559
+ /** `serviceOptionsAndVariants` as the modal's pricing option; null as above. */
3560
+ pricingOption: PricingOption | null;
3520
3561
  /** Includes empty and failed variant responses. */
3521
3562
  isLoadingServiceOptionsAndVariants: boolean;
3522
3563
  hasAddOns: boolean;
@@ -3549,6 +3590,12 @@ interface ServiceContextValue {
3549
3590
  * writes it into the next page's URL.
3550
3591
  */
3551
3592
  selection: ServicePreference;
3593
+ /**
3594
+ * The zone `selection`'s slot times are local to — the one a pick reports, else the displayed
3595
+ * one. `b=` carries it only once the CTA writes the pick, so a reader on the calendar has it
3596
+ * from here alone.
3597
+ */
3598
+ selectionTimezone: string | undefined;
3552
3599
  /** Empty clears. No participant count, so the booking form shows no count field for it. */
3553
3600
  setVariant: SetVariant;
3554
3601
  /**