@wix/bookings 1.0.14 → 1.0.15

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 (43) hide show
  1. package/build/cjs/index.d.ts +2 -1
  2. package/build/cjs/index.js +3 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/bookings-calendar-v1-session.http.d.ts +49 -26
  5. package/build/cjs/src/bookings-calendar-v1-session.http.js +49 -26
  6. package/build/cjs/src/bookings-calendar-v1-session.http.js.map +1 -1
  7. package/build/cjs/src/bookings-calendar-v1-session.universal.d.ts +49 -26
  8. package/build/cjs/src/bookings-calendar-v1-session.universal.js +49 -26
  9. package/build/cjs/src/bookings-calendar-v1-session.universal.js.map +1 -1
  10. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.http.d.ts +64 -0
  11. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.http.js +296 -0
  12. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.http.js.map +1 -0
  13. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +11 -0
  14. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.js +69 -0
  15. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.js.map +1 -0
  16. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.d.ts +1831 -0
  17. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.js +197 -0
  18. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -0
  19. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +1992 -0
  20. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js +685 -0
  21. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -0
  22. package/build/es/index.d.ts +2 -1
  23. package/build/es/index.js +2 -1
  24. package/build/es/index.js.map +1 -1
  25. package/build/es/src/bookings-calendar-v1-session.http.d.ts +49 -26
  26. package/build/es/src/bookings-calendar-v1-session.http.js +49 -26
  27. package/build/es/src/bookings-calendar-v1-session.http.js.map +1 -1
  28. package/build/es/src/bookings-calendar-v1-session.universal.d.ts +49 -26
  29. package/build/es/src/bookings-calendar-v1-session.universal.js +49 -26
  30. package/build/es/src/bookings-calendar-v1-session.universal.js.map +1 -1
  31. package/build/es/src/bookings-catalog-v1-service-options-and-variants.http.d.ts +64 -0
  32. package/build/es/src/bookings-catalog-v1-service-options-and-variants.http.js +286 -0
  33. package/build/es/src/bookings-catalog-v1-service-options-and-variants.http.js.map +1 -0
  34. package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +11 -0
  35. package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.js +38 -0
  36. package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.js.map +1 -0
  37. package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.d.ts +1831 -0
  38. package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.js +194 -0
  39. package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -0
  40. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +1992 -0
  41. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js +656 -0
  42. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -0
  43. package/package.json +2 -2
