@wix/auto_sdk_bookings_services 1.0.53 → 1.0.55

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 (129) hide show
  1. package/build/{es/src/bookings-services-v2-service-services.types.d.ts → bookings-services-v2-service-services.universal-B8YoV8-Q.d.mts} +895 -374
  2. package/build/{cjs/src/bookings-services-v2-service-services.types.d.ts → bookings-services-v2-service-services.universal-B8YoV8-Q.d.ts} +895 -374
  3. package/build/{internal/cjs/src/bookings-services-v2-service-services.public.d.ts → index.d.mts} +66 -31
  4. package/build/{internal/es/src/bookings-services-v2-service-services.public.d.ts → index.d.ts} +66 -31
  5. package/build/index.js +3306 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +3232 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{cjs/src/bookings-services-v2-service-services.types.d.ts → bookings-services-v2-service-services.universal-B8YoV8-Q.d.mts} +895 -374
  10. package/build/internal/{es/src/bookings-services-v2-service-services.types.d.ts → bookings-services-v2-service-services.universal-B8YoV8-Q.d.ts} +895 -374
  11. package/build/{cjs/src/bookings-services-v2-service-services.public.d.ts → internal/index.d.mts} +66 -31
  12. package/build/{es/src/bookings-services-v2-service-services.public.d.ts → internal/index.d.ts} +66 -31
  13. package/build/internal/index.js +3306 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +3232 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +2350 -0
  18. package/build/internal/meta.d.ts +2350 -0
  19. package/build/internal/meta.js +1879 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +1831 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +2350 -0
  24. package/build/meta.d.ts +2350 -0
  25. package/build/meta.js +1879 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +1831 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -56
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/bookings-services-v2-service-services.context.d.ts +0 -42
  40. package/build/cjs/src/bookings-services-v2-service-services.context.js +0 -72
  41. package/build/cjs/src/bookings-services-v2-service-services.context.js.map +0 -1
  42. package/build/cjs/src/bookings-services-v2-service-services.http.d.ts +0 -498
  43. package/build/cjs/src/bookings-services-v2-service-services.http.js +0 -1904
  44. package/build/cjs/src/bookings-services-v2-service-services.http.js.map +0 -1
  45. package/build/cjs/src/bookings-services-v2-service-services.meta.d.ts +0 -48
  46. package/build/cjs/src/bookings-services-v2-service-services.meta.js +0 -446
  47. package/build/cjs/src/bookings-services-v2-service-services.meta.js.map +0 -1
  48. package/build/cjs/src/bookings-services-v2-service-services.public.js +0 -299
  49. package/build/cjs/src/bookings-services-v2-service-services.public.js.map +0 -1
  50. package/build/cjs/src/bookings-services-v2-service-services.types.js +0 -235
  51. package/build/cjs/src/bookings-services-v2-service-services.types.js.map +0 -1
  52. package/build/cjs/src/bookings-services-v2-service-services.universal.d.ts +0 -4833
  53. package/build/cjs/src/bookings-services-v2-service-services.universal.js +0 -2257
  54. package/build/cjs/src/bookings-services-v2-service-services.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -56
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/src/bookings-services-v2-service-services.context.d.ts +0 -42
  65. package/build/es/src/bookings-services-v2-service-services.context.js +0 -42
  66. package/build/es/src/bookings-services-v2-service-services.context.js.map +0 -1
  67. package/build/es/src/bookings-services-v2-service-services.http.d.ts +0 -498
  68. package/build/es/src/bookings-services-v2-service-services.http.js +0 -1879
  69. package/build/es/src/bookings-services-v2-service-services.http.js.map +0 -1
  70. package/build/es/src/bookings-services-v2-service-services.meta.d.ts +0 -48
  71. package/build/es/src/bookings-services-v2-service-services.meta.js +0 -398
  72. package/build/es/src/bookings-services-v2-service-services.meta.js.map +0 -1
  73. package/build/es/src/bookings-services-v2-service-services.public.js +0 -247
  74. package/build/es/src/bookings-services-v2-service-services.public.js.map +0 -1
  75. package/build/es/src/bookings-services-v2-service-services.types.js +0 -232
  76. package/build/es/src/bookings-services-v2-service-services.types.js.map +0 -1
  77. package/build/es/src/bookings-services-v2-service-services.universal.d.ts +0 -4833
  78. package/build/es/src/bookings-services-v2-service-services.universal.js +0 -2209
  79. package/build/es/src/bookings-services-v2-service-services.universal.js.map +0 -1
  80. package/build/internal/cjs/index.d.ts +0 -1
  81. package/build/internal/cjs/index.js +0 -18
  82. package/build/internal/cjs/index.js.map +0 -1
  83. package/build/internal/cjs/index.typings.d.ts +0 -56
  84. package/build/internal/cjs/index.typings.js +0 -18
  85. package/build/internal/cjs/index.typings.js.map +0 -1
  86. package/build/internal/cjs/meta.d.ts +0 -1
  87. package/build/internal/cjs/meta.js +0 -18
  88. package/build/internal/cjs/meta.js.map +0 -1
  89. package/build/internal/cjs/src/bookings-services-v2-service-services.context.d.ts +0 -42
  90. package/build/internal/cjs/src/bookings-services-v2-service-services.context.js +0 -72
  91. package/build/internal/cjs/src/bookings-services-v2-service-services.context.js.map +0 -1
  92. package/build/internal/cjs/src/bookings-services-v2-service-services.http.d.ts +0 -498
  93. package/build/internal/cjs/src/bookings-services-v2-service-services.http.js +0 -1904
  94. package/build/internal/cjs/src/bookings-services-v2-service-services.http.js.map +0 -1
  95. package/build/internal/cjs/src/bookings-services-v2-service-services.meta.d.ts +0 -48
  96. package/build/internal/cjs/src/bookings-services-v2-service-services.meta.js +0 -446
  97. package/build/internal/cjs/src/bookings-services-v2-service-services.meta.js.map +0 -1
  98. package/build/internal/cjs/src/bookings-services-v2-service-services.public.js +0 -299
  99. package/build/internal/cjs/src/bookings-services-v2-service-services.public.js.map +0 -1
  100. package/build/internal/cjs/src/bookings-services-v2-service-services.types.js +0 -235
  101. package/build/internal/cjs/src/bookings-services-v2-service-services.types.js.map +0 -1
  102. package/build/internal/cjs/src/bookings-services-v2-service-services.universal.d.ts +0 -4833
  103. package/build/internal/cjs/src/bookings-services-v2-service-services.universal.js +0 -2257
  104. package/build/internal/cjs/src/bookings-services-v2-service-services.universal.js.map +0 -1
  105. package/build/internal/es/index.d.ts +0 -1
  106. package/build/internal/es/index.js +0 -2
  107. package/build/internal/es/index.js.map +0 -1
  108. package/build/internal/es/index.typings.d.ts +0 -56
  109. package/build/internal/es/index.typings.js +0 -2
  110. package/build/internal/es/index.typings.js.map +0 -1
  111. package/build/internal/es/meta.d.ts +0 -1
  112. package/build/internal/es/meta.js +0 -2
  113. package/build/internal/es/meta.js.map +0 -1
  114. package/build/internal/es/src/bookings-services-v2-service-services.context.d.ts +0 -42
  115. package/build/internal/es/src/bookings-services-v2-service-services.context.js +0 -42
  116. package/build/internal/es/src/bookings-services-v2-service-services.context.js.map +0 -1
  117. package/build/internal/es/src/bookings-services-v2-service-services.http.d.ts +0 -498
  118. package/build/internal/es/src/bookings-services-v2-service-services.http.js +0 -1879
  119. package/build/internal/es/src/bookings-services-v2-service-services.http.js.map +0 -1
  120. package/build/internal/es/src/bookings-services-v2-service-services.meta.d.ts +0 -48
  121. package/build/internal/es/src/bookings-services-v2-service-services.meta.js +0 -398
  122. package/build/internal/es/src/bookings-services-v2-service-services.meta.js.map +0 -1
  123. package/build/internal/es/src/bookings-services-v2-service-services.public.js +0 -247
  124. package/build/internal/es/src/bookings-services-v2-service-services.public.js.map +0 -1
  125. package/build/internal/es/src/bookings-services-v2-service-services.types.js +0 -232
  126. package/build/internal/es/src/bookings-services-v2-service-services.types.js.map +0 -1
  127. package/build/internal/es/src/bookings-services-v2-service-services.universal.d.ts +0 -4833
  128. package/build/internal/es/src/bookings-services-v2-service-services.universal.js +0 -2209
  129. package/build/internal/es/src/bookings-services-v2-service-services.universal.js.map +0 -1
