@wix/bookings 1.0.1780 → 1.0.1782

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/build/cjs/context-service-addons.d.ts +54 -3
  2. package/build/cjs/context-service-addons.js +1065 -578
  3. package/build/cjs/context-service-addons.js.map +1 -1
  4. package/build/cjs/context-service.d.ts +17 -0
  5. package/build/cjs/context-service.js +975 -963
  6. package/build/cjs/context-service.js.map +1 -1
  7. package/build/cjs/context-time-slots.d.ts +20 -91
  8. package/build/cjs/context-time-slots.js +456 -475
  9. package/build/cjs/context-time-slots.js.map +1 -1
  10. package/build/es/context-service-addons.d.mts +54 -3
  11. package/build/es/context-service-addons.mjs +1061 -574
  12. package/build/es/context-service-addons.mjs.map +1 -1
  13. package/build/es/context-service.d.mts +17 -0
  14. package/build/es/context-service.mjs +975 -963
  15. package/build/es/context-service.mjs.map +1 -1
  16. package/build/es/context-time-slots.d.mts +20 -91
  17. package/build/es/context-time-slots.mjs +456 -475
  18. package/build/es/context-time-slots.mjs.map +1 -1
  19. package/build/internal/cjs/context-service-addons.d.ts +54 -3
  20. package/build/internal/cjs/context-service.d.ts +17 -0
  21. package/build/internal/cjs/context-time-slots.d.ts +20 -91
  22. package/build/internal/es/context-service-addons.d.mts +54 -3
  23. package/build/internal/es/context-service.d.mts +17 -0
  24. package/build/internal/es/context-time-slots.d.mts +20 -91
  25. package/context-runtime/context-service/runtime.d.ts +17 -0
  26. package/context-runtime/context-service/runtime.js +3 -3
  27. package/context-runtime/context-service-addons/runtime.d.ts +54 -3
  28. package/context-runtime/context-service-addons/runtime.js +2 -2
  29. package/context-runtime/context-time-slots/runtime.d.ts +20 -91
  30. package/context-runtime/context-time-slots/runtime.js +3 -3
  31. package/package.json +3 -3
@@ -135,7 +135,7 @@ interface BookedAddOn {
135
135
  nameTranslated?: string | null;
136
136
  }
137
137
  /** Server-computed datetime adjusted to a requested timezone. */
138
- interface AddOn extends AddOnAddOnInfoOneOf {
138
+ interface AddOn$2 extends AddOnAddOnInfoOneOf {
139
139
  /** Duration in minutes for duration-based add-ons that extend booking service time. */
140
140
  durationInMinutes?: number;
141
141
  /** Maximum quantity customers can purchase for quantity-based add-ons. */
@@ -165,7 +165,7 @@ interface AddOnAddOnInfoOneOf {
165
165
  /** Maximum quantity customers can purchase for quantity-based add-ons. */
166
166
  maxQuantity?: number;
167
167
  }
168
- interface AddOnGroupDetail {
168
+ interface AddOnGroupDetail$1 {
169
169
  /**
170
170
  * Group ID.
171
171
  * @format GUID
@@ -182,7 +182,7 @@ interface AddOnGroupDetail {
182
182
  * Add-ons linked to this group in display order.
183
183
  * @maxSize 7
184
184
  */
185
- addOns?: AddOn[];
185
+ addOns?: AddOn$2[];
186
186
  /**
187
187
  * Instructional prompt displayed to customers. For example, `Choose up to 2 relaxing spa treatments to enhance your experience`. You can also use this field as a group description. For example, `Beginner-friendly rental equipment`.
188
188
  * @maxLength 200
@@ -207,7 +207,52 @@ type AddOn$1 = {
207
207
  quantity: NonNullable<BookedAddOn['quantity']>;
208
208
  };
209
209
  //#endregion
210
+ //#region ../../node_modules/@wix/editor-react-types/dist/image.d.ts
211
+ type Point = {
212
+ x: number;
213
+ y: number;
214
+ };
215
+ type Crop = Point & {
216
+ width: number;
217
+ height: number;
218
+ };
219
+ /**
220
+ * An image from Wix Media.
221
+ *
222
+ * @example
223
+ * ```tsx
224
+ * import type { Image } from '@wix/editor-react-types';
225
+ *
226
+ * interface MyComponentProps {
227
+ * image?: Image;
228
+ * }
229
+ *
230
+ * const MyComponent = ({ image }: MyComponentProps) => (
231
+ * <img src={image?.url} alt={image?.alt} />
232
+ * );
233
+ * ```
234
+ */
235
+ type Image = {
236
+ /** The image URI. */uri?: string; /** The image URL. */
237
+ url: string; /** The image file name. */
238
+ name?: string; /** The image height in pixels. */
239
+ height?: number; /** The image width in pixels. */
240
+ width?: number; /** Whether the image is animated (e.g. GIF). */
241
+ animated?: boolean; /** The crop region applied to the image. */
242
+ crop?: Crop; /** The image quality, as a percentage from 0 to 100. */
243
+ quality?: number; /** The image alt text for accessibility. */
244
+ alt?: string;
245
+ };
246
+ //#endregion
210
247
  //#region src/api/adapters/service-addons/service-addons.d.ts
248
+ type AddOn = AddOn$2 & {
249
+ mainMedia?: {
250
+ image?: string | null;
251
+ } | null;
252
+ };
253
+ type AddOnGroupDetail = Omit<AddOnGroupDetail$1, 'addOns'> & {
254
+ addOns?: AddOn[];
255
+ };
211
256
  /** An add-on the service offers, and whether the site visitor selected it. */
212
257
  interface AddOnItem {
213
258
  /**
@@ -251,6 +296,12 @@ interface AddOnItem {
251
296
  * `setAddOnQuantity()` limits its quantity to `1`.
252
297
  */
253
298
  maxQuantity: NonNullable<AddOn['maxQuantity']> | null;
299
+ /**
300
+ * Add-on's image, with its size in pixels.
301
+ *
302
+ * `null` when the add-on has no image.
303
+ */
304
+ addOnImage?: Image | null;
254
305
  /** Whether the site visitor selected the add-on. */
255
306
  isSelected: boolean;
256
307
  /**