@@ -0,0 +1,1992 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ /**
8
+ * The `serviceOptionsAndVariants` object links a service to its variants.
9
+ * You can use it to offer customers different prices for a service,
10
+ * depending on which choices they book.
11
+ * Read more about [service options and variants](https://wix.wixanswers.com/app/kb/article/2e91a25b-b3c2-4cf7-9005-429a4929fc36/en).
12
+ */
13
+ export interface ServiceOptionsAndVariants {
14
+ /**
15
+ * ID of the `serviceOptionsAndVariants` object.
16
+ * @readonly
17
+ */
18
+ _id?: string | null;
19
+ /** ID of the service related to these options and variants. */
20
+ serviceId?: string | null;
21
+ /** Service options. Note that currently only a single option is supported per service. */
22
+ options?: ServiceOptions;
23
+ /** Information about the service's variants. */
24
+ variants?: ServiceVariants;
25
+ /**
26
+ * Price of the cheapest service variant.
27
+ * @readonly
28
+ */
29
+ minPrice?: Money;
30
+ /**
31
+ * Price of the most expensive service variant.
32
+ * @readonly
33
+ */
34
+ maxPrice?: Money;
35
+ /**
36
+ * Revision number, which increments by 1 each time the `serviceOptionsAndVariants` object is updated.
37
+ * To prevent conflicting changes,
38
+ * the current revision must be passed when updating and deleting the `serviceOptionsAndVariants` object.
39
+ *
40
+ * Ignored when creating a `serviceOptionsAndVariants` object.
41
+ */
42
+ revision?: string | null;
43
+ }
44
+ export interface ServiceOption extends ServiceOptionOptionSpecificDataOneOf {
45
+ /** ID of the service option. */
46
+ _id?: string;
47
+ /** Type of the service option. */
48
+ type?: ServiceOptionType;
49
+ /** Details about the custom option. Available only for `CUSTOM` options. */
50
+ customData?: CustomServiceOption;
51
+ }
52
+ /** @oneof */
53
+ export interface ServiceOptionOptionSpecificDataOneOf {
54
+ /** Details about the custom option. Available only for `CUSTOM` options. */
55
+ customData?: CustomServiceOption;
56
+ }
57
+ export declare enum ServiceOptionType {
58
+ UNKNOWN = "UNKNOWN",
59
+ CUSTOM = "CUSTOM",
60
+ STAFF_MEMBER = "STAFF_MEMBER"
61
+ }
62
+ export interface CustomServiceOption {
63
+ /**
64
+ * Name of the service option. For example, `Age group`, `Location`, `Equipment`,
65
+ * or `Time`.
66
+ */
67
+ name?: string;
68
+ /**
69
+ * Available choices for the service option. For example, `child`, `student`,
70
+ * `adult`, and `senior` for a service option named `Age group`. Each value must
71
+ * be unique. The value's case is ignored, meaning `Child` and `child` are
72
+ * considered to be identical. Currently, only a single choice is supported
73
+ * since service can have only a single option.
74
+ */
75
+ choices?: string[];
76
+ }
77
+ export interface ServiceVariant {
78
+ /**
79
+ * Choices for the service option. Currently, only a single choice is supported
80
+ * since services can have only a single option.
81
+ *
82
+ * Max: 1 choice
83
+ */
84
+ choices?: ServiceChoice[];
85
+ /** Information about the service variant's price. */
86
+ price?: Money;
87
+ }
88
+ export interface ServiceChoice extends ServiceChoiceChoiceOneOf {
89
+ /** ID of the service option. */
90
+ optionId?: string;
91
+ /** Name of the custom choice. */
92
+ custom?: string;
93
+ /**
94
+ * ID of the staff member providing the service. Equal to the `resourceId`
95
+ * of the staff member or the `scheduleOwnerId` of the relevant
96
+ * [schedule's](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object)
97
+ * `availability.linkedSchedules`.
98
+ */
99
+ staffMemberId?: string;
100
+ }
101
+ /** @oneof */
102
+ export interface ServiceChoiceChoiceOneOf {
103
+ /** Name of the custom choice. */
104
+ custom?: string;
105
+ /**
106
+ * ID of the staff member providing the service. Equal to the `resourceId`
107
+ * of the staff member or the `scheduleOwnerId` of the relevant
108
+ * [schedule's](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object)
109
+ * `availability.linkedSchedules`.
110
+ */
111
+ staffMemberId?: string;
112
+ }
113
+ /**
114
+ * Money.
115
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
116
+ */
117
+ export interface Money {
118
+ /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */
119
+ value?: string;
120
+ /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
121
+ currency?: string;
122
+ /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
123
+ formattedValue?: string | null;
124
+ }
125
+ export interface ServiceOptions {
126
+ /**
127
+ * Values of the service options.
128
+ *
129
+ * Max: 1 service option
130
+ */
131
+ values?: ServiceOption[];
132
+ }
133
+ export interface ServiceVariants {
134
+ /** Values of the service variants. */
135
+ values?: ServiceVariant[];
136
+ }
137
+ export interface CreateServiceOptionsAndVariantsRequest {
138
+ /** Service options and variants to create. */
139
+ serviceOptionsAndVariants: ServiceOptionsAndVariants;
140
+ }
141
+ export interface CreateServiceOptionsAndVariantsResponse {
142
+ /** Information about the created service options and variants. */
143
+ serviceOptionsAndVariants?: ServiceOptionsAndVariants;
144
+ }
145
+ export interface CloneServiceOptionsAndVariantsRequest {
146
+ /** ID of the `serviceOptionsAndVariants` object to clone. */
147
+ cloneFromId: string;
148
+ /** ID of the service that will be set for the cloned `serviceOptionsAndVariants` */
149
+ targetServiceId: string;
150
+ }
151
+ export interface CloneServiceOptionsAndVariantsResponse {
152
+ /** The constructed `serviceOptionsAndVariants` clone. */
153
+ serviceOptionsAndVariants?: ServiceOptionsAndVariants;
154
+ }
155
+ export interface GetServiceOptionsAndVariantsRequest {
156
+ /** ID of the `serviceOptionsAndVariants` object to retrieve. */
157
+ serviceOptionsAndVariantsId: string;
158
+ }
159
+ export interface GetServiceOptionsAndVariantsResponse {
160
+ /** Retrieved `serviceOptionsAndVariants` object. */
161
+ serviceOptionsAndVariants?: ServiceOptionsAndVariants;
162
+ }
163
+ export interface GetServiceOptionsAndVariantsByServiceIdRequest {
164
+ /** ID of the service to retrieve options and variants for. */
165
+ serviceId: string;
166
+ }
167
+ export interface GetServiceOptionsAndVariantsByServiceIdResponse {
168
+ /** Retrieved `serviceOptionsAndVariants` object. */
169
+ serviceVariants?: ServiceOptionsAndVariants;
170
+ }
171
+ export interface UpdateServiceOptionsAndVariantsRequest {
172
+ /** `ServiceOptionsAndVariants` object to update. */
173
+ serviceOptionsAndVariants: ServiceOptionsAndVariants;
174
+ /** Field mask containing information about the fields to update. */
175
+ mask?: string[];
176
+ }
177
+ export interface UpdateServiceOptionsAndVariantsResponse {
178
+ /** Updated `serviceOptionsAndVariants` object. */
179
+ serviceOptionsAndVariants?: ServiceOptionsAndVariants;
180
+ }
181
+ export interface DeleteServiceOptionsAndVariantsRequest {
182
+ /** ID of the `serviceOptionsAndVariants` object to delete. */
183
+ serviceOptionsAndVariantsId: string;
184
+ /** Revision of the `serviceOptionsAndVariants` object to delete. */
185
+ revision?: string;
186
+ }
187
+ export interface DeleteServiceOptionsAndVariantsResponse {
188
+ }
189
+ export interface QueryServiceOptionsAndVariantsRequest {
190
+ /** Information about filters, paging, and returned fields. */
191
+ query: QueryV2;
192
+ }
193
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
194
+ /**
195
+ * Filter object in the following format:
196
+ * `"filter" : {
197
+ * "fieldName1": "value1",
198
+ * "fieldName2":{"$operator":"value2"}
199
+ * }`
200
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
201
+ */
202
+ filter?: Record<string, any> | null;
203
+ /**
204
+ * Sort object in the following format:
205
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
206
+ */
207
+ sort?: Sorting[];
208
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
209
+ fields?: string[];
210
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
211
+ fieldsets?: string[];
212
+ /** Paging options to limit and skip the number of items. */
213
+ paging?: Paging;
214
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
215
+ cursorPaging?: CursorPaging;
216
+ }
217
+ /** @oneof */
218
+ export interface QueryV2PagingMethodOneOf {
219
+ /** Paging options to limit and skip the number of items. */
220
+ paging?: Paging;
221
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
222
+ cursorPaging?: CursorPaging;
223
+ }
224
+ export interface Sorting {
225
+ /** Name of the field to sort by. */
226
+ fieldName?: string;
227
+ /** Sort order. */
228
+ order?: SortOrder;
229
+ }
230
+ export declare enum SortOrder {
231
+ ASC = "ASC",
232
+ DESC = "DESC"
233
+ }
234
+ export interface Paging {
235
+ /** Number of items to load. */
236
+ limit?: number | null;
237
+ /** Number of items to skip in the current sort order. */
238
+ offset?: number | null;
239
+ }
240
+ export interface CursorPaging {
241
+ /** Number of items to load. */
242
+ limit?: number | null;
243
+ /**
244
+ * Pointer to the next or previous page in the list of results.
245
+ *
246
+ * You can get the relevant cursor token
247
+ * from the `pagingMetadata` object in the previous call's response.
248
+ * Not relevant for the first request.
249
+ */
250
+ cursor?: string | null;
251
+ }
252
+ export interface QueryServiceOptionsAndVariantsResponse {
253
+ /** Retrieved `serviceOptionsAndVariants` objects. */
254
+ serviceOptionsAndVariantsList?: ServiceOptionsAndVariants[];
255
+ /** Paging metadata. */
256
+ pagingMetadata?: PagingMetadataV2;
257
+ }
258
+ export interface PagingMetadataV2 {
259
+ /** Number of items returned in the response. */
260
+ count?: number | null;
261
+ /** Offset that was requested. */
262
+ offset?: number | null;
263
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
264
+ total?: number | null;
265
+ /** Flag that indicates the server failed to calculate the `total` field. */
266
+ tooManyToCount?: boolean | null;
267
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
268
+ cursors?: Cursors;
269
+ }
270
+ export interface Cursors {
271
+ /** Cursor pointing to next page in the list of results. */
272
+ next?: string | null;
273
+ /** Cursor pointing to previous page in the list of results. */
274
+ prev?: string | null;
275
+ }
276
+ export interface ResourceNotification {
277
+ /**
278
+ * Updated resource entity.
279
+ * 'resource.schedules' is deprecated and will not be returned. Please use 'resource.scheduleIds' instead.
280
+ */
281
+ resource?: Resource;
282
+ /** Event type. */
283
+ event?: Event;
284
+ }
285
+ export interface Resource {
286
+ /**
287
+ * Resource ID.
288
+ * @readonly
289
+ */
290
+ _id?: string | null;
291
+ /** Resource name. */
292
+ name?: string | null;
293
+ /** Resource email address. */
294
+ email?: string | null;
295
+ /** Resource phone number. */
296
+ phone?: string | null;
297
+ /** Resource description. */
298
+ description?: string | null;
299
+ /** Deprecated. Please use tags. */
300
+ tag?: string | null;
301
+ /** Resource tags. Tags are used to identify, group, and filter the different types of resources. For example, 'staff' or 'room'. */
302
+ tags?: string[] | null;
303
+ /** Resource images. */
304
+ images?: string[];
305
+ /** Deprecated. Please use scheduleIds. List of the schedules owned by this resource. Min size 1. */
306
+ schedules?: Schedule[];
307
+ /**
308
+ * List of IDs of schedules owned by this resource.
309
+ * @readonly
310
+ */
311
+ scheduleIds?: string[] | null;
312
+ /**
313
+ * Resource status.
314
+ * <!--ONLY:VELO
315
+ * One of:
316
+ * - `"CREATED"` Default status.
317
+ * - `"DELETED"` The resource was deleted.
318
+ * - `"UPDATED"` The resource was updated.
319
+ * <!--END:ONLY:VELO-->
320
+ * @readonly
321
+ */
322
+ status?: ResourceStatus;
323
+ /**
324
+ * Wix user ID, if the resource is associated with the Wix user.
325
+ * A staff member resource can be associated with a Wix user via assignment of a permissions role in the business manager.
326
+ * <!--ONLY:VELO
327
+ * Click the **Set Permissions** button for the staff member on the Staff page on your site's dashboard.
328
+ * <!--END:ONLY:VELO-->
329
+ * @readonly
330
+ */
331
+ wixUserId?: string | null;
332
+ }
333
+ export interface Schedule {
334
+ /** Schedule ID. */
335
+ _id?: string;
336
+ /** ID of the schedule's owner entity. This may be a resource ID or a service ID. */
337
+ scheduleOwnerId?: string | null;
338
+ timeZone?: string | null;
339
+ /**
340
+ * Specifies the intervals for the sessions calculation. Optional. e.g. when creating class service you can add
341
+ * pattern for recurring intervals, these intervals can be returned as schedule's sessions or available slots if
342
+ * there are no other availability calculation constraints and the capacity is bigger then the current total number of sessions' participants.
343
+ */
344
+ intervals?: RecurringInterval[];
345
+ /** Default title for the schedule's sessions. Maximum length: 6000 characters. */
346
+ title?: string | null;
347
+ /**
348
+ * Tags for grouping schedules. These tags are the default tags for the schedule's sessions.
349
+ * The Wix Bookings app uses the following predefined tags to set schedule type: `"INDIVIDUAL"`, `"GROUP"`, and `"COURSE"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags.
350
+ */
351
+ tags?: string[] | null;
352
+ /** Default location for the schedule's sessions. */
353
+ location?: Location;
354
+ /**
355
+ * Maximum number of participants that can be added to the schedule's sessions.
356
+ * Must be at most `1` for schedule whose availability is affected by another schedule. E.g, appointment schedules of the Wix Bookings app.
357
+ */
358
+ capacity?: number | null;
359
+ /** Price options offered when booking this schedule's slots. Default is no rate. */
360
+ rate?: Rate;
361
+ /**
362
+ * An object describing how to calculate the schedule's availability.
363
+ * An empty object indicates that the schedule is not available for booking.
364
+ */
365
+ availability?: Availability;
366
+ /**
367
+ * Number of participants registered to sessions in this schedule, calculated as the sum of the party sizes.
368
+ * @readonly
369
+ */
370
+ totalNumberOfParticipants?: number;
371
+ /**
372
+ * Participants currently registered to sessions in this schedule.
373
+ * Participants who are registered in the schedule are automatically registered to any session that is created for the schedule.
374
+ * @readonly
375
+ */
376
+ participants?: Participant[];
377
+ /**
378
+ * Title and description values to override session defaults when syncing to an external calendar.
379
+ * Learn more about [syncing calendars](https://support.wix.com/en/article/wix-bookings-important-information-about-syncing-google-calendars-with-wix-bookings).
380
+ */
381
+ externalCalendarOverrides?: ExternalCalendarOverrides;
382
+ /**
383
+ * Schedule status.
384
+ * @readonly
385
+ */
386
+ status?: ScheduleStatus;
387
+ /**
388
+ * Schedule creation date.
389
+ * @readonly
390
+ */
391
+ created?: Date;
392
+ /**
393
+ * Schedule last update date.
394
+ * @readonly
395
+ */
396
+ updated?: Date;
397
+ /**
398
+ * Schedule version number, updated each time the schedule is updated.
399
+ * @readonly
400
+ */
401
+ version?: number;
402
+ /**
403
+ * Fields which were inherited from the Business Info page under Settings in the Dashboard.
404
+ * @readonly
405
+ */
406
+ inheritedFields?: string[];
407
+ /** Conferencing Provider. A schedule with a conferencing provider will use to provider information to create a conference on the provider's system when a session is created on the schedule or on one of its linked schedule's. */
408
+ conferenceProvider?: ConferenceProvider;
409
+ /** A conference created for the schedule. This is used when a participant is added to a schedule. */
410
+ calendarConference?: CalendarConference;
411
+ }
412
+ export interface RecurringInterval {
413
+ /**
414
+ * The recurring interval identifier.
415
+ * @readonly
416
+ */
417
+ _id?: string;
418
+ /** The start time of the recurring interval. Required. */
419
+ start?: Date;
420
+ /** The end time of the recurring interval. Optional. Empty value indicates that there is no end time. */
421
+ end?: Date;
422
+ /** The interval rules. The day, hour and minutes the interval is recurring. */
423
+ interval?: Interval;
424
+ /** The frequency of the interval. Optional. The default is frequency with the default repetition. */
425
+ frequency?: Frequency;
426
+ /** Specifies the list of linked schedules and the way this link affects the corresponding schedules' availability. Can be calculated from the schedule or overridden on the recurring interval. */
427
+ affectedSchedules?: LinkedSchedule[];
428
+ /**
429
+ * The type of recurring interval.
430
+ * <!--ONLY:VELO
431
+ * One of:
432
+ * - `"UNDEFINED"` The default value. Sessions for this interval will be of type EVENT.
433
+ * - `"EVENT"` A recurring interval of events.
434
+ * - `"WORKING_HOURS"` A recurring interval for availability.
435
+ * <!--END:ONLY:VELO-->
436
+ */
437
+ intervalType?: RecurringIntervalType;
438
+ }
439
+ export interface Interval {
440
+ /** The day the interval accrue. Optional. The default is the day of the recurring interval's start time. */
441
+ daysOfWeek?: Day;
442
+ /** The hour of the day the interval accrue. must be consistent with the Interval start time. Options. The default is 0. minimum: 0, maximum: 23. */
443
+ hourOfDay?: number | null;
444
+ /** The minutes of hour the interval accrue. must be consistent with the Interval end time. Options. The default is 0. minimum: 0, maximum: 59. */
445
+ minuteOfHour?: number | null;
446
+ /** The duration of the interval in minutes. Required. Part of the session end time calculation. minimum: 1, maximum: 86400. */
447
+ duration?: number;
448
+ }
449
+ export declare enum Day {
450
+ /** Undefined. */
451
+ UNDEFINED = "UNDEFINED",
452
+ /** Monday. */
453
+ MON = "MON",
454
+ /** Tuesday. */
455
+ TUE = "TUE",
456
+ /** Wednesday. */
457
+ WED = "WED",
458
+ /** Thursday. */
459
+ THU = "THU",
460
+ /** Friday. */
461
+ FRI = "FRI",
462
+ /** Saturday. */
463
+ SAT = "SAT",
464
+ /** Sunday. */
465
+ SUN = "SUN"
466
+ }
467
+ export interface Frequency {
468
+ /** The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52. */
469
+ repetition?: number | null;
470
+ }
471
+ export interface LinkedSchedule {
472
+ /** Schedule ID. */
473
+ scheduleId?: string;
474
+ /**
475
+ * Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `"BUSY"`.
476
+ * <!--ONLY:REST-->
477
+ * If set to `"BUSY"`, this schedule cannot have any available slots during the linked schedule's sessions.
478
+ * If set to `"FREE"`, this schedule can have available slots during the linked schedule's sessions.
479
+ * <!--END:ONLY:REST-->
480
+ *
481
+ * <!--ONLY:VELO
482
+ * One of:
483
+ * - `"FREE"` This schedule can have available slots during the linked schedule's sessions.
484
+ * - `"BUSY"` This schedule cannot have any available slots during the linked schedule's sessions.
485
+ * <!--END:ONLY:VELO-->
486
+ */
487
+ transparency?: Transparency;
488
+ /**
489
+ * Owner ID, of the linked schedule.
490
+ * @readonly
491
+ */
492
+ scheduleOwnerId?: string;
493
+ }
494
+ export declare enum Transparency {
495
+ UNDEFINED = "UNDEFINED",
496
+ /** The schedule can have available slots during the session. */
497
+ FREE = "FREE",
498
+ /** The schedule cannot have available slots during the session. Default value. */
499
+ BUSY = "BUSY"
500
+ }
501
+ export declare enum RecurringIntervalType {
502
+ /** The default value. Sessions for this interval will be of type EVENT. */
503
+ UNDEFINED = "UNDEFINED",
504
+ /** A recurring interval of events */
505
+ EVENT = "EVENT",
506
+ /** Deprecated */
507
+ TIME_AVAILABILITY = "TIME_AVAILABILITY",
508
+ /** A recurring interval for availability */
509
+ AVAILABILITY = "AVAILABILITY"
510
+ }
511
+ export interface Location {
512
+ /**
513
+ * Location type.
514
+ * One of:
515
+ * - `"OWNER_BUSINESS"` The business address as set in the site’s general settings.
516
+ * - `"OWNER_CUSTOM"` The address as set when creating the service.
517
+ * - `"CUSTOM"` The address set for the individual session.
518
+ */
519
+ locationType?: LocationType;
520
+ /** Free text address used when locationType is `OWNER_CUSTOM`. */
521
+ address?: string | null;
522
+ /** Custom address, used when locationType is `"OWNER_CUSTOM"`. Might be used when locationType is `"CUSTOM"` in case the owner sets a custom address for the session which is different from the default. */
523
+ customAddress?: Address;
524
+ /**
525
+ * Valid when `locationType` is `OWNER_BUSINESS`. Defaults to the business's location.
526
+ *
527
+ * `businessSchedule` is not supported by Wix Bookings
528
+ */
529
+ businessLocation?: LocationsLocation;
530
+ }
531
+ export declare enum LocationType {
532
+ UNDEFINED = "UNDEFINED",
533
+ OWNER_BUSINESS = "OWNER_BUSINESS",
534
+ OWNER_CUSTOM = "OWNER_CUSTOM",
535
+ CUSTOM = "CUSTOM"
536
+ }
537
+ /** Physical address */
538
+ export interface Address extends AddressStreetOneOf {
539
+ /** Country code. */
540
+ country?: string | null;
541
+ /** Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
542
+ subdivision?: string | null;
543
+ /** City name. */
544
+ city?: string | null;
545
+ /** Zip/postal code. */
546
+ postalCode?: string | null;
547
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
548
+ addressLine2?: string | null;
549
+ /** A string containing the full address of this location. */
550
+ formattedAddress?: string | null;
551
+ /** Free text to help find the address. */
552
+ hint?: string | null;
553
+ /** Coordinates of the physical address. */
554
+ geocode?: AddressLocation;
555
+ /** Country full name. */
556
+ countryFullname?: string | null;
557
+ /** Multi-level subdivisions from top to bottom. */
558
+ subdivisions?: Subdivision[];
559
+ /** Street name, number and apartment number. */
560
+ streetAddress?: StreetAddress;
561
+ /** Main address line, usually street and number, as free text. */
562
+ addressLine?: string | null;
563
+ }
564
+ /** @oneof */
565
+ export interface AddressStreetOneOf {
566
+ /** Street name, number and apartment number. */
567
+ streetAddress?: StreetAddress;
568
+ /** Main address line, usually street and number, as free text. */
569
+ addressLine?: string | null;
570
+ }
571
+ export interface StreetAddress {
572
+ /** Street number. */
573
+ number?: string;
574
+ /** Street name. */
575
+ name?: string;
576
+ /** Apartment number. */
577
+ apt?: string;
578
+ }
579
+ export interface AddressLocation {
580
+ /** Address latitude. */
581
+ latitude?: number | null;
582
+ /** Address longitude. */
583
+ longitude?: number | null;
584
+ }
585
+ export interface Subdivision {
586
+ /** Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
587
+ code?: string;
588
+ /** Subdivision full name. */
589
+ name?: string;
590
+ }
591
+ export interface LocationsLocation {
592
+ /**
593
+ * Location ID.
594
+ * @readonly
595
+ */
596
+ _id?: string | null;
597
+ /** Location name. */
598
+ name?: string;
599
+ /** Location description. */
600
+ description?: string | null;
601
+ /**
602
+ * Whether this is the default location. There can only be one default location per site. The default location can't be archived.
603
+ * @readonly
604
+ */
605
+ default?: boolean;
606
+ /**
607
+ * Location status. Defaults to `ACTIVE`.
608
+ * __Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)
609
+ * doesn't affect the location's status. `INACTIVE` is currently not supported.
610
+ */
611
+ status?: LocationStatus;
612
+ /** Location type. **Note:** Currently not supported. */
613
+ locationType?: LocationsLocationType;
614
+ /** Fax number. */
615
+ fax?: string | null;
616
+ /** Timezone in `America/New_York` format. */
617
+ timeZone?: string | null;
618
+ /** Email address. */
619
+ email?: string | null;
620
+ /** Phone number. */
621
+ phone?: string | null;
622
+ /** Address. */
623
+ address?: LocationsAddress;
624
+ /**
625
+ * Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.
626
+ *
627
+ * __Note:__ Not supported by Wix Bookings.
628
+ */
629
+ businessSchedule?: BusinessSchedule;
630
+ /**
631
+ * Revision number, which increments by 1 each time the location is updated.
632
+ * To prevent conflicting changes, the existing revision must be used when updating a location.
633
+ */
634
+ revision?: string | null;
635
+ /**
636
+ * Whether the location is archived. Archived locations can't be updated.
637
+ * __Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)
638
+ * doesn't affect its `status`.
639
+ * @readonly
640
+ */
641
+ archived?: boolean;
642
+ }
643
+ /** For future use */
644
+ export declare enum LocationStatus {
645
+ ACTIVE = "ACTIVE",
646
+ INACTIVE = "INACTIVE"
647
+ }
648
+ /** For future use */
649
+ export declare enum LocationsLocationType {
650
+ UNKNOWN = "UNKNOWN",
651
+ BRANCH = "BRANCH",
652
+ OFFICES = "OFFICES",
653
+ RECEPTION = "RECEPTION",
654
+ HEADQUARTERS = "HEADQUARTERS"
655
+ }
656
+ export interface LocationsAddress {
657
+ /** 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */
658
+ country?: string | null;
659
+ /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */
660
+ subdivision?: string | null;
661
+ /** City name. */
662
+ city?: string | null;
663
+ /** Postal or zip code. */
664
+ postalCode?: string | null;
665
+ /** Street address. Includes street name, number, and apartment number in separate fields. */
666
+ streetAddress?: LocationsStreetAddress;
667
+ }
668
+ /** Street address. Includes street name, number, and apartment number in separate fields. */
669
+ export interface LocationsStreetAddress {
670
+ /** Street number. */
671
+ number?: string;
672
+ /** Street name. */
673
+ name?: string;
674
+ /** Apartment number. */
675
+ apt?: string;
676
+ }
677
+ /** Address Geolocation */
678
+ export interface LocationsAddressLocation {
679
+ /** Latitude of the location. Must be between -90 and 90. */
680
+ latitude?: number | null;
681
+ /** Longitude of the location. Must be between -180 and 180. */
682
+ longitude?: number | null;
683
+ }
684
+ /** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */
685
+ export interface BusinessSchedule {
686
+ /** Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods. */
687
+ periods?: TimePeriod[];
688
+ /** Exceptions to the business's regular hours. The business can be open or closed during the exception. */
689
+ specialHourPeriod?: SpecialHourPeriod[];
690
+ }
691
+ /** Weekly recurring time periods when the business is regularly open or the service is available. */
692
+ export interface TimePeriod {
693
+ /** Day of the week the period starts on. */
694
+ openDay?: DayOfWeek;
695
+ /**
696
+ * Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents
697
+ * midnight at the end of the specified day.
698
+ */
699
+ openTime?: string;
700
+ /** Day of the week the period ends on. */
701
+ closeDay?: DayOfWeek;
702
+ /**
703
+ * Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents
704
+ * midnight at the end of the specified day.
705
+ *
706
+ * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.
707
+ */
708
+ closeTime?: string;
709
+ }
710
+ /** Enumerates the days of the week. */
711
+ export declare enum DayOfWeek {
712
+ MONDAY = "MONDAY",
713
+ TUESDAY = "TUESDAY",
714
+ WEDNESDAY = "WEDNESDAY",
715
+ THURSDAY = "THURSDAY",
716
+ FRIDAY = "FRIDAY",
717
+ SATURDAY = "SATURDAY",
718
+ SUNDAY = "SUNDAY"
719
+ }
720
+ /** Exception to the business's regular hours. The business can be open or closed during the exception. */
721
+ export interface SpecialHourPeriod {
722
+ /** Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */
723
+ startDate?: string;
724
+ /** End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */
725
+ endDate?: string;
726
+ /**
727
+ * Whether the business is closed (or the service is not available) during the exception.
728
+ *
729
+ * Default: `true`.
730
+ */
731
+ isClosed?: boolean;
732
+ /** Additional info about the exception. For example, "We close earlier on New Year's Eve." */
733
+ comment?: string;
734
+ }
735
+ export interface Rate {
736
+ /**
737
+ * Mapping between a named price option, for example, adult or child prices, and the price, currency, and down payment amount.
738
+ * When present in an update request, the `default_varied_price` is ignored to support backward compatibility.
739
+ */
740
+ labeledPriceOptions?: Record<string, Price>;
741
+ /**
742
+ * Textual price information used when **Price Per Session** is set to **Custom Price** in the app's service details page.
743
+ * When present in an update request, the `default_varied_price` is ignored to support backward compatibility.
744
+ */
745
+ priceText?: string | null;
746
+ }
747
+ export interface Price {
748
+ /** Required payment amount. */
749
+ amount?: string;
750
+ /** Currency in which the amount is quoted. */
751
+ currency?: string;
752
+ /** Amount of a down payment or deposit as part of the transaction. */
753
+ downPayAmount?: string;
754
+ }
755
+ /**
756
+ * <!-- Needs updating when recurrence has been tested
757
+ * Schedule's availability calculation is executed by the schedule's available intervals and this additional information.
758
+ * Schedule's available intervals are recurring intervals (defined in the schedule) minus sessions that has no more spots for bookings (including time between_slots), or schedule's sessions with open spots for bookings.-->
759
+ */
760
+ export interface Availability {
761
+ /** Date and time the schedule starts to be available for booking. */
762
+ start?: Date;
763
+ /** Date and time the schedule stops being available for booking. No value indicates no end time. */
764
+ end?: Date;
765
+ /** Other schedules that impact the availability calculation. Relevant only when there are availability constraints. */
766
+ linkedSchedules?: LinkedSchedule[];
767
+ /** Constraints for calculating the schedule's availability. */
768
+ constraints?: AvailabilityConstraints;
769
+ }
770
+ /** Describes how to calculate the specific slots that are available for booking. */
771
+ export interface AvailabilityConstraints {
772
+ /**
773
+ * A list of duration options for slots, in minutes. Minimum value for a duration is 1.
774
+ * The availability calculation generates slots with these durations, where there is no conflict with existing sessions or other availability constraints.
775
+ */
776
+ slotDurations?: number[];
777
+ /**
778
+ * The number of minutes between the `end` of one slot, and the `start` of the next.
779
+ * Minimum value is 0, maximum value is 120.
780
+ */
781
+ timeBetweenSlots?: number;
782
+ /**
783
+ * Specify how to split the slots in intervals of minutes.
784
+ * This value indicates the time between available slots' start time. e.g., from 5 minute slots (3:00, 3:05, 3:15) and 1 hour slots (3:00, 4:00, 5:00).
785
+ * Optional. The default is the first duration in slot_durations field.
786
+ * Deprecated. Use the `split_slots_interval.value_in_minutes`.
787
+ */
788
+ splitInterval?: number | null;
789
+ /**
790
+ * An object defining the time between available slots' start times. For example, a slot with slots_split_interval=5 can start every 5 minutes. The default is the slot duration.
791
+ * @readonly
792
+ */
793
+ slotsSplitInterval?: SplitInterval;
794
+ }
795
+ /** The time between available slots' start times. For example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc. */
796
+ export interface SplitInterval {
797
+ /**
798
+ * Whether the slot duration is used as the split interval value.
799
+ * If `same_as_duration` is `true`, the `value_in_minutes` is the sum of the first duration in
800
+ * `schedule.availabilityConstraints.SlotDurations` field, and `schedule.availabilityConstraints.TimeBetweenSlots` field.
801
+ */
802
+ sameAsDuration?: boolean | null;
803
+ /** Number of minutes between available slots' start times when `same_as_duration` is `false`. */
804
+ valueInMinutes?: number | null;
805
+ }
806
+ export interface Participant {
807
+ /** Participant ID. Currently represents the booking.id. */
808
+ _id?: string;
809
+ /** Contact ID. */
810
+ contactId?: string | null;
811
+ /** Participant's name. */
812
+ name?: string | null;
813
+ /** Participant's phone number. */
814
+ phone?: string | null;
815
+ /** Participant's email address. */
816
+ email?: string | null;
817
+ /** Group or party size. The number of people attending. Defaults to 0. Maximum is 250. */
818
+ partySize?: number;
819
+ /**
820
+ * Approval status for the participant.
821
+ * <!-- Commented out untill updateParticipant is exposed Generally the same status as the booking, unless updated using the `updateParticipant()` API. Defaults to `"UNDEFINED"`.-->
822
+ * <!--ONLY:VELO
823
+ * One of:
824
+ * - `"PENDING"` Pending business approval.
825
+ * - `"APPROVED"` Approved by the business.
826
+ * - `"DECLINED"` Declined by the business.
827
+ * <!--END:ONLY:VELO-->
828
+ */
829
+ approvalStatus?: ApprovalStatus;
830
+ /**
831
+ * Whether the participant was inherited from the schedule, as opposed to being booked directly to the session.
832
+ * @readonly
833
+ */
834
+ inherited?: boolean;
835
+ }
836
+ export declare enum ApprovalStatus {
837
+ /** Default. */
838
+ UNDEFINED = "UNDEFINED",
839
+ /** Pending business approval. */
840
+ PENDING = "PENDING",
841
+ /** Approved by the business. */
842
+ APPROVED = "APPROVED",
843
+ /** Declined by the business. */
844
+ DECLINED = "DECLINED"
845
+ }
846
+ export interface ExternalCalendarOverrides {
847
+ /** Synced title of the external calendar event. */
848
+ title?: string | null;
849
+ /** Synced description of the external calendar event. */
850
+ description?: string | null;
851
+ }
852
+ export declare enum ScheduleStatus {
853
+ UNDEFINED = "UNDEFINED",
854
+ /** The default value when the schedule is created. */
855
+ CREATED = "CREATED",
856
+ /** The schedule has been canceled. */
857
+ CANCELLED = "CANCELLED"
858
+ }
859
+ export interface Version {
860
+ /** Schedule version number, updated each time the schedule is updated. */
861
+ scheduleVersion?: number | null;
862
+ /** Participants version number, updated each time the schedule participants are updated. */
863
+ participantsVersion?: number | null;
864
+ }
865
+ export interface ConferenceProvider {
866
+ /** Conferencing provider ID */
867
+ providerId?: string;
868
+ }
869
+ export interface CalendarConference {
870
+ /** Wix Calendar conference ID. */
871
+ _id?: string;
872
+ /** Conference meeting ID in the provider's conferencing system. */
873
+ externalId?: string;
874
+ /** Conference provider ID. */
875
+ providerId?: string;
876
+ /** URL used by the host to start the conference. */
877
+ hostUrl?: string;
878
+ /** URL used by a guest to join the conference. */
879
+ guestUrl?: string;
880
+ /** Password to join the conference. */
881
+ password?: string | null;
882
+ /** Conference description. */
883
+ description?: string | null;
884
+ /**
885
+ * Conference type.
886
+ * <!--ONLY:VELO
887
+ * One of:
888
+ * - `"ONLINE_MEETING_PROVIDER"` API-generated online meeting.
889
+ * - `"CUSTOM"` User-defined meeting.
890
+ * <!--END:ONLY:VELO-->
891
+ */
892
+ conferenceType?: ConferenceType;
893
+ /** Account owner id in vc service */
894
+ accountOwnerId?: string | null;
895
+ }
896
+ export declare enum ConferenceType {
897
+ UNDEFINED = "UNDEFINED",
898
+ /** API-generated online meeting. */
899
+ ONLINE_MEETING_PROVIDER = "ONLINE_MEETING_PROVIDER",
900
+ /** User-defined meeting. */
901
+ CUSTOM = "CUSTOM"
902
+ }
903
+ export declare enum ResourceStatus {
904
+ UNDEFINED = "UNDEFINED",
905
+ /** Default status. */
906
+ CREATED = "CREATED",
907
+ /** The resource was deleted. */
908
+ DELETED = "DELETED",
909
+ /** The resource was updated. */
910
+ UPDATED = "UPDATED"
911
+ }
912
+ export declare enum Event {
913
+ UNDEFINED = "UNDEFINED",
914
+ Updated = "Updated",
915
+ Deleted = "Deleted",
916
+ Created = "Created",
917
+ Schedule_Updated = "Schedule_Updated"
918
+ }
919
+ export interface Empty {
920
+ }
921
+ /** An event sent in the system once the service is changed. */
922
+ export interface ServiceNotification {
923
+ /** Updated service entity. */
924
+ service?: Service;
925
+ event?: ServiceNotificationEvent;
926
+ policy?: BusinessServicesPolicy;
927
+ }
928
+ /** A service describes the business offering that a business provides to its customers. */
929
+ export interface Service {
930
+ /**
931
+ * Service ID.
932
+ * @readonly
933
+ */
934
+ _id?: string | null;
935
+ /** Information about the service. */
936
+ info?: ServiceInfo;
937
+ /** Description of the bookings policy for the service. */
938
+ policy?: BookingPolicy;
939
+ /** Payment options available for use when booking the service. */
940
+ paymentOptions?: PaymentOptions;
941
+ /** ID of the category to which the service belongs. */
942
+ categoryId?: string | null;
943
+ /** ID of the form that visitors fill out when booking the service. */
944
+ bookingFormId?: string | null;
945
+ /**
946
+ * List of schedule IDs for the sessions and slots that can be booked for the service.
947
+ * The list can include schedules with any `status` values, however the Bookings application only uses the schedules with a `status` of `"CREATED"`. There is only one schedule with a status of `"CREATED"` per service. The ID of that schedule must always be the first in the list.
948
+ * @readonly
949
+ */
950
+ scheduleIds?: string[];
951
+ /** Set of custom properties for the service. */
952
+ customProperties?: Record<string, string>;
953
+ /**
954
+ * Service status.
955
+ * @readonly
956
+ */
957
+ status?: ServiceStatus;
958
+ /** Sort order of the service within its category. */
959
+ sortOrder?: number | null;
960
+ /** Advanced SEO data */
961
+ advancedSeoData?: SeoSchema;
962
+ /** SEO data */
963
+ seoData?: SeoSchema;
964
+ /** Whether a conference is to be generated for the service. */
965
+ includeConferenceOption?: boolean | null;
966
+ }
967
+ /** Information describing the service. */
968
+ export interface ServiceInfo {
969
+ /** Service name. */
970
+ name?: string | null;
971
+ /** Service description. */
972
+ description?: string | null;
973
+ /** Images associated with the service. Deprecated. */
974
+ images?: string[];
975
+ /** Short service description. */
976
+ tagLine?: string | null;
977
+ /** Images associated with the service. Optional. Not supported yet. */
978
+ media?: Media;
979
+ }
980
+ export interface Media {
981
+ /** Images associated with the service. */
982
+ items?: MediaItem[];
983
+ /** Primary image associated with the service. */
984
+ mainMedia?: MediaItem;
985
+ /** Cover image associated with the service. */
986
+ coverMedia?: MediaItem;
987
+ }
988
+ export interface MediaItem extends MediaItemItemOneOf {
989
+ /** Image metadata. */
990
+ image?: string;
991
+ }
992
+ /** @oneof */
993
+ export interface MediaItemItemOneOf {
994
+ /** Image metadata. */
995
+ image?: string;
996
+ }
997
+ /** A set of rules defining the policies for booking the service for visitors and members. */
998
+ export interface BookingPolicy {
999
+ /** Maximum number of participants for a single booking. Defaults to 1. */
1000
+ maxParticipantsPerBooking?: number | null;
1001
+ /** Minimum number of minutes before the start of a session that a booking can be made. For a schedule, this is relative to the start time of the next session, excluding past sessions. Default value is taken form BusinessServicesPolicy. */
1002
+ bookUpToXMinutesBefore?: number | null;
1003
+ /** Minimum number of minutes before the start of a session that a booking can be canceled or rescheduled. Default value is taken form BusinessServicesPolicy. */
1004
+ cancelRescheduleUpToXMinutesBefore?: number | null;
1005
+ /** Whether online booking is available. Defaults to true. */
1006
+ isBookOnlineAllowed?: boolean | null;
1007
+ /** Whether bookings for the service can be canceled. Defaults to true. */
1008
+ isCancelAllowed?: boolean | null;
1009
+ /** Whether bookings for the service can be rescheduled. Defaults to true. */
1010
+ isRescheduleAllowed?: boolean | null;
1011
+ /** How far in advance a booking can be made. Default value is taken form BusinessServicesPolicy. */
1012
+ futureBookingsPolicy?: FutureBookingPolicy;
1013
+ /** Waitlist policy for the service. Default value is taken form BusinessServicesPolicy. */
1014
+ waitingListPolicy?: WaitingListPolicy;
1015
+ /** Bookings approval policy for the service. Empty by default. */
1016
+ bookingsApprovalPolicy?: BookingsApprovalPolicy;
1017
+ /**
1018
+ * A list of booking policy field names of fields that override the respective values of the default business booking policy.
1019
+ * Currently only 'service.policy.bookUpToXMinutesBefore' field is supported
1020
+ */
1021
+ overrideBusinessPolicyFields?: string[];
1022
+ }
1023
+ export interface FutureBookingPolicy {
1024
+ /** Whether a limit is imposed on advance bookings. */
1025
+ shouldLimit?: boolean | null;
1026
+ /** How far in advance, in minutes, a session can be booked. Defaults to 10,080 minutes (3 days). */
1027
+ limitXMinutesToTheFuture?: number | null;
1028
+ }
1029
+ export interface WaitingListPolicy {
1030
+ /** Whether waitlisting is enabled for the service. */
1031
+ isEnabled?: boolean | null;
1032
+ /** Number of spots available in the waitlist. Defaults to 10 spots. */
1033
+ capacity?: number | null;
1034
+ /** Amount of time a participant is given to book, once notified that a spot is available. Defaults to 10 minutes. */
1035
+ timeWindowMinutes?: number | null;
1036
+ }
1037
+ export interface BookingsApprovalPolicy {
1038
+ /** Whether bookings to the service require approval. */
1039
+ isBusinessApprovalRequired?: boolean | null;
1040
+ /** Whether the booking requests affect the session or slot availability. For example, 3 booking requests for a 10-person session will cause the session to have 7 available spots, before the requests are approved. */
1041
+ requestsAffectsAvailability?: boolean | null;
1042
+ }
1043
+ /**
1044
+ * Payment options for the service. Multiple payment options can be enabled. For example:
1045
+ * For a service to be paid only online using WiX, then set wix_pay_online=true and the rest should be set to false.
1046
+ * For a service to accept payment online via Wix or in person, set the wix_pay_online=true & wix_pay_in_person=true.
1047
+ */
1048
+ export interface PaymentOptions {
1049
+ /** Whether a booking made for the service can be paid online through Wix. */
1050
+ wixPayOnline?: boolean | null;
1051
+ /** Whether a booking made for the service can be paid in person. */
1052
+ wixPayInPerson?: boolean | null;
1053
+ /** Whether a booking made for the service can be paid in a customized way, defined by the API. */
1054
+ custom?: boolean | null;
1055
+ /** Whether a booking made for the service can be paid using Wix Pricing Plans. */
1056
+ wixPaidPlan?: boolean | null;
1057
+ }
1058
+ export declare enum ServiceStatus {
1059
+ /** The default service status. */
1060
+ CREATED = "CREATED",
1061
+ /** The service is deleted. */
1062
+ DELETED = "DELETED"
1063
+ }
1064
+ /**
1065
+ * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
1066
+ * The search engines use this information for ranking purposes, or to display snippets in the search results.
1067
+ * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
1068
+ */
1069
+ export interface SeoSchema {
1070
+ /** SEO tags information. */
1071
+ tags?: Tag[];
1072
+ /** SEO general settings. */
1073
+ settings?: Settings;
1074
+ }
1075
+ export interface Keyword {
1076
+ /** Keyword value */
1077
+ term?: string;
1078
+ /** Whether the keyword is the main focused */
1079
+ isMain?: boolean;
1080
+ }
1081
+ export interface Tag {
1082
+ /**
1083
+ * SEO tag type.
1084
+ *
1085
+ *
1086
+ * Supported values: `title`, `meta`, `script`, `link`.
1087
+ */
1088
+ type?: string;
1089
+ /**
1090
+ * A `{'key':'value'} pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.
1091
+ * For example: `{'name': 'description', 'content': 'the description itself'}`.
1092
+ */
1093
+ props?: Record<string, any> | null;
1094
+ /** SEO tag meta data. For example, `{height: 300, width: 240}`. */
1095
+ meta?: Record<string, any> | null;
1096
+ /** SEO tag inner content. For example, `<title> inner content </title>`. */
1097
+ children?: string;
1098
+ /** Whether the tag is a custom tag. */
1099
+ custom?: boolean;
1100
+ /** Whether the tag is disabled. */
1101
+ disabled?: boolean;
1102
+ }
1103
+ export interface Settings {
1104
+ /**
1105
+ * Whether the auto redirects feature creating `301 redirects` on a slug change is enabled.
1106
+ *
1107
+ *
1108
+ * Default: enabled
1109
+ */
1110
+ preventAutoRedirect?: boolean;
1111
+ /** User-selected keyword terms for a specific page */
1112
+ keywords?: Keyword[];
1113
+ }
1114
+ export declare enum ServiceNotificationEvent {
1115
+ Unspecified = "Unspecified",
1116
+ Updated = "Updated",
1117
+ Deleted = "Deleted",
1118
+ Created = "Created"
1119
+ }
1120
+ /**
1121
+ * Defines the Bookings Policy applied to the business's services. The policy can be overridden for a service when setting the `Service.BookingsPolicy` property.
1122
+ * Unless overridden, each service inherits the settings in the business policy.
1123
+ */
1124
+ export interface BusinessServicesPolicy {
1125
+ /** Minimum amount of time to make a booking before the start of the booked item. For sessions, this is relative to the start time of the session. For schedules, this is relative to the start time of the first session, excluding past sessions. Defaults to 0. */
1126
+ bookUpToXMinutesBefore?: number | null;
1127
+ /** Minimum time that a booking can be canceled or rescheduled before the session starts. Defaults to 0. */
1128
+ cancelRescheduleUpToXMinutesBefore?: number | null;
1129
+ /** An object specifying how far in advance a booking can be made. */
1130
+ futureBookingsPolicy?: FutureBookingPolicy;
1131
+ /** Waitlist policy for the service. Empty by default. */
1132
+ waitingListPolicy?: WaitingListPolicy;
1133
+ /** User defined cancellation policy message. */
1134
+ cancellationPolicy?: string | null;
1135
+ }
1136
+ export interface ScheduleNotification extends ScheduleNotificationEventOneOf {
1137
+ preserveFutureSessionsWithParticipants?: boolean | null;
1138
+ /** Whether to notify participants about changed sessions. deprecated, use participant_notification */
1139
+ notifyParticipants?: boolean;
1140
+ /** site properties. Optional. Given in create schedule notification. */
1141
+ siteProperties?: SitePropertiesOnScheduleCreation;
1142
+ instanceId?: string;
1143
+ scheduleCreated?: ScheduleCreated;
1144
+ scheduleUpdated?: ScheduleUpdated;
1145
+ scheduleCancelled?: ScheduleCancelled;
1146
+ sessionCreated?: SessionCreated;
1147
+ sessionUpdated?: SessionUpdated;
1148
+ sessionCancelled?: SessionCancelled;
1149
+ availabilityPolicyUpdated?: AvailabilityPolicyUpdated;
1150
+ intervalSplit?: IntervalSplit;
1151
+ recurringSessionSplit?: RecurringSessionSplit;
1152
+ /** Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead. */
1153
+ scheduleUnassignedFromUser?: ScheduleUnassignedFromUser;
1154
+ /** supported only for schedule migration apis. */
1155
+ multipleSessionsCreated?: MultipleSessionsCreated;
1156
+ /** supported only for schedule migration apis. */
1157
+ migrationEvent?: MigrationEvent;
1158
+ }
1159
+ /** @oneof */
1160
+ export interface ScheduleNotificationEventOneOf {
1161
+ scheduleCreated?: ScheduleCreated;
1162
+ scheduleUpdated?: ScheduleUpdated;
1163
+ scheduleCancelled?: ScheduleCancelled;
1164
+ sessionCreated?: SessionCreated;
1165
+ sessionUpdated?: SessionUpdated;
1166
+ sessionCancelled?: SessionCancelled;
1167
+ availabilityPolicyUpdated?: AvailabilityPolicyUpdated;
1168
+ intervalSplit?: IntervalSplit;
1169
+ recurringSessionSplit?: RecurringSessionSplit;
1170
+ /** Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead. */
1171
+ scheduleUnassignedFromUser?: ScheduleUnassignedFromUser;
1172
+ /** supported only for schedule migration apis. */
1173
+ multipleSessionsCreated?: MultipleSessionsCreated;
1174
+ /** supported only for schedule migration apis. */
1175
+ migrationEvent?: MigrationEvent;
1176
+ }
1177
+ export interface ScheduleCreated {
1178
+ schedule?: Schedule;
1179
+ }
1180
+ export interface ScheduleUpdated {
1181
+ /** The old schedule before the update. */
1182
+ oldSchedule?: Schedule;
1183
+ /** The new schedule after the update. */
1184
+ newSchedule?: Schedule;
1185
+ /**
1186
+ * Recurring sessions updated event. If this field is given, the reason for the schedule updated event was
1187
+ * updating at least one of the given schedule's recurring sessions.
1188
+ * This event is triggered by create/update/delete recurring session apis.
1189
+ */
1190
+ recurringSessions?: RecurringSessionsUpdated;
1191
+ /** Whether to notify participants about the change and an optional custom message */
1192
+ participantNotification?: ParticipantNotification;
1193
+ /**
1194
+ * Whether this notification was created as a result of an anonymization request, such as GDPR.
1195
+ * An anonymized participant will have the following details:
1196
+ * name = "deleted"
1197
+ * phone = "deleted"
1198
+ * email = "deleted@deleted.com"
1199
+ */
1200
+ triggeredByAnonymizeRequest?: boolean | null;
1201
+ }
1202
+ export interface RecurringSessionsUpdated {
1203
+ /** Old schedule's recurring session list. */
1204
+ oldRecurringSessions?: Session[];
1205
+ /** New schedule's recurring session list. */
1206
+ newRecurringSessions?: Session[];
1207
+ }
1208
+ export interface Session {
1209
+ /**
1210
+ * Session ID.
1211
+ * @readonly
1212
+ */
1213
+ _id?: string | null;
1214
+ /** ID of the schedule that the session belongs to. */
1215
+ scheduleId?: string;
1216
+ /**
1217
+ * ID of the resource or service that the session's schedule belongs to.
1218
+ * @readonly
1219
+ */
1220
+ scheduleOwnerId?: string | null;
1221
+ /** Original start date and time of the session in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format. */
1222
+ originalStart?: Date;
1223
+ /** An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`. */
1224
+ start?: CalendarDateTime;
1225
+ /**
1226
+ * An object specifying the end date and time of the session. The `end` time must be after the `start` time and be same type as `start`.
1227
+ * If the session is a recurring session, `end` must contain a `localDateTime`.
1228
+ */
1229
+ end?: CalendarDateTime;
1230
+ /**
1231
+ * An object specifying a list of schedules and the way each schedule's availability is affected by the session. For example, the schedule of an instructor is affected by sessions of the class that they instruct.
1232
+ * The array is inherited from the schedule and can be overridden even if the session is a recurring session.
1233
+ */
1234
+ affectedSchedules?: LinkedSchedule[];
1235
+ /**
1236
+ * Session title.
1237
+ * The value is inherited from the schedule and can be overridden unless the session is a recurring session.
1238
+ */
1239
+ title?: string | null;
1240
+ /**
1241
+ * Tags for the session.
1242
+ * The value is inherited from the schedule and can be overridden unless the session is a recurring session.
1243
+ */
1244
+ tags?: string[] | null;
1245
+ /**
1246
+ * An object describing the location where the session takes place.
1247
+ * Defaults to the schedule location.
1248
+ * For single sessions, `session.location.businessLocation` can only be provided for locations that are defined in the schedule using `schedule.location` or `schedule.availability.locations`.
1249
+ */
1250
+ location?: Location;
1251
+ /**
1252
+ * Maximum number of participants that can be added to the session. Defaults to the schedule capacity.
1253
+ * The value is inherited from the schedule and can be overridden unless the session is a recurring session.
1254
+ */
1255
+ capacity?: number | null;
1256
+ /**
1257
+ * The price options offered for the session. Defaults to the schedule rate.
1258
+ * The value is inherited from the schedule and can be overridden unless the session is a recurring session.
1259
+ */
1260
+ rate?: Rate;
1261
+ /**
1262
+ * Time reserved after the session end time, derived from the schedule availability constraints and the time between slots. Read-only.
1263
+ * If the session is a recurring session, this field must be empty.
1264
+ */
1265
+ timeReservedAfter?: number | null;
1266
+ /**
1267
+ * Additional information about the session.
1268
+ * Notes are not supported for recurring sessions.
1269
+ */
1270
+ notes?: string;
1271
+ /**
1272
+ * The number of participants booked for the session. Read-only.
1273
+ * Calculated as the sum of the party sizes.
1274
+ * @readonly
1275
+ */
1276
+ totalNumberOfParticipants?: number;
1277
+ /**
1278
+ * List of participants booked for the session.
1279
+ * The list includes participants who have registered for this specific session, and participants who have registered for a schedule that includes this session.
1280
+ * If the session is a recurring session, this field must be empty.
1281
+ */
1282
+ participants?: Participant[];
1283
+ /**
1284
+ * A list of properties for which values were inherited from the schedule.
1285
+ * This does not include participants that were inherited from the schedule.
1286
+ * @readonly
1287
+ */
1288
+ inheritedFields?: string[];
1289
+ /**
1290
+ * Title and description values to override session defaults when syncing to an external calendar.
1291
+ * Learn more about [syncing calendars](https://support.wix.com/en/article/wix-bookings-important-information-about-syncing-google-calendars-with-wix-bookings).
1292
+ * The value is inherited from the schedule and can be overridden unless the session is a recurring session.
1293
+ */
1294
+ externalCalendarOverrides?: ExternalCalendarOverrides;
1295
+ /**
1296
+ * Session status.
1297
+ * <!--ONLY:VELO
1298
+ * One of:
1299
+ * - `"CONFIRMED"` Default value.
1300
+ * - `"CANCELLED"` The session was deleted.
1301
+ * <!--END:ONLY:VELO-->
1302
+ * @readonly
1303
+ */
1304
+ status?: Status;
1305
+ /**
1306
+ * Recurring interval ID. Defined when a session will be a recurring session. read-only. Optional.
1307
+ * For exmaple, when creating a class service with recurring sessions, you add a recurrence rule to create recurring sessions.
1308
+ * This field is omitted for single sessions or instances of recurring sessions.
1309
+ * Specified when the session was originally generated from a schedule recurring interval.
1310
+ * Deprecated. Use `recurringSessionId`.
1311
+ * @readonly
1312
+ */
1313
+ recurringIntervalId?: string | null;
1314
+ /**
1315
+ * The ID of the recurring session if this session is an instance of a recurrence. Use this ID to update the recurrence and all of the instances.
1316
+ * @readonly
1317
+ */
1318
+ recurringSessionId?: string | null;
1319
+ /**
1320
+ * Session type.
1321
+ * <!--ONLY:VELO
1322
+ * One of:
1323
+ * - `"EVENT"` Reserved period of time on the schedule. For example, an appointment, class, course, or blocked time. Events are visible in the Dashboard in the Bookings app's [Booking Calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-bookings-calendar) page.
1324
+ * - `"WORKING_HOURS"` Placeholder for available time on a resource’s schedule.
1325
+ * <!--END:ONLY:VELO-->
1326
+ */
1327
+ type?: SessionType;
1328
+ /**
1329
+ * A conference created for the session according to the details set in the schedule's conference provider information.
1330
+ * If the session is a recurring session, this field is inherited from the schedule.
1331
+ */
1332
+ calendarConference?: CalendarConference;
1333
+ /**
1334
+ * A string representing a recurrence rule (RRULE) for a recurring session, as defined in [iCalendar RFC 5545](https://icalendar.org/iCalendar-RFC-5545/3-3-10-recurrence-rule.html).
1335
+ * If the session is an instance of a recurrence pattern, the `instanceOfRecurrence` property will be contain the recurrence rule and this property will be empty.
1336
+ * The RRULE defines a rule for repeating a session.
1337
+ * Supported parameters are:
1338
+ *
1339
+ * |Keyword|Description|Supported values|
1340
+ * |--|--|---|
1341
+ * |`FREQ`|The frequency at which the session is recurs. Required.|`WEEKLY`|
1342
+ * |`INTERVAL`|How often, in terms of `FREQ`, the session recurs. Default is 1. Optional.|
1343
+ * |`UNTIL`|The UTC end date and time of the recurrence. Optional.|
1344
+ * |`BYDAY`|Day of the week when the event should recur. Required.|One of: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`|
1345
+ *
1346
+ *
1347
+ * For example, a session that repeats every second week on a Monday until January 7, 2022 at 8 AM:
1348
+ * `"FREQ=WEEKLY;INTERVAL=2;BYDAY=MO;UNTIL=20220107T080000Z"`
1349
+ *
1350
+ * <!--ORIGINAL COMMENTS:
1351
+ * `FREQ` — The frequency with which the session should be repeated (such as DAILY or WEEKLY).
1352
+ * Supported `WEEKLY` value is supported.
1353
+ * INTERVAL — Works together with FREQ to specify how often the session should be repeated. For example, FREQ=WEEKLY;INTERVAL=2 means once every two weeks. Optional. Default value is 1.
1354
+ * COUNT — The number of times this event should be repeated. Not yet supported.
1355
+ * UNTIL — The UTC date & time until which the session should be repeated. This parameter is optional. When it is not specified, the event repeats forever.
1356
+ * The format is a short ISO date, followed by 'T' and a short time with seconds and without milliseconds, terminated by the UTC designator 'Z'. For example, until Jan. 19th 2018 at 7:00 AM: 'UNTIL=20180119T070000Z'.
1357
+ * BYDAY - The days of the week when the event should be repeated. Currently, only a single day is supported. This parameter is mandatory.
1358
+ * Possible values are: MO, TU, WE, TH, FR, SA, SU
1359
+ * Note that DTSTART and DTEND lines are not allowed in this field; session start and end times are specified in the start and end fields.
1360
+ * **Example**: FREQ=WEEKLY;INTERVAL=2;BYDAY=MO;UNTIL=20200427T070000Z
1361
+ * ORIGINAL COMMENTS-->
1362
+ */
1363
+ recurrence?: string | null;
1364
+ /**
1365
+ * A string representing a recurrence rule (RRULE) if the session is an instance of a recurrence pattern.
1366
+ * Empty when the session is not an instance of a recurrence rule, or if the session defines a recurrence pattern, and `recurrence` is not empty.
1367
+ * @readonly
1368
+ */
1369
+ instanceOfRecurrence?: string | null;
1370
+ }
1371
+ export interface CalendarDateTime {
1372
+ /**
1373
+ * UTC date-time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format. If a timezone offset is specified, the time is converted to UTC. For example, if you specify `new Date('2021-01-06T16:00:00.000-07:00')`, the stored value will be `"2021-01-06T23:00:00.000Z"`.
1374
+ * Required if `localDateTime` is not specified.
1375
+ * If `localDateTime` is specified, `timestamp` is calculated as `localDateTime`, using the business's timezone.
1376
+ */
1377
+ timestamp?: Date;
1378
+ /** An object containing the local date and time for the business's timezone. */
1379
+ localDateTime?: LocalDateTime;
1380
+ /**
1381
+ * The time zone. Optional. derived from the schedule.timezone.
1382
+ * In case this field is associated with recurring session, this field is empty.
1383
+ * @readonly
1384
+ */
1385
+ timeZone?: string | null;
1386
+ }
1387
+ export interface LocalDateTime {
1388
+ /** Year. 4-digit format. */
1389
+ year?: number | null;
1390
+ /** Month number, from 1-12. */
1391
+ monthOfYear?: number | null;
1392
+ /** Day of the month, from 1-31. */
1393
+ dayOfMonth?: number | null;
1394
+ /** Hour of the day in 24-hour format, from 0-23. */
1395
+ hourOfDay?: number | null;
1396
+ /** Minute, from 0-59. */
1397
+ minutesOfHour?: number | null;
1398
+ }
1399
+ export interface ExternalCalendarInfo {
1400
+ /** The external calendar type (e.g. Google Calendar, iCal, etc). */
1401
+ calendarType?: CalendarType;
1402
+ }
1403
+ export declare enum CalendarType {
1404
+ UNDEFINED = "UNDEFINED",
1405
+ GOOGLE = "GOOGLE",
1406
+ I_CAL = "I_CAL",
1407
+ /** Use `MICROSOFT` instead. */
1408
+ OUTLOOK = "OUTLOOK",
1409
+ /** Use `MICROSOFT` instead. */
1410
+ OFFICE_365 = "OFFICE_365",
1411
+ MICROSOFT = "MICROSOFT",
1412
+ OTHER = "OTHER"
1413
+ }
1414
+ export declare enum Status {
1415
+ UNDEFINED = "UNDEFINED",
1416
+ /** The session is confirmed. Default status. */
1417
+ CONFIRMED = "CONFIRMED",
1418
+ /**
1419
+ * The session is cancelled.
1420
+ * A cancelled session can be the cancellation of a recurring session that should no longer be displayed or a deleted single session.
1421
+ * The ListSessions returns cancelled sessions only if 'includeDelete' flag is set to true.
1422
+ */
1423
+ CANCELLED = "CANCELLED"
1424
+ }
1425
+ export declare enum SessionType {
1426
+ UNDEFINED = "UNDEFINED",
1427
+ /**
1428
+ * The session creates an event on the calendar for the owner of the schedule that the session belongs to.
1429
+ * Default type.
1430
+ */
1431
+ EVENT = "EVENT",
1432
+ /** The session represents a resource's available working hours. */
1433
+ WORKING_HOURS = "WORKING_HOURS",
1434
+ /** Deprecated. please use WORKING_HOURS */
1435
+ TIME_AVAILABILITY = "TIME_AVAILABILITY",
1436
+ /** Deprecated. The session represents a resource's available hours. please use WORKING_HOURS */
1437
+ AVAILABILITY = "AVAILABILITY"
1438
+ }
1439
+ export interface SessionVersion {
1440
+ /** Schedule version number, updated each time the schedule is updated. */
1441
+ scheduleVersion?: number;
1442
+ /** Session version number, updated each time the session is updated. */
1443
+ sessionVersion?: number;
1444
+ }
1445
+ export interface ParticipantNotification {
1446
+ /**
1447
+ * Whether to send the message about the changes to the customer.
1448
+ *
1449
+ * Default: `false`
1450
+ */
1451
+ notifyParticipants?: boolean;
1452
+ /** Custom message to send to the participants about the changes to the booking. */
1453
+ message?: string | null;
1454
+ }
1455
+ export interface ScheduleCancelled {
1456
+ schedule?: Schedule;
1457
+ /** Whether to notify participants about the change and an optional custom message */
1458
+ participantNotification?: ParticipantNotification;
1459
+ oldSchedule?: Schedule;
1460
+ }
1461
+ export interface SessionCreated {
1462
+ session?: Session;
1463
+ }
1464
+ export interface SessionUpdated {
1465
+ oldSession?: Session;
1466
+ newSession?: Session;
1467
+ /** Whether to notify participants about the change and an optional custom message */
1468
+ participantNotification?: ParticipantNotification;
1469
+ /**
1470
+ * Whether this notification was created as a result of an anonymization request, such as GDPR.
1471
+ * An anonymized participant will have the following details:
1472
+ * name = "deleted"
1473
+ * phone = "deleted"
1474
+ * email = "deleted@deleted.com"
1475
+ */
1476
+ triggeredByAnonymizeRequest?: boolean | null;
1477
+ }
1478
+ export interface SessionCancelled {
1479
+ session?: Session;
1480
+ /** Whether to notify participants about the change and an optional custom message */
1481
+ participantNotification?: ParticipantNotification;
1482
+ }
1483
+ export interface AvailabilityPolicyUpdated {
1484
+ availabilityPolicy?: AvailabilityPolicy;
1485
+ }
1486
+ /** Availability policy applied to all site schedules. */
1487
+ export interface AvailabilityPolicy {
1488
+ /** Specify how to split the schedule slots in intervals of minutes. */
1489
+ splitInterval?: SplitInterval;
1490
+ }
1491
+ export interface IntervalSplit {
1492
+ scheduleId?: string;
1493
+ intervals?: RecurringInterval[];
1494
+ newScheduleVersion?: number | null;
1495
+ oldScheduleVersion?: number | null;
1496
+ }
1497
+ export interface RecurringSessionSplit {
1498
+ scheduleId?: string;
1499
+ recurringSessions?: Session[];
1500
+ newScheduleVersion?: number | null;
1501
+ oldScheduleVersion?: number | null;
1502
+ }
1503
+ /** Schedule unassigned from user. */
1504
+ export interface ScheduleUnassignedFromUser {
1505
+ /** The Wix user id. */
1506
+ userId?: string | null;
1507
+ /** The schedule that was unassigned from the user. */
1508
+ schedule?: Schedule;
1509
+ }
1510
+ export interface MultipleSessionsCreated {
1511
+ schedulesWithSessions?: ScheduleWithSessions[];
1512
+ }
1513
+ export interface ScheduleWithSessions {
1514
+ schedule?: Schedule;
1515
+ siteProperties?: SitePropertiesOnScheduleCreation;
1516
+ sessions?: Session[];
1517
+ }
1518
+ export interface SitePropertiesOnScheduleCreation {
1519
+ /** The global time zone value. */
1520
+ timeZone?: string | null;
1521
+ }
1522
+ export interface MigrationEvent {
1523
+ migrationData?: MigrationData;
1524
+ }
1525
+ export interface MigrationData {
1526
+ businessId?: string | null;
1527
+ staffs?: StaffData[];
1528
+ }
1529
+ export interface StaffData {
1530
+ resourceId?: string;
1531
+ syncRequestEmail?: string;
1532
+ refreshToken?: string;
1533
+ }
1534
+ export interface DomainEvent extends DomainEventBodyOneOf {
1535
+ /** random GUID so clients can tell if event was already handled */
1536
+ _id?: string;
1537
+ /**
1538
+ * Assumes actions are also always typed to an entity_type
1539
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1540
+ */
1541
+ entityFqdn?: string;
1542
+ /**
1543
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1544
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1545
+ * Example: created/updated/deleted/started/completed/email_opened
1546
+ */
1547
+ slug?: string;
1548
+ /**
1549
+ * Assuming that all messages including Actions have id
1550
+ * Example: The id of the specific order, the id of a specific campaign
1551
+ */
1552
+ entityId?: string;
1553
+ /** The time of the event. Useful if there was a delay in dispatching */
1554
+ eventTime?: Date;
1555
+ /**
1556
+ * A field that should be set if this event was triggered by an anonymize request.
1557
+ * For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.
1558
+ * NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers.
1559
+ */
1560
+ triggeredByAnonymizeRequest?: boolean | null;
1561
+ /** If present, indicates the action that triggered the event. */
1562
+ originatedFrom?: string | null;
1563
+ /**
1564
+ * A sequence number defining the order of updates to the underlying entity.
1565
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1566
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1567
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1568
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1569
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1570
+ */
1571
+ entityEventSequence?: string | null;
1572
+ createdEvent?: EntityCreatedEvent;
1573
+ updatedEvent?: EntityUpdatedEvent;
1574
+ deletedEvent?: EntityDeletedEvent;
1575
+ actionEvent?: ActionEvent;
1576
+ extendedFieldsUpdatedEvent?: ExtendedFieldsUpdatedEvent;
1577
+ }
1578
+ /** @oneof */
1579
+ export interface DomainEventBodyOneOf {
1580
+ createdEvent?: EntityCreatedEvent;
1581
+ updatedEvent?: EntityUpdatedEvent;
1582
+ deletedEvent?: EntityDeletedEvent;
1583
+ actionEvent?: ActionEvent;
1584
+ extendedFieldsUpdatedEvent?: ExtendedFieldsUpdatedEvent;
1585
+ }
1586
+ export interface EntityCreatedEvent {
1587
+ entityAsJson?: string;
1588
+ }
1589
+ export interface EntityUpdatedEvent {
1590
+ /**
1591
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1592
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1593
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1594
+ */
1595
+ currentEntityAsJson?: string;
1596
+ }
1597
+ export interface EntityDeletedEvent {
1598
+ }
1599
+ export interface ActionEvent {
1600
+ bodyAsJson?: string;
1601
+ }
1602
+ export interface ExtendedFieldsUpdatedEvent {
1603
+ currentEntityAsJson?: string;
1604
+ }
1605
+ /** Encapsulates all details written to the Greyhound topic when a site's properties are updated. */
1606
+ export interface SitePropertiesNotification {
1607
+ /** The site ID for which this update notification applies. */
1608
+ metasiteId?: string;
1609
+ /** The actual update event. */
1610
+ event?: SitePropertiesEvent;
1611
+ /** A convenience set of mappings from the MetaSite ID to its constituent services. */
1612
+ translations?: Translation[];
1613
+ /** Context of the notification */
1614
+ changeContext?: ChangeContext;
1615
+ }
1616
+ /** The actual update event for a particular notification. */
1617
+ export interface SitePropertiesEvent {
1618
+ /** Version of the site's properties represented by this update. */
1619
+ version?: number;
1620
+ /** Set of properties that were updated - corresponds to the fields in "properties". */
1621
+ fields?: string[];
1622
+ /** Updated properties. */
1623
+ properties?: Properties;
1624
+ }
1625
+ export interface Properties {
1626
+ /** Site categories. */
1627
+ categories?: Categories;
1628
+ /** Site locale. */
1629
+ locale?: Locale;
1630
+ /**
1631
+ * Site language.
1632
+ *
1633
+ * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
1634
+ */
1635
+ language?: string | null;
1636
+ /**
1637
+ * Site currency format used to bill customers.
1638
+ *
1639
+ * Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
1640
+ */
1641
+ paymentCurrency?: string | null;
1642
+ /** Timezone in `America/New_York` format. */
1643
+ timeZone?: string | null;
1644
+ /** Email address. */
1645
+ email?: string | null;
1646
+ /** Phone number. */
1647
+ phone?: string | null;
1648
+ /** Fax number. */
1649
+ fax?: string | null;
1650
+ /** Address. */
1651
+ address?: V4Address;
1652
+ /** Site display name. */
1653
+ siteDisplayName?: string | null;
1654
+ /** Business name. */
1655
+ businessName?: string | null;
1656
+ /** Path to the site's logo in Wix Media (without Wix Media base URL). */
1657
+ logo?: string | null;
1658
+ /** Site description. */
1659
+ description?: string | null;
1660
+ /**
1661
+ * Business schedule. Regular and exceptional time periods when the business is open or the service is available.
1662
+ *
1663
+ * __Note:__ Not supported by Wix Bookings.
1664
+ */
1665
+ businessSchedule?: BusinessSchedule;
1666
+ /** Supported languages of a site and the primary language. */
1667
+ multilingual?: Multilingual;
1668
+ /** Cookie policy the site owner defined for their site (before the users interacts with/limits it). */
1669
+ consentPolicy?: ConsentPolicy;
1670
+ /**
1671
+ * Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`.
1672
+ *
1673
+ * Site business type.
1674
+ */
1675
+ businessConfig?: string | null;
1676
+ }
1677
+ export interface Categories {
1678
+ /** Primary site category. */
1679
+ primary?: string;
1680
+ /** Secondary site category. */
1681
+ secondary?: string[];
1682
+ }
1683
+ export interface Locale {
1684
+ /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
1685
+ languageCode?: string;
1686
+ /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
1687
+ country?: string;
1688
+ }
1689
+ export interface V4Address {
1690
+ /** Street name. */
1691
+ street?: string;
1692
+ /** City name. */
1693
+ city?: string;
1694
+ /** Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */
1695
+ country?: string;
1696
+ /** State. */
1697
+ state?: string;
1698
+ /** Zip or postal code. */
1699
+ zip?: string;
1700
+ /** Extra information to be displayed in the address. */
1701
+ hint?: AddressHint;
1702
+ /** Whether this address represents a physical location. */
1703
+ isPhysical?: boolean;
1704
+ /** Google-formatted version of this address. */
1705
+ googleFormattedAddress?: string;
1706
+ /** Street number. */
1707
+ streetNumber?: string;
1708
+ /** Apartment number. */
1709
+ apartmentNumber?: string;
1710
+ /** Geographic coordinates of location. */
1711
+ coordinates?: GeoCoordinates;
1712
+ }
1713
+ /**
1714
+ * Extra information on displayed addresses.
1715
+ * This is used for display purposes. Used to add additional data about the address, such as "In the passage".
1716
+ * Free text. In addition the user can state where he wants that additional description - before, after, or instead
1717
+ * the address string.
1718
+ */
1719
+ export interface AddressHint {
1720
+ /** Extra text displayed next to, or instead of, the actual address. */
1721
+ text?: string;
1722
+ /** Where the extra text should be displayed. */
1723
+ placement?: PlacementType;
1724
+ }
1725
+ /** Where the extra text should be displayed: before, after or instead of the actual address. */
1726
+ export declare enum PlacementType {
1727
+ BEFORE = "BEFORE",
1728
+ AFTER = "AFTER",
1729
+ REPLACE = "REPLACE"
1730
+ }
1731
+ /** Geocoordinates for a particular address. */
1732
+ export interface GeoCoordinates {
1733
+ /** Latitude of the location. Must be between -90 and 90. */
1734
+ latitude?: number;
1735
+ /** Longitude of the location. Must be between -180 and 180. */
1736
+ longitude?: number;
1737
+ }
1738
+ export interface Multilingual {
1739
+ /** Supported languages list. */
1740
+ supportedLanguages?: SupportedLanguage[];
1741
+ /** Whether to redirect to user language. */
1742
+ autoRedirect?: boolean;
1743
+ }
1744
+ export interface SupportedLanguage {
1745
+ /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
1746
+ languageCode?: string;
1747
+ /** Locale. */
1748
+ locale?: Locale;
1749
+ /** Whether the supported language is the primary language for the site. */
1750
+ isPrimary?: boolean;
1751
+ /** Language icon. */
1752
+ countryCode?: string;
1753
+ /** How the language will be resolved. For internal use. */
1754
+ resolutionMethod?: ResolutionMethod;
1755
+ }
1756
+ export declare enum ResolutionMethod {
1757
+ QUERY_PARAM = "QUERY_PARAM",
1758
+ SUBDOMAIN = "SUBDOMAIN",
1759
+ SUBDIRECTORY = "SUBDIRECTORY"
1760
+ }
1761
+ export interface ConsentPolicy {
1762
+ /** Whether the site uses cookies that are essential to site operation. */
1763
+ essential?: boolean | null;
1764
+ /** Whether the site uses cookies that affect site performance and other functional measurements. */
1765
+ functional?: boolean | null;
1766
+ /** Whether the site uses cookies that collect analytics about how the site is used (in order to improve it). */
1767
+ analytics?: boolean | null;
1768
+ /** Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor. */
1769
+ advertising?: boolean | null;
1770
+ /** CCPA compliance flag. */
1771
+ dataToThirdParty?: boolean | null;
1772
+ }
1773
+ /** A single mapping from the MetaSite ID to a particular service. */
1774
+ export interface Translation {
1775
+ /** The service type. */
1776
+ serviceType?: string;
1777
+ /** The application definition ID; this only applies to services of type ThirdPartyApps. */
1778
+ appDefId?: string;
1779
+ /** The instance ID of the service. */
1780
+ instanceId?: string;
1781
+ }
1782
+ export interface ChangeContext extends ChangeContextPayloadOneOf {
1783
+ /** Properties were updated. */
1784
+ propertiesChange?: PropertiesChange;
1785
+ /** Default properties were created on site creation. */
1786
+ siteCreated?: SiteCreated;
1787
+ /** Properties were cloned on site cloning. */
1788
+ siteCloned?: SiteCloned;
1789
+ }
1790
+ /** @oneof */
1791
+ export interface ChangeContextPayloadOneOf {
1792
+ /** Properties were updated. */
1793
+ propertiesChange?: PropertiesChange;
1794
+ /** Default properties were created on site creation. */
1795
+ siteCreated?: SiteCreated;
1796
+ /** Properties were cloned on site cloning. */
1797
+ siteCloned?: SiteCloned;
1798
+ }
1799
+ export interface PropertiesChange {
1800
+ }
1801
+ export interface SiteCreated {
1802
+ /** Origin template site id. */
1803
+ originTemplateId?: string | null;
1804
+ }
1805
+ export interface SiteCloned {
1806
+ /** Origin site id. */
1807
+ originMetaSiteId?: string;
1808
+ }
1809
+ /**
1810
+ * Creates options and variants for a service. Note that only a single
1811
+ * `serviceOptionsAndVariants` object is supported per service.
1812
+ *
1813
+ *
1814
+ * Currently, only a single option is supported per `serviceOptionsAndVariants` object.
1815
+ *
1816
+ * Before creating the `serviceOptionsAndVariants` object you need to calculate
1817
+ * all variants, since you must pass them in the `variants` array of the
1818
+ * request. Variants aren't automatically calculated from the options. Currently,
1819
+ * services are limited to a single option. Therefore, the variants
1820
+ * array is equal to the list of all choices for custom options,
1821
+ * or all staff members providing the service for staff member based options.
1822
+ * @param serviceOptionsAndVariants - Service options and variants to create.
1823
+ * @public
1824
+ * @documentationMaturity preview
1825
+ * @requiredField serviceOptionsAndVariants
1826
+ * @requiredField serviceOptionsAndVariants.options
1827
+ * @requiredField serviceOptionsAndVariants.serviceId
1828
+ * @requiredField serviceOptionsAndVariants.variants
1829
+ */
1830
+ export declare function createServiceOptionsAndVariants(serviceOptionsAndVariants: ServiceOptionsAndVariants): Promise<CreateServiceOptionsAndVariantsResponse>;
1831
+ /**
1832
+ * Clones a `serviceOptionsAndVariants` object. This endpoint can be called, for example, when duplicating a service.
1833
+ * The result is a deep clone in which all Service Options and Service Variants are duplicated. Each Service Option
1834
+ * in the clone will have a newly generated ID that is copied to all Service Choices of the Service Variants in the
1835
+ * clone. The clone will reference the service provided in the request by `target_service_id`.
1836
+ * @param cloneFromId - ID of the `serviceOptionsAndVariants` object to clone.
1837
+ * @param targetServiceId - ID of the service that will be set for the cloned `serviceOptionsAndVariants`
1838
+ * @public
1839
+ * @documentationMaturity preview
1840
+ * @requiredField cloneFromId
1841
+ * @requiredField targetServiceId
1842
+ */
1843
+ export declare function cloneServiceOptionsAndVariants(cloneFromId: string, targetServiceId: string): Promise<CloneServiceOptionsAndVariantsResponse>;
1844
+ /**
1845
+ * Retrieves a `serviceOptionsAndVariants` object.
1846
+ * @param serviceOptionsAndVariantsId - ID of the `serviceOptionsAndVariants` object to retrieve.
1847
+ * @public
1848
+ * @documentationMaturity preview
1849
+ * @requiredField serviceOptionsAndVariantsId
1850
+ * @returns Retrieved `serviceOptionsAndVariants` object.
1851
+ */
1852
+ export declare function getServiceOptionsAndVariants(serviceOptionsAndVariantsId: string): Promise<ServiceOptionsAndVariants>;
1853
+ /**
1854
+ * Retrieves a service's options and variants by `service_id`.
1855
+ * @param serviceId - ID of the service to retrieve options and variants for.
1856
+ * @public
1857
+ * @documentationMaturity preview
1858
+ * @requiredField serviceId
1859
+ */
1860
+ export declare function getServiceOptionsAndVariantsByServiceId(serviceId: string): Promise<GetServiceOptionsAndVariantsByServiceIdResponse>;
1861
+ /**
1862
+ * Updates the specified fields of the `serviceOptionsAndVariants` object.
1863
+ *
1864
+ * Currently, only a single option is supported per `serviceOptionsAndVariants` object.
1865
+ *
1866
+ * If you want to update `variants`, you must pass the full list of supported variants.
1867
+ *
1868
+ * If you want to update `options`, you must pass the full list of supported options.
1869
+ * @param _id - ID of the `serviceOptionsAndVariants` object.
1870
+ * @public
1871
+ * @documentationMaturity preview
1872
+ * @requiredField _id
1873
+ * @requiredField serviceOptionsAndVariants
1874
+ * @requiredField serviceOptionsAndVariants.revision
1875
+ * @returns Updated `serviceOptionsAndVariants` object.
1876
+ */
1877
+ export declare function updateServiceOptionsAndVariants(_id: string | null, serviceOptionsAndVariants: UpdateServiceOptionsAndVariants, options?: UpdateServiceOptionsAndVariantsOptions): Promise<ServiceOptionsAndVariants>;
1878
+ export interface UpdateServiceOptionsAndVariants {
1879
+ /**
1880
+ * ID of the `serviceOptionsAndVariants` object.
1881
+ * @readonly
1882
+ */
1883
+ _id?: string | null;
1884
+ /** ID of the service related to these options and variants. */
1885
+ serviceId?: string | null;
1886
+ /** Service options. Note that currently only a single option is supported per service. */
1887
+ options?: ServiceOptions;
1888
+ /** Information about the service's variants. */
1889
+ variants?: ServiceVariants;
1890
+ /**
1891
+ * Price of the cheapest service variant.
1892
+ * @readonly
1893
+ */
1894
+ minPrice?: Money;
1895
+ /**
1896
+ * Price of the most expensive service variant.
1897
+ * @readonly
1898
+ */
1899
+ maxPrice?: Money;
1900
+ /**
1901
+ * Revision number, which increments by 1 each time the `serviceOptionsAndVariants` object is updated.
1902
+ * To prevent conflicting changes,
1903
+ * the current revision must be passed when updating and deleting the `serviceOptionsAndVariants` object.
1904
+ *
1905
+ * Ignored when creating a `serviceOptionsAndVariants` object.
1906
+ */
1907
+ revision?: string | null;
1908
+ }
1909
+ export interface UpdateServiceOptionsAndVariantsOptions {
1910
+ /** Field mask containing information about the fields to update. */
1911
+ mask?: string[];
1912
+ }
1913
+ /**
1914
+ * Deletes a `serviceOptionsAndVariants` object.
1915
+ *
1916
+ *
1917
+ * Since each service has only a single `serviceOptionsAndVariants` object, the
1918
+ * service won't have any supported options and variants any longer. Instead
1919
+ * the standard Wix Bookings service price calculation will be used.
1920
+ * @param serviceOptionsAndVariantsId - ID of the `serviceOptionsAndVariants` object to delete.
1921
+ * @public
1922
+ * @documentationMaturity preview
1923
+ * @requiredField serviceOptionsAndVariantsId
1924
+ */
1925
+ export declare function deleteServiceOptionsAndVariants(serviceOptionsAndVariantsId: string, options?: DeleteServiceOptionsAndVariantsOptions): Promise<void>;
1926
+ export interface DeleteServiceOptionsAndVariantsOptions {
1927
+ /** Revision of the `serviceOptionsAndVariants` object to delete. */
1928
+ revision?: string;
1929
+ }
1930
+ /**
1931
+ * Retrieves a list of `serviceOptionsAndVariants`, given the provided paging, filtering, and sorting.
1932
+ *
1933
+ * Query Service Options And Variants runs with these defaults, which you can override:
1934
+ *
1935
+ * - `id` is sorted in `ASC` order
1936
+ * - `cursorPaging.limit` is `100`
1937
+ *
1938
+ * For a detailed list of supported filtering operations see
1939
+ * [supported filters](https://dev.wix.com/api/rest/wix-bookings/service-variants/supported-filters).
1940
+ *
1941
+ * To learn about working with _Query_ endpoints, see
1942
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
1943
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
1944
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
1945
+ * @public
1946
+ * @documentationMaturity preview
1947
+ */
1948
+ export declare function queryServiceOptionsAndVariants(): ServiceOptionsAndVariantsListQueryBuilder;
1949
+ interface QueryCursorResult {
1950
+ hasNext: () => boolean;
1951
+ hasPrev: () => boolean;
1952
+ length: number;
1953
+ pageSize: number;
1954
+ }
1955
+ export interface ServiceOptionsAndVariantsListQueryResult extends QueryCursorResult {
1956
+ items: ServiceOptionsAndVariants[];
1957
+ query: ServiceOptionsAndVariantsListQueryBuilder;
1958
+ next: () => Promise<ServiceOptionsAndVariantsListQueryResult>;
1959
+ prev: () => Promise<ServiceOptionsAndVariantsListQueryResult>;
1960
+ }
1961
+ export interface ServiceOptionsAndVariantsListQueryBuilder {
1962
+ /** @param propertyName - Property whose value is compared with `value`.
1963
+ * @param value - Value to compare against.
1964
+ * @documentationMaturity preview
1965
+ */
1966
+ eq: (propertyName: string, value: any) => ServiceOptionsAndVariantsListQueryBuilder;
1967
+ /** @param propertyName - Property whose value is compared with `value`.
1968
+ * @param value - Value to compare against.
1969
+ * @documentationMaturity preview
1970
+ */
1971
+ ne: (propertyName: string, value: any) => ServiceOptionsAndVariantsListQueryBuilder;
1972
+ /** @param propertyName - Property whose value is compared with `values`.
1973
+ * @param values - List of values to compare against.
1974
+ * @documentationMaturity preview
1975
+ */
1976
+ hasSome: (propertyName: string, value: any[]) => ServiceOptionsAndVariantsListQueryBuilder;
1977
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1978
+ * @documentationMaturity preview
1979
+ */
1980
+ ascending: (...propertyNames: string[]) => ServiceOptionsAndVariantsListQueryBuilder;
1981
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1982
+ * @documentationMaturity preview
1983
+ */
1984
+ descending: (...propertyNames: string[]) => ServiceOptionsAndVariantsListQueryBuilder;
1985
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1986
+ * @documentationMaturity preview
1987
+ */
1988
+ limit: (limit: number) => ServiceOptionsAndVariantsListQueryBuilder;
1989
+ /** @documentationMaturity preview */
1990
+ find: () => Promise<ServiceOptionsAndVariantsListQueryResult>;
1991
+ }
1992
+ export {};