@wix/auto_sdk_bookings_services 1.0.54 → 1.0.56

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 (130) 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} +893 -374
  2. package/build/{cjs/src/bookings-services-v2-service-services.types.d.ts → bookings-services-v2-service-services.universal-B8YoV8-Q.d.ts} +893 -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} +893 -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} +893 -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 -4835
  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/package.json +0 -3
  65. package/build/es/src/bookings-services-v2-service-services.context.d.ts +0 -42
  66. package/build/es/src/bookings-services-v2-service-services.context.js +0 -42
  67. package/build/es/src/bookings-services-v2-service-services.context.js.map +0 -1
  68. package/build/es/src/bookings-services-v2-service-services.http.d.ts +0 -498
  69. package/build/es/src/bookings-services-v2-service-services.http.js +0 -1879
  70. package/build/es/src/bookings-services-v2-service-services.http.js.map +0 -1
  71. package/build/es/src/bookings-services-v2-service-services.meta.d.ts +0 -48
  72. package/build/es/src/bookings-services-v2-service-services.meta.js +0 -398
  73. package/build/es/src/bookings-services-v2-service-services.meta.js.map +0 -1
  74. package/build/es/src/bookings-services-v2-service-services.public.js +0 -247
  75. package/build/es/src/bookings-services-v2-service-services.public.js.map +0 -1
  76. package/build/es/src/bookings-services-v2-service-services.types.js +0 -232
  77. package/build/es/src/bookings-services-v2-service-services.types.js.map +0 -1
  78. package/build/es/src/bookings-services-v2-service-services.universal.d.ts +0 -4835
  79. package/build/es/src/bookings-services-v2-service-services.universal.js +0 -2209
  80. package/build/es/src/bookings-services-v2-service-services.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -56
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/bookings-services-v2-service-services.context.d.ts +0 -42
  91. package/build/internal/cjs/src/bookings-services-v2-service-services.context.js +0 -72
  92. package/build/internal/cjs/src/bookings-services-v2-service-services.context.js.map +0 -1
  93. package/build/internal/cjs/src/bookings-services-v2-service-services.http.d.ts +0 -498
  94. package/build/internal/cjs/src/bookings-services-v2-service-services.http.js +0 -1904
  95. package/build/internal/cjs/src/bookings-services-v2-service-services.http.js.map +0 -1
  96. package/build/internal/cjs/src/bookings-services-v2-service-services.meta.d.ts +0 -48
  97. package/build/internal/cjs/src/bookings-services-v2-service-services.meta.js +0 -446
  98. package/build/internal/cjs/src/bookings-services-v2-service-services.meta.js.map +0 -1
  99. package/build/internal/cjs/src/bookings-services-v2-service-services.public.js +0 -299
  100. package/build/internal/cjs/src/bookings-services-v2-service-services.public.js.map +0 -1
  101. package/build/internal/cjs/src/bookings-services-v2-service-services.types.js +0 -235
  102. package/build/internal/cjs/src/bookings-services-v2-service-services.types.js.map +0 -1
  103. package/build/internal/cjs/src/bookings-services-v2-service-services.universal.d.ts +0 -4835
  104. package/build/internal/cjs/src/bookings-services-v2-service-services.universal.js +0 -2257
  105. package/build/internal/cjs/src/bookings-services-v2-service-services.universal.js.map +0 -1
  106. package/build/internal/es/index.d.ts +0 -1
  107. package/build/internal/es/index.js +0 -2
  108. package/build/internal/es/index.js.map +0 -1
  109. package/build/internal/es/index.typings.d.ts +0 -56
  110. package/build/internal/es/index.typings.js +0 -2
  111. package/build/internal/es/index.typings.js.map +0 -1
  112. package/build/internal/es/meta.d.ts +0 -1
  113. package/build/internal/es/meta.js +0 -2
  114. package/build/internal/es/meta.js.map +0 -1
  115. package/build/internal/es/src/bookings-services-v2-service-services.context.d.ts +0 -42
  116. package/build/internal/es/src/bookings-services-v2-service-services.context.js +0 -42
  117. package/build/internal/es/src/bookings-services-v2-service-services.context.js.map +0 -1
  118. package/build/internal/es/src/bookings-services-v2-service-services.http.d.ts +0 -498
  119. package/build/internal/es/src/bookings-services-v2-service-services.http.js +0 -1879
  120. package/build/internal/es/src/bookings-services-v2-service-services.http.js.map +0 -1
  121. package/build/internal/es/src/bookings-services-v2-service-services.meta.d.ts +0 -48
  122. package/build/internal/es/src/bookings-services-v2-service-services.meta.js +0 -398
  123. package/build/internal/es/src/bookings-services-v2-service-services.meta.js.map +0 -1
  124. package/build/internal/es/src/bookings-services-v2-service-services.public.js +0 -247
  125. package/build/internal/es/src/bookings-services-v2-service-services.public.js.map +0 -1
  126. package/build/internal/es/src/bookings-services-v2-service-services.types.js +0 -232
  127. package/build/internal/es/src/bookings-services-v2-service-services.types.js.map +0 -1
  128. package/build/internal/es/src/bookings-services-v2-service-services.universal.d.ts +0 -4835
  129. package/build/internal/es/src/bookings-services-v2-service-services.universal.js +0 -2209
  130. package/build/internal/es/src/bookings-services-v2-service-services.universal.js.map +0 -1