@@ -1,4833 +0,0 @@
1
- import { Search as SearchSdkType, NonNullablePaths, SearchSpec } from '@wix/sdk-types';
2
- /** The `service` object represents an offering that a business provides to its customers. */
3
- export interface Service {
4
- /**
5
- * Service ID.
6
- * @format GUID
7
- * @readonly
8
- */
9
- _id?: string | null;
10
- /**
11
- * Service type.
12
- * Learn more about *service types*
13
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types)).
14
- */
15
- type?: ServiceTypeWithLiterals;
16
- /**
17
- * Order of the service within a *category*
18
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object)).
19
- */
20
- sortOrder?: number | null;
21
- /**
22
- * Service name.
23
- * @maxLength 400
24
- * @minLength 1
25
- */
26
- name?: string | null;
27
- /**
28
- * Service description. For example, `High-class hair styling, cuts, straightening and color`.
29
- * @maxLength 7000
30
- */
31
- description?: string | null;
32
- /**
33
- * Short service description, such as `Hair styling`.
34
- * @maxLength 6000
35
- */
36
- tagLine?: string | null;
37
- /**
38
- * Default maximum number of customers that can book the service. The service cannot be booked beyond this capacity.
39
- * @min 1
40
- * @max 1000
41
- */
42
- defaultCapacity?: number | null;
43
- /** Media associated with the service. */
44
- media?: Media;
45
- /** Whether the service is hidden from the site. */
46
- hidden?: boolean | null;
47
- /**
48
- * _Category_
49
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object))
50
- * the service is associated with.
51
- */
52
- category?: V2Category;
53
- /** Form the customer filled out when booking the service. */
54
- form?: Form;
55
- /**
56
- * Payment options for booking the service.
57
- * Learn more about *service payments*
58
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments)).
59
- */
60
- payment?: Payment;
61
- /** Online booking settings. */
62
- onlineBooking?: OnlineBooking;
63
- /** Conferencing options for the service. */
64
- conferencing?: Conferencing;
65
- /**
66
- * The locations this service is offered at. Read more about *service locations*
67
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations)).
68
- * @immutable
69
- * @maxSize 500
70
- */
71
- locations?: Location[];
72
- /**
73
- * _Policy_
74
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction))
75
- * determining under what conditions this service can be booked. For example, whether the service can only be booked up to 30 minutes before it begins.
76
- */
77
- bookingPolicy?: BookingPolicy;
78
- /**
79
- * The service's *schedule*
80
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)),
81
- * which can be used to manage the service's *events*
82
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)).
83
- */
84
- schedule?: Schedule;
85
- /**
86
- * IDs of the *staff members*
87
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction))
88
- * providing the service. Available only for appointment-based services.
89
- * @maxSize 220
90
- * @format GUID
91
- */
92
- staffMemberIds?: string[];
93
- /**
94
- * Information about which resources must be available so customers can book the service.
95
- * For example, a meeting room or equipment.
96
- * @maxSize 3
97
- */
98
- serviceResources?: ServiceResource[];
99
- /**
100
- * A slug is the last part of the URL address that serves as a unique identifier of the service.
101
- * The list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner.
102
- * @readonly
103
- * @maxSize 100
104
- */
105
- supportedSlugs?: Slug[];
106
- /**
107
- * Active slug for the service.
108
- * Learn more about *service slugs*
109
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-slugs) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-slugs)).
110
- * @readonly
111
- */
112
- mainSlug?: Slug;
113
- /**
114
- * URLs to various service-related pages, such as the calendar page and the booking page.
115
- * @readonly
116
- */
117
- urls?: URLs;
118
- /** Extensions enabling users to save custom data related to the service. */
119
- extendedFields?: ExtendedFields;
120
- /** Custom SEO data for the service. */
121
- seoData?: SeoSchema;
122
- /**
123
- * Date and time the service was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
124
- * @readonly
125
- */
126
- _createdDate?: Date | null;
127
- /**
128
- * Date and time the service was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
129
- * @readonly
130
- */
131
- _updatedDate?: Date | null;
132
- /**
133
- * Revision number, which increments by 1 each time the service is updated. To
134
- * prevent conflicting changes, the existing revision must be used when updating
135
- * a service.
136
- * @readonly
137
- */
138
- revision?: string | null;
139
- }
140
- export declare enum ServiceType {
141
- /** Appointment-based service. */
142
- APPOINTMENT = "APPOINTMENT",
143
- /** Class service. */
144
- CLASS = "CLASS",
145
- /** Course service. */
146
- COURSE = "COURSE"
147
- }
148
- /** @enumType */
149
- export type ServiceTypeWithLiterals = ServiceType | 'APPOINTMENT' | 'CLASS' | 'COURSE';
150
- export interface Media {
151
- /**
152
- * Media items associated with the service.
153
- * @maxSize 100
154
- */
155
- items?: MediaItem[];
156
- /** Primary media associated with the service. */
157
- mainMedia?: MediaItem;
158
- /** Cover media associated with the service. */
159
- coverMedia?: MediaItem;
160
- }
161
- export interface MediaItem extends MediaItemItemOneOf {
162
- /** Details of the image associated with the service, such as URL and size. */
163
- image?: string;
164
- }
165
- /** @oneof */
166
- export interface MediaItemItemOneOf {
167
- /** Details of the image associated with the service, such as URL and size. */
168
- image?: string;
169
- }
170
- export interface V2Category {
171
- /**
172
- * Category ID.
173
- * @format GUID
174
- */
175
- _id?: string;
176
- /**
177
- * Category name.
178
- * @maxLength 500
179
- * @readonly
180
- */
181
- name?: string | null;
182
- /**
183
- * Order of a category within a category list.
184
- * @readonly
185
- */
186
- sortOrder?: number | null;
187
- }
188
- export interface Form {
189
- /**
190
- * ID of the form associated with the service.
191
- * The form information that you submit when booking includes contact details, participants, and other form fields set up for the service.
192
- * You can manage the service booking form fields using the Bookings Forms API.
193
- * @format GUID
194
- */
195
- _id?: string;
196
- }
197
- export interface FormSettings {
198
- /** Whether the service booking form should be hidden from the site. */
199
- hidden?: boolean | null;
200
- }
201
- export interface Payment extends PaymentRateOneOf {
202
- /**
203
- * The details for the fixed price of the service.
204
- *
205
- * Required when: `rateType` is `FIXED`
206
- */
207
- fixed?: FixedPayment;
208
- /**
209
- * The details for the custom price of the service.
210
- *
211
- * Required when: `rateType` is `CUSTOM`
212
- */
213
- custom?: CustomPayment;
214
- /**
215
- * The details for the varied pricing of the service.
216
- * Read more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).
217
- *
218
- * Required when: `rateType` is `VARIED`
219
- */
220
- varied?: VariedPayment;
221
- /** The rate the customer is expected to pay for the service. */
222
- rateType?: RateTypeWithLiterals;
223
- /** The payment options a customer can use to pay for the service. */
224
- options?: PaymentOptions;
225
- /**
226
- * IDs of pricing plans that can be used as payment for the service.
227
- * @readonly
228
- * @maxSize 75
229
- * @format GUID
230
- */
231
- pricingPlanIds?: string[];
232
- }
233
- /** @oneof */
234
- export interface PaymentRateOneOf {
235
- /**
236
- * The details for the fixed price of the service.
237
- *
238
- * Required when: `rateType` is `FIXED`
239
- */
240
- fixed?: FixedPayment;
241
- /**
242
- * The details for the custom price of the service.
243
- *
244
- * Required when: `rateType` is `CUSTOM`
245
- */
246
- custom?: CustomPayment;
247
- /**
248
- * The details for the varied pricing of the service.
249
- * Read more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).
250
- *
251
- * Required when: `rateType` is `VARIED`
252
- */
253
- varied?: VariedPayment;
254
- }
255
- export declare enum RateType {
256
- /** Unknown rate type. */
257
- UNKNOWN_RATE_TYPE = "UNKNOWN_RATE_TYPE",
258
- /** The service has a fixed price. */
259
- FIXED = "FIXED",
260
- /** The service has a custom price, expressed as a price description. */
261
- CUSTOM = "CUSTOM",
262
- /** This service is offered with a set of different prices based on different terms. */
263
- VARIED = "VARIED",
264
- /** This service is offered free of charge. */
265
- NO_FEE = "NO_FEE"
266
- }
267
- /** @enumType */
268
- export type RateTypeWithLiterals = RateType | 'UNKNOWN_RATE_TYPE' | 'FIXED' | 'CUSTOM' | 'VARIED' | 'NO_FEE';
269
- export interface FixedPayment {
270
- /**
271
- * The fixed price required to book the service.
272
- *
273
- * Required when: `rateType` is `FIXED`
274
- */
275
- price?: Money;
276
- /**
277
- * The deposit price required to book the service.
278
- *
279
- * Required when: `rateType` is `FIXED` and `paymentOptions.deposit` is `true`
280
- */
281
- deposit?: Money;
282
- }
283
- /**
284
- * Money.
285
- * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
286
- */
287
- export interface Money {
288
- /**
289
- * 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.
290
- * @format DECIMAL_VALUE
291
- * @decimalValue options { gt:0, maxScale:2 }
292
- */
293
- value?: string;
294
- /**
295
- * Currency code. Must be valid ISO 4217 currency code (e.g., USD).
296
- * @format CURRENCY
297
- * @readonly
298
- */
299
- currency?: string;
300
- /**
301
- * Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.
302
- * @maxLength 50
303
- */
304
- formattedValue?: string | null;
305
- }
306
- export interface CustomPayment {
307
- /**
308
- * A custom description explaining to the customer how to pay for the service.
309
- * @maxLength 50
310
- */
311
- description?: string | null;
312
- }
313
- export interface VariedPayment {
314
- /** The default price for the service without any variants. It will also be used as the default price for any new variant. */
315
- defaultPrice?: Money;
316
- /**
317
- * The deposit price required to book the service.
318
- *
319
- * Required when: `rateType` is `VARIED` and `paymentOptions.deposit` is `true`
320
- */
321
- deposit?: Money;
322
- /**
323
- * The minimal price a customer may pay for this service, based on its variants.
324
- * @readonly
325
- */
326
- minPrice?: Money;
327
- /**
328
- * The maximum price a customer may pay for this service, based on its variants.
329
- * @readonly
330
- */
331
- maxPrice?: Money;
332
- }
333
- export interface PaymentOptions {
334
- /**
335
- * Customers can pay for the service online.
336
- * When `true`:
337
- * + `rateType` must be either `FIXED` or `VARIED`.
338
- * + `fixed.price` or `varied.default_price` must be specified respectively. Read more about [getting paid online](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online).
339
- */
340
- online?: boolean | null;
341
- /** Customers can pay for the service in person. */
342
- inPerson?: boolean | null;
343
- /**
344
- * This service requires a deposit to be made online in order to book it.
345
- * When `true`:
346
- * + `rateType` must be `VARIED` or `FIXED`.
347
- * + A `deposit` must be specified.
348
- */
349
- deposit?: boolean | null;
350
- /** Customers can pay for the service using a pricing plan. */
351
- pricingPlan?: boolean | null;
352
- }
353
- export interface OnlineBooking {
354
- /**
355
- * Whether the service can be booked online.
356
- * When set to `true`, customers can book the service online. Configure the payment options via the `service.payment` property.
357
- * When set to `false`, customers cannot book the service online, and the service can only be paid for in person.
358
- */
359
- enabled?: boolean | null;
360
- /** Booking the service requires approval by the Wix user. */
361
- requireManualApproval?: boolean | null;
362
- /** Multiple customers can request to book the same time slot. This is relevant when `requireManualApproval` is `true`. */
363
- allowMultipleRequests?: boolean | null;
364
- }
365
- export interface Conferencing {
366
- /** Whether a conference link is generated for the service's sessions. */
367
- enabled?: boolean | null;
368
- }
369
- export interface Location extends LocationOptionsOneOf {
370
- /** Information about business locations. */
371
- business?: BusinessLocationOptions;
372
- /** Information about custom locations. */
373
- custom?: CustomLocationOptions;
374
- /**
375
- * Location ID.
376
- * @format GUID
377
- * @readonly
378
- */
379
- _id?: string;
380
- /**
381
- * Location type.
382
- *
383
- * Default: `CUSTOM`
384
- */
385
- type?: LocationTypeWithLiterals;
386
- /**
387
- * Location address. Empty for `{"type": "CUSTOMER"}`.
388
- * @readonly
389
- */
390
- calculatedAddress?: CommonAddress;
391
- }
392
- /** @oneof */
393
- export interface LocationOptionsOneOf {
394
- /** Information about business locations. */
395
- business?: BusinessLocationOptions;
396
- /** Information about custom locations. */
397
- custom?: CustomLocationOptions;
398
- }
399
- export declare enum LocationType {
400
- UNKNOWN_LOCATION_TYPE = "UNKNOWN_LOCATION_TYPE",
401
- /**
402
- * Location set by the business that is not a standard business *location*
403
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
404
- */
405
- CUSTOM = "CUSTOM",
406
- /**
407
- * Business *location*
408
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
409
- */
410
- BUSINESS = "BUSINESS",
411
- /**
412
- * The customer specifies any address when booking. Available only for
413
- * appointment-based services.
414
- */
415
- CUSTOMER = "CUSTOMER"
416
- }
417
- /** @enumType */
418
- export type LocationTypeWithLiterals = LocationType | 'UNKNOWN_LOCATION_TYPE' | 'CUSTOM' | 'BUSINESS' | 'CUSTOMER';
419
- export interface CommonAddress extends CommonAddressStreetOneOf {
420
- /** Street name and number. */
421
- streetAddress?: StreetAddress;
422
- /** @maxLength 255 */
423
- addressLine1?: string | null;
424
- /**
425
- * 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
426
- * @format COUNTRY
427
- */
428
- country?: string | null;
429
- /**
430
- * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
431
- * @maxLength 255
432
- */
433
- subdivision?: string | null;
434
- /**
435
- * City name.
436
- * @maxLength 255
437
- */
438
- city?: string | null;
439
- /**
440
- * Postal or zip code.
441
- * @maxLength 255
442
- */
443
- postalCode?: string | null;
444
- /**
445
- * Full address of the location.
446
- * @maxLength 512
447
- */
448
- formatted?: string | null;
449
- }
450
- /** @oneof */
451
- export interface CommonAddressStreetOneOf {
452
- /** Street name and number. */
453
- streetAddress?: StreetAddress;
454
- /** @maxLength 255 */
455
- addressLine?: string | null;
456
- }
457
- /** Street address. Includes street name, number, and apartment number in separate fields. */
458
- export interface StreetAddress {
459
- /**
460
- * Street number.
461
- * @maxLength 255
462
- */
463
- number?: string;
464
- /**
465
- * Street name.
466
- * @maxLength 255
467
- */
468
- name?: string;
469
- /**
470
- * Apartment number.
471
- * @maxLength 255
472
- */
473
- apt?: string;
474
- }
475
- export interface AddressLocation {
476
- /** Address latitude. */
477
- latitude?: number | null;
478
- /** Address longitude. */
479
- longitude?: number | null;
480
- }
481
- export interface BusinessLocationOptions {
482
- /**
483
- * ID of the business *location*
484
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
485
- * When setting a business location, specify only the location ID. Other location details are overwritten.
486
- * @format GUID
487
- */
488
- _id?: string;
489
- /**
490
- * Business location name.
491
- * @readonly
492
- * @maxLength 150
493
- */
494
- name?: string;
495
- /**
496
- * Whether this is the default location. There can only be a single default location per site.
497
- * @readonly
498
- */
499
- default?: boolean | null;
500
- /**
501
- * Business location address.
502
- * @readonly
503
- */
504
- address?: CommonAddress;
505
- /**
506
- * Business location email.
507
- * @format EMAIL
508
- * @readonly
509
- */
510
- email?: string | null;
511
- /**
512
- * Business location phone.
513
- * @format PHONE
514
- * @readonly
515
- */
516
- phone?: string | null;
517
- }
518
- export interface CustomLocationOptions {
519
- /**
520
- * ID of the custom location.
521
- * @format GUID
522
- * @readonly
523
- */
524
- _id?: string;
525
- /** Address of the custom location. */
526
- address?: CommonAddress;
527
- }
528
- /**
529
- * `BookingPolicy` is the main entity of `BookingPolicyService` and specifies a set of rules for booking a service
530
- * by visitors and members.
531
- *
532
- * Each `BookingPolicy` consists of a number of sub-policies. When the Bookings App is provisioned to a meta site then a
533
- * default `BookingPolicy` will be created with defaults for each of these sub-policies. This also applies when a request
534
- * is received to create a new `BookingPolicy` and one or more of these sub-policies are not provided.
535
- *
536
- * Sub-policies are defined in separate objects as specified below.
537
- *
538
- * - The `LimitEarlyBookingPolicy` object defines the policy for limiting early bookings.
539
- * - The `LimitLateBookingPolicy` object defines the policy for limiting late bookings.
540
- * - The `BookAfterStartPolicy` object defines the policy for booking after the start of the schedule.
541
- * - The `CancellationPolicy` object defines the policy for canceling a booked entity.
542
- * - The `ReschedulePolicy` object defines the policy for rescheduling booked entity.
543
- * - The `WaitlistPolicy` object defines the policy for a waitlist.
544
- * - The `ParticipantsPolicy` object defines the policy regarding the participants per booking.
545
- * - The `ResourcesPolicy` object defines the policy regarding the resources per booking.
546
- * - The `CancellationFeePolicy` object defines the policy regarding cancellation fees.
547
- * - The `SaveCreditCardPolicy` object defines the policy for saving credit card details.
548
- *
549
- * By default each sub-policy is disabled. A more detailed specification of the default settings of each sub-policy
550
- * can be found in the description of the corresponding object.
551
- *
552
- * Partial updates are supported on the main entity level, however in order to update a sub-policy the client needs to provide the whole sub-policy object.
553
- */
554
- export interface BookingPolicy {
555
- /**
556
- * The ID to the policy for the booking.
557
- * @format GUID
558
- */
559
- _id?: string;
560
- /**
561
- * Date and time the policy was created.
562
- * @readonly
563
- */
564
- _createdDate?: Date | null;
565
- /**
566
- * Date and time the policy was updated.
567
- * @readonly
568
- */
569
- _updatedDate?: Date | null;
570
- /**
571
- * Name of the policy.
572
- * @maxLength 400
573
- * @readonly
574
- */
575
- name?: string | null;
576
- /**
577
- * Custom description for the policy. This policy is displayed to the participant.
578
- * @readonly
579
- */
580
- customPolicyDescription?: PolicyDescription;
581
- /**
582
- * Whether the policy is the default for the meta site.
583
- * @readonly
584
- */
585
- default?: boolean | null;
586
- /**
587
- * Policy for limiting early bookings.
588
- * @readonly
589
- */
590
- limitEarlyBookingPolicy?: LimitEarlyBookingPolicy;
591
- /**
592
- * Policy for limiting late bookings.
593
- * @readonly
594
- */
595
- limitLateBookingPolicy?: LimitLateBookingPolicy;
596
- /**
597
- * Policy on booking an entity after the start of the schedule.
598
- * @readonly
599
- */
600
- bookAfterStartPolicy?: BookAfterStartPolicy;
601
- /**
602
- * Policy for canceling a booked entity.
603
- * @readonly
604
- */
605
- cancellationPolicy?: CancellationPolicy;
606
- /**
607
- * Policy for rescheduling a booked entity.
608
- * @readonly
609
- */
610
- reschedulePolicy?: ReschedulePolicy;
611
- /**
612
- * Waitlist policy for the service.
613
- * @readonly
614
- */
615
- waitlistPolicy?: WaitlistPolicy;
616
- /**
617
- * Policy regarding the participants per booking.
618
- * @readonly
619
- */
620
- participantsPolicy?: ParticipantsPolicy;
621
- /**
622
- * Policy for allocating resources.
623
- * @readonly
624
- */
625
- resourcesPolicy?: ResourcesPolicy;
626
- /**
627
- * Rules for cancellation fees.
628
- * @readonly
629
- */
630
- cancellationFeePolicy?: CancellationFeePolicy;
631
- /**
632
- * Rule for saving credit card.
633
- * @readonly
634
- */
635
- saveCreditCardPolicy?: SaveCreditCardPolicy;
636
- }
637
- /** A description of the policy to display to participants. */
638
- export interface PolicyDescription {
639
- /**
640
- * Whether the description should be displayed. If `true`, the description is displayed.
641
- *
642
- * Default: `false`
643
- */
644
- enabled?: boolean;
645
- /**
646
- * The description to display.
647
- *
648
- * Default: Empty
649
- * Max length: 2500 characters
650
- * @maxLength 2500
651
- */
652
- description?: string;
653
- }
654
- /** The policy for limiting early bookings. */
655
- export interface LimitEarlyBookingPolicy {
656
- /**
657
- * Whether there is a limit on how early a customer
658
- * can book. When `false`, there is no limit on the earliest
659
- * booking time and customers can book in advance, as early as they like.
660
- *
661
- * Default: `false`
662
- */
663
- enabled?: boolean;
664
- /**
665
- * Maximum number of minutes before the start of the session that a booking can be made. This value must be greater
666
- * than `latest_booking_in_minutes` in the `LimitLateBookingPolicy` policy.
667
- *
668
- * Default: 10080 minutes (7 days)
669
- * Min: 1 minute
670
- * @min 1
671
- */
672
- earliestBookingInMinutes?: number;
673
- }
674
- /**
675
- * The policy for limiting late bookings.
676
- *
677
- * This policy and the `BookAfterStartPolicy` policy cannot be enabled at the same time. So if this policy
678
- * is enabled, `BookAfterStartPolicy` must be disabled.
679
- */
680
- export interface LimitLateBookingPolicy {
681
- /**
682
- * Whether there is a limit on how late a customer
683
- * can book. When `false`, there is no limit on the latest
684
- * booking time and customers can book up to the last minute.
685
- *
686
- * Default: `false`
687
- */
688
- enabled?: boolean;
689
- /**
690
- * Minimum number of minutes before the start of the session that a booking can be made.
691
- * For a schedule, this is relative to the start time of the next booked session, excluding past-booked sessions.
692
- * This value must be less than `earliest_booking_in_minutes` in the `LimitEarlyBookingPolicy` policy.
693
- *
694
- * Default: 1440 minutes (1 day)
695
- * Min: 1 minute
696
- * @min 1
697
- */
698
- latestBookingInMinutes?: number;
699
- }
700
- /**
701
- * The policy for whether a session can be booked after the start of the schedule.
702
- * This policy and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this policy
703
- * is enabled, the `LimitLateBookingPolicy` policy must be disabled.
704
- */
705
- export interface BookAfterStartPolicy {
706
- /**
707
- * Whether booking is allowed after the start of the schedule. When `true`,
708
- * customers can book after the start of the schedule.
709
- *
710
- * Default: `false`
711
- */
712
- enabled?: boolean;
713
- }
714
- /** The policy for canceling a booked session. */
715
- export interface CancellationPolicy {
716
- /**
717
- * Whether canceling a booking is allowed. When `true`, customers
718
- * can cancel the booking.
719
- *
720
- * Default: `false`
721
- */
722
- enabled?: boolean;
723
- /**
724
- * Whether there is a limit on the latest cancellation time. When `true`,
725
- * a time limit is enforced.
726
- *
727
- * Default: `false`
728
- */
729
- limitLatestCancellation?: boolean;
730
- /**
731
- * Minimum number of minutes before the start of the booked session that the booking can be canceled.
732
- *
733
- * Default: 1440 minutes (1 day)
734
- * Min: 1 minute
735
- * @min 1
736
- */
737
- latestCancellationInMinutes?: number;
738
- }
739
- /** The policy for rescheduling a booked session. */
740
- export interface ReschedulePolicy {
741
- /**
742
- * Whether rescheduling a booking is allowed. When `true`, customers
743
- * can reschedule the booking.
744
- *
745
- * Default: `false`
746
- */
747
- enabled?: boolean;
748
- /**
749
- * Whether there is a limit on the latest reschedule time. When `true`,
750
- * a time limit is enforced.
751
- *
752
- * Default: `false`
753
- */
754
- limitLatestReschedule?: boolean;
755
- /**
756
- * Minimum number of minutes before the start of the booked session that the booking can be rescheduled.
757
- *
758
- * Default: 1440 minutes (1 day)
759
- * Min: 1 minute
760
- * @min 1
761
- */
762
- latestRescheduleInMinutes?: number;
763
- }
764
- /** The policy for the waitlist. */
765
- export interface WaitlistPolicy {
766
- /**
767
- * Whether the session has a waitlist. If `true`, there is a waitlist.
768
- *
769
- * Default: `false`
770
- */
771
- enabled?: boolean;
772
- /**
773
- * Number of spots available in the waitlist.
774
- *
775
- * Default: 10 spots
776
- * Min: 1 spot
777
- * @min 1
778
- */
779
- capacity?: number;
780
- /**
781
- * Amount of time a participant is given to book, once notified that a spot is available.
782
- *
783
- * Default: 10 minutes
784
- * Min: 1 spot
785
- * @min 1
786
- */
787
- reservationTimeInMinutes?: number;
788
- }
789
- /** The policy for the maximum number of participants per booking. */
790
- export interface ParticipantsPolicy {
791
- /**
792
- * Maximum number of participants allowed.
793
- *
794
- * Default: 1 participant
795
- * Min: 1 participant
796
- * @min 1
797
- */
798
- maxParticipantsPerBooking?: number;
799
- }
800
- /** The policy regarding the allocation of resources (e.g. staff members). */
801
- export interface ResourcesPolicy {
802
- /**
803
- * `true` if this policy is enabled, `false` otherwise.
804
- * When `false` then the client must always select a resource when booking an appointment.
805
- */
806
- enabled?: boolean;
807
- /**
808
- * `true`, if it is allowed to automatically assign a resource when booking an appointment,
809
- * `false`, if the client must always select a resource.
810
- *
811
- * Default: `false`
812
- */
813
- autoAssignAllowed?: boolean;
814
- }
815
- export interface CancellationFeePolicy {
816
- /**
817
- * Whether canceling a booking will result in a cancellation fee
818
- *
819
- * Default: `false`
820
- */
821
- enabled?: boolean;
822
- /**
823
- * Cancellation windows describing the time of cancellation and the fee to charge.
824
- * @maxSize 2
825
- */
826
- cancellationWindows?: CancellationWindow[];
827
- /**
828
- * Whether the cancellation fee should not be automatically collected when customer cancels the booking.
829
- *
830
- * Default: `true`
831
- */
832
- autoCollectFeeEnabled?: boolean | null;
833
- }
834
- export interface CancellationWindow extends CancellationWindowFeeOneOf {
835
- /** Amount to be charged as a cancellation fee. */
836
- amount?: Money;
837
- /**
838
- * Percentage of the original price to be charged as a cancellation fee.
839
- * @decimalValue options { gt:0, lte:100, maxScale:2 }
840
- */
841
- percentage?: string;
842
- /**
843
- * The fee will be applied if the booked session starts within this start time in minutes.
844
- * @min 1
845
- */
846
- startInMinutes?: number | null;
847
- }
848
- /** @oneof */
849
- export interface CancellationWindowFeeOneOf {
850
- /** Amount to be charged as a cancellation fee. */
851
- amount?: Money;
852
- /**
853
- * Percentage of the original price to be charged as a cancellation fee.
854
- * @decimalValue options { gt:0, lte:100, maxScale:2 }
855
- */
856
- percentage?: string;
857
- }
858
- export interface SaveCreditCardPolicy {
859
- /** Default: `false` */
860
- enabled?: boolean;
861
- }
862
- export interface Schedule {
863
- /**
864
- * ID of the *schedule*
865
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction))
866
- * to which the service's events belong.
867
- * @format GUID
868
- * @readonly
869
- */
870
- _id?: string | null;
871
- /**
872
- * Start time of the first session in the schedule. For courses only.
873
- * @readonly
874
- */
875
- firstSessionStart?: Date | null;
876
- /**
877
- * End time of the last session in the schedule. For courses only.
878
- * @readonly
879
- */
880
- lastSessionEnd?: Date | null;
881
- /** Limitations affecting the service availability. */
882
- availabilityConstraints?: AvailabilityConstraints;
883
- }
884
- export interface AvailabilityConstraints {
885
- /**
886
- * Calculated list of all supported session durations for the service. For
887
- * appointment-based services without varied pricing based on session length, it
888
- * matches the single value in the `sessionDurations` array. For appointment-based
889
- * services with varied pricing based on session length, it includes session
890
- * durations for all *variants*
891
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)),
892
- * while ignoring `sessionDurations`.
893
- * For courses and classes, it includes durations for all future
894
- * recurring sessions but excludes durations for one-off or past recurring sessions.
895
- * @readonly
896
- * @maxSize 50
897
- */
898
- durations?: Duration[];
899
- /**
900
- * List of supported session durations in minutes.
901
- *
902
- * - For appointment-based services, specify `sessionDurations` when creating a service.
903
- * - For appointment-based services with varied pricing by session length, you must still specify `sessionDurations`, but the values are ignored. Actual durations are taken from the service variants ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
904
- * - For classes or courses, don't specify `sessionDurations` when creating a service.
905
- *
906
- * Min: `1` minute
907
- * Max: `44639` minutes (30 days, 23 hours, and 59 minutes)
908
- * @min 1
909
- * @max 44639
910
- * @maxSize 50
911
- */
912
- sessionDurations?: number[];
913
- /**
914
- * The number of minutes between the end of a session and the start of the next.
915
- *
916
- *
917
- * Min: `0` minutes
918
- * Max: `720` minutes
919
- * @max 720
920
- */
921
- timeBetweenSessions?: number;
922
- }
923
- export interface Duration {
924
- /**
925
- * The duration of the service in minutes.
926
- *
927
- * Min: `1` minute
928
- * Max: `44639` minutes (30 days, 23 hours, and 59 minutes)
929
- * @min 1
930
- * @max 44639
931
- */
932
- minutes?: number;
933
- }
934
- export interface StaffMember {
935
- /**
936
- * ID of the staff member providing the service, can be used to retrieve resource information using wix-bookings-backend resources API.
937
- * @format GUID
938
- * @readonly
939
- */
940
- staffMemberId?: string;
941
- /**
942
- * Name of the staff member
943
- * @maxLength 40
944
- * @readonly
945
- */
946
- name?: string | null;
947
- /**
948
- * Main media associated with the service.
949
- * @readonly
950
- */
951
- mainMedia?: StaffMediaItem;
952
- }
953
- export interface StaffMediaItem extends StaffMediaItemItemOneOf {
954
- /** Details of the image associated with the staff, such as URL and size. */
955
- image?: string;
956
- }
957
- /** @oneof */
958
- export interface StaffMediaItemItemOneOf {
959
- /** Details of the image associated with the staff, such as URL and size. */
960
- image?: string;
961
- }
962
- export interface StaffMemberDetails {
963
- /**
964
- * Staff members providing the service. For appointments only.
965
- * @maxSize 220
966
- */
967
- staffMembers?: StaffMember[];
968
- }
969
- export interface ResourceGroup {
970
- /**
971
- * An optional resource group ID. If specified, it references a resource group in the resource groups API.
972
- * TODO - referenced_entity annotation
973
- * @format GUID
974
- */
975
- resourceGroupId?: string | null;
976
- /**
977
- * Resource IDs. Each ID references a resource in the resources API and may be a subset of resources within a resource group.
978
- * TODO - referenced_entity annotation
979
- */
980
- resourceIds?: ResourceIds;
981
- /**
982
- * Specifies how many resources in the group / resource IDs are required to book the service.
983
- * Defaults to 1.
984
- * @min 1
985
- */
986
- requiredResourcesNumber?: number | null;
987
- /**
988
- * If set to `true`, the customer can select the specific resources while booking the service.
989
- * If set to `false`, the resources required to book the service will be auto-selected at the time of the booking.
990
- * Defaults to false.
991
- * @readonly
992
- */
993
- selectableResource?: boolean | null;
994
- }
995
- export interface ResourceIds {
996
- /**
997
- * Values of the resource IDs.
998
- * @maxSize 100
999
- * @format GUID
1000
- */
1001
- values?: string[];
1002
- }
1003
- export interface ServiceResource extends ServiceResourceSelectionOneOf {
1004
- /**
1005
- * Details about the required *resource type*
1006
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)).
1007
- */
1008
- resourceType?: ResourceType;
1009
- }
1010
- /** @oneof */
1011
- export interface ServiceResourceSelectionOneOf {
1012
- }
1013
- export interface ResourceType {
1014
- /**
1015
- * The type of the resource.
1016
- * @format GUID
1017
- */
1018
- _id?: string | null;
1019
- /**
1020
- * The name of the resource type.
1021
- * @readonly
1022
- * @maxLength 40
1023
- * @minLength 1
1024
- */
1025
- name?: string | null;
1026
- }
1027
- export interface Slug {
1028
- /**
1029
- * The unique part of service's URL that identifies the service's information page. For example, `service-1` in `https:/example.com/services/service-1`.
1030
- * @maxLength 500
1031
- */
1032
- name?: string;
1033
- /**
1034
- * Whether the slug was generated or customized. If `true`, the slug was customized manually by the business owner. Otherwise, the slug was automatically generated from the service name.
1035
- * @readonly
1036
- */
1037
- custom?: boolean | null;
1038
- /**
1039
- * Date and time the slug was created. This is a system field.
1040
- * @readonly
1041
- */
1042
- _createdDate?: Date | null;
1043
- }
1044
- export interface URLs {
1045
- /**
1046
- * The URL for the service page.
1047
- * @readonly
1048
- */
1049
- servicePage?: string;
1050
- /**
1051
- * The URL for the booking entry point. It can be either to the calendar or to the service page.
1052
- * @readonly
1053
- */
1054
- bookingPage?: string;
1055
- /**
1056
- * The URL for the calendar. Can be empty if no calendar exists.
1057
- * @readonly
1058
- */
1059
- calendarPage?: string;
1060
- }
1061
- export interface ExtendedFields {
1062
- /**
1063
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
1064
- * The value of each key is structured according to the schema defined when the extended fields were configured.
1065
- *
1066
- * You can only access fields for which you have the appropriate permissions.
1067
- *
1068
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
1069
- */
1070
- namespaces?: Record<string, Record<string, any>>;
1071
- }
1072
- /**
1073
- * 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.
1074
- * The search engines use this information for ranking purposes, or to display snippets in the search results.
1075
- * 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.
1076
- */
1077
- export interface SeoSchema {
1078
- /** SEO tag information. */
1079
- tags?: Tag[];
1080
- /** SEO general settings. */
1081
- settings?: Settings;
1082
- }
1083
- export interface Keyword {
1084
- /** Keyword value. */
1085
- term?: string;
1086
- /** Whether the keyword is the main focus keyword. */
1087
- isMain?: boolean;
1088
- /**
1089
- * The source that added the keyword terms to the SEO settings.
1090
- * @maxLength 1000
1091
- */
1092
- origin?: string | null;
1093
- }
1094
- export interface Tag {
1095
- /**
1096
- * SEO tag type.
1097
- *
1098
- *
1099
- * Supported values: `title`, `meta`, `script`, `link`.
1100
- */
1101
- type?: string;
1102
- /**
1103
- * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
1104
- * For example: `{"name": "description", "content": "the description itself"}`.
1105
- */
1106
- props?: Record<string, any> | null;
1107
- /** SEO tag meta data. For example, `{"height": 300, "width": 240}`. */
1108
- meta?: Record<string, any> | null;
1109
- /** SEO tag inner content. For example, `<title> inner content </title>`. */
1110
- children?: string;
1111
- /** Whether the tag is a custom tag. */
1112
- custom?: boolean;
1113
- /** Whether the tag is disabled. */
1114
- disabled?: boolean;
1115
- }
1116
- export interface Settings {
1117
- /**
1118
- * Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
1119
- *
1120
- *
1121
- * Default: `false` (Auto Redirect is enabled.)
1122
- */
1123
- preventAutoRedirect?: boolean;
1124
- /**
1125
- * User-selected keyword terms for a specific page.
1126
- * @maxSize 5
1127
- */
1128
- keywords?: Keyword[];
1129
- }
1130
- export interface AddOnGroup {
1131
- /**
1132
- * ID of the group.
1133
- * @readonly
1134
- * @format GUID
1135
- */
1136
- _id?: string | null;
1137
- /**
1138
- * The name of the group.
1139
- * @maxLength 100
1140
- */
1141
- name?: string | null;
1142
- /**
1143
- * The maximum number of AddOns that can be selected from this group.
1144
- * If not set, there is no upper limit.
1145
- */
1146
- maxNumberOfAddOns?: number | null;
1147
- /**
1148
- * List of AddOn IDs that are part of this group.
1149
- * @format GUID
1150
- * @maxSize 7
1151
- */
1152
- addOnIds?: string[] | null;
1153
- /**
1154
- * The group prompt.
1155
- * @maxLength 200
1156
- */
1157
- prompt?: string | null;
1158
- }
1159
- export interface AddOnDetails {
1160
- /**
1161
- * ID of the AddOn.
1162
- * @format GUID
1163
- */
1164
- addOnId?: string | null;
1165
- /**
1166
- * The duration of the AddOn in minutes.
1167
- * This field can be empty if the AddOn has no specific duration.
1168
- */
1169
- durationInMinutes?: number | null;
1170
- }
1171
- /**
1172
- * Message for reindexing search data to a given search schema. Support both upsert and delete flows as well as
1173
- * performs context manipulation with adding tenant, provided in message to callscope.
1174
- */
1175
- export interface ReindexMessage extends ReindexMessageActionOneOf {
1176
- upsert?: Upsert;
1177
- delete?: Delete;
1178
- entityFqdn?: string;
1179
- tenantId?: string;
1180
- eventTime?: Date | null;
1181
- entityEventSequence?: string | null;
1182
- schema?: Schema;
1183
- }
1184
- /** @oneof */
1185
- export interface ReindexMessageActionOneOf {
1186
- upsert?: Upsert;
1187
- delete?: Delete;
1188
- }
1189
- export interface Upsert {
1190
- entityId?: string;
1191
- entityAsJson?: string;
1192
- }
1193
- export interface Delete {
1194
- entityId?: string;
1195
- }
1196
- export interface Schema {
1197
- label?: string;
1198
- clusterName?: string;
1199
- }
1200
- export interface SetCustomSlugEvent {
1201
- /** The main slug for the service after the update */
1202
- mainSlug?: Slug;
1203
- }
1204
- export interface ServicesUrlsChanged {
1205
- }
1206
- export interface DomainEvent extends DomainEventBodyOneOf {
1207
- createdEvent?: EntityCreatedEvent;
1208
- updatedEvent?: EntityUpdatedEvent;
1209
- deletedEvent?: EntityDeletedEvent;
1210
- actionEvent?: ActionEvent;
1211
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1212
- _id?: string;
1213
- /**
1214
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1215
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1216
- */
1217
- entityFqdn?: string;
1218
- /**
1219
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
1220
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1221
- */
1222
- slug?: string;
1223
- /** ID of the entity associated with the event. */
1224
- entityId?: string;
1225
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1226
- eventTime?: Date | null;
1227
- /**
1228
- * Whether the event was triggered as a result of a privacy regulation application
1229
- * (for example, GDPR).
1230
- */
1231
- triggeredByAnonymizeRequest?: boolean | null;
1232
- /** If present, indicates the action that triggered the event. */
1233
- originatedFrom?: string | null;
1234
- /**
1235
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
1236
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
1237
- */
1238
- entityEventSequence?: string | null;
1239
- }
1240
- /** @oneof */
1241
- export interface DomainEventBodyOneOf {
1242
- createdEvent?: EntityCreatedEvent;
1243
- updatedEvent?: EntityUpdatedEvent;
1244
- deletedEvent?: EntityDeletedEvent;
1245
- actionEvent?: ActionEvent;
1246
- }
1247
- export interface EntityCreatedEvent {
1248
- entity?: string;
1249
- }
1250
- export interface RestoreInfo {
1251
- deletedDate?: Date | null;
1252
- }
1253
- export interface EntityUpdatedEvent {
1254
- /**
1255
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1256
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1257
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1258
- */
1259
- currentEntity?: string;
1260
- }
1261
- export interface EntityDeletedEvent {
1262
- /** Entity that was deleted. */
1263
- deletedEntity?: string | null;
1264
- }
1265
- export interface ActionEvent {
1266
- body?: string;
1267
- }
1268
- export interface MessageEnvelope {
1269
- /**
1270
- * App instance ID.
1271
- * @format GUID
1272
- */
1273
- instanceId?: string | null;
1274
- /**
1275
- * Event type.
1276
- * @maxLength 150
1277
- */
1278
- eventType?: string;
1279
- /** The identification type and identity data. */
1280
- identity?: IdentificationData;
1281
- /** Stringify payload. */
1282
- data?: string;
1283
- }
1284
- export interface IdentificationData extends IdentificationDataIdOneOf {
1285
- /**
1286
- * ID of a site visitor that has not logged in to the site.
1287
- * @format GUID
1288
- */
1289
- anonymousVisitorId?: string;
1290
- /**
1291
- * ID of a site visitor that has logged in to the site.
1292
- * @format GUID
1293
- */
1294
- memberId?: string;
1295
- /**
1296
- * ID of a Wix user (site owner, contributor, etc.).
1297
- * @format GUID
1298
- */
1299
- wixUserId?: string;
1300
- /**
1301
- * ID of an app.
1302
- * @format GUID
1303
- */
1304
- appId?: string;
1305
- /** @readonly */
1306
- identityType?: WebhookIdentityTypeWithLiterals;
1307
- }
1308
- /** @oneof */
1309
- export interface IdentificationDataIdOneOf {
1310
- /**
1311
- * ID of a site visitor that has not logged in to the site.
1312
- * @format GUID
1313
- */
1314
- anonymousVisitorId?: string;
1315
- /**
1316
- * ID of a site visitor that has logged in to the site.
1317
- * @format GUID
1318
- */
1319
- memberId?: string;
1320
- /**
1321
- * ID of a Wix user (site owner, contributor, etc.).
1322
- * @format GUID
1323
- */
1324
- wixUserId?: string;
1325
- /**
1326
- * ID of an app.
1327
- * @format GUID
1328
- */
1329
- appId?: string;
1330
- }
1331
- export declare enum WebhookIdentityType {
1332
- UNKNOWN = "UNKNOWN",
1333
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1334
- MEMBER = "MEMBER",
1335
- WIX_USER = "WIX_USER",
1336
- APP = "APP"
1337
- }
1338
- /** @enumType */
1339
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1340
- export interface CreateAddOnGroupRequest {
1341
- /** AddOnGroup to create. */
1342
- addOnGroup?: AddOnGroup;
1343
- /**
1344
- * ID of the service to create the AddOnGroup for.
1345
- * @format GUID
1346
- */
1347
- serviceId?: string | null;
1348
- }
1349
- export interface CreateAddOnGroupResponse {
1350
- /** Created AddOnGroup. */
1351
- addOnGroup?: AddOnGroup;
1352
- }
1353
- export interface DeleteAddOnGroupRequest {
1354
- /**
1355
- * ID of the AddOnGroup to delete.
1356
- * @format GUID
1357
- */
1358
- addOnGroupId?: string | null;
1359
- /**
1360
- * ID of the service from which to delete the AddOnGroup.
1361
- * @format GUID
1362
- */
1363
- serviceId?: string | null;
1364
- }
1365
- export interface DeleteAddOnGroupResponse {
1366
- }
1367
- export interface UpdateAddOnGroupRequest {
1368
- /** AddOnGroup to update. */
1369
- addOnGroup?: AddOnGroup;
1370
- /**
1371
- * ID of the service that contains the AddOnGroup.
1372
- * @format GUID
1373
- */
1374
- serviceId?: string | null;
1375
- }
1376
- export interface UpdateAddOnGroupResponse {
1377
- /** Updated AddOnGroup */
1378
- addOnGroup?: AddOnGroup;
1379
- }
1380
- export interface ListAddOnGroupsByServiceIdRequest {
1381
- /**
1382
- * ID of the service to retrieve AddOnGroups for.
1383
- * @format GUID
1384
- */
1385
- serviceId?: string | null;
1386
- /**
1387
- * List of group ids to return. If not provided, all groups are returned.
1388
- * @format GUID
1389
- * @maxSize 3
1390
- */
1391
- groupIds?: string[] | null;
1392
- }
1393
- export interface ListAddOnGroupsByServiceIdResponse {
1394
- /**
1395
- * List of group IDs and their linked AddOns.
1396
- * @maxSize 3
1397
- */
1398
- addOnGroupsDetails?: AddOnGroupDetail[];
1399
- }
1400
- export interface AddOn extends AddOnAddOnInfoOneOf {
1401
- /** The AddOn description. */
1402
- durationInMinutes?: number;
1403
- /** The AddOn max quantity. */
1404
- maxQuantity?: number;
1405
- /**
1406
- * The AddOn ID.
1407
- * @format GUID
1408
- */
1409
- addOnId?: string | null;
1410
- /**
1411
- * The AddOn name.
1412
- * @maxLength 100
1413
- */
1414
- name?: string | null;
1415
- /** The AddOn price. */
1416
- price?: Money;
1417
- }
1418
- /** @oneof */
1419
- export interface AddOnAddOnInfoOneOf {
1420
- /** The AddOn description. */
1421
- durationInMinutes?: number;
1422
- /** The AddOn max quantity. */
1423
- maxQuantity?: number;
1424
- }
1425
- export interface AddOnGroupDetail {
1426
- /**
1427
- * The group ID.
1428
- * @format GUID
1429
- */
1430
- groupId?: string | null;
1431
- /** The group max number of AddOns. */
1432
- maxNumberOfAddOns?: number | null;
1433
- /**
1434
- * The group name.
1435
- * @maxLength 100
1436
- */
1437
- groupName?: string | null;
1438
- /**
1439
- * The AddOns information linked to the group.
1440
- * @maxSize 7
1441
- */
1442
- addOns?: AddOn[];
1443
- /**
1444
- * The group prompt.
1445
- * @maxLength 200
1446
- */
1447
- prompt?: string | null;
1448
- }
1449
- export interface SetAddOnsForGroupRequest {
1450
- /**
1451
- * The service ID to set AddOns for.
1452
- * @format GUID
1453
- */
1454
- serviceId?: string | null;
1455
- /**
1456
- * The group ID to set AddOns for.
1457
- * @format GUID
1458
- */
1459
- groupId?: string | null;
1460
- /**
1461
- * The IDs of AddOns to set.
1462
- * @format GUID
1463
- * @minSize 1
1464
- * @maxSize 7
1465
- */
1466
- addOnIds?: string[] | null;
1467
- }
1468
- export interface SetAddOnsForGroupResponse {
1469
- /** The updated AddOnGroup. */
1470
- addOnGroup?: AddOnGroup;
1471
- }
1472
- export interface ValidateAddOnsSelectionRequest {
1473
- /**
1474
- * The service ID to validate AddOns against.
1475
- * @format GUID
1476
- */
1477
- serviceId?: string | null;
1478
- /**
1479
- * The group ID to validate AddOns against.
1480
- * @format GUID
1481
- */
1482
- groupId?: string | null;
1483
- /**
1484
- * The IDs of AddOns to validate.
1485
- * @format GUID
1486
- * @minSize 1
1487
- * @maxSize 7
1488
- */
1489
- addOnIds?: string[] | null;
1490
- }
1491
- export interface ValidateAddOnsSelectionResponse {
1492
- /** The validation result. */
1493
- result?: ValidationResult;
1494
- }
1495
- export interface ValidationResult {
1496
- /** Whether the AddOns selection is valid. */
1497
- valid?: boolean | null;
1498
- /**
1499
- * A validation error message.
1500
- * This field should populated when `valid` is `false`.
1501
- * @minLength 1
1502
- * @maxLength 300
1503
- */
1504
- message?: string | null;
1505
- }
1506
- export interface CreateServiceRequest {
1507
- /** Service to create. */
1508
- service: Service;
1509
- }
1510
- export interface CreateServiceResponse {
1511
- /** Created service. */
1512
- service?: Service;
1513
- }
1514
- export interface ValidateServiceRequest {
1515
- /** Service to validate. */
1516
- service?: Service;
1517
- }
1518
- export interface ValidateServiceResponse {
1519
- /** Whether the service is valid. */
1520
- valid?: boolean;
1521
- /** Field violations. */
1522
- fieldViolations?: FieldViolation[];
1523
- }
1524
- export interface FieldViolation {
1525
- /**
1526
- * Path to the invalid field.
1527
- * @maxLength 2000
1528
- */
1529
- fieldName?: string;
1530
- /**
1531
- * Description of the error.
1532
- * @maxLength 2000
1533
- */
1534
- description?: string;
1535
- /**
1536
- * Rule name of the violation
1537
- * @maxLength 2000
1538
- */
1539
- ruleName?: string;
1540
- }
1541
- export interface BulkCreateServicesRequest {
1542
- /**
1543
- * Services to create.
1544
- * @maxSize 100
1545
- */
1546
- services: Service[];
1547
- /** Whether to return the created service objects. */
1548
- returnEntity?: boolean;
1549
- }
1550
- export interface BulkCreateServicesResponse {
1551
- /** The result of each service creation. */
1552
- results?: BulkServiceResult[];
1553
- /** Create statistics. */
1554
- bulkActionMetadata?: BulkActionMetadata;
1555
- }
1556
- export interface BulkServiceResult {
1557
- /** Update metadata. */
1558
- itemMetadata?: ItemMetadata;
1559
- /** Updated service. */
1560
- item?: Service;
1561
- }
1562
- export interface ItemMetadata {
1563
- /**
1564
- * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
1565
- * @format GUID
1566
- */
1567
- _id?: string | null;
1568
- /** Index of the item within the request array. Allows for correlation between request and response items. */
1569
- originalIndex?: number;
1570
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1571
- success?: boolean;
1572
- /** Details about the error in case of failure. */
1573
- error?: ApplicationError;
1574
- }
1575
- export interface ApplicationError {
1576
- /** Error code. */
1577
- code?: string;
1578
- /** Description of the error. */
1579
- description?: string;
1580
- /** Data related to the error. */
1581
- data?: Record<string, any> | null;
1582
- }
1583
- export interface BulkActionMetadata {
1584
- /** Number of items that were successfully processed. */
1585
- totalSuccesses?: number;
1586
- /** Number of items that couldn't be processed. */
1587
- totalFailures?: number;
1588
- /** Number of failures without details because detailed failure threshold was exceeded. */
1589
- undetailedFailures?: number;
1590
- }
1591
- export interface GetServiceRequest {
1592
- /**
1593
- * ID of the service to retrieve.
1594
- * @format GUID
1595
- */
1596
- serviceId: string;
1597
- }
1598
- export declare enum V2RequestedFields {
1599
- /** Unknown requested field. */
1600
- UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
1601
- /** When passed, `service.staff_members` is returned. */
1602
- STAFF_MEMBER_DETAILS = "STAFF_MEMBER_DETAILS",
1603
- /** When passed, `service.service_resources.resource_type.name` is returned. */
1604
- RESOURCE_TYPE_DETAILS = "RESOURCE_TYPE_DETAILS"
1605
- }
1606
- /** @enumType */
1607
- export type V2RequestedFieldsWithLiterals = V2RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'STAFF_MEMBER_DETAILS' | 'RESOURCE_TYPE_DETAILS';
1608
- export interface GetServiceResponse {
1609
- /** Retrieved service. */
1610
- service?: Service;
1611
- }
1612
- export interface GetServiceAvailabilityConstraintsRequest {
1613
- /**
1614
- * ID of the service to retrieve.
1615
- * @format GUID
1616
- */
1617
- serviceId?: string;
1618
- }
1619
- export interface GetServiceAvailabilityConstraintsResponse {
1620
- /** The retrieved availability constraints of the service. */
1621
- constraints?: ServiceAvailabilityConstraints;
1622
- }
1623
- export interface ServiceAvailabilityConstraints {
1624
- /**
1625
- * The booking policy.
1626
- * @readonly
1627
- */
1628
- bookingPolicy?: BookingPolicy;
1629
- /**
1630
- * The service schedule, including the schedule ID and availability constraints.
1631
- * @readonly
1632
- */
1633
- schedule?: Schedule;
1634
- /**
1635
- * The locations this service is offered at.
1636
- * Only multiple locations of type `BUSINESS` are supported. Multiple locations of type `CUSTOM` or `CUSTOMER` are not supported.
1637
- * For courses only: Currently, only one location is supported for all location types.
1638
- * Use the `Set Service Locations` method to change the locations this service is offered at.
1639
- * @readonly
1640
- * @maxSize 100
1641
- */
1642
- locations?: Location[];
1643
- /**
1644
- * Resource groups required to book the service. For backward compatibility only. Use `Service Resources` instead.
1645
- * @maxSize 3
1646
- * @readonly
1647
- * @deprecated Resource groups required to book the service. For backward compatibility only. Use `Service Resources` instead.
1648
- * @replacedBy service_resources
1649
- * @targetRemovalDate 2024-08-19
1650
- */
1651
- resourceGroups?: ResourceGroup[];
1652
- /**
1653
- * Resource groups required to book the service.
1654
- * @maxSize 3
1655
- * @readonly
1656
- */
1657
- serviceResources?: ServiceResource[];
1658
- /**
1659
- * The time between available slots' start times.
1660
- * For example, for 5-minute slots: 3:00, 3:05, 3:10 etc. For 1-hour slots: 3:00, 4:00, 5:00 etc.
1661
- * Applied to all schedules of the site.
1662
- * For appointments only.
1663
- * @readonly
1664
- */
1665
- slotsSplitInterval?: SplitInterval;
1666
- /**
1667
- * Online booking settings.
1668
- * @readonly
1669
- */
1670
- onlineBooking?: OnlineBooking;
1671
- }
1672
- /** 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. */
1673
- export interface SplitInterval {
1674
- /**
1675
- * Whether the slot duration is used as the split interval value.
1676
- * If `same_as_duration` is `true`, the `value_in_minutes` is the sum of the first duration in
1677
- * `schedule.availabilityConstraints.SlotDurations` field, and `schedule.availabilityConstraints.TimeBetweenSlots` field.
1678
- */
1679
- sameAsDuration?: boolean | null;
1680
- /** Number of minutes between available slots' start times when `same_as_duration` is `false`. */
1681
- valueInMinutes?: number | null;
1682
- }
1683
- export interface UpdateServiceRequest {
1684
- /** Service to update. */
1685
- service: Service;
1686
- }
1687
- export interface UpdateServiceResponse {
1688
- /** Updated service. */
1689
- service?: Service;
1690
- }
1691
- export interface BulkUpdateServicesRequest {
1692
- /**
1693
- * Services to update.
1694
- * @maxSize 100
1695
- */
1696
- services?: MaskedService[];
1697
- /** Whether to include the updated services in the response. Default: `false` */
1698
- returnEntity?: boolean;
1699
- }
1700
- export interface MaskedService {
1701
- /** Service to update. */
1702
- service?: Service;
1703
- /** Explicit list of fields to update. */
1704
- mask?: string[];
1705
- }
1706
- export interface BulkUpdateServicesResponse {
1707
- /** The result of each service update. */
1708
- results?: BulkServiceResult[];
1709
- /** Update statistics. */
1710
- bulkActionMetadata?: BulkActionMetadata;
1711
- }
1712
- export interface BulkUpdateServicesByFilterRequest {
1713
- /** Filter to identify the services to update. */
1714
- filter: Record<string, any> | null;
1715
- /** Service to update. */
1716
- service: Service;
1717
- }
1718
- export interface BulkUpdateServicesByFilterResponse {
1719
- /**
1720
- * ID of the service update job.
1721
- *
1722
- * Pass this ID to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction) to retrieve job details and metadata.
1723
- * @format GUID
1724
- */
1725
- jobId?: string;
1726
- }
1727
- export interface DeleteServiceRequest {
1728
- /**
1729
- * ID of the service to delete.
1730
- * @format GUID
1731
- */
1732
- serviceId: string;
1733
- /**
1734
- * Whether to preserve future sessions with participants.
1735
- *
1736
- * Default: `false`
1737
- */
1738
- preserveFutureSessionsWithParticipants?: boolean;
1739
- /**
1740
- * Whether to notify participants about the change and an optional
1741
- * custom message.
1742
- */
1743
- participantNotification?: ParticipantNotification;
1744
- }
1745
- export interface ParticipantNotification {
1746
- /**
1747
- * Whether to send the message about the changes to the customer.
1748
- *
1749
- * Default: `false`
1750
- */
1751
- notifyParticipants?: boolean | null;
1752
- /**
1753
- * Custom message to send to the participants about the changes to the booking.
1754
- * @maxLength 2000
1755
- */
1756
- message?: string | null;
1757
- }
1758
- export interface DeleteServiceResponse {
1759
- }
1760
- export interface BulkDeleteServicesRequest {
1761
- /**
1762
- * IDs of the services to delete.
1763
- * @format GUID
1764
- * @maxSize 100
1765
- */
1766
- ids: string[];
1767
- /**
1768
- * Whether to preserve future sessions with participants.
1769
- *
1770
- * Default: `false`.
1771
- */
1772
- preserveFutureSessionsWithParticipants?: boolean;
1773
- /**
1774
- * Whether to notify participants about the change and an optional
1775
- * custom message.
1776
- */
1777
- participantNotification?: ParticipantNotification;
1778
- }
1779
- export interface BulkDeleteServicesResponse {
1780
- /** The result of each service removal. */
1781
- results?: BulkServiceResult[];
1782
- /** Delete statistics. */
1783
- bulkActionMetadata?: BulkActionMetadata;
1784
- }
1785
- export interface BulkDeleteServicesByFilterRequest {
1786
- /** Filter to identify the services that need to be deleted. */
1787
- filter: Record<string, any> | null;
1788
- /**
1789
- * Whether to preserve future sessions with participants.
1790
- *
1791
- * Default: `false`.
1792
- */
1793
- preserveFutureSessionsWithParticipants?: boolean;
1794
- /** Whether to notify participants about the change and an optional custom message. */
1795
- participantNotification?: ParticipantNotification;
1796
- }
1797
- export interface BulkDeleteServicesByFilterResponse {
1798
- /**
1799
- * ID of the service deletion job.
1800
- *
1801
- * Pass this ID to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction) to retrieve job details and metadata.
1802
- * @format GUID
1803
- */
1804
- jobId?: string;
1805
- }
1806
- export interface QueryServicesRequest {
1807
- /** WQL expression. */
1808
- query: QueryV2;
1809
- }
1810
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
1811
- /** Paging options to limit and skip the number of items. */
1812
- paging?: Paging;
1813
- /**
1814
- * Filter object in the following format:
1815
- *
1816
- * `"filter" : {
1817
- * "fieldName1": "value1",
1818
- * "fieldName2":{"$operator":"value2"}
1819
- * }`
1820
- *
1821
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`
1822
- *
1823
- * Read more about [supported fields and operators](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting).
1824
- */
1825
- filter?: Record<string, any> | null;
1826
- /**
1827
- * Sort object in the following format:
1828
- * `[ {"fieldName":"sortField1","order":"ASC"},
1829
- * {"fieldName":"sortField2","order":"DESC"} ]`
1830
- *
1831
- * Read more about [sorting](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting#wix-bookings_services-v2_filtering-and-sorting_sorting).
1832
- * @maxSize 50
1833
- */
1834
- sort?: Sorting[];
1835
- }
1836
- /** @oneof */
1837
- export interface QueryV2PagingMethodOneOf {
1838
- /** Paging options to limit and skip the number of items. */
1839
- paging?: Paging;
1840
- }
1841
- export interface Sorting {
1842
- /**
1843
- * Name of the field to sort by.
1844
- * @maxLength 512
1845
- */
1846
- fieldName?: string;
1847
- /** Sort order. */
1848
- order?: SortOrderWithLiterals;
1849
- }
1850
- export declare enum SortOrder {
1851
- ASC = "ASC",
1852
- DESC = "DESC"
1853
- }
1854
- /** @enumType */
1855
- export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
1856
- export interface Paging {
1857
- /** Number of items to load. */
1858
- limit?: number | null;
1859
- /** Number of items to skip in the current sort order. */
1860
- offset?: number | null;
1861
- }
1862
- export interface CursorPaging {
1863
- /**
1864
- * Number of items to load.
1865
- * @max 100
1866
- */
1867
- limit?: number | null;
1868
- /**
1869
- * Pointer to the next or previous page in the list of results.
1870
- *
1871
- * You can get the relevant cursor token
1872
- * from the `pagingMetadata` object in the previous call's response.
1873
- * Not relevant for the first request.
1874
- * @maxLength 16000
1875
- */
1876
- cursor?: string | null;
1877
- }
1878
- export interface QueryServicesResponse {
1879
- /** The retrieved services. */
1880
- services?: Service[];
1881
- /** Paging metadata, including offset and count. */
1882
- pagingMetadata?: PagingMetadataV2;
1883
- }
1884
- export interface PagingMetadataV2 {
1885
- /** Number of items returned in the response. */
1886
- count?: number | null;
1887
- /** Offset that was requested. */
1888
- offset?: number | null;
1889
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1890
- total?: number | null;
1891
- /** Flag that indicates the server failed to calculate the `total` field. */
1892
- tooManyToCount?: boolean | null;
1893
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1894
- cursors?: Cursors;
1895
- }
1896
- export interface Cursors {
1897
- /**
1898
- * Cursor pointing to next page in the list of results.
1899
- * @maxLength 16000
1900
- */
1901
- next?: string | null;
1902
- /**
1903
- * Cursor pointing to previous page in the list of results.
1904
- * @maxLength 16000
1905
- */
1906
- prev?: string | null;
1907
- }
1908
- export interface SearchServicesRequest {
1909
- /** WQL, search or aggregation expression. */
1910
- search: CursorSearch;
1911
- }
1912
- export interface CursorSearch extends CursorSearchPagingMethodOneOf {
1913
- /**
1914
- * Cursor pointing to page of results.
1915
- * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
1916
- */
1917
- cursorPaging?: CursorPaging;
1918
- /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
1919
- filter?: Record<string, any> | null;
1920
- /**
1921
- * Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
1922
- * @maxSize 10
1923
- */
1924
- sort?: Sorting[];
1925
- /**
1926
- * Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
1927
- * @maxSize 10
1928
- */
1929
- aggregations?: Aggregation[];
1930
- /** Free text to match in searchable fields */
1931
- search?: SearchDetails;
1932
- /**
1933
- * UTC offset or IANA time zone. Valid values are
1934
- * ISO 8601 UTC offsets, such as +02:00 or -06:00,
1935
- * and IANA time zone IDs, such as Europe/Rome
1936
- *
1937
- * Affects all filters and aggregations returned values.
1938
- * You may override this behavior in a specific filter by providing
1939
- * timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
1940
- * @maxLength 50
1941
- */
1942
- timeZone?: string | null;
1943
- }
1944
- /** @oneof */
1945
- export interface CursorSearchPagingMethodOneOf {
1946
- /**
1947
- * Cursor pointing to page of results.
1948
- * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
1949
- */
1950
- cursorPaging?: CursorPaging;
1951
- }
1952
- export interface Aggregation extends AggregationKindOneOf {
1953
- /** Value aggregation */
1954
- value?: ValueAggregation;
1955
- /** Range aggregation */
1956
- range?: RangeAggregation;
1957
- /** Scalar aggregation */
1958
- scalar?: ScalarAggregation;
1959
- /** Date histogram aggregation */
1960
- dateHistogram?: DateHistogramAggregation;
1961
- /** Nested aggregation */
1962
- nested?: NestedAggregation;
1963
- /**
1964
- * User-defined name of aggregation, should be unique, will appear in aggregation results
1965
- * @maxLength 100
1966
- */
1967
- name?: string | null;
1968
- /** Type of aggregation, client must provide matching aggregation field below */
1969
- type?: AggregationTypeWithLiterals;
1970
- /**
1971
- * Field to aggregate by, use dot notation to specify json path
1972
- * @maxLength 200
1973
- */
1974
- fieldPath?: string;
1975
- /**
1976
- * deprecated, use `nested` instead
1977
- * @deprecated deprecated, use `nested` instead
1978
- * @replacedBy kind.nested
1979
- * @targetRemovalDate 2025-01-01
1980
- */
1981
- groupBy?: GroupByAggregation;
1982
- }
1983
- /** @oneof */
1984
- export interface AggregationKindOneOf {
1985
- /** Value aggregation */
1986
- value?: ValueAggregation;
1987
- /** Range aggregation */
1988
- range?: RangeAggregation;
1989
- /** Scalar aggregation */
1990
- scalar?: ScalarAggregation;
1991
- /** Date histogram aggregation */
1992
- dateHistogram?: DateHistogramAggregation;
1993
- /** Nested aggregation */
1994
- nested?: NestedAggregation;
1995
- }
1996
- export interface RangeBucket {
1997
- /** Inclusive lower bound of the range. Required if to is not given. */
1998
- from?: number | null;
1999
- /** Exclusive upper bound of the range. Required if from is not given. */
2000
- to?: number | null;
2001
- }
2002
- export declare enum SortType {
2003
- COUNT = "COUNT",
2004
- VALUE = "VALUE"
2005
- }
2006
- /** @enumType */
2007
- export type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
2008
- export declare enum SortDirection {
2009
- DESC = "DESC",
2010
- ASC = "ASC"
2011
- }
2012
- /** @enumType */
2013
- export type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
2014
- export declare enum MissingValues {
2015
- EXCLUDE = "EXCLUDE",
2016
- INCLUDE = "INCLUDE"
2017
- }
2018
- /** @enumType */
2019
- export type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
2020
- export interface IncludeMissingValuesOptions {
2021
- /**
2022
- * can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
2023
- * @maxLength 20
2024
- */
2025
- addToBucket?: string;
2026
- }
2027
- export declare enum ScalarType {
2028
- UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
2029
- COUNT_DISTINCT = "COUNT_DISTINCT",
2030
- MIN = "MIN",
2031
- MAX = "MAX"
2032
- }
2033
- /** @enumType */
2034
- export type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
2035
- export interface ValueAggregation extends ValueAggregationOptionsOneOf {
2036
- /** options for including missing values */
2037
- includeOptions?: IncludeMissingValuesOptions;
2038
- /** Should sort by number of matches or value of the field */
2039
- sortType?: SortTypeWithLiterals;
2040
- /** Should sort in ascending or descending order */
2041
- sortDirection?: SortDirectionWithLiterals;
2042
- /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
2043
- limit?: number | null;
2044
- /** should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
2045
- missingValues?: MissingValuesWithLiterals;
2046
- }
2047
- /** @oneof */
2048
- export interface ValueAggregationOptionsOneOf {
2049
- /** options for including missing values */
2050
- includeOptions?: IncludeMissingValuesOptions;
2051
- }
2052
- export declare enum NestedAggregationType {
2053
- UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
2054
- VALUE = "VALUE",
2055
- RANGE = "RANGE",
2056
- SCALAR = "SCALAR",
2057
- DATE_HISTOGRAM = "DATE_HISTOGRAM"
2058
- }
2059
- /** @enumType */
2060
- export type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
2061
- export interface RangeAggregation {
2062
- /**
2063
- * Range buckets
2064
- * @maxSize 50
2065
- */
2066
- buckets?: RangeBucket[];
2067
- }
2068
- export interface ScalarAggregation {
2069
- /** Define the operator for the scalar aggregation */
2070
- type?: ScalarTypeWithLiterals;
2071
- }
2072
- export interface DateHistogramAggregation {
2073
- /** Interval for date histogram aggregation */
2074
- interval?: IntervalWithLiterals;
2075
- }
2076
- export declare enum Interval {
2077
- /** Unknown interval. */
2078
- UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
2079
- /** Yearly interval. */
2080
- YEAR = "YEAR",
2081
- /** Monthly interval. */
2082
- MONTH = "MONTH",
2083
- /** Weekly interval. */
2084
- WEEK = "WEEK",
2085
- /** Daily interval. */
2086
- DAY = "DAY",
2087
- /** Hourly interval. */
2088
- HOUR = "HOUR",
2089
- /** Minute interval. */
2090
- MINUTE = "MINUTE",
2091
- /** Second interval. */
2092
- SECOND = "SECOND"
2093
- }
2094
- /** @enumType */
2095
- export type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
2096
- export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
2097
- /** Value aggregation */
2098
- value?: ValueAggregation;
2099
- /** Range aggregation */
2100
- range?: RangeAggregation;
2101
- /** Scalar aggregation */
2102
- scalar?: ScalarAggregation;
2103
- /** Date histogram aggregation */
2104
- dateHistogram?: DateHistogramAggregation;
2105
- /**
2106
- * User-defined name of aggregation, should be unique, will appear in aggregation results
2107
- * @maxLength 100
2108
- */
2109
- name?: string | null;
2110
- /** Type of aggregation, client must provide matching aggregation field below */
2111
- type?: NestedAggregationTypeWithLiterals;
2112
- /**
2113
- * Field to aggregate by, use dont notation to specify json path
2114
- * @maxLength 200
2115
- */
2116
- fieldPath?: string;
2117
- }
2118
- /** @oneof */
2119
- export interface NestedAggregationItemKindOneOf {
2120
- /** Value aggregation */
2121
- value?: ValueAggregation;
2122
- /** Range aggregation */
2123
- range?: RangeAggregation;
2124
- /** Scalar aggregation */
2125
- scalar?: ScalarAggregation;
2126
- /** Date histogram aggregation */
2127
- dateHistogram?: DateHistogramAggregation;
2128
- }
2129
- export declare enum AggregationType {
2130
- UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
2131
- VALUE = "VALUE",
2132
- RANGE = "RANGE",
2133
- SCALAR = "SCALAR",
2134
- DATE_HISTOGRAM = "DATE_HISTOGRAM",
2135
- NESTED = "NESTED"
2136
- }
2137
- /** @enumType */
2138
- export type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
2139
- /** nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
2140
- export interface NestedAggregation {
2141
- /**
2142
- * Flattened list of aggregations, where each next aggregation is nested within previous one
2143
- * @minSize 2
2144
- * @maxSize 10
2145
- */
2146
- nestedAggregations?: NestedAggregationItem[];
2147
- }
2148
- export interface GroupByAggregation extends GroupByAggregationKindOneOf {
2149
- /** Value aggregation configuration */
2150
- value?: ValueAggregation;
2151
- /**
2152
- * User-defined name of aggregation, should be unique, will appear in aggregation results
2153
- * @maxLength 100
2154
- */
2155
- name?: string | null;
2156
- /**
2157
- * Field to aggregate by
2158
- * @maxLength 200
2159
- */
2160
- fieldPath?: string;
2161
- }
2162
- /** @oneof */
2163
- export interface GroupByAggregationKindOneOf {
2164
- /** Value aggregation configuration */
2165
- value?: ValueAggregation;
2166
- }
2167
- export interface SearchDetails {
2168
- /** Boolean search mode */
2169
- mode?: ModeWithLiterals;
2170
- /**
2171
- * Search term or expression
2172
- * @maxLength 200
2173
- */
2174
- expression?: string | null;
2175
- /**
2176
- * Fields to search in. If empty - server will search in own default fields
2177
- * @maxSize 10
2178
- * @maxLength 200
2179
- */
2180
- fields?: string[];
2181
- /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
2182
- fuzzy?: boolean;
2183
- }
2184
- export declare enum Mode {
2185
- /** Any */
2186
- OR = "OR",
2187
- /** All */
2188
- AND = "AND"
2189
- }
2190
- /** @enumType */
2191
- export type ModeWithLiterals = Mode | 'OR' | 'AND';
2192
- export interface SearchServicesResponse {
2193
- /** The retrieved services. */
2194
- services?: Service[];
2195
- /** Cursor paging metadata */
2196
- pagingMetadata?: CursorPagingMetadata;
2197
- /** Response aggregation data */
2198
- aggregationData?: AggregationData;
2199
- }
2200
- export interface CursorPagingMetadata {
2201
- /** Number of items returned in the response. */
2202
- count?: number | null;
2203
- /** Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */
2204
- cursors?: Cursors;
2205
- /**
2206
- * Indicates if there are more results after the current page.
2207
- * If `true`, another page of results can be retrieved.
2208
- * If `false`, this is the last page.
2209
- */
2210
- hasNext?: boolean | null;
2211
- }
2212
- export interface AggregationData {
2213
- /**
2214
- * key = aggregation name (as derived from search request)
2215
- * @maxSize 10000
2216
- */
2217
- results?: AggregationResults[];
2218
- }
2219
- export interface ValueAggregationResult {
2220
- /**
2221
- * Value of the field
2222
- * @maxLength 100
2223
- */
2224
- value?: string;
2225
- /** Count of entities with this value */
2226
- count?: number;
2227
- }
2228
- export interface RangeAggregationResult {
2229
- /** Inclusive lower bound of the range */
2230
- from?: number | null;
2231
- /** Exclusive upper bound of the range */
2232
- to?: number | null;
2233
- /** Count of entities in this range */
2234
- count?: number;
2235
- }
2236
- export interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
2237
- /** Value aggregation results */
2238
- values?: ValueResults;
2239
- /** Range aggregation results */
2240
- ranges?: RangeResults;
2241
- /** Scalar aggregation results */
2242
- scalar?: AggregationResultsScalarResult;
2243
- /**
2244
- * User-defined name of aggregation, matches the one provided in request
2245
- * @maxLength 100
2246
- */
2247
- name?: string;
2248
- /** Type of aggregation that matches result */
2249
- type?: AggregationTypeWithLiterals;
2250
- /**
2251
- * Field to aggregate by, matches the one provided in request
2252
- * @maxLength 200
2253
- */
2254
- fieldPath?: string;
2255
- }
2256
- /** @oneof */
2257
- export interface NestedAggregationResultsResultOneOf {
2258
- /** Value aggregation results */
2259
- values?: ValueResults;
2260
- /** Range aggregation results */
2261
- ranges?: RangeResults;
2262
- /** Scalar aggregation results */
2263
- scalar?: AggregationResultsScalarResult;
2264
- }
2265
- export interface ValueResults {
2266
- /**
2267
- * List of value aggregations
2268
- * @maxSize 250
2269
- */
2270
- results?: ValueAggregationResult[];
2271
- }
2272
- export interface RangeResults {
2273
- /**
2274
- * List of ranges returned in same order as requested
2275
- * @maxSize 50
2276
- */
2277
- results?: RangeAggregationResult[];
2278
- }
2279
- export interface AggregationResultsScalarResult {
2280
- /** Type of scalar aggregation */
2281
- type?: ScalarTypeWithLiterals;
2282
- /** Value of the scalar aggregation */
2283
- value?: number;
2284
- }
2285
- export interface NestedValueAggregationResult {
2286
- /**
2287
- * Value of the field
2288
- * @maxLength 1000
2289
- */
2290
- value?: string;
2291
- /** Nested aggregations */
2292
- nestedResults?: NestedAggregationResults;
2293
- }
2294
- export interface ValueResult {
2295
- /**
2296
- * Value of the field
2297
- * @maxLength 1000
2298
- */
2299
- value?: string;
2300
- /** Count of entities with this value */
2301
- count?: number | null;
2302
- }
2303
- export interface RangeResult {
2304
- /** Inclusive lower bound of the range */
2305
- from?: number | null;
2306
- /** Exclusive upper bound of the range */
2307
- to?: number | null;
2308
- /** Count of entities in this range */
2309
- count?: number | null;
2310
- }
2311
- export interface ScalarResult {
2312
- /** Value of the scalar aggregation */
2313
- value?: number;
2314
- }
2315
- export interface NestedResultValue extends NestedResultValueResultOneOf {
2316
- /** Value aggregation result */
2317
- value?: ValueResult;
2318
- /** Range aggregation result */
2319
- range?: RangeResult;
2320
- /** Scalar aggregation result */
2321
- scalar?: ScalarResult;
2322
- /** Date histogram aggregation result */
2323
- dateHistogram?: ValueResult;
2324
- }
2325
- /** @oneof */
2326
- export interface NestedResultValueResultOneOf {
2327
- /** Value aggregation result */
2328
- value?: ValueResult;
2329
- /** Range aggregation result */
2330
- range?: RangeResult;
2331
- /** Scalar aggregation result */
2332
- scalar?: ScalarResult;
2333
- /** Date histogram aggregation result */
2334
- dateHistogram?: ValueResult;
2335
- }
2336
- export interface Results {
2337
- /** List of nested aggregations */
2338
- results?: Record<string, NestedResultValue>;
2339
- }
2340
- export interface DateHistogramResult {
2341
- /**
2342
- * Date in ISO 8601 format
2343
- * @maxLength 100
2344
- */
2345
- value?: string;
2346
- /** Count of documents in the bucket */
2347
- count?: number;
2348
- }
2349
- export interface GroupByValueResults {
2350
- /**
2351
- * List of value aggregations
2352
- * @maxSize 1000
2353
- */
2354
- results?: NestedValueAggregationResult[];
2355
- }
2356
- export interface DateHistogramResults {
2357
- /**
2358
- * List of date histogram aggregations
2359
- * @maxSize 200
2360
- */
2361
- results?: DateHistogramResult[];
2362
- }
2363
- /**
2364
- * results of `NESTED` aggregation type in a flattened form
2365
- * aggregations in resulting array are keyed by requested aggregation `name`.
2366
- */
2367
- export interface NestedResults {
2368
- /**
2369
- * List of nested aggregations
2370
- * @maxSize 1000
2371
- */
2372
- results?: Results[];
2373
- }
2374
- export interface AggregationResults extends AggregationResultsResultOneOf {
2375
- /** Value aggregation results */
2376
- values?: ValueResults;
2377
- /** Range aggregation results */
2378
- ranges?: RangeResults;
2379
- /** Scalar aggregation results */
2380
- scalar?: AggregationResultsScalarResult;
2381
- /** Group by value aggregation results */
2382
- groupedByValue?: GroupByValueResults;
2383
- /** Date histogram aggregation results */
2384
- dateHistogram?: DateHistogramResults;
2385
- /** Nested aggregation results */
2386
- nested?: NestedResults;
2387
- /**
2388
- * User-defined name of aggregation as derived from search request
2389
- * @maxLength 100
2390
- */
2391
- name?: string;
2392
- /** Type of aggregation that must match provided kind as derived from search request */
2393
- type?: AggregationTypeWithLiterals;
2394
- /**
2395
- * Field to aggregate by as derived from search request
2396
- * @maxLength 200
2397
- */
2398
- fieldPath?: string;
2399
- }
2400
- /** @oneof */
2401
- export interface AggregationResultsResultOneOf {
2402
- /** Value aggregation results */
2403
- values?: ValueResults;
2404
- /** Range aggregation results */
2405
- ranges?: RangeResults;
2406
- /** Scalar aggregation results */
2407
- scalar?: AggregationResultsScalarResult;
2408
- /** Group by value aggregation results */
2409
- groupedByValue?: GroupByValueResults;
2410
- /** Date histogram aggregation results */
2411
- dateHistogram?: DateHistogramResults;
2412
- /** Nested aggregation results */
2413
- nested?: NestedResults;
2414
- }
2415
- export interface QueryPoliciesRequest {
2416
- /**
2417
- * Information about filters, paging, and sorting. See the article about
2418
- * booking policy filters
2419
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))
2420
- * for all supported filters and sorting options.
2421
- */
2422
- query: CursorQuery;
2423
- }
2424
- export interface CursorQuery extends CursorQueryPagingMethodOneOf {
2425
- /** 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`. */
2426
- cursorPaging?: CursorPaging;
2427
- /**
2428
- * Filter object in the following format:
2429
- * `"filter" : {
2430
- * "fieldName1": "value1",
2431
- * "fieldName2":{"$operator":"value2"}
2432
- * }`
2433
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`
2434
- */
2435
- filter?: Record<string, any> | null;
2436
- /**
2437
- * Sort object in the following format:
2438
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
2439
- * @maxSize 50
2440
- */
2441
- sort?: Sorting[];
2442
- }
2443
- /** @oneof */
2444
- export interface CursorQueryPagingMethodOneOf {
2445
- /** 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`. */
2446
- cursorPaging?: CursorPaging;
2447
- }
2448
- export interface QueryPoliciesResponse {
2449
- /** Retrieved booking policies and information about the services using them. */
2450
- bookingPolicies?: BookingPolicyWithServices[];
2451
- /** Paging metadata. */
2452
- pagingMetadata?: CursorPagingMetadata;
2453
- }
2454
- export interface BookingPolicyWithServices {
2455
- /** Retrieved booking policy. */
2456
- bookingPolicy?: BookingPolicy;
2457
- /**
2458
- * Up to 5 services connected to the booking policy. If `totalServiceCount` is
2459
- * greater than 5, there are additional services connected to the policy.
2460
- * You can call *Search Services*
2461
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/search-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/search-services))
2462
- * specifying the relevant policy ID in the filter, to retrieve all services that are
2463
- * connected to a booking policy.
2464
- * @maxSize 5
2465
- */
2466
- connectedServices?: Service[];
2467
- /** Total number of services connected to the booking policy. */
2468
- totalServiceCount?: number;
2469
- }
2470
- export interface QueryBookingFormsRequest {
2471
- /**
2472
- * Information about filters, paging, and sorting. See the article about
2473
- * form filters ([REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object))
2474
- * for all supported filters and sorting options.
2475
- */
2476
- query: CursorQuery;
2477
- /**
2478
- * Conditional fields to return.
2479
- * @maxSize 1
2480
- */
2481
- conditionalFields?: RequestedFieldsWithLiterals[];
2482
- }
2483
- export declare enum RequestedFields {
2484
- /** Unknown requested conditional field. */
2485
- UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
2486
- /** Whether to return the site's default booking form. */
2487
- DEFAULT_BOOKING_FORM = "DEFAULT_BOOKING_FORM"
2488
- }
2489
- /** @enumType */
2490
- export type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'DEFAULT_BOOKING_FORM';
2491
- export interface QueryBookingFormsResponse {
2492
- /** Retrieved booking forms and information about connected services. */
2493
- bookingForms?: BookingForm[];
2494
- /** Paging metadata. */
2495
- pagingMetadata?: CursorPagingMetadata;
2496
- /** The site's default booking form and information about connected services. */
2497
- defaultBookingForm?: BookingForm;
2498
- }
2499
- export interface BookingForm {
2500
- /** Information about the retrieved booking form. */
2501
- formDetails?: FormDetails;
2502
- /**
2503
- * Up to 5 services connected to the booking form. If `totalServiceCount` is
2504
- * greater than 5, there are additional services connected to the policy.
2505
- * You can call *Search Services*
2506
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/search-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/search-services))
2507
- * specifying the relevant policy ID in the filter, to retrieve all services that are
2508
- * connected to a booking policy.
2509
- * @maxSize 5
2510
- */
2511
- connectedServices?: ConnectedService[];
2512
- /** Total number of services connected to the booking form. */
2513
- totalServiceCount?: number;
2514
- }
2515
- export interface FormDetails {
2516
- /**
2517
- * Form ID.
2518
- * @format GUID
2519
- */
2520
- formId?: string;
2521
- /**
2522
- * Form name.
2523
- * @maxLength 200
2524
- */
2525
- name?: string | null;
2526
- /**
2527
- * Revision number, which increments by 1 each time the form is updated.
2528
- * To prevent conflicting changes,
2529
- * the current revision must be passed when updating the form.
2530
- * @readonly
2531
- */
2532
- revision?: string | null;
2533
- }
2534
- export interface ConnectedService {
2535
- /**
2536
- * ID of the service connected to the booking form.
2537
- * @format GUID
2538
- */
2539
- _id?: string | null;
2540
- /**
2541
- * Name of the service connected to the booking form.
2542
- * @maxLength 400
2543
- * @minLength 1
2544
- */
2545
- name?: string | null;
2546
- }
2547
- export interface CountServicesRequest {
2548
- /**
2549
- * Query filter to base the count on. See supported filters
2550
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))
2551
- * for more details.
2552
- */
2553
- filter?: Record<string, any> | null;
2554
- }
2555
- export interface CountServicesResponse {
2556
- /** Number of services matching the specified filter. */
2557
- count?: number;
2558
- }
2559
- export interface QueryLocationsRequest {
2560
- /** Filter. */
2561
- filter?: QueryLocationsFilter;
2562
- }
2563
- export interface QueryLocationsFilter {
2564
- /**
2565
- * Service filter. See supported filters
2566
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))
2567
- * for more details.
2568
- */
2569
- services?: Record<string, any> | null;
2570
- /**
2571
- * List of business IDs to filter by.
2572
- * @format GUID
2573
- * @maxSize 100
2574
- */
2575
- businessLocationIds?: string[];
2576
- }
2577
- export interface QueryLocationsResponse {
2578
- /**
2579
- * Retrieved business locations and whether each location is connected to at
2580
- * least one service.
2581
- */
2582
- businessLocations?: BusinessLocations;
2583
- /**
2584
- * Retrieved custom locations and whether each location is connected to at
2585
- * least one service.
2586
- */
2587
- customLocations?: CustomLocations;
2588
- /**
2589
- * Retrieved customer locations and whether each location is connected to at
2590
- * least one service.
2591
- */
2592
- customerLocations?: CustomerLocations;
2593
- }
2594
- export interface BusinessLocations {
2595
- /**
2596
- * Whether at least one service matching the filter is connected to any of the
2597
- * retrieved business locations.
2598
- */
2599
- exists?: boolean;
2600
- /**
2601
- * Retrieved business locations.
2602
- * @maxSize 100
2603
- */
2604
- locations?: Location[];
2605
- }
2606
- export interface CustomLocations {
2607
- /**
2608
- * Whether at least one service matching the filter is connected to any of the
2609
- * retrieved custom locations.
2610
- */
2611
- exists?: boolean;
2612
- }
2613
- export interface CustomerLocations {
2614
- /**
2615
- * Whether at least one service matching the filter is connected to any of the
2616
- * retrieved customer locations.
2617
- */
2618
- exists?: boolean;
2619
- }
2620
- export interface QueryCategoriesRequest {
2621
- /** Filter. */
2622
- filter?: QueryCategoriesFilter;
2623
- }
2624
- export interface QueryCategoriesFilter {
2625
- /**
2626
- * Service filter. See supported filters
2627
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))
2628
- * for more details.
2629
- */
2630
- services?: Record<string, any> | null;
2631
- /**
2632
- * List of category IDs to filter by.
2633
- * @format GUID
2634
- * @maxSize 100
2635
- */
2636
- categoryIds?: string[];
2637
- }
2638
- export interface QueryCategoriesResponse {
2639
- /** Retrieved categories. */
2640
- categories?: V2Category[];
2641
- }
2642
- export interface QueryServicesMultiLanguageRequest {
2643
- /** WQL expression. */
2644
- query?: QueryV2;
2645
- }
2646
- export interface QueryServicesMultiLanguageResponse {
2647
- /** The retrieved services in the main language */
2648
- services?: Service[];
2649
- /**
2650
- * the retrieved services in the requested language according to the
2651
- * provided linguist aspect
2652
- */
2653
- translatedServices?: Service[];
2654
- /** Paging metadata, including offset and count. */
2655
- pagingMetadata?: PagingMetadataV2;
2656
- }
2657
- export interface SetServiceLocationsRequest {
2658
- /**
2659
- * ID of the service.
2660
- * @format GUID
2661
- */
2662
- serviceId: string;
2663
- /**
2664
- * List of locations replacing existing service locations. Omitting an existing location removes it from the service. Specify `removedLocationSessionsAction` to determine the handling of future sessions scheduled at that location.
2665
- * @maxSize 100
2666
- */
2667
- locations: Location[];
2668
- /**
2669
- * The action to perform on sessions currently set to a removed location. For
2670
- * example, move existing sessions to a new specified location.
2671
- * If not specified, sessions will not be moved to a new location.
2672
- */
2673
- removedLocationSessionsAction?: RemovedLocationSessionsAction;
2674
- /**
2675
- * Whether to notify participants about the change of location, and an
2676
- * Optional custom message. The notification is sent only to participants of sessions that are affected by the change.
2677
- */
2678
- participantNotification?: ParticipantNotification;
2679
- }
2680
- export interface RemovedLocationSessionsAction extends RemovedLocationSessionsActionActionOptionsOneOf {
2681
- /**
2682
- * Details about the new location of future events that were scheduled to take
2683
- * place at a removed location.
2684
- */
2685
- moveToLocationOptions?: MoveToNewLocationsOptions;
2686
- /** Information about what to do with future events at the removed location. */
2687
- action?: ActionWithLiterals;
2688
- }
2689
- /** @oneof */
2690
- export interface RemovedLocationSessionsActionActionOptionsOneOf {
2691
- /**
2692
- * Details about the new location of future events that were scheduled to take
2693
- * place at a removed location.
2694
- */
2695
- moveToLocationOptions?: MoveToNewLocationsOptions;
2696
- }
2697
- export declare enum Action {
2698
- UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
2699
- /** Retain all future sessions at their current location. This is the default. */
2700
- KEEP_AT_CURRENT_LOCATION = "KEEP_AT_CURRENT_LOCATION",
2701
- /** Move future events to a new location. */
2702
- MOVE_TO_LOCATION = "MOVE_TO_LOCATION",
2703
- /**
2704
- * Cancel all future events at the removed location.
2705
- * Currently not supported.
2706
- */
2707
- DELETE = "DELETE"
2708
- }
2709
- /** @enumType */
2710
- export type ActionWithLiterals = Action | 'UNKNOWN_ACTION_TYPE' | 'KEEP_AT_CURRENT_LOCATION' | 'MOVE_TO_LOCATION' | 'DELETE';
2711
- export interface MoveToNewLocationsOptions {
2712
- /** The new location to move existing sessions currently set to a removed location, used when `action` is `MOVE_TO_LOCATION`. */
2713
- newLocation?: Location;
2714
- }
2715
- export interface SetServiceLocationsResponse {
2716
- /** The updated service with the newly set locations. */
2717
- service?: Service;
2718
- }
2719
- export interface EnablePricingPlansForServiceRequest {
2720
- /**
2721
- * ID of the service to update.
2722
- * @format GUID
2723
- */
2724
- serviceId: string;
2725
- /**
2726
- * IDs of the *pricing plans*
2727
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))
2728
- * to add to the service's `payment.pricingPlanIds` array.
2729
- * @format GUID
2730
- * @maxSize 100
2731
- */
2732
- pricingPlanIds: string[];
2733
- }
2734
- export interface EnablePricingPlansForServiceResponse {
2735
- /** Updated service. */
2736
- service?: Service;
2737
- }
2738
- export interface InvalidPricingPlan {
2739
- /**
2740
- * ID of the invalid pricing plan.
2741
- * @format GUID
2742
- */
2743
- _id?: string;
2744
- /**
2745
- * Explanation why the pricing plan is considered invalid.
2746
- * @maxLength 2000
2747
- */
2748
- message?: string;
2749
- }
2750
- export interface DisablePricingPlansForServiceRequest {
2751
- /**
2752
- * ID of the service to update.
2753
- * @format GUID
2754
- */
2755
- serviceId: string;
2756
- /**
2757
- * IDs of the *pricing plans*
2758
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))
2759
- * to remove from the service's `payment.pricingPlanIds` array.
2760
- * @format GUID
2761
- * @maxSize 75
2762
- */
2763
- pricingPlanIds?: string[];
2764
- }
2765
- export interface DisablePricingPlansForServiceResponse {
2766
- /** Updated service. */
2767
- service?: Service;
2768
- }
2769
- export interface SetCustomSlugRequest {
2770
- /**
2771
- * ID of the service for which to update the active slug.
2772
- * @format GUID
2773
- */
2774
- serviceId: string;
2775
- /**
2776
- * Slug to set as the active service slug.
2777
- * @maxLength 500
2778
- */
2779
- slug?: string;
2780
- }
2781
- export interface SetCustomSlugResponse {
2782
- /** Updated active service slug. */
2783
- slug?: Slug;
2784
- /** Updated service. */
2785
- service?: Service;
2786
- }
2787
- export interface ValidateSlugRequest {
2788
- /**
2789
- * IO of the service to check custom slug validity for.
2790
- * @format GUID
2791
- */
2792
- serviceId: string;
2793
- /**
2794
- * Custom slug to validate.
2795
- * @maxLength 500
2796
- */
2797
- slug?: string;
2798
- }
2799
- export interface ValidateSlugResponse {
2800
- /** Whether the slug is valid. */
2801
- valid?: boolean;
2802
- /**
2803
- * Valid slug. Available only if `{"valid": true}`.
2804
- * @maxLength 500
2805
- */
2806
- slug?: string | null;
2807
- /**
2808
- * Reasons why the slug is invalid. Available only if `{"valid": false}`.
2809
- * @maxSize 3
2810
- */
2811
- errors?: InvalidSlugErrorWithLiterals[];
2812
- }
2813
- export declare enum InvalidSlugError {
2814
- /** Unknown slug error. */
2815
- UNKNOWN_SLUG_ERROR = "UNKNOWN_SLUG_ERROR",
2816
- /** Slug contains illegal characters. */
2817
- SLUG_CONTAINS_ILLEGAL_CHARACTERS = "SLUG_CONTAINS_ILLEGAL_CHARACTERS",
2818
- /** Slug is already associated with another service. */
2819
- SLUG_ALREADY_EXISTS = "SLUG_ALREADY_EXISTS"
2820
- }
2821
- /** @enumType */
2822
- export type InvalidSlugErrorWithLiterals = InvalidSlugError | 'UNKNOWN_SLUG_ERROR' | 'SLUG_CONTAINS_ILLEGAL_CHARACTERS' | 'SLUG_ALREADY_EXISTS';
2823
- export interface CloneServiceRequest {
2824
- /**
2825
- * ID of the service to clone.
2826
- * @format GUID
2827
- */
2828
- sourceServiceId: string;
2829
- }
2830
- export interface CloneServiceResponse {
2831
- /** Cloned service. */
2832
- service?: Service;
2833
- /**
2834
- * Information about connected entities that couldn't be cloned. For example,
2835
- * future recurring events, the booking form, service variants, and connected
2836
- * pricing plans.
2837
- */
2838
- errors?: CloneErrorsWithLiterals[];
2839
- }
2840
- export declare enum CloneErrors {
2841
- /**
2842
- * Failed to clone the original service's *options and variants*
2843
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
2844
- */
2845
- OPTIONS_AND_VARIANTS = "OPTIONS_AND_VARIANTS",
2846
- /** Failed to clone the original service's *booking form*. */
2847
- FORM = "FORM"
2848
- }
2849
- /** @enumType */
2850
- export type CloneErrorsWithLiterals = CloneErrors | 'OPTIONS_AND_VARIANTS' | 'FORM';
2851
- /** An event sent every time a category entity is changed. */
2852
- export interface CategoryNotification {
2853
- category?: Category;
2854
- event?: CategoryNotificationEventWithLiterals;
2855
- }
2856
- /** Categories are used to group multiple services together. A service must be associated with a category in order to be exposed in the Wix Bookings UI. */
2857
- export interface Category {
2858
- /**
2859
- * Category ID.
2860
- * @format GUID
2861
- * @readonly
2862
- */
2863
- _id?: string | null;
2864
- /**
2865
- * Category name.
2866
- * @maxLength 500
2867
- */
2868
- name?: string | null;
2869
- /**
2870
- * Category status.
2871
- *
2872
- * Default: `CREATED`
2873
- * @readonly
2874
- */
2875
- status?: StatusWithLiterals;
2876
- /** Sort order of the category in the live site and dashboard. */
2877
- sortOrder?: number | null;
2878
- }
2879
- export declare enum Status {
2880
- /** The category was created. */
2881
- CREATED = "CREATED",
2882
- /** The category was deleted. */
2883
- DELETED = "DELETED"
2884
- }
2885
- /** @enumType */
2886
- export type StatusWithLiterals = Status | 'CREATED' | 'DELETED';
2887
- export declare enum CategoryNotificationEvent {
2888
- /** Category was updated. */
2889
- Updated = "Updated",
2890
- /** Category was deleted. */
2891
- Deleted = "Deleted",
2892
- /** Category was created. */
2893
- Created = "Created"
2894
- }
2895
- /** @enumType */
2896
- export type CategoryNotificationEventWithLiterals = CategoryNotificationEvent | 'Updated' | 'Deleted' | 'Created';
2897
- export interface Empty {
2898
- }
2899
- export interface BenefitNotification {
2900
- /**
2901
- * Plan unique ID
2902
- * @format GUID
2903
- */
2904
- planId?: string;
2905
- /**
2906
- * App def ID
2907
- * @format GUID
2908
- */
2909
- appDefId?: string;
2910
- /** Current benefit details */
2911
- benefit?: Benefit;
2912
- /** Previous benefit */
2913
- prevBenefit?: Benefit;
2914
- /** Notification event */
2915
- event?: EventWithLiterals;
2916
- }
2917
- export interface Benefit {
2918
- /**
2919
- * Benefit unique ID
2920
- * @format GUID
2921
- * @readonly
2922
- */
2923
- _id?: string | null;
2924
- /** Benefit Type */
2925
- benefitType?: BenefitTypeWithLiterals;
2926
- /**
2927
- * Resource IDs that serves by this benefit
2928
- * @format GUID
2929
- */
2930
- resourceIds?: string[];
2931
- /** Amount of credits that provided by this benefit */
2932
- creditAmount?: number | null;
2933
- /**
2934
- * additional details related to benefit; limited to 20 entries, 20 symbols for key and 20 symbols for value
2935
- * @maxSize 20
2936
- */
2937
- customFields?: Record<string, string>;
2938
- /** return value only in case it required in the ListRequest, true means that benefit's type could be updated */
2939
- editable?: boolean | null;
2940
- /** Benefit behavior */
2941
- behavior?: Behavior;
2942
- /**
2943
- * Id of the app associated with this benefit
2944
- * @format GUID
2945
- * @readonly
2946
- */
2947
- appDefId?: string | null;
2948
- }
2949
- export interface EntryPass {
2950
- }
2951
- export interface Discount extends DiscountDiscountOneOf {
2952
- /**
2953
- * Fixed-rate percent off discount
2954
- * @decimalValue options { gt:0, lte:100, maxScale:2 }
2955
- */
2956
- percentOffRate?: string;
2957
- /**
2958
- * Absolute amount discount
2959
- * @decimalValue options { gt:0, maxScale:2 }
2960
- */
2961
- moneyOffAmount?: string;
2962
- }
2963
- /** @oneof */
2964
- export interface DiscountDiscountOneOf {
2965
- /**
2966
- * Fixed-rate percent off discount
2967
- * @decimalValue options { gt:0, lte:100, maxScale:2 }
2968
- */
2969
- percentOffRate?: string;
2970
- /**
2971
- * Absolute amount discount
2972
- * @decimalValue options { gt:0, maxScale:2 }
2973
- */
2974
- moneyOffAmount?: string;
2975
- }
2976
- export declare enum BenefitType {
2977
- /** Should never be used */
2978
- UNDEFINED = "UNDEFINED",
2979
- /** Limited benefit type */
2980
- LIMITED = "LIMITED",
2981
- /** Unlimited benefit type */
2982
- UNLIMITED = "UNLIMITED"
2983
- }
2984
- /** @enumType */
2985
- export type BenefitTypeWithLiterals = BenefitType | 'UNDEFINED' | 'LIMITED' | 'UNLIMITED';
2986
- export interface Behavior extends BehaviorBehaviorOneOf {
2987
- /** Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events. */
2988
- defaultBehavior?: EntryPass;
2989
- /** Discount applied to paid resources */
2990
- discount?: Discount;
2991
- }
2992
- /** @oneof */
2993
- export interface BehaviorBehaviorOneOf {
2994
- /** Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events. */
2995
- defaultBehavior?: EntryPass;
2996
- /** Discount applied to paid resources */
2997
- discount?: Discount;
2998
- }
2999
- export declare enum Event {
3000
- Updated = "Updated",
3001
- Deleted = "Deleted",
3002
- Created = "Created"
3003
- }
3004
- /** @enumType */
3005
- export type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';
3006
- export interface UserDomainInfoChangedEvent {
3007
- domainName?: string;
3008
- crudType?: CrudTypeWithLiterals;
3009
- /** @format GUID */
3010
- metaSiteId?: string | null;
3011
- changeTime?: Date | null;
3012
- }
3013
- export declare enum CrudType {
3014
- INVALID_CRUD_TYPE = "INVALID_CRUD_TYPE",
3015
- CREATE = "CREATE",
3016
- UPDATE = "UPDATE",
3017
- DELETE = "DELETE",
3018
- /** Unfortunately this action is used by hibernate save in wix-war */
3019
- CREATE_OR_UPDATE = "CREATE_OR_UPDATE"
3020
- }
3021
- /** @enumType */
3022
- export type CrudTypeWithLiterals = CrudType | 'INVALID_CRUD_TYPE' | 'CREATE' | 'UPDATE' | 'DELETE' | 'CREATE_OR_UPDATE';
3023
- export interface HtmlSitePublished {
3024
- /**
3025
- * Application instance ID
3026
- * @maxLength 50
3027
- */
3028
- appInstanceId?: string;
3029
- /**
3030
- * Application type
3031
- * @maxLength 100
3032
- */
3033
- appType?: string;
3034
- /** Revision */
3035
- revision?: string;
3036
- /**
3037
- * MSID
3038
- * @maxLength 100
3039
- */
3040
- metaSiteId?: string | null;
3041
- /**
3042
- * optional branch id if publish is done from branch
3043
- * @format GUID
3044
- */
3045
- branchId?: string | null;
3046
- /** The site's last transactionId */
3047
- lastTransactionId?: string | null;
3048
- /** A list of the site's pages */
3049
- pages?: Page[];
3050
- /** Site's publish date */
3051
- publishDate?: string;
3052
- }
3053
- export interface Page {
3054
- /**
3055
- * Page's Id
3056
- * @maxLength 100
3057
- */
3058
- _id?: string;
3059
- }
3060
- /** Encapsulates all details written to the Greyhound topic when a site's properties are updated. */
3061
- export interface SitePropertiesNotification {
3062
- /** The site ID for which this update notification applies. */
3063
- metasiteId?: string;
3064
- /** The actual update event. */
3065
- event?: SitePropertiesEvent;
3066
- /**
3067
- * A convenience set of mappings from the MetaSite ID to its constituent services.
3068
- * @maxSize 500
3069
- */
3070
- translations?: Translation[];
3071
- /** Context of the notification */
3072
- changeContext?: ChangeContext;
3073
- }
3074
- /** The actual update event for a particular notification. */
3075
- export interface SitePropertiesEvent {
3076
- /** Version of the site's properties represented by this update. */
3077
- version?: number;
3078
- /** Set of properties that were updated - corresponds to the fields in "properties". */
3079
- fields?: string[];
3080
- /** Updated properties. */
3081
- properties?: Properties;
3082
- }
3083
- export interface Properties {
3084
- /** Site categories. */
3085
- categories?: Categories;
3086
- /** Site locale. */
3087
- locale?: Locale;
3088
- /**
3089
- * Site language.
3090
- *
3091
- * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
3092
- */
3093
- language?: string | null;
3094
- /**
3095
- * Site currency format used to bill customers.
3096
- *
3097
- * Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
3098
- */
3099
- paymentCurrency?: string | null;
3100
- /** Timezone in `America/New_York` format. */
3101
- timeZone?: string | null;
3102
- /** Email address. */
3103
- email?: string | null;
3104
- /** Phone number. */
3105
- phone?: string | null;
3106
- /** Fax number. */
3107
- fax?: string | null;
3108
- /** Address. */
3109
- address?: Address;
3110
- /** Site display name. */
3111
- siteDisplayName?: string | null;
3112
- /** Business name. */
3113
- businessName?: string | null;
3114
- /** Path to the site's logo in Wix Media (without Wix Media base URL). */
3115
- logo?: string | null;
3116
- /** Site description. */
3117
- description?: string | null;
3118
- /**
3119
- * Business schedule. Regular and exceptional time periods when the business is open or the service is available.
3120
- *
3121
- * __Note:__ Not supported by Wix Bookings.
3122
- */
3123
- businessSchedule?: BusinessSchedule;
3124
- /** Supported languages of a site and the primary language. */
3125
- multilingual?: Multilingual;
3126
- /** Cookie policy the Wix user defined for their site (before the site visitor interacts with/limits it). */
3127
- consentPolicy?: ConsentPolicy;
3128
- /**
3129
- * Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`.
3130
- *
3131
- * Site business type.
3132
- */
3133
- businessConfig?: string | null;
3134
- /** External site URL that uses Wix as its headless business solution. */
3135
- externalSiteUrl?: string | null;
3136
- /** Track clicks analytics. */
3137
- trackClicksAnalytics?: boolean;
3138
- }
3139
- export interface Categories {
3140
- /** Primary site category. */
3141
- primary?: string;
3142
- /**
3143
- * Secondary site category.
3144
- * @maxSize 50
3145
- */
3146
- secondary?: string[];
3147
- /** Business Term Id */
3148
- businessTermId?: string | null;
3149
- }
3150
- export interface Locale {
3151
- /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
3152
- languageCode?: string;
3153
- /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
3154
- country?: string;
3155
- }
3156
- export interface Address {
3157
- /** Street name. */
3158
- street?: string;
3159
- /** City name. */
3160
- city?: string;
3161
- /** Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */
3162
- country?: string;
3163
- /** State. */
3164
- state?: string;
3165
- /**
3166
- * Zip or postal code.
3167
- * @maxLength 20
3168
- */
3169
- zip?: string;
3170
- /** Extra information to be displayed in the address. */
3171
- hint?: AddressHint;
3172
- /** Whether this address represents a physical location. */
3173
- isPhysical?: boolean;
3174
- /** Google-formatted version of this address. */
3175
- googleFormattedAddress?: string;
3176
- /** Street number. */
3177
- streetNumber?: string;
3178
- /** Apartment number. */
3179
- apartmentNumber?: string;
3180
- /** Geographic coordinates of location. */
3181
- coordinates?: GeoCoordinates;
3182
- }
3183
- /**
3184
- * Extra information on displayed addresses.
3185
- * This is used for display purposes. Used to add additional data about the address, such as "In the passage".
3186
- * Free text. In addition, the user can state where to display the additional description - before, after, or instead of the address string.
3187
- */
3188
- export interface AddressHint {
3189
- /** Extra text displayed next to, or instead of, the actual address. */
3190
- text?: string;
3191
- /** Where the extra text should be displayed. */
3192
- placement?: PlacementTypeWithLiterals;
3193
- }
3194
- /** Where the extra text should be displayed: before, after or instead of the actual address. */
3195
- export declare enum PlacementType {
3196
- BEFORE = "BEFORE",
3197
- AFTER = "AFTER",
3198
- REPLACE = "REPLACE"
3199
- }
3200
- /** @enumType */
3201
- export type PlacementTypeWithLiterals = PlacementType | 'BEFORE' | 'AFTER' | 'REPLACE';
3202
- /** Geocoordinates for a particular address. */
3203
- export interface GeoCoordinates {
3204
- /** Latitude of the location. Must be between -90 and 90. */
3205
- latitude?: number;
3206
- /** Longitude of the location. Must be between -180 and 180. */
3207
- longitude?: number;
3208
- }
3209
- /** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */
3210
- export interface BusinessSchedule {
3211
- /**
3212
- * Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods.
3213
- * @maxSize 100
3214
- */
3215
- periods?: TimePeriod[];
3216
- /**
3217
- * Exceptions to the business's regular hours. The business can be open or closed during the exception.
3218
- * @maxSize 100
3219
- */
3220
- specialHourPeriod?: SpecialHourPeriod[];
3221
- }
3222
- /** Weekly recurring time periods when the business is regularly open or the service is available. */
3223
- export interface TimePeriod {
3224
- /** Day of the week the period starts on. */
3225
- openDay?: DayOfWeekWithLiterals;
3226
- /**
3227
- * 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
3228
- * midnight at the end of the specified day.
3229
- */
3230
- openTime?: string;
3231
- /** Day of the week the period ends on. */
3232
- closeDay?: DayOfWeekWithLiterals;
3233
- /**
3234
- * 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
3235
- * midnight at the end of the specified day.
3236
- *
3237
- * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.
3238
- */
3239
- closeTime?: string;
3240
- }
3241
- /** Enumerates the days of the week. */
3242
- export declare enum DayOfWeek {
3243
- MONDAY = "MONDAY",
3244
- TUESDAY = "TUESDAY",
3245
- WEDNESDAY = "WEDNESDAY",
3246
- THURSDAY = "THURSDAY",
3247
- FRIDAY = "FRIDAY",
3248
- SATURDAY = "SATURDAY",
3249
- SUNDAY = "SUNDAY"
3250
- }
3251
- /** @enumType */
3252
- export type DayOfWeekWithLiterals = DayOfWeek | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY';
3253
- /** Exception to the business's regular hours. The business can be open or closed during the exception. */
3254
- export interface SpecialHourPeriod {
3255
- /** 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). */
3256
- startDate?: string;
3257
- /** 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). */
3258
- endDate?: string;
3259
- /**
3260
- * Whether the business is closed (or the service is not available) during the exception.
3261
- *
3262
- * Default: `true`.
3263
- */
3264
- isClosed?: boolean;
3265
- /** Additional info about the exception. For example, "We close earlier on New Year's Eve." */
3266
- comment?: string;
3267
- }
3268
- export interface Multilingual {
3269
- /**
3270
- * Supported languages list.
3271
- * @maxSize 200
3272
- */
3273
- supportedLanguages?: SupportedLanguage[];
3274
- /** Whether to redirect to user language. */
3275
- autoRedirect?: boolean;
3276
- }
3277
- export interface SupportedLanguage {
3278
- /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
3279
- languageCode?: string;
3280
- /** Locale. */
3281
- locale?: Locale;
3282
- /** Whether the supported language is the primary language for the site. */
3283
- isPrimary?: boolean;
3284
- /** Language icon. */
3285
- countryCode?: string;
3286
- /** How the language will be resolved. For internal use. */
3287
- resolutionMethod?: ResolutionMethodWithLiterals;
3288
- }
3289
- export declare enum ResolutionMethod {
3290
- QUERY_PARAM = "QUERY_PARAM",
3291
- SUBDOMAIN = "SUBDOMAIN",
3292
- SUBDIRECTORY = "SUBDIRECTORY"
3293
- }
3294
- /** @enumType */
3295
- export type ResolutionMethodWithLiterals = ResolutionMethod | 'QUERY_PARAM' | 'SUBDOMAIN' | 'SUBDIRECTORY';
3296
- export interface ConsentPolicy {
3297
- /** Whether the site uses cookies that are essential to site operation. Always `true`. */
3298
- essential?: boolean | null;
3299
- /** Whether the site uses cookies that affect site performance and other functional measurements. */
3300
- functional?: boolean | null;
3301
- /** Whether the site uses cookies that collect analytics about how the site is used (in order to improve it). */
3302
- analytics?: boolean | null;
3303
- /** Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor. */
3304
- advertising?: boolean | null;
3305
- /** CCPA compliance flag. */
3306
- dataToThirdParty?: boolean | null;
3307
- }
3308
- /** A single mapping from the MetaSite ID to a particular service. */
3309
- export interface Translation {
3310
- /** The service type. */
3311
- serviceType?: string;
3312
- /** The application definition ID; this only applies to services of type ThirdPartyApps. */
3313
- appDefId?: string;
3314
- /** The instance ID of the service. */
3315
- instanceId?: string;
3316
- }
3317
- export interface ChangeContext extends ChangeContextPayloadOneOf {
3318
- /** Properties were updated. */
3319
- propertiesChange?: PropertiesChange;
3320
- /** Default properties were created on site creation. */
3321
- siteCreated?: SiteCreated;
3322
- /** Properties were cloned on site cloning. */
3323
- siteCloned?: SiteCloned;
3324
- }
3325
- /** @oneof */
3326
- export interface ChangeContextPayloadOneOf {
3327
- /** Properties were updated. */
3328
- propertiesChange?: PropertiesChange;
3329
- /** Default properties were created on site creation. */
3330
- siteCreated?: SiteCreated;
3331
- /** Properties were cloned on site cloning. */
3332
- siteCloned?: SiteCloned;
3333
- }
3334
- export interface PropertiesChange {
3335
- }
3336
- export interface SiteCreated {
3337
- /** Origin template site id. */
3338
- originTemplateId?: string | null;
3339
- }
3340
- export interface SiteCloned {
3341
- /** Origin site id. */
3342
- originMetaSiteId?: string;
3343
- }
3344
- export interface BaseEventMetadata {
3345
- /**
3346
- * App instance ID.
3347
- * @format GUID
3348
- */
3349
- instanceId?: string | null;
3350
- /**
3351
- * Event type.
3352
- * @maxLength 150
3353
- */
3354
- eventType?: string;
3355
- /** The identification type and identity data. */
3356
- identity?: IdentificationData;
3357
- }
3358
- export interface EventMetadata extends BaseEventMetadata {
3359
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3360
- _id?: string;
3361
- /**
3362
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3363
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
3364
- */
3365
- entityFqdn?: string;
3366
- /**
3367
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
3368
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
3369
- */
3370
- slug?: string;
3371
- /** ID of the entity associated with the event. */
3372
- entityId?: string;
3373
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3374
- eventTime?: Date | null;
3375
- /**
3376
- * Whether the event was triggered as a result of a privacy regulation application
3377
- * (for example, GDPR).
3378
- */
3379
- triggeredByAnonymizeRequest?: boolean | null;
3380
- /** If present, indicates the action that triggered the event. */
3381
- originatedFrom?: string | null;
3382
- /**
3383
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
3384
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
3385
- */
3386
- entityEventSequence?: string | null;
3387
- }
3388
- export interface ServiceCreatedEnvelope {
3389
- entity: Service;
3390
- metadata: EventMetadata;
3391
- }
3392
- /**
3393
- * Triggered when a service is created.
3394
- * @permissionScope Manage Stores
3395
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3396
- * @permissionScope Read Bookings - Public Data
3397
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
3398
- * @permissionScope Manage Bookings Services and Settings
3399
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
3400
- * @permissionScope Manage Bookings
3401
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3402
- * @permissionScope Read Bookings - Including Participants
3403
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
3404
- * @permissionScope Read Bookings - all read permissions
3405
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
3406
- * @permissionScope Manage Bookings - all permissions
3407
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3408
- * @permissionId BOOKINGS.SERVICES_READ
3409
- * @webhook
3410
- * @eventType wix.bookings.services.v2.service_created
3411
- * @slug created
3412
- */
3413
- export declare function onServiceCreated(handler: (event: ServiceCreatedEnvelope) => void | Promise<void>): void;
3414
- export interface ServiceDeletedEnvelope {
3415
- entity: Service;
3416
- metadata: EventMetadata;
3417
- }
3418
- /**
3419
- * Triggered when a service is deleted.
3420
- * @permissionScope Manage Stores
3421
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3422
- * @permissionScope Read Bookings - Public Data
3423
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
3424
- * @permissionScope Manage Bookings Services and Settings
3425
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
3426
- * @permissionScope Manage Bookings
3427
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3428
- * @permissionScope Read Bookings - Including Participants
3429
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
3430
- * @permissionScope Read Bookings - all read permissions
3431
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
3432
- * @permissionScope Manage Bookings - all permissions
3433
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3434
- * @permissionId BOOKINGS.SERVICES_READ
3435
- * @webhook
3436
- * @eventType wix.bookings.services.v2.service_deleted
3437
- * @slug deleted
3438
- */
3439
- export declare function onServiceDeleted(handler: (event: ServiceDeletedEnvelope) => void | Promise<void>): void;
3440
- export interface ServiceUpdatedEnvelope {
3441
- entity: Service;
3442
- metadata: EventMetadata;
3443
- }
3444
- /**
3445
- * Triggered when a service is updated.
3446
- * @permissionScope Manage Stores
3447
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3448
- * @permissionScope Read Bookings - Public Data
3449
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
3450
- * @permissionScope Manage Bookings Services and Settings
3451
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
3452
- * @permissionScope Manage Bookings
3453
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3454
- * @permissionScope Read Bookings - Including Participants
3455
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
3456
- * @permissionScope Read Bookings - all read permissions
3457
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
3458
- * @permissionScope Manage Bookings - all permissions
3459
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3460
- * @permissionId BOOKINGS.SERVICES_READ
3461
- * @webhook
3462
- * @eventType wix.bookings.services.v2.service_updated
3463
- * @slug updated
3464
- */
3465
- export declare function onServiceUpdated(handler: (event: ServiceUpdatedEnvelope) => void | Promise<void>): void;
3466
- type ServiceNonNullablePaths = `type` | `media.items` | `category._id` | `form._id` | `payment.fixed.price.value` | `payment.fixed.price.currency` | `payment.rateType` | `payment.pricingPlanIds` | `locations` | `locations.${number}.business._id` | `locations.${number}.business.name` | `locations.${number}.business.address.streetAddress.number` | `locations.${number}.business.address.streetAddress.name` | `locations.${number}.business.address.streetAddress.apt` | `locations.${number}.custom._id` | `locations.${number}._id` | `locations.${number}.type` | `bookingPolicy._id` | `bookingPolicy.customPolicyDescription.enabled` | `bookingPolicy.customPolicyDescription.description` | `bookingPolicy.limitEarlyBookingPolicy.enabled` | `bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes` | `bookingPolicy.limitLateBookingPolicy.enabled` | `bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes` | `bookingPolicy.bookAfterStartPolicy.enabled` | `bookingPolicy.cancellationPolicy.enabled` | `bookingPolicy.cancellationPolicy.limitLatestCancellation` | `bookingPolicy.cancellationPolicy.latestCancellationInMinutes` | `bookingPolicy.reschedulePolicy.enabled` | `bookingPolicy.reschedulePolicy.limitLatestReschedule` | `bookingPolicy.reschedulePolicy.latestRescheduleInMinutes` | `bookingPolicy.waitlistPolicy.enabled` | `bookingPolicy.waitlistPolicy.capacity` | `bookingPolicy.waitlistPolicy.reservationTimeInMinutes` | `bookingPolicy.participantsPolicy.maxParticipantsPerBooking` | `bookingPolicy.resourcesPolicy.enabled` | `bookingPolicy.resourcesPolicy.autoAssignAllowed` | `bookingPolicy.cancellationFeePolicy.enabled` | `bookingPolicy.cancellationFeePolicy.cancellationWindows` | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.amount.value` | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.amount.currency` | `bookingPolicy.cancellationFeePolicy.cancellationWindows.${number}.percentage` | `bookingPolicy.saveCreditCardPolicy.enabled` | `schedule.availabilityConstraints.durations` | `schedule.availabilityConstraints.durations.${number}.minutes` | `schedule.availabilityConstraints.sessionDurations` | `schedule.availabilityConstraints.timeBetweenSessions` | `staffMemberIds` | `serviceResources` | `supportedSlugs` | `supportedSlugs.${number}.name` | `mainSlug.name` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain`;
3467
- /**
3468
- * Creates a service.
3469
- *
3470
- *
3471
- * ## Required fields
3472
- *
3473
- * When creating a service you must specify the following fields:
3474
- * - `type`
3475
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types)):
3476
- * Whether it's an appointment-based service, class, or course.
3477
- * - `name`: Service name that's displayed to customers.
3478
- * - `onlineBooking`:
3479
- * Settings determining whether customers can book online, whether the business
3480
- * must manually confirm bookings, and whether customers can request to book an
3481
- * appointment time slot that already has a booking request awaiting business
3482
- * confirmation.
3483
- * - `payment`
3484
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments)):
3485
- * How customers can pay when signing up for the service.
3486
- *
3487
- * ### Session durations
3488
- *
3489
- * Depending on which type of service you're creating, you may also need to specify
3490
- * supported session durations.
3491
- *
3492
- * __Classes and courses__
3493
- *
3494
- * Don't specify `schedule.availabilityConstraints.sessionDurations`.
3495
- *
3496
- * __Appointment-based services without varied pricing based on session length__
3497
- *
3498
- * Specify the single supported session duration in the
3499
- * `schedule.availabilityConstraints.sessionDurations` array.
3500
- *
3501
- * __Appointment-based services with varied pricing based on session length__
3502
- *
3503
- * - Specify all supported session durations in `schedule.availabilityConstraints.sessionDurations`.
3504
- * - Note that Wix Bookings doesn't display these values to customers and
3505
- * ignores them in pricing and availability calculations. Instead session
3506
- * durations are retrieved from the relevant service *variants*
3507
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
3508
- * - It is mandatory to specify `schedule.availabilityConstraints.sessionDurations`,
3509
- * even though these values are ignored.
3510
- * @param service - Service to create.
3511
- * @public
3512
- * @requiredField service
3513
- * @permissionId BOOKINGS.SERVICES_CREATE
3514
- * @permissionScope Manage Bookings
3515
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3516
- * @permissionScope Manage Bookings - all permissions
3517
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3518
- * @applicableIdentity APP
3519
- * @returns Created service.
3520
- * @fqn wix.bookings.services.v2.ServicesService.CreateService
3521
- */
3522
- export declare function createService(service: Service): Promise<NonNullablePaths<Service, ServiceNonNullablePaths>>;
3523
- /**
3524
- * Creates multiple services.
3525
- *
3526
- *
3527
- * See *Create Service*
3528
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/create-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/create-service))
3529
- * for more details.
3530
- * @param services - Services to create.
3531
- * @public
3532
- * @requiredField services
3533
- * @permissionId BOOKINGS.SERVICES_CREATE
3534
- * @permissionScope Manage Bookings
3535
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3536
- * @permissionScope Manage Bookings - all permissions
3537
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3538
- * @applicableIdentity APP
3539
- * @fqn wix.bookings.services.v2.ServicesService.BulkCreateServices
3540
- */
3541
- export declare function bulkCreateServices(services: Service[], options?: BulkCreateServicesOptions): Promise<NonNullablePaths<BulkCreateServicesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
3542
- [P in ServiceNonNullablePaths]: `results.${number}.item.${P}`;
3543
- }[ServiceNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
3544
- export interface BulkCreateServicesOptions {
3545
- /** Whether to return the created service objects. */
3546
- returnEntity?: boolean;
3547
- }
3548
- /**
3549
- * Retrieves a service.
3550
- * @param serviceId - ID of the service to retrieve.
3551
- * @public
3552
- * @requiredField serviceId
3553
- * @permissionId BOOKINGS.SERVICES_READ
3554
- * @permissionScope Manage Stores
3555
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3556
- * @permissionScope Read Bookings - Public Data
3557
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
3558
- * @permissionScope Manage Bookings Services and Settings
3559
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
3560
- * @permissionScope Manage Bookings
3561
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3562
- * @permissionScope Read Bookings - Including Participants
3563
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
3564
- * @permissionScope Read Bookings - all read permissions
3565
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
3566
- * @permissionScope Manage Bookings - all permissions
3567
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3568
- * @applicableIdentity APP
3569
- * @applicableIdentity VISITOR
3570
- * @returns Retrieved service.
3571
- * @fqn wix.bookings.services.v2.ServicesService.GetService
3572
- */
3573
- export declare function getService(serviceId: string): Promise<NonNullablePaths<Service, ServiceNonNullablePaths>>;
3574
- /**
3575
- * Updates a service.
3576
- *
3577
- *
3578
- * Each time the service is updated, `revision` increments by 1. You must
3579
- * include the number of the existing revision when updating the service.
3580
- * This ensures you're working with the latest service information and
3581
- * prevents unintended overwrites.
3582
- *
3583
- * ## Session durations
3584
- *
3585
- * Specify `schedule.availabilityConstraints.sessionDurations`
3586
- * only if you want to update it for appointment-based services without varied
3587
- * pricing based on session length. Don't specify `schedule.availabilityConstraints.sessionDurations`
3588
- * for all other appointment-based services, classes, or courses. See *Create Service*
3589
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/create-service#session-durations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/create-service#session-durations))
3590
- * for more details.
3591
- * @param _id - Service ID.
3592
- * @public
3593
- * @requiredField _id
3594
- * @requiredField service
3595
- * @requiredField service.revision
3596
- * @permissionId BOOKINGS.SERVICES_UPDATE
3597
- * @permissionScope Manage Bookings
3598
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3599
- * @permissionScope Manage Bookings - all permissions
3600
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3601
- * @applicableIdentity APP
3602
- * @returns Updated service.
3603
- * @fqn wix.bookings.services.v2.ServicesService.UpdateService
3604
- */
3605
- export declare function updateService(_id: string, service: NonNullablePaths<UpdateService, `revision`>): Promise<NonNullablePaths<Service, ServiceNonNullablePaths>>;
3606
- export interface UpdateService {
3607
- /**
3608
- * Service ID.
3609
- * @format GUID
3610
- * @readonly
3611
- */
3612
- _id?: string | null;
3613
- /**
3614
- * Service type.
3615
- * Learn more about *service types*
3616
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types)).
3617
- */
3618
- type?: ServiceTypeWithLiterals;
3619
- /**
3620
- * Order of the service within a *category*
3621
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object)).
3622
- */
3623
- sortOrder?: number | null;
3624
- /**
3625
- * Service name.
3626
- * @maxLength 400
3627
- * @minLength 1
3628
- */
3629
- name?: string | null;
3630
- /**
3631
- * Service description. For example, `High-class hair styling, cuts, straightening and color`.
3632
- * @maxLength 7000
3633
- */
3634
- description?: string | null;
3635
- /**
3636
- * Short service description, such as `Hair styling`.
3637
- * @maxLength 6000
3638
- */
3639
- tagLine?: string | null;
3640
- /**
3641
- * Default maximum number of customers that can book the service. The service cannot be booked beyond this capacity.
3642
- * @min 1
3643
- * @max 1000
3644
- */
3645
- defaultCapacity?: number | null;
3646
- /** Media associated with the service. */
3647
- media?: Media;
3648
- /** Whether the service is hidden from the site. */
3649
- hidden?: boolean | null;
3650
- /**
3651
- * _Category_
3652
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object))
3653
- * the service is associated with.
3654
- */
3655
- category?: V2Category;
3656
- /** Form the customer filled out when booking the service. */
3657
- form?: Form;
3658
- /**
3659
- * Payment options for booking the service.
3660
- * Learn more about *service payments*
3661
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-payments) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments)).
3662
- */
3663
- payment?: Payment;
3664
- /** Online booking settings. */
3665
- onlineBooking?: OnlineBooking;
3666
- /** Conferencing options for the service. */
3667
- conferencing?: Conferencing;
3668
- /**
3669
- * The locations this service is offered at. Read more about *service locations*
3670
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations)).
3671
- * @immutable
3672
- * @maxSize 500
3673
- */
3674
- locations?: Location[];
3675
- /**
3676
- * _Policy_
3677
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction))
3678
- * determining under what conditions this service can be booked. For example, whether the service can only be booked up to 30 minutes before it begins.
3679
- */
3680
- bookingPolicy?: BookingPolicy;
3681
- /**
3682
- * The service's *schedule*
3683
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)),
3684
- * which can be used to manage the service's *events*
3685
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)).
3686
- */
3687
- schedule?: Schedule;
3688
- /**
3689
- * IDs of the *staff members*
3690
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction))
3691
- * providing the service. Available only for appointment-based services.
3692
- * @maxSize 220
3693
- * @format GUID
3694
- */
3695
- staffMemberIds?: string[];
3696
- /**
3697
- * Information about which resources must be available so customers can book the service.
3698
- * For example, a meeting room or equipment.
3699
- * @maxSize 3
3700
- */
3701
- serviceResources?: ServiceResource[];
3702
- /**
3703
- * A slug is the last part of the URL address that serves as a unique identifier of the service.
3704
- * The list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner.
3705
- * @readonly
3706
- * @maxSize 100
3707
- */
3708
- supportedSlugs?: Slug[];
3709
- /**
3710
- * Active slug for the service.
3711
- * Learn more about *service slugs*
3712
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-slugs) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-slugs)).
3713
- * @readonly
3714
- */
3715
- mainSlug?: Slug;
3716
- /**
3717
- * URLs to various service-related pages, such as the calendar page and the booking page.
3718
- * @readonly
3719
- */
3720
- urls?: URLs;
3721
- /** Extensions enabling users to save custom data related to the service. */
3722
- extendedFields?: ExtendedFields;
3723
- /** Custom SEO data for the service. */
3724
- seoData?: SeoSchema;
3725
- /**
3726
- * Date and time the service was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
3727
- * @readonly
3728
- */
3729
- _createdDate?: Date | null;
3730
- /**
3731
- * Date and time the service was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
3732
- * @readonly
3733
- */
3734
- _updatedDate?: Date | null;
3735
- /**
3736
- * Revision number, which increments by 1 each time the service is updated. To
3737
- * prevent conflicting changes, the existing revision must be used when updating
3738
- * a service.
3739
- * @readonly
3740
- */
3741
- revision?: string | null;
3742
- }
3743
- /**
3744
- * Updates up to 100 services.
3745
- *
3746
- *
3747
- * See *Update Service*
3748
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))
3749
- * for more details.
3750
- *
3751
- * The call succeeds even if one or more individual services can't be updated.
3752
- * Information about failures is returned in `bulkActionMetadata`.
3753
- * @public
3754
- * @requiredField options.services.service
3755
- * @requiredField options.services.service._id
3756
- * @requiredField options.services.service.revision
3757
- * @permissionId BOOKINGS.SERVICES_UPDATE
3758
- * @permissionScope Manage Bookings
3759
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3760
- * @permissionScope Manage Bookings - all permissions
3761
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3762
- * @applicableIdentity APP
3763
- * @fqn wix.bookings.services.v2.ServicesService.BulkUpdateServices
3764
- */
3765
- export declare function bulkUpdateServices(options?: NonNullablePaths<BulkUpdateServicesOptions, `services.${number}.service` | `services.${number}.service._id` | `services.${number}.service.revision`>): Promise<NonNullablePaths<BulkUpdateServicesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
3766
- [P in ServiceNonNullablePaths]: `results.${number}.item.${P}`;
3767
- }[ServiceNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
3768
- export interface BulkUpdateServicesOptions {
3769
- /**
3770
- * Services to update.
3771
- * @maxSize 100
3772
- */
3773
- services?: MaskedService[];
3774
- /** Whether to include the updated services in the response. Default: `false` */
3775
- returnEntity?: boolean;
3776
- }
3777
- /**
3778
- * Updates multiple services by filter.
3779
- *
3780
- *
3781
- * Refer to the supported filters article
3782
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))
3783
- * for more details.
3784
- *
3785
- * See *Update Service*
3786
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))
3787
- * for more details about updating a service.
3788
- *
3789
- * The call succeeds even if one or more individual services can't be updated.
3790
- * Information about failures is returned in `bulkActionMetadata`.
3791
- * @param filter - Filter to identify the services to update.
3792
- * @public
3793
- * @requiredField filter
3794
- * @requiredField options
3795
- * @requiredField options.service
3796
- * @permissionId BOOKINGS.SERVICES_UPDATE
3797
- * @permissionScope Manage Bookings
3798
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3799
- * @permissionScope Manage Bookings - all permissions
3800
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3801
- * @applicableIdentity APP
3802
- * @fqn wix.bookings.services.v2.ServicesService.BulkUpdateServicesByFilter
3803
- */
3804
- export declare function bulkUpdateServicesByFilter(filter: Record<string, any>, options: NonNullablePaths<BulkUpdateServicesByFilterOptions, `service`>): Promise<NonNullablePaths<BulkUpdateServicesByFilterResponse, `jobId`>>;
3805
- export interface BulkUpdateServicesByFilterOptions {
3806
- /** Service to update. */
3807
- service: Service;
3808
- }
3809
- /**
3810
- * Deletes a service.
3811
- *
3812
- *
3813
- * Specify `{"preserveFutureSessionsWithParticipants": true}` to retain all
3814
- * future sessions for the service. By default, all future sessions are canceled.
3815
- * @param serviceId - ID of the service to delete.
3816
- * @public
3817
- * @requiredField serviceId
3818
- * @param options - Allows you to configure how to handle the deleted service's future sessions and how to notify the sessions participants.
3819
- * @permissionId BOOKINGS.SERVICES_DELETE
3820
- * @permissionScope Manage Bookings
3821
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3822
- * @permissionScope Manage Bookings - all permissions
3823
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3824
- * @applicableIdentity APP
3825
- * @fqn wix.bookings.services.v2.ServicesService.DeleteService
3826
- */
3827
- export declare function deleteService(serviceId: string, options?: DeleteServiceOptions): Promise<void>;
3828
- export interface DeleteServiceOptions {
3829
- /**
3830
- * Whether to preserve future sessions with participants.
3831
- *
3832
- * Default: `false`
3833
- */
3834
- preserveFutureSessionsWithParticipants?: boolean;
3835
- /**
3836
- * Whether to notify participants about the change and an optional
3837
- * custom message.
3838
- */
3839
- participantNotification?: ParticipantNotification;
3840
- }
3841
- /**
3842
- * Deletes multiple services.
3843
- *
3844
- *
3845
- * See *Delete Service*
3846
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service))
3847
- * for more details about deleting a service.
3848
- *
3849
- * The call succeeds even if one or more individual services can't be deleted.
3850
- * Information about failures is returned in `bulkActionMetadata`.
3851
- * @param ids - IDs of the services to delete.
3852
- * @public
3853
- * @requiredField ids
3854
- * @permissionId BOOKINGS.SERVICES_DELETE
3855
- * @permissionScope Manage Bookings
3856
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3857
- * @permissionScope Manage Bookings - all permissions
3858
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3859
- * @applicableIdentity APP
3860
- * @fqn wix.bookings.services.v2.ServicesService.BulkDeleteServices
3861
- */
3862
- export declare function bulkDeleteServices(ids: string[], options?: BulkDeleteServicesOptions): Promise<NonNullablePaths<BulkDeleteServicesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
3863
- [P in ServiceNonNullablePaths]: `results.${number}.item.${P}`;
3864
- }[ServiceNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
3865
- export interface BulkDeleteServicesOptions {
3866
- /**
3867
- * Whether to preserve future sessions with participants.
3868
- *
3869
- * Default: `false`.
3870
- */
3871
- preserveFutureSessionsWithParticipants?: boolean;
3872
- /**
3873
- * Whether to notify participants about the change and an optional
3874
- * custom message.
3875
- */
3876
- participantNotification?: ParticipantNotification;
3877
- }
3878
- /**
3879
- * Deletes multiple services by filter.
3880
- *
3881
- *
3882
- * See *Delete Service*
3883
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/delete-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/delete-service))
3884
- * for more details about deleting a service.
3885
- *
3886
- * The call succeeds even if one or more individual services can't be deleted.
3887
- * Information about failures is returned in `bulkActionMetadata`.
3888
- *
3889
- * Refer to the supported filters article
3890
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))
3891
- * for more details.
3892
- *
3893
- * To learn about working with filters in general, see
3894
- * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
3895
- * @param filter - Filter to identify the services that need to be deleted.
3896
- * @public
3897
- * @requiredField filter
3898
- * @permissionId BOOKINGS.SERVICES_DELETE
3899
- * @permissionScope Manage Bookings
3900
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3901
- * @permissionScope Manage Bookings - all permissions
3902
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3903
- * @applicableIdentity APP
3904
- * @fqn wix.bookings.services.v2.ServicesService.BulkDeleteServicesByFilter
3905
- */
3906
- export declare function bulkDeleteServicesByFilter(filter: Record<string, any>, options?: BulkDeleteServicesByFilterOptions): Promise<NonNullablePaths<BulkDeleteServicesByFilterResponse, `jobId`>>;
3907
- export interface BulkDeleteServicesByFilterOptions {
3908
- /**
3909
- * Whether to preserve future sessions with participants.
3910
- *
3911
- * Default: `false`.
3912
- */
3913
- preserveFutureSessionsWithParticipants?: boolean;
3914
- /** Whether to notify participants about the change and an optional custom message. */
3915
- participantNotification?: ParticipantNotification;
3916
- }
3917
- /**
3918
- * Creates a query to retrieve a list of `service` objects.
3919
- *
3920
- * The `queryServices()` function builds a query to retrieve a list of `service` objects and returns a `ServicesQueryBuilder` object.
3921
- *
3922
- * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/services-query-builder/find) function.
3923
- *
3924
- * You can refine the query by chaining `ServicesQueryBuilder` functions onto the query. `ServicesQueryBuilder` functions enable you to sort, filter, and control the results that `queryServices()` returns.
3925
- *
3926
- * `queryServices()` runs with the following `ServicesQueryBuilder` defaults that you can override:
3927
- *
3928
- * + `limit` is `100`.
3929
- * + Sorted by `createdDate` in ascending order.
3930
- *
3931
- * The functions that are chained to `queryServices()` are applied in the order they are called. For example, if you apply `ascending("category.name")` and then `ascending("name")`, the results are sorted first by `category.name`, and then, if there are multiple results with the same `category.name`, the items are sorted by `name`.
3932
- *
3933
- * The following `ServicesQueryBuilder` functions are supported for the `queryServices()` function. For a full description of the `service` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/services-query-result/items) property in `ServicesQueryResult`.
3934
- * @public
3935
- * @permissionScope Manage Stores
3936
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3937
- * @permissionScope Read Bookings - Public Data
3938
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
3939
- * @permissionScope Manage Bookings Services and Settings
3940
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
3941
- * @permissionScope Manage Bookings
3942
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
3943
- * @permissionScope Read Bookings - Including Participants
3944
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
3945
- * @permissionScope Read Bookings - all read permissions
3946
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
3947
- * @permissionScope Manage Bookings - all permissions
3948
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
3949
- * @permissionId BOOKINGS.SERVICES_READ
3950
- * @applicableIdentity APP
3951
- * @applicableIdentity VISITOR
3952
- * @fqn wix.bookings.services.v2.ServicesService.QueryServices
3953
- */
3954
- export declare function queryServices(options?: QueryServicesOptions): ServicesQueryBuilder;
3955
- export interface QueryServicesOptions {
3956
- }
3957
- interface QueryOffsetResult {
3958
- currentPage: number | undefined;
3959
- totalPages: number | undefined;
3960
- totalCount: number | undefined;
3961
- hasNext: () => boolean;
3962
- hasPrev: () => boolean;
3963
- length: number;
3964
- pageSize: number;
3965
- }
3966
- export interface ServicesQueryResult extends QueryOffsetResult {
3967
- items: Service[];
3968
- query: ServicesQueryBuilder;
3969
- next: () => Promise<ServicesQueryResult>;
3970
- prev: () => Promise<ServicesQueryResult>;
3971
- }
3972
- export interface ServicesQueryBuilder {
3973
- /** @param propertyName - Property whose value is compared with `value`.
3974
- * @param value - Value to compare against.
3975
- */
3976
- eq: (propertyName: '_id' | 'type' | 'name' | 'description' | 'tagLine' | 'hidden' | 'category.id' | 'category.name' | 'form.id' | 'payment.options.online' | 'payment.options.inPerson' | 'payment.options.pricingPlan' | 'onlineBooking.enabled' | 'locations.business.id' | 'schedule.firstSessionStart' | 'schedule.lastSessionEnd' | 'staffMemberIds' | 'supportedSlugs.name' | 'mainSlug.name', value: any) => ServicesQueryBuilder;
3977
- /** @param propertyName - Property whose value is compared with `value`.
3978
- * @param value - Value to compare against.
3979
- */
3980
- ne: (propertyName: '_id' | 'type' | 'name' | 'description' | 'tagLine' | 'hidden' | 'category.id' | 'category.name' | 'form.id' | 'payment.options.online' | 'payment.options.inPerson' | 'payment.options.pricingPlan' | 'onlineBooking.enabled' | 'locations.business.id' | 'schedule.firstSessionStart' | 'schedule.lastSessionEnd' | 'staffMemberIds' | 'supportedSlugs.name' | 'mainSlug.name', value: any) => ServicesQueryBuilder;
3981
- /** @param propertyName - Property whose value is compared with `value`.
3982
- * @param value - Value to compare against.
3983
- */
3984
- ge: (propertyName: '_id' | 'name' | 'description' | 'tagLine' | 'category.id' | 'category.name' | 'form.id' | 'locations.business.id' | 'schedule.firstSessionStart' | 'schedule.lastSessionEnd' | 'supportedSlugs.name' | 'mainSlug.name', value: any) => ServicesQueryBuilder;
3985
- /** @param propertyName - Property whose value is compared with `value`.
3986
- * @param value - Value to compare against.
3987
- */
3988
- gt: (propertyName: '_id' | 'name' | 'description' | 'tagLine' | 'category.id' | 'category.name' | 'form.id' | 'locations.business.id' | 'schedule.firstSessionStart' | 'schedule.lastSessionEnd' | 'supportedSlugs.name' | 'mainSlug.name', value: any) => ServicesQueryBuilder;
3989
- /** @param propertyName - Property whose value is compared with `value`.
3990
- * @param value - Value to compare against.
3991
- */
3992
- le: (propertyName: '_id' | 'name' | 'description' | 'tagLine' | 'category.id' | 'category.name' | 'form.id' | 'locations.business.id' | 'schedule.firstSessionStart' | 'schedule.lastSessionEnd' | 'supportedSlugs.name' | 'mainSlug.name', value: any) => ServicesQueryBuilder;
3993
- /** @param propertyName - Property whose value is compared with `value`.
3994
- * @param value - Value to compare against.
3995
- */
3996
- lt: (propertyName: '_id' | 'name' | 'description' | 'tagLine' | 'category.id' | 'category.name' | 'form.id' | 'locations.business.id' | 'schedule.firstSessionStart' | 'schedule.lastSessionEnd' | 'supportedSlugs.name' | 'mainSlug.name', value: any) => ServicesQueryBuilder;
3997
- /** @param propertyName - Property whose value is compared with `string`.
3998
- * @param string - String to compare against. Case-insensitive.
3999
- */
4000
- startsWith: (propertyName: '_id' | 'name' | 'description' | 'tagLine' | 'category.id' | 'category.name' | 'form.id' | 'locations.business.id' | 'supportedSlugs.name' | 'mainSlug.name', value: string) => ServicesQueryBuilder;
4001
- /** @param propertyName - Property whose value is compared with `values`.
4002
- * @param values - List of values to compare against.
4003
- */
4004
- hasSome: (propertyName: '_id' | 'type' | 'name' | 'description' | 'tagLine' | 'hidden' | 'category.id' | 'category.name' | 'form.id' | 'payment.options.online' | 'payment.options.inPerson' | 'payment.options.pricingPlan' | 'onlineBooking.enabled' | 'locations.business.id' | 'schedule.firstSessionStart' | 'schedule.lastSessionEnd' | 'staffMemberIds' | 'supportedSlugs.name' | 'mainSlug.name', value: any[]) => ServicesQueryBuilder;
4005
- /** @param propertyName - Property whose value is compared with `values`.
4006
- * @param values - List of values to compare against.
4007
- */
4008
- hasAll: (propertyName: 'staffMemberIds', value: any[]) => ServicesQueryBuilder;
4009
- in: (propertyName: '_id' | 'type' | 'name' | 'description' | 'tagLine' | 'hidden' | 'category.id' | 'category.name' | 'form.id' | 'payment.options.online' | 'payment.options.inPerson' | 'payment.options.pricingPlan' | 'onlineBooking.enabled' | 'locations.business.id' | 'schedule.firstSessionStart' | 'schedule.lastSessionEnd' | 'staffMemberIds' | 'supportedSlugs.name' | 'mainSlug.name', value: any) => ServicesQueryBuilder;
4010
- exists: (propertyName: '_id' | 'type' | 'name' | 'description' | 'tagLine' | 'hidden' | 'category.id' | 'category.name' | 'form.id' | 'payment.options.online' | 'payment.options.inPerson' | 'payment.options.pricingPlan' | 'onlineBooking.enabled' | 'locations.business.id' | 'schedule.firstSessionStart' | 'schedule.lastSessionEnd' | 'staffMemberIds' | 'supportedSlugs.name' | 'mainSlug.name', value: boolean) => ServicesQueryBuilder;
4011
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
4012
- limit: (limit: number) => ServicesQueryBuilder;
4013
- /** @param skip - Number of items to skip in the query results before returning the results. */
4014
- skip: (skip: number) => ServicesQueryBuilder;
4015
- find: () => Promise<ServicesQueryResult>;
4016
- }
4017
- /**
4018
- * Retrieves a list of up to 100 services, given the provided filtering, paging,
4019
- * and sorting.
4020
- *
4021
- *
4022
- * ## Defaults
4023
- *
4024
- * Search Services has the following default settings, which you can override:
4025
- * + Sorted by `createdDate` in ascending order.
4026
- * + `paging.limit` set to `100`.
4027
- * + `paging.offset` set to `0`.
4028
- *
4029
- * ## Filters
4030
- *
4031
- * When using filters for dates, you must use
4032
- * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
4033
- *
4034
- * Refer to the supported filters article
4035
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting))
4036
- * for a complete list of supported filters and sorting options.
4037
- *
4038
- * ## See also
4039
- *
4040
- * To learn about working with *Search* methods, see
4041
- * _API Query Language_
4042
- * ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language))
4043
- * and *Sorting and Paging*
4044
- * ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language#the-sort-array) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging)).
4045
- * @param search - WQL, search or aggregation expression.
4046
- * @public
4047
- * @documentationMaturity preview
4048
- * @requiredField search
4049
- * @permissionId BOOKINGS.SERVICES_READ
4050
- * @permissionScope Manage Stores
4051
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4052
- * @permissionScope Read Bookings - Public Data
4053
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
4054
- * @permissionScope Manage Bookings Services and Settings
4055
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
4056
- * @permissionScope Manage Bookings
4057
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4058
- * @permissionScope Read Bookings - Including Participants
4059
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
4060
- * @permissionScope Read Bookings - all read permissions
4061
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
4062
- * @permissionScope Manage Bookings - all permissions
4063
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4064
- * @applicableIdentity APP
4065
- * @applicableIdentity VISITOR
4066
- * @fqn wix.bookings.services.v2.ServicesService.SearchServices
4067
- */
4068
- export declare function searchServices(search: ServiceSearch): Promise<NonNullablePaths<SearchServicesResponse, {
4069
- [P in ServiceNonNullablePaths]: `services.${number}.${P}`;
4070
- }[ServiceNonNullablePaths] | `aggregationData.results` | `aggregationData.results.${number}.scalar.type` | `aggregationData.results.${number}.scalar.value` | `aggregationData.results.${number}.name` | `aggregationData.results.${number}.type` | `aggregationData.results.${number}.fieldPath`>>;
4071
- export interface ServiceSearchSpec extends SearchSpec {
4072
- aggregatable: [
4073
- '_id',
4074
- 'addOnDetails.addOnId',
4075
- 'addOnDetails.durationInMinutes',
4076
- 'appId',
4077
- 'category._id',
4078
- 'category.name',
4079
- 'category.sortOrder',
4080
- 'description',
4081
- 'form._id',
4082
- 'hidden',
4083
- 'locations.business._id',
4084
- 'locations.business.name',
4085
- 'locations.type',
4086
- 'mainSlug.name',
4087
- 'name',
4088
- 'onlineBooking.enabled',
4089
- 'payment.options.inPerson',
4090
- 'payment.options.online',
4091
- 'payment.options.pricingPlan',
4092
- 'staffMemberIds',
4093
- 'supportedSlugs.name',
4094
- 'tagLine',
4095
- 'type'
4096
- ];
4097
- paging: 'cursor';
4098
- wql: [
4099
- {
4100
- operators: ['$hasAll', '$hasSome'];
4101
- fields: [
4102
- 'locations.business._id',
4103
- 'locations.business.name',
4104
- 'locations.calculatedAddress.formattedAddress',
4105
- 'locations.type',
4106
- 'staffMemberIds',
4107
- 'supportedSlugs.name'
4108
- ];
4109
- sort: 'NONE';
4110
- },
4111
- {
4112
- operators: '*';
4113
- fields: [
4114
- '_id',
4115
- 'addOnDetails.addOnId',
4116
- 'addOnDetails.durationInMinutes',
4117
- 'appId',
4118
- 'category._id',
4119
- 'category.name',
4120
- 'category.sortOrder',
4121
- 'description',
4122
- 'form._id',
4123
- 'hidden',
4124
- 'mainSlug.name',
4125
- 'name',
4126
- 'onlineBooking.enabled',
4127
- 'payment.options.inPerson',
4128
- 'payment.options.online',
4129
- 'payment.options.pricingPlan',
4130
- 'tagLine',
4131
- 'type'
4132
- ];
4133
- sort: 'NONE';
4134
- }
4135
- ];
4136
- }
4137
- export type CommonSearchWithEntityContext = SearchSdkType<Service, ServiceSearchSpec>;
4138
- export type ServiceSearch = {
4139
- /**
4140
- Cursor pointing to page of results.
4141
- When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
4142
- */
4143
- cursorPaging?: {
4144
- /**
4145
- Number of items to load.
4146
- @max: 100
4147
- */
4148
- limit?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit'] | null;
4149
- /**
4150
- Pointer to the next or previous page in the list of results.
4151
-
4152
- You can get the relevant cursor token
4153
- from the `pagingMetadata` object in the previous call's response.
4154
- Not relevant for the first request.
4155
- @maxLength: 16000
4156
- */
4157
- cursor?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor'] | null;
4158
- };
4159
- /**
4160
- A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)
4161
- */
4162
- filter?: CommonSearchWithEntityContext['filter'] | null;
4163
- /**
4164
- Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
4165
- @maxSize: 10
4166
- */
4167
- sort?: {
4168
- /**
4169
- Name of the field to sort by.
4170
- @maxLength: 512
4171
- */
4172
- fieldName?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['fieldName'];
4173
- /**
4174
- Sort order.
4175
- */
4176
- order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];
4177
- }[];
4178
- /**
4179
- Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
4180
- @maxSize: 10
4181
- */
4182
- aggregations?: {
4183
- /**
4184
- Value aggregation
4185
- */
4186
- value?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['value'];
4187
- /**
4188
- Range aggregation
4189
- */
4190
- range?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['range'];
4191
- /**
4192
- Scalar aggregation
4193
- */
4194
- scalar?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['scalar'];
4195
- /**
4196
- Date histogram aggregation
4197
- */
4198
- dateHistogram?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['dateHistogram'];
4199
- /**
4200
- Nested aggregation
4201
- */
4202
- nested?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['nested'];
4203
- /**
4204
- User-defined name of aggregation, should be unique, will appear in aggregation results
4205
- @maxLength: 100
4206
- */
4207
- name?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['name'] | null;
4208
- /**
4209
- Type of aggregation, client must provide matching aggregation field below
4210
- */
4211
- type?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['type'];
4212
- /**
4213
- Field to aggregate by, use dot notation to specify json path
4214
- @maxLength: 200
4215
- */
4216
- fieldPath?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['fieldPath'];
4217
- /**
4218
- deprecated, use `nested` instead
4219
- @deprecated: deprecated, use `nested` instead,
4220
- @replacedBy: kind.nested,
4221
- @targetRemovalDate: 2025-01-01
4222
- */
4223
- groupBy?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['groupBy'];
4224
- }[];
4225
- /**
4226
- Free text to match in searchable fields
4227
- */
4228
- search?: {
4229
- /**
4230
- Boolean search mode
4231
- */
4232
- mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];
4233
- /**
4234
- Search term or expression
4235
- @maxLength: 200
4236
- */
4237
- expression?: NonNullable<CommonSearchWithEntityContext['search']>['expression'] | null;
4238
- /**
4239
- Fields to search in. If empty - server will search in own default fields
4240
- @maxSize: 10,
4241
- @maxLength: 200
4242
- */
4243
- fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];
4244
- /**
4245
- Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm)
4246
- */
4247
- fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];
4248
- };
4249
- /**
4250
- UTC offset or IANA time zone. Valid values are
4251
- ISO 8601 UTC offsets, such as +02:00 or -06:00,
4252
- and IANA time zone IDs, such as Europe/Rome
4253
-
4254
- Affects all filters and aggregations returned values.
4255
- You may override this behavior in a specific filter by providing
4256
- timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
4257
- @maxLength: 50
4258
- */
4259
- timeZone?: CommonSearchWithEntityContext['timeZone'] | null;
4260
- };
4261
- /**
4262
- * Retrieves a list of up to 100 *booking policies*
4263
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction)),
4264
- * and information about the services that are connected to them,
4265
- * given the provided filtering, paging, and sorting.
4266
- *
4267
- * ## Defaults
4268
- *
4269
- * Query Policies has the following default settings, which you can override:
4270
- *
4271
- * + Sorted by `id` in ascending order.
4272
- * + `cursorPaging.limit` set to `100`.
4273
- *
4274
- * ## Filters
4275
- *
4276
- * For a complete list of supported filters, refer to **Booking Policies API: Supported Filters**
4277
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters)).
4278
- *
4279
- * When using date filters, you must use
4280
- * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
4281
- *
4282
- * ## Returned services
4283
- *
4284
- * If a booking policy is connected to more than 5 services, only a subset of
4285
- * those services is returned. The `bookingPolicies.totalServiceCount` values
4286
- * indicate the total number of services linked to each policy. You can call *Search Services*
4287
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/search-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/search-services))
4288
- * and specify the relevant policy ID in the filter to retrieve all services
4289
- * connected to the booking policy.
4290
- *
4291
- * ## See also
4292
- *
4293
- * To learn about working with *Query* endpoints, see
4294
- * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)
4295
- * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
4296
- * @param query - Information about filters, paging, and sorting. See the article about
4297
- * booking policy filters
4298
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))
4299
- * for all supported filters and sorting options.
4300
- * @public
4301
- * @documentationMaturity preview
4302
- * @requiredField query
4303
- * @permissionId BOOKINGS.BOOKING_POLICY_READ
4304
- * @permissionId BOOKINGS.SERVICES_READ
4305
- * @permissionScope Manage Stores
4306
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4307
- * @permissionScope Read Bookings - Public Data
4308
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
4309
- * @permissionScope Manage Bookings Services and Settings
4310
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
4311
- * @permissionScope Manage Bookings
4312
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4313
- * @permissionScope Read Bookings - Including Participants
4314
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
4315
- * @permissionScope Read Bookings - all read permissions
4316
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
4317
- * @permissionScope Manage Bookings - all permissions
4318
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4319
- * @permissionScope Manage Stores
4320
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4321
- * @permissionScope Read Bookings - Public Data
4322
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
4323
- * @permissionScope Manage Bookings Services and Settings
4324
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
4325
- * @permissionScope Manage Bookings
4326
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4327
- * @permissionScope Read Bookings - Including Participants
4328
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
4329
- * @permissionScope Read Bookings - all read permissions
4330
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
4331
- * @permissionScope Manage Bookings - all permissions
4332
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4333
- * @applicableIdentity APP
4334
- * @applicableIdentity VISITOR
4335
- * @fqn wix.bookings.services.v2.ServicesService.QueryPolicies
4336
- */
4337
- export declare function queryPolicies(query: CursorQuery): Promise<NonNullablePaths<QueryPoliciesResponse, `bookingPolicies` | `bookingPolicies.${number}.bookingPolicy._id` | `bookingPolicies.${number}.bookingPolicy.customPolicyDescription.enabled` | `bookingPolicies.${number}.bookingPolicy.customPolicyDescription.description` | `bookingPolicies.${number}.bookingPolicy.limitEarlyBookingPolicy.enabled` | `bookingPolicies.${number}.bookingPolicy.limitEarlyBookingPolicy.earliestBookingInMinutes` | `bookingPolicies.${number}.bookingPolicy.limitLateBookingPolicy.enabled` | `bookingPolicies.${number}.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes` | `bookingPolicies.${number}.bookingPolicy.bookAfterStartPolicy.enabled` | `bookingPolicies.${number}.bookingPolicy.cancellationPolicy.enabled` | `bookingPolicies.${number}.bookingPolicy.cancellationPolicy.limitLatestCancellation` | `bookingPolicies.${number}.bookingPolicy.cancellationPolicy.latestCancellationInMinutes` | `bookingPolicies.${number}.bookingPolicy.reschedulePolicy.enabled` | `bookingPolicies.${number}.bookingPolicy.reschedulePolicy.limitLatestReschedule` | `bookingPolicies.${number}.bookingPolicy.reschedulePolicy.latestRescheduleInMinutes` | `bookingPolicies.${number}.bookingPolicy.waitlistPolicy.enabled` | `bookingPolicies.${number}.bookingPolicy.waitlistPolicy.capacity` | `bookingPolicies.${number}.bookingPolicy.waitlistPolicy.reservationTimeInMinutes` | `bookingPolicies.${number}.bookingPolicy.participantsPolicy.maxParticipantsPerBooking` | `bookingPolicies.${number}.bookingPolicy.resourcesPolicy.enabled` | `bookingPolicies.${number}.bookingPolicy.resourcesPolicy.autoAssignAllowed` | `bookingPolicies.${number}.bookingPolicy.cancellationFeePolicy.enabled` | `bookingPolicies.${number}.bookingPolicy.saveCreditCardPolicy.enabled` | {
4338
- [P in ServiceNonNullablePaths]: `bookingPolicies.${number}.connectedServices.${number}.${P}`;
4339
- }[ServiceNonNullablePaths] | `bookingPolicies.${number}.totalServiceCount`>>;
4340
- /**
4341
- * Retrieves a list of up to 100 *booking forms*
4342
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/forms/introduction) | [REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)),
4343
- * and information about the services that are connected to them,
4344
- * given the provided filtering, paging, and sorting.
4345
- *
4346
- *
4347
- * ## Defaults
4348
- *
4349
- * Query Booking Forms has the following default settings, which you can override:
4350
- *
4351
- * + Sorted by `id` in ascending order.
4352
- * + `cursorPaging.limit` set to `100`.
4353
- *
4354
- * ## Filters
4355
- *
4356
- * For a complete list of supported filters, refer to **Forms API: Supported Filters**
4357
- * ([REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object)).
4358
- *
4359
- * When using date filters, you must use
4360
- * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
4361
- *
4362
- * ## Returned services
4363
- *
4364
- * If a booking policy is connected to more than 5 services, only a subset of
4365
- * these service IDs and names is returned. The `bookingForms.totalServiceCount`
4366
- * values indicate the total number of services linked to each form. You can call *Query Services*
4367
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/query-services) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/query-services))
4368
- * and specify the relevant form ID in the filter to retrieve all services
4369
- * connected to the booking form.
4370
- *
4371
- * ## Default booking forms
4372
- *
4373
- * By default, all Wix Bookings services use a standard booking form. To retrieve
4374
- * a site's default booking form with Query Booking Forms, specify
4375
- * `{"conditionalFields": ["DEFAULT_BOOKING_FORM"]}`.
4376
- *
4377
- * ## See also
4378
- *
4379
- * To learn about working with *Query* endpoints, see
4380
- * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)
4381
- * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
4382
- * @param query - Information about filters, paging, and sorting. See the article about
4383
- * form filters ([REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object))
4384
- * for all supported filters and sorting options.
4385
- * @public
4386
- * @requiredField query
4387
- * @permissionId BOOKINGS.SERVICE_BOOKING_FORMS_READ
4388
- * @permissionId BOOKINGS.SERVICES_READ
4389
- * @permissionScope Manage Bookings
4390
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4391
- * @permissionScope Manage Bookings - all permissions
4392
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4393
- * @permissionScope Manage Stores
4394
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4395
- * @permissionScope Read Bookings - Public Data
4396
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
4397
- * @permissionScope Manage Bookings Services and Settings
4398
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
4399
- * @permissionScope Manage Bookings
4400
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4401
- * @permissionScope Read Bookings - Including Participants
4402
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
4403
- * @permissionScope Read Bookings - all read permissions
4404
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
4405
- * @permissionScope Manage Bookings - all permissions
4406
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4407
- * @applicableIdentity APP
4408
- * @applicableIdentity VISITOR
4409
- * @fqn wix.bookings.services.v2.ServicesService.QueryBookingForms
4410
- */
4411
- export declare function queryBookingForms(query: CursorQuery, options?: QueryBookingFormsOptions): Promise<NonNullablePaths<QueryBookingFormsResponse, `bookingForms` | `bookingForms.${number}.formDetails.formId` | `bookingForms.${number}.totalServiceCount` | `defaultBookingForm.formDetails.formId` | `defaultBookingForm.connectedServices` | `defaultBookingForm.totalServiceCount`>>;
4412
- export interface QueryBookingFormsOptions {
4413
- /**
4414
- * Conditional fields to return.
4415
- * @maxSize 1
4416
- */
4417
- conditionalFields?: RequestedFieldsWithLiterals[];
4418
- }
4419
- /**
4420
- * Counts how many services match the given filter.
4421
- *
4422
- *
4423
- * Refer to the supported filters article
4424
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))
4425
- * for more details.
4426
- *
4427
- * To learn about working with filters in general, see
4428
- * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)
4429
- * @public
4430
- * @permissionId BOOKINGS.SERVICES_COUNT
4431
- * @permissionScope Manage Stores
4432
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4433
- * @permissionScope Read Bookings - Public Data
4434
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
4435
- * @permissionScope Manage Bookings Services and Settings
4436
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
4437
- * @permissionScope Manage Bookings
4438
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4439
- * @permissionScope Read Bookings - Including Participants
4440
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
4441
- * @permissionScope Read Bookings - all read permissions
4442
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
4443
- * @permissionScope Manage Bookings - all permissions
4444
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4445
- * @applicableIdentity APP
4446
- * @applicableIdentity VISITOR
4447
- * @fqn wix.bookings.services.v2.ServicesService.CountServices
4448
- */
4449
- export declare function countServices(options?: CountServicesOptions): Promise<NonNullablePaths<CountServicesResponse, `count`>>;
4450
- export interface CountServicesOptions {
4451
- /**
4452
- * Query filter to base the count on. See supported filters
4453
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))
4454
- * for more details.
4455
- */
4456
- filter?: Record<string, any> | null;
4457
- }
4458
- /**
4459
- * Retrieves 3 separate lists of business, custom, and customer *locations*
4460
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)),
4461
- * given the provided filtering, and whether each location is connected to at
4462
- * least one of the site's services.
4463
- *
4464
- *
4465
- * ## Defaults
4466
- *
4467
- * Query Locations has the following default setting, which you can't override:
4468
- * Sorted by `id` in ascending order.
4469
- *
4470
- * ## Filters
4471
- *
4472
- * For a complete list of supported filters, refer to the `location` object
4473
- * ([REST](https://dev.wix.com/docs/rest/business-management/locations/location-object)).
4474
- *
4475
- * When using date filters, you must use
4476
- * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
4477
- *
4478
- * ## See also
4479
- *
4480
- * To learn about working with *Query* endpoints, see
4481
- * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)
4482
- * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
4483
- * @public
4484
- * @documentationMaturity preview
4485
- * @permissionId BOOKINGS.SERVICES_READ
4486
- * @permissionScope Manage Stores
4487
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4488
- * @permissionScope Read Bookings - Public Data
4489
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
4490
- * @permissionScope Manage Bookings Services and Settings
4491
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
4492
- * @permissionScope Manage Bookings
4493
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4494
- * @permissionScope Read Bookings - Including Participants
4495
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
4496
- * @permissionScope Read Bookings - all read permissions
4497
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
4498
- * @permissionScope Manage Bookings - all permissions
4499
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4500
- * @applicableIdentity APP
4501
- * @applicableIdentity VISITOR
4502
- * @fqn wix.bookings.services.v2.ServicesService.QueryLocations
4503
- */
4504
- export declare function queryLocations(options?: QueryLocationsOptions): Promise<NonNullablePaths<QueryLocationsResponse, `businessLocations.exists` | `businessLocations.locations` | `businessLocations.locations.${number}.business._id` | `businessLocations.locations.${number}.business.name` | `businessLocations.locations.${number}.business.address.streetAddress.number` | `businessLocations.locations.${number}.business.address.streetAddress.name` | `businessLocations.locations.${number}.business.address.streetAddress.apt` | `businessLocations.locations.${number}.custom._id` | `businessLocations.locations.${number}._id` | `businessLocations.locations.${number}.type` | `customLocations.exists` | `customerLocations.exists`>>;
4505
- export interface QueryLocationsOptions {
4506
- /** Filter. */
4507
- filter?: QueryLocationsFilter;
4508
- }
4509
- /**
4510
- * Retrieves a list of service *categories*
4511
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/categories/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/introduction)),
4512
- * given the provided filtering.
4513
- *
4514
- *
4515
- * ## Defaults
4516
- *
4517
- * Query Categories has the following default setting, which you can't override:
4518
- * Sorted by `id` in ascending order.
4519
- *
4520
- * ## Filters
4521
- *
4522
- * For a complete list of supported filters, refer to the supported filters article
4523
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering)).
4524
- *
4525
- * When using date filters, you must use
4526
- * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
4527
- *
4528
- * ## See also
4529
- *
4530
- * To learn about working with *Query* endpoints, see
4531
- * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)
4532
- * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
4533
- * @public
4534
- * @documentationMaturity preview
4535
- * @permissionId BOOKINGS.SERVICES_READ
4536
- * @permissionScope Manage Stores
4537
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4538
- * @permissionScope Read Bookings - Public Data
4539
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
4540
- * @permissionScope Manage Bookings Services and Settings
4541
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
4542
- * @permissionScope Manage Bookings
4543
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4544
- * @permissionScope Read Bookings - Including Participants
4545
- * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
4546
- * @permissionScope Read Bookings - all read permissions
4547
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
4548
- * @permissionScope Manage Bookings - all permissions
4549
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4550
- * @applicableIdentity APP
4551
- * @applicableIdentity VISITOR
4552
- * @fqn wix.bookings.services.v2.ServicesService.QueryCategories
4553
- */
4554
- export declare function queryCategories(options?: QueryCategoriesOptions): Promise<NonNullablePaths<QueryCategoriesResponse, `categories` | `categories.${number}._id`>>;
4555
- export interface QueryCategoriesOptions {
4556
- /** Filter. */
4557
- filter?: QueryCategoriesFilter;
4558
- }
4559
- /**
4560
- * Replaces the list of the *locations*
4561
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))
4562
- * where the business offers the service.
4563
- *
4564
- *
4565
- * ## Consequences for customers
4566
- *
4567
- * Removing a service location may impact existing sessions and their
4568
- * participants. If you remove at least one service location, you must
4569
- * specify `removedLocationSessionsAction` to indicate what happens to all
4570
- * future sessions scheduled at this location.
4571
- *
4572
- * - **Keep existing location**: If you want to retain future sessions at their
4573
- * originally scheduled location, specify
4574
- * `{"removedLocationSessionsAction.action": "KEEP_AT_CURRENT_LOCATION"}`.
4575
- * This ensures nothing changes for the customer, but the business must be
4576
- * able to provide access to the removed location in the future.
4577
- * - **Update location**: If you want to update the location for future sessions
4578
- * scheduled at the removed location, specify
4579
- * `{"removedLocationSessionsAction.action": "MOVE_TO_LOCATION"}` and
4580
- * `moveToLocationOptions.newLocation`.
4581
- *
4582
- * You can't mix and match to keep some sessions at the previous location while
4583
- * moving other sessions to an updated location.
4584
- *
4585
- * Past session details aren't changed, no matter which option you choose for
4586
- * future sessions.
4587
- *
4588
- * Future sessions scheduled for a location defined by the customer are also not
4589
- * updated.
4590
- *
4591
- * ## Specify location details
4592
- *
4593
- * Depending on whether the new or updated location is a business or custom location,
4594
- * you need to specify different fields.
4595
- *
4596
- * - **Business location**: Specify the relevant *location ID*
4597
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))
4598
- * in `locations.business.id`.
4599
- * - **Custom location**: Specify the complete address object as
4600
- * `locations.custom.address`.
4601
- *
4602
- * ## Participant notifications
4603
- *
4604
- * You can specify a `participantNotification.message` that's immediately send
4605
- * to all customers who had booked at a changed location. Ensure
4606
- * `participantNotification.notifyParticipants` is set to `true` to send the
4607
- * message.
4608
- * @param serviceId - ID of the service.
4609
- * @param locations - List of locations replacing existing service locations. Omitting an existing location removes it from the service. Specify `removedLocationSessionsAction` to determine the handling of future sessions scheduled at that location.
4610
- * @public
4611
- * @documentationMaturity preview
4612
- * @requiredField locations
4613
- * @requiredField serviceId
4614
- * @permissionId BOOKINGS.SERVICES_LOCATIONS_SET
4615
- * @permissionScope Manage Bookings
4616
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4617
- * @permissionScope Manage Bookings - all permissions
4618
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4619
- * @applicableIdentity APP
4620
- * @fqn wix.bookings.services.v2.ServicesService.SetServiceLocations
4621
- */
4622
- export declare function setServiceLocations(serviceId: string, locations: Location[], options?: SetServiceLocationsOptions): Promise<NonNullablePaths<SetServiceLocationsResponse, {
4623
- [P in ServiceNonNullablePaths]: `service.${P}`;
4624
- }[ServiceNonNullablePaths]>>;
4625
- export interface SetServiceLocationsOptions {
4626
- /**
4627
- * The action to perform on sessions currently set to a removed location. For
4628
- * example, move existing sessions to a new specified location.
4629
- * If not specified, sessions will not be moved to a new location.
4630
- */
4631
- removedLocationSessionsAction?: RemovedLocationSessionsAction;
4632
- /**
4633
- * Whether to notify participants about the change of location, and an
4634
- * Optional custom message. The notification is sent only to participants of sessions that are affected by the change.
4635
- */
4636
- participantNotification?: ParticipantNotification;
4637
- }
4638
- /**
4639
- * Adds a list of *pricing plan IDs*
4640
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))
4641
- * to a service's `payment.pricingPlanIds` array.
4642
- *
4643
- *
4644
- * The call doesn't validate whether the service's `payment.options.pricingPlan`
4645
- * is set to `true`. If it's set to `false`, customers aren't able to pay
4646
- * for their bookings using pricing plans. You can call *Update Service*
4647
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/update-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/update-service))
4648
- * to change a service's supported payment methods.
4649
- * @param serviceId - ID of the service to update.
4650
- * @param pricingPlanIds - IDs of the *pricing plans*
4651
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))
4652
- * to add to the service's `payment.pricingPlanIds` array.
4653
- * @public
4654
- * @requiredField pricingPlanIds
4655
- * @requiredField serviceId
4656
- * @permissionId BOOKINGS.SERVICES_PRICING_PLANS_ADD
4657
- * @permissionScope Manage Bookings
4658
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4659
- * @permissionScope Manage Bookings - all permissions
4660
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4661
- * @applicableIdentity APP
4662
- * @fqn wix.bookings.services.v2.ServicesService.EnablePricingPlansForService
4663
- */
4664
- export declare function enablePricingPlansForService(serviceId: string, pricingPlanIds: string[]): Promise<NonNullablePaths<EnablePricingPlansForServiceResponse, {
4665
- [P in ServiceNonNullablePaths]: `service.${P}`;
4666
- }[ServiceNonNullablePaths]>>;
4667
- /**
4668
- * Removes a list of *pricing plan IDs*
4669
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))
4670
- * from a service's `payment.pricingPlanIds` array.
4671
- *
4672
- *
4673
- * If you remove all pricing plan IDs from `payment.pricingPlanIds` and the
4674
- * service supports only payments by pricing plan, customers will no longer be
4675
- * able to book the service, as they will have no payment options available.
4676
- * @param serviceId - ID of the service to update.
4677
- * @public
4678
- * @requiredField serviceId
4679
- * @permissionId BOOKINGS.SERVICES_PRICING_PLANS_REMOVE
4680
- * @permissionScope Manage Bookings
4681
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4682
- * @permissionScope Manage Bookings - all permissions
4683
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4684
- * @applicableIdentity APP
4685
- * @fqn wix.bookings.services.v2.ServicesService.DisablePricingPlansForService
4686
- */
4687
- export declare function disablePricingPlansForService(serviceId: string, options?: DisablePricingPlansForServiceOptions): Promise<NonNullablePaths<DisablePricingPlansForServiceResponse, {
4688
- [P in ServiceNonNullablePaths]: `service.${P}`;
4689
- }[ServiceNonNullablePaths]>>;
4690
- export interface DisablePricingPlansForServiceOptions {
4691
- /**
4692
- * IDs of the *pricing plans*
4693
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/plan-object))
4694
- * to remove from the service's `payment.pricingPlanIds` array.
4695
- * @format GUID
4696
- * @maxSize 75
4697
- */
4698
- pricingPlanIds?: string[];
4699
- }
4700
- /**
4701
- * Sets a new active slug for the service.
4702
- *
4703
- *
4704
- * The call fails if at least one of these conditions is met:
4705
- * - The slug doesn't adheres to the supported format.
4706
- * - Another service is currently using the slug.
4707
- * - Another service has used the slug in the past.
4708
- * @param serviceId - ID of the service for which to update the active slug.
4709
- * @public
4710
- * @requiredField serviceId
4711
- * @permissionId BOOKINGS.SERVICES_CUSTOM_SLUGS_SET
4712
- * @permissionScope Manage Bookings
4713
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4714
- * @permissionScope Manage Bookings - all permissions
4715
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4716
- * @applicableIdentity APP
4717
- * @fqn wix.bookings.services.v2.ServicesService.SetCustomSlug
4718
- */
4719
- export declare function setCustomSlug(serviceId: string, options?: SetCustomSlugOptions): Promise<NonNullablePaths<SetCustomSlugResponse, `slug.name` | {
4720
- [P in ServiceNonNullablePaths]: `service.${P}`;
4721
- }[ServiceNonNullablePaths]>>;
4722
- export interface SetCustomSlugOptions {
4723
- /**
4724
- * Slug to set as the active service slug.
4725
- * @maxLength 500
4726
- */
4727
- slug?: string;
4728
- }
4729
- /**
4730
- * Checks whether a custom slug is validate for the service.
4731
- *
4732
- *
4733
- * The checks include:
4734
- * - The slug adheres to the supported format.
4735
- * - No other service is currently using the slug.
4736
- * - No other service has used the slug in the past.
4737
- *
4738
- * The call fails if at least one of the checks fails.
4739
- * @param serviceId - IO of the service to check custom slug validity for.
4740
- * @public
4741
- * @requiredField serviceId
4742
- * @permissionId BOOKINGS.SERVICES_CUSTOM_SLUGS_SET
4743
- * @permissionScope Manage Bookings
4744
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4745
- * @permissionScope Manage Bookings - all permissions
4746
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4747
- * @applicableIdentity APP
4748
- * @fqn wix.bookings.services.v2.ServicesService.ValidateSlug
4749
- */
4750
- export declare function validateSlug(serviceId: string, options?: ValidateSlugOptions): Promise<NonNullablePaths<ValidateSlugResponse, `valid` | `errors`>>;
4751
- export interface ValidateSlugOptions {
4752
- /**
4753
- * Custom slug to validate.
4754
- * @maxLength 500
4755
- */
4756
- slug?: string;
4757
- }
4758
- /**
4759
- * Clones a service.
4760
- *
4761
- *
4762
- * ## Connected entities
4763
- *
4764
- * By default, not all entities connected to the service are cloned.
4765
- *
4766
- * ### Schedule
4767
- *
4768
- * Wix Bookings automatically creates a new active *schedule*
4769
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction))
4770
- * for the cloned service. If Wix Bookings can't create this schedule, the
4771
- * Clone Service* call fails.
4772
- *
4773
- * - __For appointment-based services__: Future appointments aren't added to the
4774
- * cloned service's schedule. Use the *Events API*
4775
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
4776
- * to add them as needed.
4777
- * - __For classes and courses__: Future one-time events aren't added to the
4778
- * cloned service's schedule, while future recurring events are added
4779
- * asynchronously. The *Clone Service* call always succeeds, whether or not
4780
- * recurring events are added.
4781
- * If the response includes `RECURRING_EVENTS` in the `errors` array, it means the
4782
- * cloned service doesn't have future recurring events, even though the original
4783
- * service does. You can either delete the cloned service and try again or use
4784
- * the *Events API*
4785
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
4786
- * to add missing events to the schedule.
4787
- *
4788
- * Wix Bookings never adds past events to the cloned service's schedule.
4789
- *
4790
- * ### Service options and variants
4791
- *
4792
- * If the original service has *variants*
4793
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)),
4794
- * they're cloned asynchronously. The *Clone Service* call always succeeds,
4795
- * regardless of whether variants were cloned.
4796
- *
4797
- * If the response includes `OPTIONS_AND_VARIANTS` in the `errors` array, the cloned
4798
- * service doesn't have variants, even though the original service does. You can
4799
- * delete the cloned service and call *Clone Service* again, or use the
4800
- * _Service Options And Variants API_
4801
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction))
4802
- * to add variants.
4803
- *
4804
- * ### Booking form
4805
- *
4806
- * The original service's booking form isn't cloned, whether it's
4807
- * the default or a custom booking form.
4808
- *
4809
- * ### Pricing plans
4810
- *
4811
- * If the original service's accepts payments via *pricing plans*
4812
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans/introduction)),
4813
- * the cloned service's `payment.options.pricingPlan` is also set to `true`. To
4814
- * accept specific pricing plans, call *Enable Pricing Plans For Service*
4815
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/enable-pricing-plans-for-service) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/enable-pricing-plans-for-service)),
4816
- * after cloning the service. If the original service accepts only
4817
- * pricing plan payments and you don't call *Enable Pricing Plans For Service*
4818
- * after cloning the service, customers will be unable to book the service.
4819
- * @param sourceServiceId - ID of the service to clone.
4820
- * @public
4821
- * @requiredField sourceServiceId
4822
- * @permissionId BOOKINGS.SERVICES_CREATE
4823
- * @permissionScope Manage Bookings
4824
- * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
4825
- * @permissionScope Manage Bookings - all permissions
4826
- * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
4827
- * @applicableIdentity APP
4828
- * @fqn wix.bookings.services.v2.ServicesService.CloneService
4829
- */
4830
- export declare function cloneService(sourceServiceId: string): Promise<NonNullablePaths<CloneServiceResponse, {
4831
- [P in ServiceNonNullablePaths]: `service.${P}`;
4832
- }[ServiceNonNullablePaths] | `errors`>>;
4833
- export {};