@@ -0,0 +1,2350 @@
1
+ import { bD as CreateServiceRequest$1, bE as CreateServiceResponse$1, bI as BulkCreateServicesRequest$1, a as BulkCreateServicesResponse$1, bN as GetServiceRequest$1, bO as GetServiceResponse$1, bT as UpdateServiceRequest$1, bU as UpdateServiceResponse$1, bV as BulkUpdateServicesRequest$1, c as BulkUpdateServicesResponse$1, bX as BulkUpdateServicesByFilterRequest$1, e as BulkUpdateServicesByFilterResponse$1, bY as DeleteServiceRequest$1, b_ as DeleteServiceResponse$1, b$ as BulkDeleteServicesRequest$1, g as BulkDeleteServicesResponse$1, c0 as BulkDeleteServicesByFilterRequest$1, i as BulkDeleteServicesByFilterResponse$1, c1 as QueryServicesRequest$1, c7 as QueryServicesResponse$1, ca as SearchServicesRequest$1, l as SearchServicesResponse$1, cO as QueryPoliciesRequest$1, m as QueryPoliciesResponse$1, cR as QueryBookingFormsRequest$1, o as QueryBookingFormsResponse$1, cV as CountServicesRequest$1, q as CountServicesResponse$1, cW as QueryLocationsRequest$1, s as QueryLocationsResponse$1, c$ as QueryCategoriesRequest$1, u as QueryCategoriesResponse$1, d3 as SetServiceLocationsRequest$1, w as SetServiceLocationsResponse$1, d7 as EnablePricingPlansForServiceRequest$1, E as EnablePricingPlansForServiceResponse$1, d9 as DisablePricingPlansForServiceRequest$1, y as DisablePricingPlansForServiceResponse$1, da as SetCustomSlugRequest$1, A as SetCustomSlugResponse$1, db as ValidateSlugRequest$1, F as ValidateSlugResponse$1, dc as CloneServiceRequest$1, G as CloneServiceResponse$1 } from './bookings-services-v2-service-services.universal-B8YoV8-Q.js';
2
+ import '@wix/sdk-types';
3
+
4
+ /** The `service` object represents an offering that a business provides to its customers. */
5
+ interface Service {
6
+ /**
7
+ * Service ID.
8
+ * @format GUID
9
+ * @readonly
10
+ */
11
+ id?: string | null;
12
+ /**
13
+ * Service type.
14
+ * Learn more about *service types*
15
+ * ([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)).
16
+ */
17
+ type?: ServiceTypeWithLiterals;
18
+ /**
19
+ * Order of the service within a *category*
20
+ * ([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)).
21
+ */
22
+ sortOrder?: number | null;
23
+ /**
24
+ * Service name.
25
+ * @maxLength 400
26
+ * @minLength 1
27
+ */
28
+ name?: string | null;
29
+ /**
30
+ * Service description. For example, `High-class hair styling, cuts, straightening and color`.
31
+ * @maxLength 7000
32
+ */
33
+ description?: string | null;
34
+ /**
35
+ * Short service description, such as `Hair styling`.
36
+ * @maxLength 6000
37
+ */
38
+ tagLine?: string | null;
39
+ /**
40
+ * Default maximum number of customers that can book the service. The service cannot be booked beyond this capacity.
41
+ * @min 1
42
+ * @max 1000
43
+ */
44
+ defaultCapacity?: number | null;
45
+ /** Media associated with the service. */
46
+ media?: Media;
47
+ /** Whether the service is hidden from the site. */
48
+ hidden?: boolean | null;
49
+ /**
50
+ * _Category_
51
+ * ([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))
52
+ * the service is associated with.
53
+ */
54
+ category?: V2Category;
55
+ /** Form the customer filled out when booking the service. */
56
+ form?: Form;
57
+ /**
58
+ * Payment options for booking the service.
59
+ * Learn more about *service payments*
60
+ * ([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)).
61
+ */
62
+ payment?: Payment;
63
+ /** Online booking settings. */
64
+ onlineBooking?: OnlineBooking;
65
+ /** Conferencing options for the service. */
66
+ conferencing?: Conferencing;
67
+ /**
68
+ * The locations this service is offered at. Read more about *service locations*
69
+ * ([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)).
70
+ * @immutable
71
+ * @maxSize 500
72
+ */
73
+ locations?: Location[];
74
+ /**
75
+ * _Policy_
76
+ * ([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))
77
+ * 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.
78
+ */
79
+ bookingPolicy?: BookingPolicy;
80
+ /**
81
+ * The service's *schedule*
82
+ * ([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)),
83
+ * which can be used to manage the service's *events*
84
+ * ([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)).
85
+ */
86
+ schedule?: Schedule;
87
+ /**
88
+ * IDs of the *staff members*
89
+ * ([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))
90
+ * providing the service. Available only for appointment-based services.
91
+ * @maxSize 220
92
+ * @format GUID
93
+ */
94
+ staffMemberIds?: string[];
95
+ /**
96
+ * Information about which resources must be available so customers can book the service.
97
+ * For example, a meeting room or equipment.
98
+ * @maxSize 3
99
+ */
100
+ serviceResources?: ServiceResource[];
101
+ /**
102
+ * A slug is the last part of the URL address that serves as a unique identifier of the service.
103
+ * The list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner.
104
+ * @readonly
105
+ * @maxSize 100
106
+ */
107
+ supportedSlugs?: Slug[];
108
+ /**
109
+ * Active slug for the service.
110
+ * Learn more about *service slugs*
111
+ * ([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)).
112
+ * @readonly
113
+ */
114
+ mainSlug?: Slug;
115
+ /**
116
+ * URLs to various service-related pages, such as the calendar page and the booking page.
117
+ * @readonly
118
+ */
119
+ urls?: URLs;
120
+ /** Extensions enabling users to save custom data related to the service. */
121
+ extendedFields?: ExtendedFields;
122
+ /** Custom SEO data for the service. */
123
+ seoData?: SeoSchema;
124
+ /**
125
+ * Date and time the service was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
126
+ * @readonly
127
+ */
128
+ createdDate?: Date | null;
129
+ /**
130
+ * Date and time the service was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
131
+ * @readonly
132
+ */
133
+ updatedDate?: Date | null;
134
+ /**
135
+ * Revision number, which increments by 1 each time the service is updated. To
136
+ * prevent conflicting changes, the existing revision must be used when updating
137
+ * a service.
138
+ * @readonly
139
+ */
140
+ revision?: string | null;
141
+ }
142
+ declare enum ServiceType {
143
+ /** Appointment-based service. */
144
+ APPOINTMENT = "APPOINTMENT",
145
+ /** Class service. */
146
+ CLASS = "CLASS",
147
+ /** Course service. */
148
+ COURSE = "COURSE"
149
+ }
150
+ /** @enumType */
151
+ type ServiceTypeWithLiterals = ServiceType | 'APPOINTMENT' | 'CLASS' | 'COURSE';
152
+ interface Media {
153
+ /**
154
+ * Media items associated with the service.
155
+ * @maxSize 100
156
+ */
157
+ items?: MediaItem[];
158
+ /** Primary media associated with the service. */
159
+ mainMedia?: MediaItem;
160
+ /** Cover media associated with the service. */
161
+ coverMedia?: MediaItem;
162
+ }
163
+ interface MediaItem extends MediaItemItemOneOf {
164
+ /** Details of the image associated with the service, such as URL and size. */
165
+ image?: Image;
166
+ }
167
+ /** @oneof */
168
+ interface MediaItemItemOneOf {
169
+ /** Details of the image associated with the service, such as URL and size. */
170
+ image?: Image;
171
+ }
172
+ interface Image {
173
+ /**
174
+ * WixMedia image ID. (e.g. "4b3901ffcb8d7ad81a613779d92c9702.jpg")
175
+ * @maxLength 2048
176
+ */
177
+ id?: string;
178
+ /**
179
+ * Image URL. (similar to image.id e.g. "4b3901ffcb8d7ad81a613779d92c9702.jpg")
180
+ * @maxLength 2048
181
+ */
182
+ url?: string;
183
+ /** Original image height. */
184
+ height?: number;
185
+ /** Original image width. */
186
+ width?: number;
187
+ /**
188
+ * Image alt text.
189
+ * @maxLength 134061
190
+ */
191
+ altText?: string | null;
192
+ /**
193
+ * Image file name.
194
+ * @readonly
195
+ * @maxLength 2048
196
+ */
197
+ filename?: string | null;
198
+ }
199
+ interface V2Category {
200
+ /**
201
+ * Category ID.
202
+ * @format GUID
203
+ */
204
+ id?: string;
205
+ /**
206
+ * Category name.
207
+ * @maxLength 500
208
+ * @readonly
209
+ */
210
+ name?: string | null;
211
+ /**
212
+ * Order of a category within a category list.
213
+ * @readonly
214
+ */
215
+ sortOrder?: number | null;
216
+ }
217
+ interface Form {
218
+ /**
219
+ * ID of the form associated with the service.
220
+ * The form information that you submit when booking includes contact details, participants, and other form fields set up for the service.
221
+ * You can manage the service booking form fields using the Bookings Forms API.
222
+ * @format GUID
223
+ */
224
+ id?: string;
225
+ }
226
+ interface Payment extends PaymentRateOneOf {
227
+ /**
228
+ * The details for the fixed price of the service.
229
+ *
230
+ * Required when: `rateType` is `FIXED`
231
+ */
232
+ fixed?: FixedPayment;
233
+ /**
234
+ * The details for the custom price of the service.
235
+ *
236
+ * Required when: `rateType` is `CUSTOM`
237
+ */
238
+ custom?: CustomPayment;
239
+ /**
240
+ * The details for the varied pricing of the service.
241
+ * Read more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).
242
+ *
243
+ * Required when: `rateType` is `VARIED`
244
+ */
245
+ varied?: VariedPayment;
246
+ /** The rate the customer is expected to pay for the service. */
247
+ rateType?: RateTypeWithLiterals;
248
+ /** The payment options a customer can use to pay for the service. */
249
+ options?: PaymentOptions;
250
+ /**
251
+ * IDs of pricing plans that can be used as payment for the service.
252
+ * @readonly
253
+ * @maxSize 75
254
+ * @format GUID
255
+ */
256
+ pricingPlanIds?: string[];
257
+ }
258
+ /** @oneof */
259
+ interface PaymentRateOneOf {
260
+ /**
261
+ * The details for the fixed price of the service.
262
+ *
263
+ * Required when: `rateType` is `FIXED`
264
+ */
265
+ fixed?: FixedPayment;
266
+ /**
267
+ * The details for the custom price of the service.
268
+ *
269
+ * Required when: `rateType` is `CUSTOM`
270
+ */
271
+ custom?: CustomPayment;
272
+ /**
273
+ * The details for the varied pricing of the service.
274
+ * Read more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).
275
+ *
276
+ * Required when: `rateType` is `VARIED`
277
+ */
278
+ varied?: VariedPayment;
279
+ }
280
+ declare enum RateType {
281
+ /** Unknown rate type. */
282
+ UNKNOWN_RATE_TYPE = "UNKNOWN_RATE_TYPE",
283
+ /** The service has a fixed price. */
284
+ FIXED = "FIXED",
285
+ /** The service has a custom price, expressed as a price description. */
286
+ CUSTOM = "CUSTOM",
287
+ /** This service is offered with a set of different prices based on different terms. */
288
+ VARIED = "VARIED",
289
+ /** This service is offered free of charge. */
290
+ NO_FEE = "NO_FEE"
291
+ }
292
+ /** @enumType */
293
+ type RateTypeWithLiterals = RateType | 'UNKNOWN_RATE_TYPE' | 'FIXED' | 'CUSTOM' | 'VARIED' | 'NO_FEE';
294
+ interface FixedPayment {
295
+ /**
296
+ * The fixed price required to book the service.
297
+ *
298
+ * Required when: `rateType` is `FIXED`
299
+ */
300
+ price?: Money;
301
+ /**
302
+ * The deposit price required to book the service.
303
+ *
304
+ * Required when: `rateType` is `FIXED` and `paymentOptions.deposit` is `true`
305
+ */
306
+ deposit?: Money;
307
+ }
308
+ /**
309
+ * Money.
310
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
311
+ */
312
+ interface Money {
313
+ /**
314
+ * 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.
315
+ * @format DECIMAL_VALUE
316
+ * @decimalValue options { gt:0, maxScale:2 }
317
+ */
318
+ value?: string;
319
+ /**
320
+ * Currency code. Must be valid ISO 4217 currency code (e.g., USD).
321
+ * @format CURRENCY
322
+ * @readonly
323
+ */
324
+ currency?: string;
325
+ /**
326
+ * Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.
327
+ * @maxLength 50
328
+ */
329
+ formattedValue?: string | null;
330
+ }
331
+ interface CustomPayment {
332
+ /**
333
+ * A custom description explaining to the customer how to pay for the service.
334
+ * @maxLength 50
335
+ */
336
+ description?: string | null;
337
+ }
338
+ interface VariedPayment {
339
+ /** The default price for the service without any variants. It will also be used as the default price for any new variant. */
340
+ defaultPrice?: Money;
341
+ /**
342
+ * The deposit price required to book the service.
343
+ *
344
+ * Required when: `rateType` is `VARIED` and `paymentOptions.deposit` is `true`
345
+ */
346
+ deposit?: Money;
347
+ /**
348
+ * The minimal price a customer may pay for this service, based on its variants.
349
+ * @readonly
350
+ */
351
+ minPrice?: Money;
352
+ /**
353
+ * The maximum price a customer may pay for this service, based on its variants.
354
+ * @readonly
355
+ */
356
+ maxPrice?: Money;
357
+ }
358
+ interface PaymentOptions {
359
+ /**
360
+ * Customers can pay for the service online.
361
+ * When `true`:
362
+ * + `rateType` must be either `FIXED` or `VARIED`.
363
+ * + `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).
364
+ */
365
+ online?: boolean | null;
366
+ /** Customers can pay for the service in person. */
367
+ inPerson?: boolean | null;
368
+ /**
369
+ * This service requires a deposit to be made online in order to book it.
370
+ * When `true`:
371
+ * + `rateType` must be `VARIED` or `FIXED`.
372
+ * + A `deposit` must be specified.
373
+ */
374
+ deposit?: boolean | null;
375
+ /** Customers can pay for the service using a pricing plan. */
376
+ pricingPlan?: boolean | null;
377
+ }
378
+ interface OnlineBooking {
379
+ /**
380
+ * Whether the service can be booked online.
381
+ * When set to `true`, customers can book the service online. Configure the payment options via the `service.payment` property.
382
+ * When set to `false`, customers cannot book the service online, and the service can only be paid for in person.
383
+ */
384
+ enabled?: boolean | null;
385
+ /** Booking the service requires approval by the Wix user. */
386
+ requireManualApproval?: boolean | null;
387
+ /** Multiple customers can request to book the same time slot. This is relevant when `requireManualApproval` is `true`. */
388
+ allowMultipleRequests?: boolean | null;
389
+ }
390
+ interface Conferencing {
391
+ /** Whether a conference link is generated for the service's sessions. */
392
+ enabled?: boolean | null;
393
+ }
394
+ interface Location extends LocationOptionsOneOf {
395
+ /** Information about business locations. */
396
+ business?: BusinessLocationOptions;
397
+ /** Information about custom locations. */
398
+ custom?: CustomLocationOptions;
399
+ /**
400
+ * Location ID.
401
+ * @format GUID
402
+ * @readonly
403
+ */
404
+ id?: string;
405
+ /**
406
+ * Location type.
407
+ *
408
+ * Default: `CUSTOM`
409
+ */
410
+ type?: LocationTypeWithLiterals;
411
+ /**
412
+ * Location address. Empty for `{"type": "CUSTOMER"}`.
413
+ * @readonly
414
+ */
415
+ calculatedAddress?: CommonAddress;
416
+ }
417
+ /** @oneof */
418
+ interface LocationOptionsOneOf {
419
+ /** Information about business locations. */
420
+ business?: BusinessLocationOptions;
421
+ /** Information about custom locations. */
422
+ custom?: CustomLocationOptions;
423
+ }
424
+ declare enum LocationType {
425
+ UNKNOWN_LOCATION_TYPE = "UNKNOWN_LOCATION_TYPE",
426
+ /**
427
+ * Location set by the business that is not a standard business *location*
428
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
429
+ */
430
+ CUSTOM = "CUSTOM",
431
+ /**
432
+ * Business *location*
433
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
434
+ */
435
+ BUSINESS = "BUSINESS",
436
+ /**
437
+ * The customer specifies any address when booking. Available only for
438
+ * appointment-based services.
439
+ */
440
+ CUSTOMER = "CUSTOMER"
441
+ }
442
+ /** @enumType */
443
+ type LocationTypeWithLiterals = LocationType | 'UNKNOWN_LOCATION_TYPE' | 'CUSTOM' | 'BUSINESS' | 'CUSTOMER';
444
+ interface CommonAddress extends CommonAddressStreetOneOf {
445
+ /** Street name and number. */
446
+ streetAddress?: StreetAddress;
447
+ /** @maxLength 255 */
448
+ addressLine?: string | null;
449
+ /**
450
+ * 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
451
+ * @format COUNTRY
452
+ */
453
+ country?: string | null;
454
+ /**
455
+ * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
456
+ * @maxLength 255
457
+ */
458
+ subdivision?: string | null;
459
+ /**
460
+ * City name.
461
+ * @maxLength 255
462
+ */
463
+ city?: string | null;
464
+ /**
465
+ * Postal or zip code.
466
+ * @maxLength 255
467
+ */
468
+ postalCode?: string | null;
469
+ /**
470
+ * Full address of the location.
471
+ * @maxLength 512
472
+ */
473
+ formattedAddress?: string | null;
474
+ }
475
+ /** @oneof */
476
+ interface CommonAddressStreetOneOf {
477
+ /** Street name and number. */
478
+ streetAddress?: StreetAddress;
479
+ /** @maxLength 255 */
480
+ addressLine?: string | null;
481
+ }
482
+ /** Street address. Includes street name, number, and apartment number in separate fields. */
483
+ interface StreetAddress {
484
+ /**
485
+ * Street number.
486
+ * @maxLength 255
487
+ */
488
+ number?: string;
489
+ /**
490
+ * Street name.
491
+ * @maxLength 255
492
+ */
493
+ name?: string;
494
+ /**
495
+ * Apartment number.
496
+ * @maxLength 255
497
+ */
498
+ apt?: string;
499
+ }
500
+ interface BusinessLocationOptions {
501
+ /**
502
+ * ID of the business *location*
503
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
504
+ * When setting a business location, specify only the location ID. Other location details are overwritten.
505
+ * @format GUID
506
+ */
507
+ id?: string;
508
+ /**
509
+ * Business location name.
510
+ * @readonly
511
+ * @maxLength 150
512
+ */
513
+ name?: string;
514
+ /**
515
+ * Whether this is the default location. There can only be a single default location per site.
516
+ * @readonly
517
+ */
518
+ default?: boolean | null;
519
+ /**
520
+ * Business location address.
521
+ * @readonly
522
+ */
523
+ address?: CommonAddress;
524
+ /**
525
+ * Business location email.
526
+ * @format EMAIL
527
+ * @readonly
528
+ */
529
+ email?: string | null;
530
+ /**
531
+ * Business location phone.
532
+ * @format PHONE
533
+ * @readonly
534
+ */
535
+ phone?: string | null;
536
+ }
537
+ interface CustomLocationOptions {
538
+ /**
539
+ * ID of the custom location.
540
+ * @format GUID
541
+ * @readonly
542
+ */
543
+ id?: string;
544
+ /** Address of the custom location. */
545
+ address?: CommonAddress;
546
+ }
547
+ /**
548
+ * `BookingPolicy` is the main entity of `BookingPolicyService` and specifies a set of rules for booking a service
549
+ * by visitors and members.
550
+ *
551
+ * Each `BookingPolicy` consists of a number of sub-policies. When the Bookings App is provisioned to a meta site then a
552
+ * default `BookingPolicy` will be created with defaults for each of these sub-policies. This also applies when a request
553
+ * is received to create a new `BookingPolicy` and one or more of these sub-policies are not provided.
554
+ *
555
+ * Sub-policies are defined in separate objects as specified below.
556
+ *
557
+ * - The `LimitEarlyBookingPolicy` object defines the policy for limiting early bookings.
558
+ * - The `LimitLateBookingPolicy` object defines the policy for limiting late bookings.
559
+ * - The `BookAfterStartPolicy` object defines the policy for booking after the start of the schedule.
560
+ * - The `CancellationPolicy` object defines the policy for canceling a booked entity.
561
+ * - The `ReschedulePolicy` object defines the policy for rescheduling booked entity.
562
+ * - The `WaitlistPolicy` object defines the policy for a waitlist.
563
+ * - The `ParticipantsPolicy` object defines the policy regarding the participants per booking.
564
+ * - The `ResourcesPolicy` object defines the policy regarding the resources per booking.
565
+ * - The `CancellationFeePolicy` object defines the policy regarding cancellation fees.
566
+ * - The `SaveCreditCardPolicy` object defines the policy for saving credit card details.
567
+ *
568
+ * By default each sub-policy is disabled. A more detailed specification of the default settings of each sub-policy
569
+ * can be found in the description of the corresponding object.
570
+ *
571
+ * 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.
572
+ */
573
+ interface BookingPolicy {
574
+ /**
575
+ * The ID to the policy for the booking.
576
+ * @format GUID
577
+ */
578
+ id?: string;
579
+ /**
580
+ * Date and time the policy was created.
581
+ * @readonly
582
+ */
583
+ createdDate?: Date | null;
584
+ /**
585
+ * Date and time the policy was updated.
586
+ * @readonly
587
+ */
588
+ updatedDate?: Date | null;
589
+ /**
590
+ * Name of the policy.
591
+ * @maxLength 400
592
+ * @readonly
593
+ */
594
+ name?: string | null;
595
+ /**
596
+ * Custom description for the policy. This policy is displayed to the participant.
597
+ * @readonly
598
+ */
599
+ customPolicyDescription?: PolicyDescription;
600
+ /**
601
+ * Whether the policy is the default for the meta site.
602
+ * @readonly
603
+ */
604
+ default?: boolean | null;
605
+ /**
606
+ * Policy for limiting early bookings.
607
+ * @readonly
608
+ */
609
+ limitEarlyBookingPolicy?: LimitEarlyBookingPolicy;
610
+ /**
611
+ * Policy for limiting late bookings.
612
+ * @readonly
613
+ */
614
+ limitLateBookingPolicy?: LimitLateBookingPolicy;
615
+ /**
616
+ * Policy on booking an entity after the start of the schedule.
617
+ * @readonly
618
+ */
619
+ bookAfterStartPolicy?: BookAfterStartPolicy;
620
+ /**
621
+ * Policy for canceling a booked entity.
622
+ * @readonly
623
+ */
624
+ cancellationPolicy?: CancellationPolicy;
625
+ /**
626
+ * Policy for rescheduling a booked entity.
627
+ * @readonly
628
+ */
629
+ reschedulePolicy?: ReschedulePolicy;
630
+ /**
631
+ * Waitlist policy for the service.
632
+ * @readonly
633
+ */
634
+ waitlistPolicy?: WaitlistPolicy;
635
+ /**
636
+ * Policy regarding the participants per booking.
637
+ * @readonly
638
+ */
639
+ participantsPolicy?: ParticipantsPolicy;
640
+ /**
641
+ * Policy for allocating resources.
642
+ * @readonly
643
+ */
644
+ resourcesPolicy?: ResourcesPolicy;
645
+ /**
646
+ * Rules for cancellation fees.
647
+ * @readonly
648
+ */
649
+ cancellationFeePolicy?: CancellationFeePolicy;
650
+ /**
651
+ * Rule for saving credit card.
652
+ * @readonly
653
+ */
654
+ saveCreditCardPolicy?: SaveCreditCardPolicy;
655
+ }
656
+ /** A description of the policy to display to participants. */
657
+ interface PolicyDescription {
658
+ /**
659
+ * Whether the description should be displayed. If `true`, the description is displayed.
660
+ *
661
+ * Default: `false`
662
+ */
663
+ enabled?: boolean;
664
+ /**
665
+ * The description to display.
666
+ *
667
+ * Default: Empty
668
+ * Max length: 2500 characters
669
+ * @maxLength 2500
670
+ */
671
+ description?: string;
672
+ }
673
+ /** The policy for limiting early bookings. */
674
+ interface LimitEarlyBookingPolicy {
675
+ /**
676
+ * Whether there is a limit on how early a customer
677
+ * can book. When `false`, there is no limit on the earliest
678
+ * booking time and customers can book in advance, as early as they like.
679
+ *
680
+ * Default: `false`
681
+ */
682
+ enabled?: boolean;
683
+ /**
684
+ * Maximum number of minutes before the start of the session that a booking can be made. This value must be greater
685
+ * than `latest_booking_in_minutes` in the `LimitLateBookingPolicy` policy.
686
+ *
687
+ * Default: 10080 minutes (7 days)
688
+ * Min: 1 minute
689
+ * @min 1
690
+ */
691
+ earliestBookingInMinutes?: number;
692
+ }
693
+ /**
694
+ * The policy for limiting late bookings.
695
+ *
696
+ * This policy and the `BookAfterStartPolicy` policy cannot be enabled at the same time. So if this policy
697
+ * is enabled, `BookAfterStartPolicy` must be disabled.
698
+ */
699
+ interface LimitLateBookingPolicy {
700
+ /**
701
+ * Whether there is a limit on how late a customer
702
+ * can book. When `false`, there is no limit on the latest
703
+ * booking time and customers can book up to the last minute.
704
+ *
705
+ * Default: `false`
706
+ */
707
+ enabled?: boolean;
708
+ /**
709
+ * Minimum number of minutes before the start of the session that a booking can be made.
710
+ * For a schedule, this is relative to the start time of the next booked session, excluding past-booked sessions.
711
+ * This value must be less than `earliest_booking_in_minutes` in the `LimitEarlyBookingPolicy` policy.
712
+ *
713
+ * Default: 1440 minutes (1 day)
714
+ * Min: 1 minute
715
+ * @min 1
716
+ */
717
+ latestBookingInMinutes?: number;
718
+ }
719
+ /**
720
+ * The policy for whether a session can be booked after the start of the schedule.
721
+ * This policy and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this policy
722
+ * is enabled, the `LimitLateBookingPolicy` policy must be disabled.
723
+ */
724
+ interface BookAfterStartPolicy {
725
+ /**
726
+ * Whether booking is allowed after the start of the schedule. When `true`,
727
+ * customers can book after the start of the schedule.
728
+ *
729
+ * Default: `false`
730
+ */
731
+ enabled?: boolean;
732
+ }
733
+ /** The policy for canceling a booked session. */
734
+ interface CancellationPolicy {
735
+ /**
736
+ * Whether canceling a booking is allowed. When `true`, customers
737
+ * can cancel the booking.
738
+ *
739
+ * Default: `false`
740
+ */
741
+ enabled?: boolean;
742
+ /**
743
+ * Whether there is a limit on the latest cancellation time. When `true`,
744
+ * a time limit is enforced.
745
+ *
746
+ * Default: `false`
747
+ */
748
+ limitLatestCancellation?: boolean;
749
+ /**
750
+ * Minimum number of minutes before the start of the booked session that the booking can be canceled.
751
+ *
752
+ * Default: 1440 minutes (1 day)
753
+ * Min: 1 minute
754
+ * @min 1
755
+ */
756
+ latestCancellationInMinutes?: number;
757
+ }
758
+ /** The policy for rescheduling a booked session. */
759
+ interface ReschedulePolicy {
760
+ /**
761
+ * Whether rescheduling a booking is allowed. When `true`, customers
762
+ * can reschedule the booking.
763
+ *
764
+ * Default: `false`
765
+ */
766
+ enabled?: boolean;
767
+ /**
768
+ * Whether there is a limit on the latest reschedule time. When `true`,
769
+ * a time limit is enforced.
770
+ *
771
+ * Default: `false`
772
+ */
773
+ limitLatestReschedule?: boolean;
774
+ /**
775
+ * Minimum number of minutes before the start of the booked session that the booking can be rescheduled.
776
+ *
777
+ * Default: 1440 minutes (1 day)
778
+ * Min: 1 minute
779
+ * @min 1
780
+ */
781
+ latestRescheduleInMinutes?: number;
782
+ }
783
+ /** The policy for the waitlist. */
784
+ interface WaitlistPolicy {
785
+ /**
786
+ * Whether the session has a waitlist. If `true`, there is a waitlist.
787
+ *
788
+ * Default: `false`
789
+ */
790
+ enabled?: boolean;
791
+ /**
792
+ * Number of spots available in the waitlist.
793
+ *
794
+ * Default: 10 spots
795
+ * Min: 1 spot
796
+ * @min 1
797
+ */
798
+ capacity?: number;
799
+ /**
800
+ * Amount of time a participant is given to book, once notified that a spot is available.
801
+ *
802
+ * Default: 10 minutes
803
+ * Min: 1 spot
804
+ * @min 1
805
+ */
806
+ reservationTimeInMinutes?: number;
807
+ }
808
+ /** The policy for the maximum number of participants per booking. */
809
+ interface ParticipantsPolicy {
810
+ /**
811
+ * Maximum number of participants allowed.
812
+ *
813
+ * Default: 1 participant
814
+ * Min: 1 participant
815
+ * @min 1
816
+ */
817
+ maxParticipantsPerBooking?: number;
818
+ }
819
+ /** The policy regarding the allocation of resources (e.g. staff members). */
820
+ interface ResourcesPolicy {
821
+ /**
822
+ * `true` if this policy is enabled, `false` otherwise.
823
+ * When `false` then the client must always select a resource when booking an appointment.
824
+ */
825
+ enabled?: boolean;
826
+ /**
827
+ * `true`, if it is allowed to automatically assign a resource when booking an appointment,
828
+ * `false`, if the client must always select a resource.
829
+ *
830
+ * Default: `false`
831
+ */
832
+ autoAssignAllowed?: boolean;
833
+ }
834
+ interface CancellationFeePolicy {
835
+ /**
836
+ * Whether canceling a booking will result in a cancellation fee
837
+ *
838
+ * Default: `false`
839
+ */
840
+ enabled?: boolean;
841
+ /**
842
+ * Cancellation windows describing the time of cancellation and the fee to charge.
843
+ * @maxSize 2
844
+ */
845
+ cancellationWindows?: CancellationWindow[];
846
+ /**
847
+ * Whether the cancellation fee should not be automatically collected when customer cancels the booking.
848
+ *
849
+ * Default: `true`
850
+ */
851
+ autoCollectFeeEnabled?: boolean | null;
852
+ }
853
+ interface CancellationWindow extends CancellationWindowFeeOneOf {
854
+ /** Amount to be charged as a cancellation fee. */
855
+ amount?: Money;
856
+ /**
857
+ * Percentage of the original price to be charged as a cancellation fee.
858
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
859
+ */
860
+ percentage?: string;
861
+ /**
862
+ * The fee will be applied if the booked session starts within this start time in minutes.
863
+ * @min 1
864
+ */
865
+ startInMinutes?: number | null;
866
+ }
867
+ /** @oneof */
868
+ interface CancellationWindowFeeOneOf {
869
+ /** Amount to be charged as a cancellation fee. */
870
+ amount?: Money;
871
+ /**
872
+ * Percentage of the original price to be charged as a cancellation fee.
873
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
874
+ */
875
+ percentage?: string;
876
+ }
877
+ interface SaveCreditCardPolicy {
878
+ /** Default: `false` */
879
+ enabled?: boolean;
880
+ }
881
+ interface Schedule {
882
+ /**
883
+ * ID of the *schedule*
884
+ * ([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))
885
+ * to which the service's events belong.
886
+ * @format GUID
887
+ * @readonly
888
+ */
889
+ id?: string | null;
890
+ /**
891
+ * Start time of the first session in the schedule. For courses only.
892
+ * @readonly
893
+ */
894
+ firstSessionStart?: Date | null;
895
+ /**
896
+ * End time of the last session in the schedule. For courses only.
897
+ * @readonly
898
+ */
899
+ lastSessionEnd?: Date | null;
900
+ /** Limitations affecting the service availability. */
901
+ availabilityConstraints?: AvailabilityConstraints;
902
+ }
903
+ interface AvailabilityConstraints {
904
+ /**
905
+ * Calculated list of all supported session durations for the service. For
906
+ * appointment-based services without varied pricing based on session length, it
907
+ * matches the single value in the `sessionDurations` array. For appointment-based
908
+ * services with varied pricing based on session length, it includes session
909
+ * durations for all *variants*
910
+ * ([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)),
911
+ * while ignoring `sessionDurations`.
912
+ * For courses and classes, it includes durations for all future
913
+ * recurring sessions but excludes durations for one-off or past recurring sessions.
914
+ * @readonly
915
+ * @maxSize 50
916
+ */
917
+ durations?: Duration[];
918
+ /**
919
+ * List of supported session durations in minutes.
920
+ *
921
+ * - For appointment-based services, specify `sessionDurations` when creating a service.
922
+ * - 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)).
923
+ * - For classes or courses, don't specify `sessionDurations` when creating a service.
924
+ *
925
+ * Min: `1` minute
926
+ * Max: `44639` minutes (30 days, 23 hours, and 59 minutes)
927
+ * @min 1
928
+ * @max 44639
929
+ * @maxSize 50
930
+ */
931
+ sessionDurations?: number[];
932
+ /**
933
+ * The number of minutes between the end of a session and the start of the next.
934
+ *
935
+ *
936
+ * Min: `0` minutes
937
+ * Max: `720` minutes
938
+ * @max 720
939
+ */
940
+ timeBetweenSessions?: number;
941
+ }
942
+ interface Duration {
943
+ /**
944
+ * The duration of the service in minutes.
945
+ *
946
+ * Min: `1` minute
947
+ * Max: `44639` minutes (30 days, 23 hours, and 59 minutes)
948
+ * @min 1
949
+ * @max 44639
950
+ */
951
+ minutes?: number;
952
+ }
953
+ interface ServiceResource extends ServiceResourceSelectionOneOf {
954
+ /**
955
+ * Details about the required *resource type*
956
+ * ([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)).
957
+ */
958
+ resourceType?: ResourceType;
959
+ }
960
+ /** @oneof */
961
+ interface ServiceResourceSelectionOneOf {
962
+ }
963
+ interface ResourceType {
964
+ /**
965
+ * The type of the resource.
966
+ * @format GUID
967
+ */
968
+ id?: string | null;
969
+ /**
970
+ * The name of the resource type.
971
+ * @readonly
972
+ * @maxLength 40
973
+ * @minLength 1
974
+ */
975
+ name?: string | null;
976
+ }
977
+ interface Slug {
978
+ /**
979
+ * 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`.
980
+ * @maxLength 500
981
+ */
982
+ name?: string;
983
+ /**
984
+ * 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.
985
+ * @readonly
986
+ */
987
+ custom?: boolean | null;
988
+ /**
989
+ * Date and time the slug was created. This is a system field.
990
+ * @readonly
991
+ */
992
+ createdDate?: Date | null;
993
+ }
994
+ interface URLs {
995
+ /**
996
+ * The URL for the service page.
997
+ * @readonly
998
+ */
999
+ servicePage?: PageUrlV2;
1000
+ /**
1001
+ * The URL for the booking entry point. It can be either to the calendar or to the service page.
1002
+ * @readonly
1003
+ */
1004
+ bookingPage?: PageUrlV2;
1005
+ /**
1006
+ * The URL for the calendar. Can be empty if no calendar exists.
1007
+ * @readonly
1008
+ */
1009
+ calendarPage?: PageUrlV2;
1010
+ }
1011
+ interface PageUrlV2 {
1012
+ /**
1013
+ * The relative path for the page within the site. For example, `/product-page/a-product`.
1014
+ * @maxLength 2048
1015
+ */
1016
+ relativePath?: string;
1017
+ /**
1018
+ * The page's full URL. For example, `https://mysite.com/product-page/a-product`.
1019
+ * @maxLength 2048
1020
+ */
1021
+ url?: string | null;
1022
+ }
1023
+ interface ExtendedFields {
1024
+ /**
1025
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
1026
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
1027
+ *
1028
+ * You can only access fields for which you have the appropriate permissions.
1029
+ *
1030
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
1031
+ */
1032
+ namespaces?: Record<string, Record<string, any>>;
1033
+ }
1034
+ /**
1035
+ * 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.
1036
+ * The search engines use this information for ranking purposes, or to display snippets in the search results.
1037
+ * 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.
1038
+ */
1039
+ interface SeoSchema {
1040
+ /** SEO tag information. */
1041
+ tags?: Tag[];
1042
+ /** SEO general settings. */
1043
+ settings?: Settings;
1044
+ }
1045
+ interface Keyword {
1046
+ /** Keyword value. */
1047
+ term?: string;
1048
+ /** Whether the keyword is the main focus keyword. */
1049
+ isMain?: boolean;
1050
+ /**
1051
+ * The source that added the keyword terms to the SEO settings.
1052
+ * @maxLength 1000
1053
+ */
1054
+ origin?: string | null;
1055
+ }
1056
+ interface Tag {
1057
+ /**
1058
+ * SEO tag type.
1059
+ *
1060
+ *
1061
+ * Supported values: `title`, `meta`, `script`, `link`.
1062
+ */
1063
+ type?: string;
1064
+ /**
1065
+ * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
1066
+ * For example: `{"name": "description", "content": "the description itself"}`.
1067
+ */
1068
+ props?: Record<string, any> | null;
1069
+ /** SEO tag meta data. For example, `{"height": 300, "width": 240}`. */
1070
+ meta?: Record<string, any> | null;
1071
+ /** SEO tag inner content. For example, `<title> inner content </title>`. */
1072
+ children?: string;
1073
+ /** Whether the tag is a custom tag. */
1074
+ custom?: boolean;
1075
+ /** Whether the tag is disabled. */
1076
+ disabled?: boolean;
1077
+ }
1078
+ interface Settings {
1079
+ /**
1080
+ * Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
1081
+ *
1082
+ *
1083
+ * Default: `false` (Auto Redirect is enabled.)
1084
+ */
1085
+ preventAutoRedirect?: boolean;
1086
+ /**
1087
+ * User-selected keyword terms for a specific page.
1088
+ * @maxSize 5
1089
+ */
1090
+ keywords?: Keyword[];
1091
+ }
1092
+ interface CreateServiceRequest {
1093
+ /** Service to create. */
1094
+ service: Service;
1095
+ }
1096
+ interface CreateServiceResponse {
1097
+ /** Created service. */
1098
+ service?: Service;
1099
+ }
1100
+ interface BulkCreateServicesRequest {
1101
+ /**
1102
+ * Services to create.
1103
+ * @maxSize 100
1104
+ */
1105
+ services: Service[];
1106
+ /** Whether to return the created service objects. */
1107
+ returnEntity?: boolean;
1108
+ }
1109
+ interface BulkCreateServicesResponse {
1110
+ /** The result of each service creation. */
1111
+ results?: BulkServiceResult[];
1112
+ /** Create statistics. */
1113
+ bulkActionMetadata?: BulkActionMetadata;
1114
+ }
1115
+ interface BulkServiceResult {
1116
+ /** Update metadata. */
1117
+ itemMetadata?: ItemMetadata;
1118
+ /** Updated service. */
1119
+ item?: Service;
1120
+ }
1121
+ interface ItemMetadata {
1122
+ /**
1123
+ * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
1124
+ * @format GUID
1125
+ */
1126
+ id?: string | null;
1127
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1128
+ originalIndex?: number;
1129
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1130
+ success?: boolean;
1131
+ /** Details about the error in case of failure. */
1132
+ error?: ApplicationError;
1133
+ }
1134
+ interface ApplicationError {
1135
+ /** Error code. */
1136
+ code?: string;
1137
+ /** Description of the error. */
1138
+ description?: string;
1139
+ /** Data related to the error. */
1140
+ data?: Record<string, any> | null;
1141
+ }
1142
+ interface BulkActionMetadata {
1143
+ /** Number of items that were successfully processed. */
1144
+ totalSuccesses?: number;
1145
+ /** Number of items that couldn't be processed. */
1146
+ totalFailures?: number;
1147
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1148
+ undetailedFailures?: number;
1149
+ }
1150
+ interface GetServiceRequest {
1151
+ /**
1152
+ * ID of the service to retrieve.
1153
+ * @format GUID
1154
+ */
1155
+ serviceId: string;
1156
+ }
1157
+ interface GetServiceResponse {
1158
+ /** Retrieved service. */
1159
+ service?: Service;
1160
+ }
1161
+ interface UpdateServiceRequest {
1162
+ /** Service to update. */
1163
+ service: Service;
1164
+ }
1165
+ interface UpdateServiceResponse {
1166
+ /** Updated service. */
1167
+ service?: Service;
1168
+ }
1169
+ interface BulkUpdateServicesRequest {
1170
+ /**
1171
+ * Services to update.
1172
+ * @maxSize 100
1173
+ */
1174
+ services?: MaskedService[];
1175
+ /** Whether to include the updated services in the response. Default: `false` */
1176
+ returnEntity?: boolean;
1177
+ }
1178
+ interface MaskedService {
1179
+ /** Service to update. */
1180
+ service?: Service;
1181
+ /** Explicit list of fields to update. */
1182
+ mask?: string[];
1183
+ }
1184
+ interface BulkUpdateServicesResponse {
1185
+ /** The result of each service update. */
1186
+ results?: BulkServiceResult[];
1187
+ /** Update statistics. */
1188
+ bulkActionMetadata?: BulkActionMetadata;
1189
+ }
1190
+ interface BulkUpdateServicesByFilterRequest {
1191
+ /** Filter to identify the services to update. */
1192
+ filter: Record<string, any> | null;
1193
+ /** Service to update. */
1194
+ service: Service;
1195
+ }
1196
+ interface BulkUpdateServicesByFilterResponse {
1197
+ /**
1198
+ * ID of the service update job.
1199
+ *
1200
+ * Pass this ID to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction) to retrieve job details and metadata.
1201
+ * @format GUID
1202
+ */
1203
+ jobId?: string;
1204
+ }
1205
+ interface DeleteServiceRequest {
1206
+ /**
1207
+ * ID of the service to delete.
1208
+ * @format GUID
1209
+ */
1210
+ serviceId: string;
1211
+ /**
1212
+ * Whether to preserve future sessions with participants.
1213
+ *
1214
+ * Default: `false`
1215
+ */
1216
+ preserveFutureSessionsWithParticipants?: boolean;
1217
+ /**
1218
+ * Whether to notify participants about the change and an optional
1219
+ * custom message.
1220
+ */
1221
+ participantNotification?: ParticipantNotification;
1222
+ }
1223
+ interface ParticipantNotification {
1224
+ /**
1225
+ * Whether to send the message about the changes to the customer.
1226
+ *
1227
+ * Default: `false`
1228
+ */
1229
+ notifyParticipants?: boolean | null;
1230
+ /**
1231
+ * Custom message to send to the participants about the changes to the booking.
1232
+ * @maxLength 2000
1233
+ */
1234
+ message?: string | null;
1235
+ }
1236
+ interface DeleteServiceResponse {
1237
+ }
1238
+ interface BulkDeleteServicesRequest {
1239
+ /**
1240
+ * IDs of the services to delete.
1241
+ * @format GUID
1242
+ * @maxSize 100
1243
+ */
1244
+ ids: string[];
1245
+ /**
1246
+ * Whether to preserve future sessions with participants.
1247
+ *
1248
+ * Default: `false`.
1249
+ */
1250
+ preserveFutureSessionsWithParticipants?: boolean;
1251
+ /**
1252
+ * Whether to notify participants about the change and an optional
1253
+ * custom message.
1254
+ */
1255
+ participantNotification?: ParticipantNotification;
1256
+ }
1257
+ interface BulkDeleteServicesResponse {
1258
+ /** The result of each service removal. */
1259
+ results?: BulkServiceResult[];
1260
+ /** Delete statistics. */
1261
+ bulkActionMetadata?: BulkActionMetadata;
1262
+ }
1263
+ interface BulkDeleteServicesByFilterRequest {
1264
+ /** Filter to identify the services that need to be deleted. */
1265
+ filter: Record<string, any> | null;
1266
+ /**
1267
+ * Whether to preserve future sessions with participants.
1268
+ *
1269
+ * Default: `false`.
1270
+ */
1271
+ preserveFutureSessionsWithParticipants?: boolean;
1272
+ /** Whether to notify participants about the change and an optional custom message. */
1273
+ participantNotification?: ParticipantNotification;
1274
+ }
1275
+ interface BulkDeleteServicesByFilterResponse {
1276
+ /**
1277
+ * ID of the service deletion job.
1278
+ *
1279
+ * Pass this ID to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction) to retrieve job details and metadata.
1280
+ * @format GUID
1281
+ */
1282
+ jobId?: string;
1283
+ }
1284
+ interface QueryServicesRequest {
1285
+ /** WQL expression. */
1286
+ query: QueryV2;
1287
+ }
1288
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
1289
+ /** Paging options to limit and skip the number of items. */
1290
+ paging?: Paging;
1291
+ /**
1292
+ * Filter object in the following format:
1293
+ *
1294
+ * `"filter" : {
1295
+ * "fieldName1": "value1",
1296
+ * "fieldName2":{"$operator":"value2"}
1297
+ * }`
1298
+ *
1299
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`
1300
+ *
1301
+ * Read more about [supported fields and operators](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting).
1302
+ */
1303
+ filter?: Record<string, any> | null;
1304
+ /**
1305
+ * Sort object in the following format:
1306
+ * `[ {"fieldName":"sortField1","order":"ASC"},
1307
+ * {"fieldName":"sortField2","order":"DESC"} ]`
1308
+ *
1309
+ * 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).
1310
+ * @maxSize 50
1311
+ */
1312
+ sort?: Sorting[];
1313
+ }
1314
+ /** @oneof */
1315
+ interface QueryV2PagingMethodOneOf {
1316
+ /** Paging options to limit and skip the number of items. */
1317
+ paging?: Paging;
1318
+ }
1319
+ interface Sorting {
1320
+ /**
1321
+ * Name of the field to sort by.
1322
+ * @maxLength 512
1323
+ */
1324
+ fieldName?: string;
1325
+ /** Sort order. */
1326
+ order?: SortOrderWithLiterals;
1327
+ }
1328
+ declare enum SortOrder {
1329
+ ASC = "ASC",
1330
+ DESC = "DESC"
1331
+ }
1332
+ /** @enumType */
1333
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
1334
+ interface Paging {
1335
+ /** Number of items to load. */
1336
+ limit?: number | null;
1337
+ /** Number of items to skip in the current sort order. */
1338
+ offset?: number | null;
1339
+ }
1340
+ interface CursorPaging {
1341
+ /**
1342
+ * Number of items to load.
1343
+ * @max 100
1344
+ */
1345
+ limit?: number | null;
1346
+ /**
1347
+ * Pointer to the next or previous page in the list of results.
1348
+ *
1349
+ * You can get the relevant cursor token
1350
+ * from the `pagingMetadata` object in the previous call's response.
1351
+ * Not relevant for the first request.
1352
+ * @maxLength 16000
1353
+ */
1354
+ cursor?: string | null;
1355
+ }
1356
+ interface QueryServicesResponse {
1357
+ /** The retrieved services. */
1358
+ services?: Service[];
1359
+ /** Paging metadata, including offset and count. */
1360
+ pagingMetadata?: PagingMetadataV2;
1361
+ }
1362
+ interface PagingMetadataV2 {
1363
+ /** Number of items returned in the response. */
1364
+ count?: number | null;
1365
+ /** Offset that was requested. */
1366
+ offset?: number | null;
1367
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1368
+ total?: number | null;
1369
+ /** Flag that indicates the server failed to calculate the `total` field. */
1370
+ tooManyToCount?: boolean | null;
1371
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1372
+ cursors?: Cursors;
1373
+ }
1374
+ interface Cursors {
1375
+ /**
1376
+ * Cursor pointing to next page in the list of results.
1377
+ * @maxLength 16000
1378
+ */
1379
+ next?: string | null;
1380
+ /**
1381
+ * Cursor pointing to previous page in the list of results.
1382
+ * @maxLength 16000
1383
+ */
1384
+ prev?: string | null;
1385
+ }
1386
+ interface SearchServicesRequest {
1387
+ /** WQL, search or aggregation expression. */
1388
+ search: CursorSearch;
1389
+ }
1390
+ interface CursorSearch extends CursorSearchPagingMethodOneOf {
1391
+ /**
1392
+ * Cursor pointing to page of results.
1393
+ * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
1394
+ */
1395
+ cursorPaging?: CursorPaging;
1396
+ /** 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) */
1397
+ filter?: Record<string, any> | null;
1398
+ /**
1399
+ * Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
1400
+ * @maxSize 10
1401
+ */
1402
+ sort?: Sorting[];
1403
+ /**
1404
+ * 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.
1405
+ * @maxSize 10
1406
+ */
1407
+ aggregations?: Aggregation[];
1408
+ /** Free text to match in searchable fields */
1409
+ search?: SearchDetails;
1410
+ /**
1411
+ * UTC offset or IANA time zone. Valid values are
1412
+ * ISO 8601 UTC offsets, such as +02:00 or -06:00,
1413
+ * and IANA time zone IDs, such as Europe/Rome
1414
+ *
1415
+ * Affects all filters and aggregations returned values.
1416
+ * You may override this behavior in a specific filter by providing
1417
+ * timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
1418
+ * @maxLength 50
1419
+ */
1420
+ timeZone?: string | null;
1421
+ }
1422
+ /** @oneof */
1423
+ interface CursorSearchPagingMethodOneOf {
1424
+ /**
1425
+ * Cursor pointing to page of results.
1426
+ * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
1427
+ */
1428
+ cursorPaging?: CursorPaging;
1429
+ }
1430
+ interface Aggregation extends AggregationKindOneOf {
1431
+ /** Value aggregation */
1432
+ value?: ValueAggregation;
1433
+ /** Range aggregation */
1434
+ range?: RangeAggregation;
1435
+ /** Scalar aggregation */
1436
+ scalar?: ScalarAggregation;
1437
+ /** Date histogram aggregation */
1438
+ dateHistogram?: DateHistogramAggregation;
1439
+ /** Nested aggregation */
1440
+ nested?: NestedAggregation;
1441
+ /**
1442
+ * User-defined name of aggregation, should be unique, will appear in aggregation results
1443
+ * @maxLength 100
1444
+ */
1445
+ name?: string | null;
1446
+ /** Type of aggregation, client must provide matching aggregation field below */
1447
+ type?: AggregationTypeWithLiterals;
1448
+ /**
1449
+ * Field to aggregate by, use dot notation to specify json path
1450
+ * @maxLength 200
1451
+ */
1452
+ fieldPath?: string;
1453
+ /**
1454
+ * deprecated, use `nested` instead
1455
+ * @deprecated deprecated, use `nested` instead
1456
+ * @replacedBy kind.nested
1457
+ * @targetRemovalDate 2025-01-01
1458
+ */
1459
+ groupBy?: GroupByAggregation;
1460
+ }
1461
+ /** @oneof */
1462
+ interface AggregationKindOneOf {
1463
+ /** Value aggregation */
1464
+ value?: ValueAggregation;
1465
+ /** Range aggregation */
1466
+ range?: RangeAggregation;
1467
+ /** Scalar aggregation */
1468
+ scalar?: ScalarAggregation;
1469
+ /** Date histogram aggregation */
1470
+ dateHistogram?: DateHistogramAggregation;
1471
+ /** Nested aggregation */
1472
+ nested?: NestedAggregation;
1473
+ }
1474
+ interface RangeBucket {
1475
+ /** Inclusive lower bound of the range. Required if to is not given. */
1476
+ from?: number | null;
1477
+ /** Exclusive upper bound of the range. Required if from is not given. */
1478
+ to?: number | null;
1479
+ }
1480
+ declare enum SortType {
1481
+ COUNT = "COUNT",
1482
+ VALUE = "VALUE"
1483
+ }
1484
+ /** @enumType */
1485
+ type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
1486
+ declare enum SortDirection {
1487
+ DESC = "DESC",
1488
+ ASC = "ASC"
1489
+ }
1490
+ /** @enumType */
1491
+ type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
1492
+ declare enum MissingValues {
1493
+ EXCLUDE = "EXCLUDE",
1494
+ INCLUDE = "INCLUDE"
1495
+ }
1496
+ /** @enumType */
1497
+ type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
1498
+ interface IncludeMissingValuesOptions {
1499
+ /**
1500
+ * can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
1501
+ * @maxLength 20
1502
+ */
1503
+ addToBucket?: string;
1504
+ }
1505
+ declare enum ScalarType {
1506
+ UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
1507
+ COUNT_DISTINCT = "COUNT_DISTINCT",
1508
+ MIN = "MIN",
1509
+ MAX = "MAX"
1510
+ }
1511
+ /** @enumType */
1512
+ type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
1513
+ interface ValueAggregation extends ValueAggregationOptionsOneOf {
1514
+ /** options for including missing values */
1515
+ includeOptions?: IncludeMissingValuesOptions;
1516
+ /** Should sort by number of matches or value of the field */
1517
+ sortType?: SortTypeWithLiterals;
1518
+ /** Should sort in ascending or descending order */
1519
+ sortDirection?: SortDirectionWithLiterals;
1520
+ /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
1521
+ limit?: number | null;
1522
+ /** should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
1523
+ missingValues?: MissingValuesWithLiterals;
1524
+ }
1525
+ /** @oneof */
1526
+ interface ValueAggregationOptionsOneOf {
1527
+ /** options for including missing values */
1528
+ includeOptions?: IncludeMissingValuesOptions;
1529
+ }
1530
+ declare enum NestedAggregationType {
1531
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
1532
+ VALUE = "VALUE",
1533
+ RANGE = "RANGE",
1534
+ SCALAR = "SCALAR",
1535
+ DATE_HISTOGRAM = "DATE_HISTOGRAM"
1536
+ }
1537
+ /** @enumType */
1538
+ type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
1539
+ interface RangeAggregation {
1540
+ /**
1541
+ * Range buckets
1542
+ * @maxSize 50
1543
+ */
1544
+ buckets?: RangeBucket[];
1545
+ }
1546
+ interface ScalarAggregation {
1547
+ /** Define the operator for the scalar aggregation */
1548
+ type?: ScalarTypeWithLiterals;
1549
+ }
1550
+ interface DateHistogramAggregation {
1551
+ /** Interval for date histogram aggregation */
1552
+ interval?: IntervalWithLiterals;
1553
+ }
1554
+ declare enum Interval {
1555
+ /** Unknown interval. */
1556
+ UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
1557
+ /** Yearly interval. */
1558
+ YEAR = "YEAR",
1559
+ /** Monthly interval. */
1560
+ MONTH = "MONTH",
1561
+ /** Weekly interval. */
1562
+ WEEK = "WEEK",
1563
+ /** Daily interval. */
1564
+ DAY = "DAY",
1565
+ /** Hourly interval. */
1566
+ HOUR = "HOUR",
1567
+ /** Minute interval. */
1568
+ MINUTE = "MINUTE",
1569
+ /** Second interval. */
1570
+ SECOND = "SECOND"
1571
+ }
1572
+ /** @enumType */
1573
+ type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
1574
+ interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
1575
+ /** Value aggregation */
1576
+ value?: ValueAggregation;
1577
+ /** Range aggregation */
1578
+ range?: RangeAggregation;
1579
+ /** Scalar aggregation */
1580
+ scalar?: ScalarAggregation;
1581
+ /** Date histogram aggregation */
1582
+ dateHistogram?: DateHistogramAggregation;
1583
+ /**
1584
+ * User-defined name of aggregation, should be unique, will appear in aggregation results
1585
+ * @maxLength 100
1586
+ */
1587
+ name?: string | null;
1588
+ /** Type of aggregation, client must provide matching aggregation field below */
1589
+ type?: NestedAggregationTypeWithLiterals;
1590
+ /**
1591
+ * Field to aggregate by, use dont notation to specify json path
1592
+ * @maxLength 200
1593
+ */
1594
+ fieldPath?: string;
1595
+ }
1596
+ /** @oneof */
1597
+ interface NestedAggregationItemKindOneOf {
1598
+ /** Value aggregation */
1599
+ value?: ValueAggregation;
1600
+ /** Range aggregation */
1601
+ range?: RangeAggregation;
1602
+ /** Scalar aggregation */
1603
+ scalar?: ScalarAggregation;
1604
+ /** Date histogram aggregation */
1605
+ dateHistogram?: DateHistogramAggregation;
1606
+ }
1607
+ declare enum AggregationType {
1608
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
1609
+ VALUE = "VALUE",
1610
+ RANGE = "RANGE",
1611
+ SCALAR = "SCALAR",
1612
+ DATE_HISTOGRAM = "DATE_HISTOGRAM",
1613
+ NESTED = "NESTED"
1614
+ }
1615
+ /** @enumType */
1616
+ type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
1617
+ /** nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
1618
+ interface NestedAggregation {
1619
+ /**
1620
+ * Flattened list of aggregations, where each next aggregation is nested within previous one
1621
+ * @minSize 2
1622
+ * @maxSize 10
1623
+ */
1624
+ nestedAggregations?: NestedAggregationItem[];
1625
+ }
1626
+ interface GroupByAggregation extends GroupByAggregationKindOneOf {
1627
+ /** Value aggregation configuration */
1628
+ value?: ValueAggregation;
1629
+ /**
1630
+ * User-defined name of aggregation, should be unique, will appear in aggregation results
1631
+ * @maxLength 100
1632
+ */
1633
+ name?: string | null;
1634
+ /**
1635
+ * Field to aggregate by
1636
+ * @maxLength 200
1637
+ */
1638
+ fieldPath?: string;
1639
+ }
1640
+ /** @oneof */
1641
+ interface GroupByAggregationKindOneOf {
1642
+ /** Value aggregation configuration */
1643
+ value?: ValueAggregation;
1644
+ }
1645
+ interface SearchDetails {
1646
+ /** Boolean search mode */
1647
+ mode?: ModeWithLiterals;
1648
+ /**
1649
+ * Search term or expression
1650
+ * @maxLength 200
1651
+ */
1652
+ expression?: string | null;
1653
+ /**
1654
+ * Fields to search in. If empty - server will search in own default fields
1655
+ * @maxSize 10
1656
+ * @maxLength 200
1657
+ */
1658
+ fields?: string[];
1659
+ /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
1660
+ fuzzy?: boolean;
1661
+ }
1662
+ declare enum Mode {
1663
+ /** Any */
1664
+ OR = "OR",
1665
+ /** All */
1666
+ AND = "AND"
1667
+ }
1668
+ /** @enumType */
1669
+ type ModeWithLiterals = Mode | 'OR' | 'AND';
1670
+ interface SearchServicesResponse {
1671
+ /** The retrieved services. */
1672
+ services?: Service[];
1673
+ /** Cursor paging metadata */
1674
+ pagingMetadata?: CursorPagingMetadata;
1675
+ /** Response aggregation data */
1676
+ aggregationData?: AggregationData;
1677
+ }
1678
+ interface CursorPagingMetadata {
1679
+ /** Number of items returned in the response. */
1680
+ count?: number | null;
1681
+ /** 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). */
1682
+ cursors?: Cursors;
1683
+ /**
1684
+ * Indicates if there are more results after the current page.
1685
+ * If `true`, another page of results can be retrieved.
1686
+ * If `false`, this is the last page.
1687
+ */
1688
+ hasNext?: boolean | null;
1689
+ }
1690
+ interface AggregationData {
1691
+ /**
1692
+ * key = aggregation name (as derived from search request)
1693
+ * @maxSize 10000
1694
+ */
1695
+ results?: AggregationResults[];
1696
+ }
1697
+ interface ValueAggregationResult {
1698
+ /**
1699
+ * Value of the field
1700
+ * @maxLength 100
1701
+ */
1702
+ value?: string;
1703
+ /** Count of entities with this value */
1704
+ count?: number;
1705
+ }
1706
+ interface RangeAggregationResult {
1707
+ /** Inclusive lower bound of the range */
1708
+ from?: number | null;
1709
+ /** Exclusive upper bound of the range */
1710
+ to?: number | null;
1711
+ /** Count of entities in this range */
1712
+ count?: number;
1713
+ }
1714
+ interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
1715
+ /** Value aggregation results */
1716
+ values?: ValueResults;
1717
+ /** Range aggregation results */
1718
+ ranges?: RangeResults;
1719
+ /** Scalar aggregation results */
1720
+ scalar?: AggregationResultsScalarResult;
1721
+ /**
1722
+ * User-defined name of aggregation, matches the one provided in request
1723
+ * @maxLength 100
1724
+ */
1725
+ name?: string;
1726
+ /** Type of aggregation that matches result */
1727
+ type?: AggregationTypeWithLiterals;
1728
+ /**
1729
+ * Field to aggregate by, matches the one provided in request
1730
+ * @maxLength 200
1731
+ */
1732
+ fieldPath?: string;
1733
+ }
1734
+ /** @oneof */
1735
+ interface NestedAggregationResultsResultOneOf {
1736
+ /** Value aggregation results */
1737
+ values?: ValueResults;
1738
+ /** Range aggregation results */
1739
+ ranges?: RangeResults;
1740
+ /** Scalar aggregation results */
1741
+ scalar?: AggregationResultsScalarResult;
1742
+ }
1743
+ interface ValueResults {
1744
+ /**
1745
+ * List of value aggregations
1746
+ * @maxSize 250
1747
+ */
1748
+ results?: ValueAggregationResult[];
1749
+ }
1750
+ interface RangeResults {
1751
+ /**
1752
+ * List of ranges returned in same order as requested
1753
+ * @maxSize 50
1754
+ */
1755
+ results?: RangeAggregationResult[];
1756
+ }
1757
+ interface AggregationResultsScalarResult {
1758
+ /** Type of scalar aggregation */
1759
+ type?: ScalarTypeWithLiterals;
1760
+ /** Value of the scalar aggregation */
1761
+ value?: number;
1762
+ }
1763
+ interface NestedValueAggregationResult {
1764
+ /**
1765
+ * Value of the field
1766
+ * @maxLength 1000
1767
+ */
1768
+ value?: string;
1769
+ /** Nested aggregations */
1770
+ nestedResults?: NestedAggregationResults;
1771
+ }
1772
+ interface ValueResult {
1773
+ /**
1774
+ * Value of the field
1775
+ * @maxLength 1000
1776
+ */
1777
+ value?: string;
1778
+ /** Count of entities with this value */
1779
+ count?: number | null;
1780
+ }
1781
+ interface RangeResult {
1782
+ /** Inclusive lower bound of the range */
1783
+ from?: number | null;
1784
+ /** Exclusive upper bound of the range */
1785
+ to?: number | null;
1786
+ /** Count of entities in this range */
1787
+ count?: number | null;
1788
+ }
1789
+ interface ScalarResult {
1790
+ /** Value of the scalar aggregation */
1791
+ value?: number;
1792
+ }
1793
+ interface NestedResultValue extends NestedResultValueResultOneOf {
1794
+ /** Value aggregation result */
1795
+ value?: ValueResult;
1796
+ /** Range aggregation result */
1797
+ range?: RangeResult;
1798
+ /** Scalar aggregation result */
1799
+ scalar?: ScalarResult;
1800
+ /** Date histogram aggregation result */
1801
+ dateHistogram?: ValueResult;
1802
+ }
1803
+ /** @oneof */
1804
+ interface NestedResultValueResultOneOf {
1805
+ /** Value aggregation result */
1806
+ value?: ValueResult;
1807
+ /** Range aggregation result */
1808
+ range?: RangeResult;
1809
+ /** Scalar aggregation result */
1810
+ scalar?: ScalarResult;
1811
+ /** Date histogram aggregation result */
1812
+ dateHistogram?: ValueResult;
1813
+ }
1814
+ interface Results {
1815
+ /** List of nested aggregations */
1816
+ results?: Record<string, NestedResultValue>;
1817
+ }
1818
+ interface DateHistogramResult {
1819
+ /**
1820
+ * Date in ISO 8601 format
1821
+ * @maxLength 100
1822
+ */
1823
+ value?: string;
1824
+ /** Count of documents in the bucket */
1825
+ count?: number;
1826
+ }
1827
+ interface GroupByValueResults {
1828
+ /**
1829
+ * List of value aggregations
1830
+ * @maxSize 1000
1831
+ */
1832
+ results?: NestedValueAggregationResult[];
1833
+ }
1834
+ interface DateHistogramResults {
1835
+ /**
1836
+ * List of date histogram aggregations
1837
+ * @maxSize 200
1838
+ */
1839
+ results?: DateHistogramResult[];
1840
+ }
1841
+ /**
1842
+ * results of `NESTED` aggregation type in a flattened form
1843
+ * aggregations in resulting array are keyed by requested aggregation `name`.
1844
+ */
1845
+ interface NestedResults {
1846
+ /**
1847
+ * List of nested aggregations
1848
+ * @maxSize 1000
1849
+ */
1850
+ results?: Results[];
1851
+ }
1852
+ interface AggregationResults extends AggregationResultsResultOneOf {
1853
+ /** Value aggregation results */
1854
+ values?: ValueResults;
1855
+ /** Range aggregation results */
1856
+ ranges?: RangeResults;
1857
+ /** Scalar aggregation results */
1858
+ scalar?: AggregationResultsScalarResult;
1859
+ /** Group by value aggregation results */
1860
+ groupedByValue?: GroupByValueResults;
1861
+ /** Date histogram aggregation results */
1862
+ dateHistogram?: DateHistogramResults;
1863
+ /** Nested aggregation results */
1864
+ nested?: NestedResults;
1865
+ /**
1866
+ * User-defined name of aggregation as derived from search request
1867
+ * @maxLength 100
1868
+ */
1869
+ name?: string;
1870
+ /** Type of aggregation that must match provided kind as derived from search request */
1871
+ type?: AggregationTypeWithLiterals;
1872
+ /**
1873
+ * Field to aggregate by as derived from search request
1874
+ * @maxLength 200
1875
+ */
1876
+ fieldPath?: string;
1877
+ }
1878
+ /** @oneof */
1879
+ interface AggregationResultsResultOneOf {
1880
+ /** Value aggregation results */
1881
+ values?: ValueResults;
1882
+ /** Range aggregation results */
1883
+ ranges?: RangeResults;
1884
+ /** Scalar aggregation results */
1885
+ scalar?: AggregationResultsScalarResult;
1886
+ /** Group by value aggregation results */
1887
+ groupedByValue?: GroupByValueResults;
1888
+ /** Date histogram aggregation results */
1889
+ dateHistogram?: DateHistogramResults;
1890
+ /** Nested aggregation results */
1891
+ nested?: NestedResults;
1892
+ }
1893
+ interface QueryPoliciesRequest {
1894
+ /**
1895
+ * Information about filters, paging, and sorting. See the article about
1896
+ * booking policy filters
1897
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))
1898
+ * for all supported filters and sorting options.
1899
+ */
1900
+ query: CursorQuery;
1901
+ }
1902
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
1903
+ /** 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`. */
1904
+ cursorPaging?: CursorPaging;
1905
+ /**
1906
+ * Filter object in the following format:
1907
+ * `"filter" : {
1908
+ * "fieldName1": "value1",
1909
+ * "fieldName2":{"$operator":"value2"}
1910
+ * }`
1911
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`
1912
+ */
1913
+ filter?: Record<string, any> | null;
1914
+ /**
1915
+ * Sort object in the following format:
1916
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1917
+ * @maxSize 50
1918
+ */
1919
+ sort?: Sorting[];
1920
+ }
1921
+ /** @oneof */
1922
+ interface CursorQueryPagingMethodOneOf {
1923
+ /** 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`. */
1924
+ cursorPaging?: CursorPaging;
1925
+ }
1926
+ interface QueryPoliciesResponse {
1927
+ /** Retrieved booking policies and information about the services using them. */
1928
+ bookingPolicies?: BookingPolicyWithServices[];
1929
+ /** Paging metadata. */
1930
+ pagingMetadata?: CursorPagingMetadata;
1931
+ }
1932
+ interface BookingPolicyWithServices {
1933
+ /** Retrieved booking policy. */
1934
+ bookingPolicy?: BookingPolicy;
1935
+ /**
1936
+ * Up to 5 services connected to the booking policy. If `totalServiceCount` is
1937
+ * greater than 5, there are additional services connected to the policy.
1938
+ * You can call *Search Services*
1939
+ * ([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))
1940
+ * specifying the relevant policy ID in the filter, to retrieve all services that are
1941
+ * connected to a booking policy.
1942
+ * @maxSize 5
1943
+ */
1944
+ connectedServices?: Service[];
1945
+ /** Total number of services connected to the booking policy. */
1946
+ totalServiceCount?: number;
1947
+ }
1948
+ interface QueryBookingFormsRequest {
1949
+ /**
1950
+ * Information about filters, paging, and sorting. See the article about
1951
+ * form filters ([REST](https://dev.wix.com/docs/rest/crm/forms/form-schemas/form-object))
1952
+ * for all supported filters and sorting options.
1953
+ */
1954
+ query: CursorQuery;
1955
+ /**
1956
+ * Conditional fields to return.
1957
+ * @maxSize 1
1958
+ */
1959
+ conditionalFields?: RequestedFieldsWithLiterals[];
1960
+ }
1961
+ declare enum RequestedFields {
1962
+ /** Unknown requested conditional field. */
1963
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
1964
+ /** Whether to return the site's default booking form. */
1965
+ DEFAULT_BOOKING_FORM = "DEFAULT_BOOKING_FORM"
1966
+ }
1967
+ /** @enumType */
1968
+ type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'DEFAULT_BOOKING_FORM';
1969
+ interface QueryBookingFormsResponse {
1970
+ /** Retrieved booking forms and information about connected services. */
1971
+ bookingForms?: BookingForm[];
1972
+ /** Paging metadata. */
1973
+ pagingMetadata?: CursorPagingMetadata;
1974
+ /** The site's default booking form and information about connected services. */
1975
+ defaultBookingForm?: BookingForm;
1976
+ }
1977
+ interface BookingForm {
1978
+ /** Information about the retrieved booking form. */
1979
+ formDetails?: FormDetails;
1980
+ /**
1981
+ * Up to 5 services connected to the booking form. If `totalServiceCount` is
1982
+ * greater than 5, there are additional services connected to the policy.
1983
+ * You can call *Search Services*
1984
+ * ([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))
1985
+ * specifying the relevant policy ID in the filter, to retrieve all services that are
1986
+ * connected to a booking policy.
1987
+ * @maxSize 5
1988
+ */
1989
+ connectedServices?: ConnectedService[];
1990
+ /** Total number of services connected to the booking form. */
1991
+ totalServiceCount?: number;
1992
+ }
1993
+ interface FormDetails {
1994
+ /**
1995
+ * Form ID.
1996
+ * @format GUID
1997
+ */
1998
+ formId?: string;
1999
+ /**
2000
+ * Form name.
2001
+ * @maxLength 200
2002
+ */
2003
+ name?: string | null;
2004
+ /**
2005
+ * Revision number, which increments by 1 each time the form is updated.
2006
+ * To prevent conflicting changes,
2007
+ * the current revision must be passed when updating the form.
2008
+ * @readonly
2009
+ */
2010
+ revision?: string | null;
2011
+ }
2012
+ interface ConnectedService {
2013
+ /**
2014
+ * ID of the service connected to the booking form.
2015
+ * @format GUID
2016
+ */
2017
+ id?: string | null;
2018
+ /**
2019
+ * Name of the service connected to the booking form.
2020
+ * @maxLength 400
2021
+ * @minLength 1
2022
+ */
2023
+ name?: string | null;
2024
+ }
2025
+ interface CountServicesRequest {
2026
+ /**
2027
+ * Query filter to base the count on. See supported filters
2028
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))
2029
+ * for more details.
2030
+ */
2031
+ filter?: Record<string, any> | null;
2032
+ }
2033
+ interface CountServicesResponse {
2034
+ /** Number of services matching the specified filter. */
2035
+ count?: number;
2036
+ }
2037
+ interface QueryLocationsRequest {
2038
+ /** Filter. */
2039
+ filter?: QueryLocationsFilter;
2040
+ }
2041
+ interface QueryLocationsFilter {
2042
+ /**
2043
+ * Service filter. See supported filters
2044
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))
2045
+ * for more details.
2046
+ */
2047
+ services?: Record<string, any> | null;
2048
+ /**
2049
+ * List of business IDs to filter by.
2050
+ * @format GUID
2051
+ * @maxSize 100
2052
+ */
2053
+ businessLocationIds?: string[];
2054
+ }
2055
+ interface QueryLocationsResponse {
2056
+ /**
2057
+ * Retrieved business locations and whether each location is connected to at
2058
+ * least one service.
2059
+ */
2060
+ businessLocations?: BusinessLocations;
2061
+ /**
2062
+ * Retrieved custom locations and whether each location is connected to at
2063
+ * least one service.
2064
+ */
2065
+ customLocations?: CustomLocations;
2066
+ /**
2067
+ * Retrieved customer locations and whether each location is connected to at
2068
+ * least one service.
2069
+ */
2070
+ customerLocations?: CustomerLocations;
2071
+ }
2072
+ interface BusinessLocations {
2073
+ /**
2074
+ * Whether at least one service matching the filter is connected to any of the
2075
+ * retrieved business locations.
2076
+ */
2077
+ exists?: boolean;
2078
+ /**
2079
+ * Retrieved business locations.
2080
+ * @maxSize 100
2081
+ */
2082
+ locations?: Location[];
2083
+ }
2084
+ interface CustomLocations {
2085
+ /**
2086
+ * Whether at least one service matching the filter is connected to any of the
2087
+ * retrieved custom locations.
2088
+ */
2089
+ exists?: boolean;
2090
+ }
2091
+ interface CustomerLocations {
2092
+ /**
2093
+ * Whether at least one service matching the filter is connected to any of the
2094
+ * retrieved customer locations.
2095
+ */
2096
+ exists?: boolean;
2097
+ }
2098
+ interface QueryCategoriesRequest {
2099
+ /** Filter. */
2100
+ filter?: QueryCategoriesFilter;
2101
+ }
2102
+ interface QueryCategoriesFilter {
2103
+ /**
2104
+ * Service filter. See supported filters
2105
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/filtering-and-sorting#filtering))
2106
+ * for more details.
2107
+ */
2108
+ services?: Record<string, any> | null;
2109
+ /**
2110
+ * List of category IDs to filter by.
2111
+ * @format GUID
2112
+ * @maxSize 100
2113
+ */
2114
+ categoryIds?: string[];
2115
+ }
2116
+ interface QueryCategoriesResponse {
2117
+ /** Retrieved categories. */
2118
+ categories?: V2Category[];
2119
+ }
2120
+ interface SetServiceLocationsRequest {
2121
+ /**
2122
+ * ID of the service.
2123
+ * @format GUID
2124
+ */
2125
+ serviceId: string;
2126
+ /**
2127
+ * 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.
2128
+ * @maxSize 100
2129
+ */
2130
+ locations: Location[];
2131
+ /**
2132
+ * The action to perform on sessions currently set to a removed location. For
2133
+ * example, move existing sessions to a new specified location.
2134
+ * If not specified, sessions will not be moved to a new location.
2135
+ */
2136
+ removedLocationSessionsAction?: RemovedLocationSessionsAction;
2137
+ /**
2138
+ * Whether to notify participants about the change of location, and an
2139
+ * Optional custom message. The notification is sent only to participants of sessions that are affected by the change.
2140
+ */
2141
+ participantNotification?: ParticipantNotification;
2142
+ }
2143
+ interface RemovedLocationSessionsAction extends RemovedLocationSessionsActionActionOptionsOneOf {
2144
+ /**
2145
+ * Details about the new location of future events that were scheduled to take
2146
+ * place at a removed location.
2147
+ */
2148
+ moveToLocationOptions?: MoveToNewLocationsOptions;
2149
+ /** Information about what to do with future events at the removed location. */
2150
+ action?: ActionWithLiterals;
2151
+ }
2152
+ /** @oneof */
2153
+ interface RemovedLocationSessionsActionActionOptionsOneOf {
2154
+ /**
2155
+ * Details about the new location of future events that were scheduled to take
2156
+ * place at a removed location.
2157
+ */
2158
+ moveToLocationOptions?: MoveToNewLocationsOptions;
2159
+ }
2160
+ declare enum Action {
2161
+ UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
2162
+ /** Retain all future sessions at their current location. This is the default. */
2163
+ KEEP_AT_CURRENT_LOCATION = "KEEP_AT_CURRENT_LOCATION",
2164
+ /** Move future events to a new location. */
2165
+ MOVE_TO_LOCATION = "MOVE_TO_LOCATION",
2166
+ /**
2167
+ * Cancel all future events at the removed location.
2168
+ * Currently not supported.
2169
+ */
2170
+ DELETE = "DELETE"
2171
+ }
2172
+ /** @enumType */
2173
+ type ActionWithLiterals = Action | 'UNKNOWN_ACTION_TYPE' | 'KEEP_AT_CURRENT_LOCATION' | 'MOVE_TO_LOCATION' | 'DELETE';
2174
+ interface MoveToNewLocationsOptions {
2175
+ /** The new location to move existing sessions currently set to a removed location, used when `action` is `MOVE_TO_LOCATION`. */
2176
+ newLocation?: Location;
2177
+ }
2178
+ interface SetServiceLocationsResponse {
2179
+ /** The updated service with the newly set locations. */
2180
+ service?: Service;
2181
+ }
2182
+ interface EnablePricingPlansForServiceRequest {
2183
+ /**
2184
+ * ID of the service to update.
2185
+ * @format GUID
2186
+ */
2187
+ serviceId: string;
2188
+ /**
2189
+ * IDs of the *pricing plans*
2190
+ * ([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))
2191
+ * to add to the service's `payment.pricingPlanIds` array.
2192
+ * @format GUID
2193
+ * @maxSize 100
2194
+ */
2195
+ pricingPlanIds: string[];
2196
+ }
2197
+ interface EnablePricingPlansForServiceResponse {
2198
+ /** Updated service. */
2199
+ service?: Service;
2200
+ }
2201
+ interface DisablePricingPlansForServiceRequest {
2202
+ /**
2203
+ * ID of the service to update.
2204
+ * @format GUID
2205
+ */
2206
+ serviceId: string;
2207
+ /**
2208
+ * IDs of the *pricing plans*
2209
+ * ([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))
2210
+ * to remove from the service's `payment.pricingPlanIds` array.
2211
+ * @format GUID
2212
+ * @maxSize 75
2213
+ */
2214
+ pricingPlanIds?: string[];
2215
+ }
2216
+ interface DisablePricingPlansForServiceResponse {
2217
+ /** Updated service. */
2218
+ service?: Service;
2219
+ }
2220
+ interface SetCustomSlugRequest {
2221
+ /**
2222
+ * ID of the service for which to update the active slug.
2223
+ * @format GUID
2224
+ */
2225
+ serviceId: string;
2226
+ /**
2227
+ * Slug to set as the active service slug.
2228
+ * @maxLength 500
2229
+ */
2230
+ slug?: string;
2231
+ }
2232
+ interface SetCustomSlugResponse {
2233
+ /** Updated active service slug. */
2234
+ slug?: Slug;
2235
+ /** Updated service. */
2236
+ service?: Service;
2237
+ }
2238
+ interface ValidateSlugRequest {
2239
+ /**
2240
+ * IO of the service to check custom slug validity for.
2241
+ * @format GUID
2242
+ */
2243
+ serviceId: string;
2244
+ /**
2245
+ * Custom slug to validate.
2246
+ * @maxLength 500
2247
+ */
2248
+ slug?: string;
2249
+ }
2250
+ interface ValidateSlugResponse {
2251
+ /** Whether the slug is valid. */
2252
+ valid?: boolean;
2253
+ /**
2254
+ * Valid slug. Available only if `{"valid": true}`.
2255
+ * @maxLength 500
2256
+ */
2257
+ slug?: string | null;
2258
+ /**
2259
+ * Reasons why the slug is invalid. Available only if `{"valid": false}`.
2260
+ * @maxSize 3
2261
+ */
2262
+ errors?: InvalidSlugErrorWithLiterals[];
2263
+ }
2264
+ declare enum InvalidSlugError {
2265
+ /** Unknown slug error. */
2266
+ UNKNOWN_SLUG_ERROR = "UNKNOWN_SLUG_ERROR",
2267
+ /** Slug contains illegal characters. */
2268
+ SLUG_CONTAINS_ILLEGAL_CHARACTERS = "SLUG_CONTAINS_ILLEGAL_CHARACTERS",
2269
+ /** Slug is already associated with another service. */
2270
+ SLUG_ALREADY_EXISTS = "SLUG_ALREADY_EXISTS"
2271
+ }
2272
+ /** @enumType */
2273
+ type InvalidSlugErrorWithLiterals = InvalidSlugError | 'UNKNOWN_SLUG_ERROR' | 'SLUG_CONTAINS_ILLEGAL_CHARACTERS' | 'SLUG_ALREADY_EXISTS';
2274
+ interface CloneServiceRequest {
2275
+ /**
2276
+ * ID of the service to clone.
2277
+ * @format GUID
2278
+ */
2279
+ sourceServiceId: string;
2280
+ }
2281
+ interface CloneServiceResponse {
2282
+ /** Cloned service. */
2283
+ service?: Service;
2284
+ /**
2285
+ * Information about connected entities that couldn't be cloned. For example,
2286
+ * future recurring events, the booking form, service variants, and connected
2287
+ * pricing plans.
2288
+ */
2289
+ errors?: CloneErrorsWithLiterals[];
2290
+ }
2291
+ declare enum CloneErrors {
2292
+ /**
2293
+ * Failed to clone the original service's *options and variants*
2294
+ * ([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)).
2295
+ */
2296
+ OPTIONS_AND_VARIANTS = "OPTIONS_AND_VARIANTS",
2297
+ /** Failed to clone the original service's *booking form*. */
2298
+ FORM = "FORM"
2299
+ }
2300
+ /** @enumType */
2301
+ type CloneErrorsWithLiterals = CloneErrors | 'OPTIONS_AND_VARIANTS' | 'FORM';
2302
+
2303
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
2304
+ getUrl: (context: any) => string;
2305
+ httpMethod: K;
2306
+ path: string;
2307
+ pathParams: M;
2308
+ __requestType: T;
2309
+ __originalRequestType: S;
2310
+ __responseType: Q;
2311
+ __originalResponseType: R;
2312
+ };
2313
+ declare function createService(): __PublicMethodMetaInfo<'POST', {}, CreateServiceRequest$1, CreateServiceRequest, CreateServiceResponse$1, CreateServiceResponse>;
2314
+ declare function bulkCreateServices(): __PublicMethodMetaInfo<'POST', {}, BulkCreateServicesRequest$1, BulkCreateServicesRequest, BulkCreateServicesResponse$1, BulkCreateServicesResponse>;
2315
+ declare function getService(): __PublicMethodMetaInfo<'GET', {
2316
+ serviceId: string;
2317
+ }, GetServiceRequest$1, GetServiceRequest, GetServiceResponse$1, GetServiceResponse>;
2318
+ declare function updateService(): __PublicMethodMetaInfo<'PATCH', {
2319
+ serviceId: string;
2320
+ }, UpdateServiceRequest$1, UpdateServiceRequest, UpdateServiceResponse$1, UpdateServiceResponse>;
2321
+ declare function bulkUpdateServices(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateServicesRequest$1, BulkUpdateServicesRequest, BulkUpdateServicesResponse$1, BulkUpdateServicesResponse>;
2322
+ declare function bulkUpdateServicesByFilter(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateServicesByFilterRequest$1, BulkUpdateServicesByFilterRequest, BulkUpdateServicesByFilterResponse$1, BulkUpdateServicesByFilterResponse>;
2323
+ declare function deleteService(): __PublicMethodMetaInfo<'DELETE', {
2324
+ serviceId: string;
2325
+ }, DeleteServiceRequest$1, DeleteServiceRequest, DeleteServiceResponse$1, DeleteServiceResponse>;
2326
+ declare function bulkDeleteServices(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteServicesRequest$1, BulkDeleteServicesRequest, BulkDeleteServicesResponse$1, BulkDeleteServicesResponse>;
2327
+ declare function bulkDeleteServicesByFilter(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteServicesByFilterRequest$1, BulkDeleteServicesByFilterRequest, BulkDeleteServicesByFilterResponse$1, BulkDeleteServicesByFilterResponse>;
2328
+ declare function queryServices(): __PublicMethodMetaInfo<'POST', {}, QueryServicesRequest$1, QueryServicesRequest, QueryServicesResponse$1, QueryServicesResponse>;
2329
+ declare function searchServices(): __PublicMethodMetaInfo<'POST', {}, SearchServicesRequest$1, SearchServicesRequest, SearchServicesResponse$1, SearchServicesResponse>;
2330
+ declare function queryPolicies(): __PublicMethodMetaInfo<'POST', {}, QueryPoliciesRequest$1, QueryPoliciesRequest, QueryPoliciesResponse$1, QueryPoliciesResponse>;
2331
+ declare function queryBookingForms(): __PublicMethodMetaInfo<'POST', {}, QueryBookingFormsRequest$1, QueryBookingFormsRequest, QueryBookingFormsResponse$1, QueryBookingFormsResponse>;
2332
+ declare function countServices(): __PublicMethodMetaInfo<'POST', {}, CountServicesRequest$1, CountServicesRequest, CountServicesResponse$1, CountServicesResponse>;
2333
+ declare function queryLocations(): __PublicMethodMetaInfo<'POST', {}, QueryLocationsRequest$1, QueryLocationsRequest, QueryLocationsResponse$1, QueryLocationsResponse>;
2334
+ declare function queryCategories(): __PublicMethodMetaInfo<'POST', {}, QueryCategoriesRequest$1, QueryCategoriesRequest, QueryCategoriesResponse$1, QueryCategoriesResponse>;
2335
+ declare function setServiceLocations(): __PublicMethodMetaInfo<'POST', {
2336
+ serviceId: string;
2337
+ }, SetServiceLocationsRequest$1, SetServiceLocationsRequest, SetServiceLocationsResponse$1, SetServiceLocationsResponse>;
2338
+ declare function enablePricingPlansForService(): __PublicMethodMetaInfo<'POST', {
2339
+ serviceId: string;
2340
+ }, EnablePricingPlansForServiceRequest$1, EnablePricingPlansForServiceRequest, EnablePricingPlansForServiceResponse$1, EnablePricingPlansForServiceResponse>;
2341
+ declare function disablePricingPlansForService(): __PublicMethodMetaInfo<'POST', {
2342
+ serviceId: string;
2343
+ }, DisablePricingPlansForServiceRequest$1, DisablePricingPlansForServiceRequest, DisablePricingPlansForServiceResponse$1, DisablePricingPlansForServiceResponse>;
2344
+ declare function setCustomSlug(): __PublicMethodMetaInfo<'POST', {
2345
+ serviceId: string;
2346
+ }, SetCustomSlugRequest$1, SetCustomSlugRequest, SetCustomSlugResponse$1, SetCustomSlugResponse>;
2347
+ declare function validateSlug(): __PublicMethodMetaInfo<'POST', {}, ValidateSlugRequest$1, ValidateSlugRequest, ValidateSlugResponse$1, ValidateSlugResponse>;
2348
+ declare function cloneService(): __PublicMethodMetaInfo<'POST', {}, CloneServiceRequest$1, CloneServiceRequest, CloneServiceResponse$1, CloneServiceResponse>;
2349
+
2350
+ export { type __PublicMethodMetaInfo, bulkCreateServices, bulkDeleteServices, bulkDeleteServicesByFilter, bulkUpdateServices, bulkUpdateServicesByFilter, cloneService, countServices, createService, deleteService, disablePricingPlansForService, enablePricingPlansForService, getService, queryBookingForms, queryCategories, queryLocations, queryPolicies, queryServices, searchServices, setCustomSlug, setServiceLocations, updateService, validateSlug };