@wix/auto_sdk_bookings_booking-policies 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
  11. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.js +49 -0
  12. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
  13. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.d.ts +70 -0
  14. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.js +329 -0
  15. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
  16. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
  17. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js +180 -0
  18. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
  19. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.d.ts +116 -0
  20. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.js +110 -0
  21. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
  22. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1274 -0
  23. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.js +148 -0
  24. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
  25. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.d.ts +1735 -0
  26. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js +576 -0
  27. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
  39. package/build/es/src/bookings-v1-booking-policy-booking-policies.context.js +37 -0
  40. package/build/es/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
  41. package/build/es/src/bookings-v1-booking-policy-booking-policies.http.d.ts +70 -0
  42. package/build/es/src/bookings-v1-booking-policy-booking-policies.http.js +318 -0
  43. package/build/es/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
  44. package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
  45. package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.js +146 -0
  46. package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
  47. package/build/es/src/bookings-v1-booking-policy-booking-policies.public.d.ts +116 -0
  48. package/build/es/src/bookings-v1-booking-policy-booking-policies.public.js +90 -0
  49. package/build/es/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
  50. package/build/es/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1274 -0
  51. package/build/es/src/bookings-v1-booking-policy-booking-policies.types.js +145 -0
  52. package/build/es/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
  53. package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.d.ts +1735 -0
  54. package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.js +542 -0
  55. package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
  66. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.js +49 -0
  67. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
  68. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.d.ts +70 -0
  69. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.js +329 -0
  70. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
  71. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
  72. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js +180 -0
  73. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
  74. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.d.ts +116 -0
  75. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.js +110 -0
  76. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
  77. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1274 -0
  78. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.js +148 -0
  79. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
  80. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.d.ts +1735 -0
  81. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js +576 -0
  82. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
  93. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.js +37 -0
  94. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
  95. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.d.ts +70 -0
  96. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.js +318 -0
  97. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
  98. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
  99. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.js +146 -0
  100. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
  101. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.d.ts +116 -0
  102. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.js +90 -0
  103. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
  104. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1274 -0
  105. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.js +145 -0
  106. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
  107. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.d.ts +1735 -0
  108. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.js +542 -0
  109. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1735 @@
1
+ /**
2
+ * A booking policy is a set of rules that determine how customers can book a
3
+ * service, including timeframes for booking, canceling, or rescheduling.
4
+ */
5
+ export interface BookingPolicy {
6
+ /**
7
+ * ID of the booking policy.
8
+ * @readonly
9
+ */
10
+ _id?: string | null;
11
+ /**
12
+ * Revision number, which increments by 1 each time the booking policy is updated.
13
+ * To prevent conflicting changes, the current `revision` must be passed when
14
+ * updating the booking policy.
15
+ * @readonly
16
+ */
17
+ revision?: string | null;
18
+ /**
19
+ * Date and time the booking policy was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
20
+ * @readonly
21
+ */
22
+ _createdDate?: Date | null;
23
+ /**
24
+ * Date and time the booking policy was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
25
+ * @readonly
26
+ */
27
+ _updatedDate?: Date | null;
28
+ /** Name of the booking policy. */
29
+ name?: string | null;
30
+ /**
31
+ * Custom description for the booking policy and whether it's displayed to the
32
+ * participant.
33
+ */
34
+ customPolicyDescription?: PolicyDescription;
35
+ /**
36
+ * Whether the booking policy is the default.
37
+ * @readonly
38
+ */
39
+ default?: boolean | null;
40
+ /** Rule for limiting early bookings. */
41
+ limitEarlyBookingPolicy?: LimitEarlyBookingPolicy;
42
+ /**
43
+ * Rule for limiting late bookings. This rule and `bookAfterStartPolicy` can't
44
+ * be both enabled at the same time.
45
+ */
46
+ limitLateBookingPolicy?: LimitLateBookingPolicy;
47
+ /**
48
+ * Rule for booking after the start of a session or course. This rule and
49
+ * `limitLateBookingPolicy` can't be both enabled at the same time.
50
+ */
51
+ bookAfterStartPolicy?: BookAfterStartPolicy;
52
+ /** Rule for canceling a booking. */
53
+ cancellationPolicy?: CancellationPolicy;
54
+ /** Rule for rescheduling a booking. */
55
+ reschedulePolicy?: ReschedulePolicy;
56
+ /** Waitlist rule for the service. */
57
+ waitlistPolicy?: WaitlistPolicy;
58
+ /** Rule for participants per booking. */
59
+ participantsPolicy?: ParticipantsPolicy;
60
+ /** Rules for cancellation fees. */
61
+ cancellationFeePolicy?: CancellationFeePolicy;
62
+ /** Rule for saving credit card details. */
63
+ saveCreditCardPolicy?: SaveCreditCardPolicy;
64
+ /** Extensions enabling users to save custom data related to the booking policies. */
65
+ extendedFields?: ExtendedFields;
66
+ }
67
+ /** A description of the booking policy to display to participants. */
68
+ export interface PolicyDescription {
69
+ /**
70
+ * Whether the description is displayed to the participant. `true` means the
71
+ * description is displayed.
72
+ *
73
+ * Default: `false`
74
+ */
75
+ enabled?: boolean;
76
+ /**
77
+ * Description of the booking policy.
78
+ *
79
+ * Default: Empty
80
+ * Max length: 2500 characters
81
+ */
82
+ description?: string;
83
+ }
84
+ /** The rule for limiting early bookings. */
85
+ export interface LimitEarlyBookingPolicy {
86
+ /**
87
+ * Whether there's a limit about how early a customer can book. `false` means there's
88
+ * no limit to the earliest supported booking time.
89
+ *
90
+ * Default: `false`
91
+ */
92
+ enabled?: boolean;
93
+ /**
94
+ * Maximum number of minutes before the start of a session or course customers can book.
95
+ * Must be greater than `limitLateBookingPolicy.latestBookingInMinutes`.
96
+ *
97
+ * Default: `10080` minutes (7 days)
98
+ * Min: `1` minute
99
+ */
100
+ earliestBookingInMinutes?: number;
101
+ }
102
+ /**
103
+ * Rule limiting late bookings.
104
+ *
105
+ * This rule and `bookAfterStartPolicy` can't be both enabled at the same time.
106
+ */
107
+ export interface LimitLateBookingPolicy {
108
+ /**
109
+ * Whether there's a limit about how late customers can book. `false` means
110
+ * customers can book up to the last minute. If specified as `true`,
111
+ * `bookAfterStartPolicy.enabled` must be `false`.
112
+ *
113
+ * Default: `false`
114
+ */
115
+ enabled?: boolean;
116
+ /**
117
+ * Minimum number of minutes before the start of the session customers can book.
118
+ * For courses, this is relative to the start time of the next session and doesn't
119
+ * consider course sessions in the past. This value must be less than
120
+ * `limitEarlyBookingPolicy.earliestBookingInMinutes`.
121
+ *
122
+ * Default: `1440` minutes (1 day)
123
+ * Min: `1` minute
124
+ */
125
+ latestBookingInMinutes?: number;
126
+ }
127
+ /**
128
+ * The rule for whether a session can be booked after the start of the schedule.
129
+ * This rule and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this rule
130
+ * is enabled, the `LimitLateBookingPolicy` rule must be disabled.
131
+ */
132
+ export interface BookAfterStartPolicy {
133
+ /**
134
+ * Whether customers can book after the session has started. `true` means
135
+ * customers can book after the session has started. For courses, this refers to
136
+ * the start of the last course session. If specified as `true`,
137
+ * `limitLateBookingPolicy.enabled` must be `false`.
138
+ *
139
+ * Default: `false`
140
+ */
141
+ enabled?: boolean;
142
+ }
143
+ /** The rule for canceling a booked session. */
144
+ export interface CancellationPolicy {
145
+ /**
146
+ * Whether customers can cancel the booking. `true` means customers can cancel
147
+ * the booking.
148
+ *
149
+ * Default: `false`
150
+ */
151
+ enabled?: boolean;
152
+ /**
153
+ * Whether there's a limit on the latest cancellation time. `false` means customers
154
+ * can cancel the booking until the last minute before the course or session starts.
155
+ *
156
+ * Default: `false`
157
+ */
158
+ limitLatestCancellation?: boolean;
159
+ /**
160
+ * Minimum number of minutes before the start of the session customers can cancel.
161
+ * For courses, this refers to the start of the first course session.
162
+ *
163
+ * Default: `1440` minutes (1 day)
164
+ * Min: `1` minute
165
+ */
166
+ latestCancellationInMinutes?: number;
167
+ }
168
+ /** The rule for rescheduling a booked session. */
169
+ export interface ReschedulePolicy {
170
+ /**
171
+ * Whether customers can reschedule a booking for an appointment-based service.
172
+ * `true` means customers can reschedule.
173
+ *
174
+ * Default: `false`
175
+ */
176
+ enabled?: boolean;
177
+ /**
178
+ * Whether there's a limit on the latest supported rescheduling time. `false`
179
+ * means customers can reschedule until the last minute before the session start.
180
+ *
181
+ * Default: `false`
182
+ */
183
+ limitLatestReschedule?: boolean;
184
+ /**
185
+ * Minimum number of minutes before the session start session customers can
186
+ * reschedule their booking.
187
+ *
188
+ * Default: `1440` minutes (1 day)
189
+ * Min: `1` minute
190
+ */
191
+ latestRescheduleInMinutes?: number;
192
+ }
193
+ /** The rule for the waitlist. */
194
+ export interface WaitlistPolicy {
195
+ /**
196
+ * Whether the service has a waitlist. `true` means there's a waitlist.
197
+ *
198
+ * Default: `false`
199
+ */
200
+ enabled?: boolean;
201
+ /**
202
+ * Number of spots in the waitlist.
203
+ *
204
+ * Default: `10` spots
205
+ * Min: `1` spot
206
+ */
207
+ capacity?: number;
208
+ /**
209
+ * Time in minutes the potential customer is given to book after they've been
210
+ * notified that a spot has opened up for them. If they don't respond in time,
211
+ * the open spot is offered to the next potential customer on the waitlist.
212
+ *
213
+ * Default: `10` minutes
214
+ * Min: `1` minute
215
+ */
216
+ reservationTimeInMinutes?: number;
217
+ }
218
+ /** The rule for the maximum number of participants per booking. */
219
+ export interface ParticipantsPolicy {
220
+ /**
221
+ * Maximum number of participants per booking.
222
+ *
223
+ * Default: `1` participant
224
+ * Min: `1` participant
225
+ */
226
+ maxParticipantsPerBooking?: number;
227
+ }
228
+ /** The rule regarding the allocation of resources (e.g. staff members). */
229
+ export interface ResourcesPolicy {
230
+ /**
231
+ * Whether the customer must select a resource, for example a staff member, when
232
+ * booking. `false` means the customer can book without selecting a resource.
233
+ *
234
+ * Default: `false`
235
+ */
236
+ enabled?: boolean;
237
+ /**
238
+ * Whether Wix Bookings automatically assigns a resource, for example a *staff member*
239
+ * ([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)),
240
+ * to the booking. `false` means the customer must select the resource
241
+ * themselves and Wix Bookings doesn't assign it automatically.
242
+ *
243
+ * Default: `false`
244
+ */
245
+ autoAssignAllowed?: boolean;
246
+ }
247
+ export interface CancellationFeePolicy {
248
+ /**
249
+ * Whether customers must pay a cancellation fee when canceling a booking.
250
+ *
251
+ * Default: `false`
252
+ */
253
+ enabled?: boolean;
254
+ /**
255
+ * Time windows relative to the session start during which customers can cancel
256
+ * their booking. Each window includes details about the fee for canceling within it.
257
+ */
258
+ cancellationWindows?: CancellationWindow[];
259
+ /**
260
+ * Whether Wix automatically charges the cancellation fee from the customer once
261
+ * they cancel their booking.
262
+ *
263
+ * Default: `true`
264
+ */
265
+ autoCollectFeeEnabled?: boolean | null;
266
+ }
267
+ /**
268
+ * Money.
269
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
270
+ */
271
+ export interface Money {
272
+ /** 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. */
273
+ value?: string;
274
+ /**
275
+ * Currency code. Must be valid ISO 4217 currency code (e.g., USD).
276
+ * @readonly
277
+ */
278
+ currency?: string;
279
+ /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
280
+ formattedValue?: string | null;
281
+ }
282
+ export interface CancellationWindow extends CancellationWindowFeeOneOf {
283
+ /** Fixed amount customers must pay when canceling the booking within this window. */
284
+ amount?: Money;
285
+ /**
286
+ * Percentage of the booking price customers must pay when canceling within
287
+ * this window.
288
+ *
289
+ * Min: `0.01` percent
290
+ * Max: `100` percent
291
+ */
292
+ percentage?: string;
293
+ /**
294
+ * Start of the cancellation window in minutes before the session start. For
295
+ * courses, this refers to the start of the first course session.
296
+ */
297
+ startInMinutes?: number | null;
298
+ }
299
+ /** @oneof */
300
+ export interface CancellationWindowFeeOneOf {
301
+ /** Fixed amount customers must pay when canceling the booking within this window. */
302
+ amount?: Money;
303
+ /**
304
+ * Percentage of the booking price customers must pay when canceling within
305
+ * this window.
306
+ *
307
+ * Min: `0.01` percent
308
+ * Max: `100` percent
309
+ */
310
+ percentage?: string;
311
+ }
312
+ export interface SaveCreditCardPolicy {
313
+ /**
314
+ * Whether Wix stores credit card details of the customer. Storing the details
315
+ * allows Wix to prefill the *eCommerce checkout*
316
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction))
317
+ * and thus increases the likelihood that the customer completes the booking
318
+ * process.
319
+ *
320
+ * Default: `false`
321
+ */
322
+ enabled?: boolean;
323
+ }
324
+ export interface ExtendedFields {
325
+ /**
326
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
327
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
328
+ *
329
+ * You can only access fields for which you have the appropriate permissions.
330
+ *
331
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
332
+ */
333
+ namespaces?: Record<string, Record<string, any>>;
334
+ }
335
+ /** This event is triggered when a different booking policy has been set as the default policy. */
336
+ export interface DefaultBookingPolicySet {
337
+ /** The new default booking policy. */
338
+ currentDefaultBookingPolicy?: BookingPolicy;
339
+ /**
340
+ * The booking policy that was the default before this endpoint was called.
341
+ * This field will be empty if there was no default booking policy before this method was called.
342
+ */
343
+ previousDefaultBookingPolicy?: BookingPolicy;
344
+ }
345
+ export interface CreateBookingPolicyRequest {
346
+ /** Booking policy to create. */
347
+ bookingPolicy: BookingPolicy;
348
+ }
349
+ export interface CreateBookingPolicyResponse {
350
+ /** Created booking policy. */
351
+ bookingPolicy?: BookingPolicy;
352
+ }
353
+ export interface GetBookingPolicyRequest {
354
+ /** ID of the booking policy to retrieve. */
355
+ bookingPolicyId: string;
356
+ }
357
+ export interface GetBookingPolicyResponse {
358
+ /** Retrieved booking policy. */
359
+ bookingPolicy?: BookingPolicy;
360
+ }
361
+ export interface GetStrictestBookingPolicyRequest {
362
+ /** IDs of the booking policies for which to retrieve the strictest rules for. */
363
+ bookingPolicyIds: string[];
364
+ }
365
+ export interface GetStrictestBookingPolicyResponse {
366
+ /**
367
+ * Hypothetical `bookingPolicy` object that combines the strictest version of
368
+ * each rule. `bookingPolicy.id` is `null` and the returned object isn't actually
369
+ * created. To create a new policy, you can call *Create Booking Policy*
370
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/create-booking-policy) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/create-booking-policy)).
371
+ */
372
+ bookingPolicy?: BookingPolicy;
373
+ }
374
+ export interface UpdateBookingPolicyRequest {
375
+ /** Booking policy to update. */
376
+ bookingPolicy: BookingPolicy;
377
+ }
378
+ export interface UpdateBookingPolicyResponse {
379
+ /** Updated booking policy. */
380
+ bookingPolicy?: BookingPolicy;
381
+ }
382
+ export interface SetDefaultBookingPolicyRequest {
383
+ /** ID of the booking policy that's set as default. */
384
+ bookingPolicyId: string;
385
+ }
386
+ export interface SetDefaultBookingPolicyResponse {
387
+ /** New default booking policy. */
388
+ currentDefaultBookingPolicy?: BookingPolicy;
389
+ /**
390
+ * Previous default booking policy. Not available if the provided booking policy
391
+ * was already the default.
392
+ */
393
+ previousDefaultBookingPolicy?: BookingPolicy;
394
+ }
395
+ export interface DeleteBookingPolicyRequest {
396
+ /** ID of the booking policy to delete. */
397
+ bookingPolicyId: string;
398
+ }
399
+ export interface DeleteBookingPolicyResponse {
400
+ }
401
+ export interface QueryBookingPoliciesRequest {
402
+ /**
403
+ * The query by which to select booking policies. See
404
+ * [the supported filters article](https://dev.wix.com/docs/rest/business-solutions/bookings/services/booking-policy/supported-filters)
405
+ * for details.
406
+ */
407
+ query: CursorQuery;
408
+ }
409
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
410
+ /** 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`. */
411
+ cursorPaging?: CursorPaging;
412
+ /**
413
+ * Filter object in the following format:
414
+ * `"filter" : {
415
+ * "fieldName1": "value1",
416
+ * "fieldName2":{"$operator":"value2"}
417
+ * }`
418
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
419
+ */
420
+ filter?: Record<string, any> | null;
421
+ /**
422
+ * Sort object in the following format:
423
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
424
+ */
425
+ sort?: Sorting[];
426
+ }
427
+ /** @oneof */
428
+ export interface CursorQueryPagingMethodOneOf {
429
+ /** 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`. */
430
+ cursorPaging?: CursorPaging;
431
+ }
432
+ export interface Sorting {
433
+ /** Name of the field to sort by. */
434
+ fieldName?: string;
435
+ /** Sort order. */
436
+ order?: SortOrder;
437
+ }
438
+ export declare enum SortOrder {
439
+ ASC = "ASC",
440
+ DESC = "DESC"
441
+ }
442
+ export interface CursorPaging {
443
+ /** Number of items to load. */
444
+ limit?: number | null;
445
+ /**
446
+ * Pointer to the next or previous page in the list of results.
447
+ *
448
+ * You can get the relevant cursor token
449
+ * from the `pagingMetadata` object in the previous call's response.
450
+ * Not relevant for the first request.
451
+ */
452
+ cursor?: string | null;
453
+ }
454
+ export interface QueryBookingPoliciesResponse {
455
+ /** Retrieved booking policies. */
456
+ bookingPolicies?: BookingPolicy[];
457
+ /** Paging metadata. */
458
+ pagingMetadata?: CursorPagingMetadata;
459
+ }
460
+ export interface CursorPagingMetadata {
461
+ /** Number of items returned in the response. */
462
+ count?: number | null;
463
+ /** Offset that was requested. */
464
+ cursors?: Cursors;
465
+ /**
466
+ * Indicates if there are more results after the current page.
467
+ * If `true`, another page of results can be retrieved.
468
+ * If `false`, this is the last page.
469
+ */
470
+ hasNext?: boolean | null;
471
+ }
472
+ export interface Cursors {
473
+ /** Cursor pointing to next page in the list of results. */
474
+ next?: string | null;
475
+ /** Cursor pointing to previous page in the list of results. */
476
+ prev?: string | null;
477
+ }
478
+ export interface CountBookingPoliciesRequest {
479
+ /**
480
+ * Filter to base the count on. See
481
+ * supported filters*
482
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))
483
+ * for details.
484
+ */
485
+ filter?: Record<string, any> | null;
486
+ }
487
+ export interface CountBookingPoliciesResponse {
488
+ /** Number of booking policies matching the provided filter. */
489
+ count?: number;
490
+ }
491
+ export interface UpdateAllPoliciesRequest {
492
+ /** Fields to set to all booking policies. */
493
+ bookingPolicy?: BookingPolicy;
494
+ /** List of fields to update */
495
+ mask?: string[];
496
+ }
497
+ export interface UpdateAllPoliciesResponse {
498
+ }
499
+ export interface CreateMissingDefaultPolicyRequest {
500
+ }
501
+ export interface CreateMissingDefaultPolicyResponse {
502
+ /** The default booking policy. */
503
+ defaultBookingPolicy?: BookingPolicy;
504
+ /** Whether a new default policy was created. */
505
+ wasANewPolicyCreated?: boolean;
506
+ }
507
+ export interface DomainEvent extends DomainEventBodyOneOf {
508
+ createdEvent?: EntityCreatedEvent;
509
+ updatedEvent?: EntityUpdatedEvent;
510
+ deletedEvent?: EntityDeletedEvent;
511
+ actionEvent?: ActionEvent;
512
+ /**
513
+ * Unique event ID.
514
+ * Allows clients to ignore duplicate webhooks.
515
+ */
516
+ _id?: string;
517
+ /**
518
+ * Assumes actions are also always typed to an entity_type
519
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
520
+ */
521
+ entityFqdn?: string;
522
+ /**
523
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
524
+ * This is although the created/updated/deleted notion is duplication of the oneof types
525
+ * Example: created/updated/deleted/started/completed/email_opened
526
+ */
527
+ slug?: string;
528
+ /** ID of the entity associated with the event. */
529
+ entityId?: string;
530
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
531
+ eventTime?: Date | null;
532
+ /**
533
+ * Whether the event was triggered as a result of a privacy regulation application
534
+ * (for example, GDPR).
535
+ */
536
+ triggeredByAnonymizeRequest?: boolean | null;
537
+ /** If present, indicates the action that triggered the event. */
538
+ originatedFrom?: string | null;
539
+ /**
540
+ * A sequence number defining the order of updates to the underlying entity.
541
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
542
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
543
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
544
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
545
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
546
+ */
547
+ entityEventSequence?: string | null;
548
+ }
549
+ /** @oneof */
550
+ export interface DomainEventBodyOneOf {
551
+ createdEvent?: EntityCreatedEvent;
552
+ updatedEvent?: EntityUpdatedEvent;
553
+ deletedEvent?: EntityDeletedEvent;
554
+ actionEvent?: ActionEvent;
555
+ }
556
+ export interface EntityCreatedEvent {
557
+ entity?: string;
558
+ }
559
+ export interface RestoreInfo {
560
+ deletedDate?: Date | null;
561
+ }
562
+ export interface EntityUpdatedEvent {
563
+ /**
564
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
565
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
566
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
567
+ */
568
+ currentEntity?: string;
569
+ }
570
+ export interface EntityDeletedEvent {
571
+ /** Entity that was deleted */
572
+ deletedEntity?: string | null;
573
+ }
574
+ export interface ActionEvent {
575
+ body?: string;
576
+ }
577
+ export interface Empty {
578
+ }
579
+ /** Encapsulates all details written to the Greyhound topic when a site's properties are updated. */
580
+ export interface SitePropertiesNotification {
581
+ /** The site ID for which this update notification applies. */
582
+ metasiteId?: string;
583
+ /** The actual update event. */
584
+ event?: SitePropertiesEvent;
585
+ /** A convenience set of mappings from the MetaSite ID to its constituent services. */
586
+ translations?: Translation[];
587
+ /** Context of the notification */
588
+ changeContext?: ChangeContext;
589
+ }
590
+ /** The actual update event for a particular notification. */
591
+ export interface SitePropertiesEvent {
592
+ /** Version of the site's properties represented by this update. */
593
+ version?: number;
594
+ /** Set of properties that were updated - corresponds to the fields in "properties". */
595
+ fields?: string[];
596
+ /** Updated properties. */
597
+ properties?: Properties;
598
+ }
599
+ export interface Properties {
600
+ /** Site categories. */
601
+ categories?: Categories;
602
+ /** Site locale. */
603
+ locale?: Locale;
604
+ /**
605
+ * Site language.
606
+ *
607
+ * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
608
+ */
609
+ language?: string | null;
610
+ /**
611
+ * Site currency format used to bill customers.
612
+ *
613
+ * Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
614
+ */
615
+ paymentCurrency?: string | null;
616
+ /** Timezone in `America/New_York` format. */
617
+ timeZone?: string | null;
618
+ /** Email address. */
619
+ email?: string | null;
620
+ /** Phone number. */
621
+ phone?: string | null;
622
+ /** Fax number. */
623
+ fax?: string | null;
624
+ /** Address. */
625
+ address?: Address;
626
+ /** Site display name. */
627
+ siteDisplayName?: string | null;
628
+ /** Business name. */
629
+ businessName?: string | null;
630
+ /** Path to the site's logo in Wix Media (without Wix Media base URL). */
631
+ logo?: string | null;
632
+ /** Site description. */
633
+ description?: string | null;
634
+ /**
635
+ * Business schedule. Regular and exceptional time periods when the business is open or the service is available.
636
+ *
637
+ * __Note:__ Not supported by Wix Bookings.
638
+ */
639
+ businessSchedule?: BusinessSchedule;
640
+ /** Supported languages of a site and the primary language. */
641
+ multilingual?: Multilingual;
642
+ /** Cookie policy the Wix user defined for their site (before the site visitor interacts with/limits it). */
643
+ consentPolicy?: ConsentPolicy;
644
+ /**
645
+ * Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`.
646
+ *
647
+ * Site business type.
648
+ */
649
+ businessConfig?: string | null;
650
+ /** External site URL that uses Wix as its headless business solution. */
651
+ externalSiteUrl?: string | null;
652
+ /** Track clicks analytics. */
653
+ trackClicksAnalytics?: boolean;
654
+ }
655
+ export interface Categories {
656
+ /** Primary site category. */
657
+ primary?: string;
658
+ /** Secondary site category. */
659
+ secondary?: string[];
660
+ /** Business Term Id */
661
+ businessTermId?: string | null;
662
+ }
663
+ export interface Locale {
664
+ /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
665
+ languageCode?: string;
666
+ /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
667
+ country?: string;
668
+ }
669
+ export interface Address {
670
+ /** Street name. */
671
+ street?: string;
672
+ /** City name. */
673
+ city?: string;
674
+ /** Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */
675
+ country?: string;
676
+ /** State. */
677
+ state?: string;
678
+ /** Zip or postal code. */
679
+ zip?: string;
680
+ /** Extra information to be displayed in the address. */
681
+ hint?: AddressHint;
682
+ /** Whether this address represents a physical location. */
683
+ isPhysical?: boolean;
684
+ /** Google-formatted version of this address. */
685
+ googleFormattedAddress?: string;
686
+ /** Street number. */
687
+ streetNumber?: string;
688
+ /** Apartment number. */
689
+ apartmentNumber?: string;
690
+ /** Geographic coordinates of location. */
691
+ coordinates?: GeoCoordinates;
692
+ }
693
+ /**
694
+ * Extra information on displayed addresses.
695
+ * This is used for display purposes. Used to add additional data about the address, such as "In the passage".
696
+ * Free text. In addition, the user can state where to display the additional description - before, after, or instead of the address string.
697
+ */
698
+ export interface AddressHint {
699
+ /** Extra text displayed next to, or instead of, the actual address. */
700
+ text?: string;
701
+ /** Where the extra text should be displayed. */
702
+ placement?: PlacementType;
703
+ }
704
+ /** Where the extra text should be displayed: before, after or instead of the actual address. */
705
+ export declare enum PlacementType {
706
+ BEFORE = "BEFORE",
707
+ AFTER = "AFTER",
708
+ REPLACE = "REPLACE"
709
+ }
710
+ /** Geocoordinates for a particular address. */
711
+ export interface GeoCoordinates {
712
+ /** Latitude of the location. Must be between -90 and 90. */
713
+ latitude?: number;
714
+ /** Longitude of the location. Must be between -180 and 180. */
715
+ longitude?: number;
716
+ }
717
+ /** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */
718
+ export interface BusinessSchedule {
719
+ /** Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods. */
720
+ periods?: TimePeriod[];
721
+ /** Exceptions to the business's regular hours. The business can be open or closed during the exception. */
722
+ specialHourPeriod?: SpecialHourPeriod[];
723
+ }
724
+ /** Weekly recurring time periods when the business is regularly open or the service is available. */
725
+ export interface TimePeriod {
726
+ /** Day of the week the period starts on. */
727
+ openDay?: DayOfWeek;
728
+ /**
729
+ * Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents
730
+ * midnight at the end of the specified day.
731
+ */
732
+ openTime?: string;
733
+ /** Day of the week the period ends on. */
734
+ closeDay?: DayOfWeek;
735
+ /**
736
+ * Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents
737
+ * midnight at the end of the specified day.
738
+ *
739
+ * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.
740
+ */
741
+ closeTime?: string;
742
+ }
743
+ /** Enumerates the days of the week. */
744
+ export declare enum DayOfWeek {
745
+ MONDAY = "MONDAY",
746
+ TUESDAY = "TUESDAY",
747
+ WEDNESDAY = "WEDNESDAY",
748
+ THURSDAY = "THURSDAY",
749
+ FRIDAY = "FRIDAY",
750
+ SATURDAY = "SATURDAY",
751
+ SUNDAY = "SUNDAY"
752
+ }
753
+ /** Exception to the business's regular hours. The business can be open or closed during the exception. */
754
+ export interface SpecialHourPeriod {
755
+ /** Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */
756
+ startDate?: string;
757
+ /** End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */
758
+ endDate?: string;
759
+ /**
760
+ * Whether the business is closed (or the service is not available) during the exception.
761
+ *
762
+ * Default: `true`.
763
+ */
764
+ isClosed?: boolean;
765
+ /** Additional info about the exception. For example, "We close earlier on New Year's Eve." */
766
+ comment?: string;
767
+ }
768
+ export interface Multilingual {
769
+ /** Supported languages list. */
770
+ supportedLanguages?: SupportedLanguage[];
771
+ /** Whether to redirect to user language. */
772
+ autoRedirect?: boolean;
773
+ }
774
+ export interface SupportedLanguage {
775
+ /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
776
+ languageCode?: string;
777
+ /** Locale. */
778
+ locale?: Locale;
779
+ /** Whether the supported language is the primary language for the site. */
780
+ isPrimary?: boolean;
781
+ /** Language icon. */
782
+ countryCode?: string;
783
+ /** How the language will be resolved. For internal use. */
784
+ resolutionMethod?: ResolutionMethod;
785
+ }
786
+ export declare enum ResolutionMethod {
787
+ QUERY_PARAM = "QUERY_PARAM",
788
+ SUBDOMAIN = "SUBDOMAIN",
789
+ SUBDIRECTORY = "SUBDIRECTORY"
790
+ }
791
+ export interface ConsentPolicy {
792
+ /** Whether the site uses cookies that are essential to site operation. Always `true`. */
793
+ essential?: boolean | null;
794
+ /** Whether the site uses cookies that affect site performance and other functional measurements. */
795
+ functional?: boolean | null;
796
+ /** Whether the site uses cookies that collect analytics about how the site is used (in order to improve it). */
797
+ analytics?: boolean | null;
798
+ /** Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor. */
799
+ advertising?: boolean | null;
800
+ /** CCPA compliance flag. */
801
+ dataToThirdParty?: boolean | null;
802
+ }
803
+ /** A single mapping from the MetaSite ID to a particular service. */
804
+ export interface Translation {
805
+ /** The service type. */
806
+ serviceType?: string;
807
+ /** The application definition ID; this only applies to services of type ThirdPartyApps. */
808
+ appDefId?: string;
809
+ /** The instance ID of the service. */
810
+ instanceId?: string;
811
+ }
812
+ export interface ChangeContext extends ChangeContextPayloadOneOf {
813
+ /** Properties were updated. */
814
+ propertiesChange?: PropertiesChange;
815
+ /** Default properties were created on site creation. */
816
+ siteCreated?: V4SiteCreated;
817
+ /** Properties were cloned on site cloning. */
818
+ siteCloned?: SiteCloned;
819
+ }
820
+ /** @oneof */
821
+ export interface ChangeContextPayloadOneOf {
822
+ /** Properties were updated. */
823
+ propertiesChange?: PropertiesChange;
824
+ /** Default properties were created on site creation. */
825
+ siteCreated?: V4SiteCreated;
826
+ /** Properties were cloned on site cloning. */
827
+ siteCloned?: SiteCloned;
828
+ }
829
+ export interface PropertiesChange {
830
+ }
831
+ export interface V4SiteCreated {
832
+ /** Origin template site id. */
833
+ originTemplateId?: string | null;
834
+ }
835
+ export interface SiteCloned {
836
+ /** Origin site id. */
837
+ originMetaSiteId?: string;
838
+ }
839
+ export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
840
+ /** Emitted on a meta site creation. */
841
+ siteCreated?: SiteCreated;
842
+ /** Emitted on a meta site transfer completion. */
843
+ siteTransferred?: SiteTransferred;
844
+ /** Emitted on a meta site deletion. */
845
+ siteDeleted?: SiteDeleted;
846
+ /** Emitted on a meta site restoration. */
847
+ siteUndeleted?: SiteUndeleted;
848
+ /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
849
+ sitePublished?: SitePublished;
850
+ /** Emitted on a meta site unpublish. */
851
+ siteUnpublished?: SiteUnpublished;
852
+ /** Emitted when meta site is marked as template. */
853
+ siteMarkedAsTemplate?: SiteMarkedAsTemplate;
854
+ /** Emitted when meta site is marked as a WixSite. */
855
+ siteMarkedAsWixSite?: SiteMarkedAsWixSite;
856
+ /** Emitted when an application is provisioned (installed). */
857
+ serviceProvisioned?: ServiceProvisioned;
858
+ /** Emitted when an application is removed (uninstalled). */
859
+ serviceRemoved?: ServiceRemoved;
860
+ /** Emitted when meta site name (URL slug) is changed. */
861
+ siteRenamedPayload?: SiteRenamed;
862
+ /** Emitted when meta site was permanently deleted. */
863
+ hardDeleted?: SiteHardDeleted;
864
+ /** Emitted on a namespace change. */
865
+ namespaceChanged?: NamespaceChanged;
866
+ /** Emitted when Studio is attached. */
867
+ studioAssigned?: StudioAssigned;
868
+ /** Emitted when Studio is detached. */
869
+ studioUnassigned?: StudioUnassigned;
870
+ /** A meta site id. */
871
+ metaSiteId?: string;
872
+ /** A meta site version. Monotonically increasing. */
873
+ version?: string;
874
+ /** A timestamp of the event. */
875
+ timestamp?: string;
876
+ /**
877
+ * TODO(meta-site): Change validation once validations are disabled for consumers
878
+ * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659
879
+ */
880
+ assets?: Asset[];
881
+ }
882
+ /** @oneof */
883
+ export interface MetaSiteSpecialEventPayloadOneOf {
884
+ /** Emitted on a meta site creation. */
885
+ siteCreated?: SiteCreated;
886
+ /** Emitted on a meta site transfer completion. */
887
+ siteTransferred?: SiteTransferred;
888
+ /** Emitted on a meta site deletion. */
889
+ siteDeleted?: SiteDeleted;
890
+ /** Emitted on a meta site restoration. */
891
+ siteUndeleted?: SiteUndeleted;
892
+ /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
893
+ sitePublished?: SitePublished;
894
+ /** Emitted on a meta site unpublish. */
895
+ siteUnpublished?: SiteUnpublished;
896
+ /** Emitted when meta site is marked as template. */
897
+ siteMarkedAsTemplate?: SiteMarkedAsTemplate;
898
+ /** Emitted when meta site is marked as a WixSite. */
899
+ siteMarkedAsWixSite?: SiteMarkedAsWixSite;
900
+ /** Emitted when an application is provisioned (installed). */
901
+ serviceProvisioned?: ServiceProvisioned;
902
+ /** Emitted when an application is removed (uninstalled). */
903
+ serviceRemoved?: ServiceRemoved;
904
+ /** Emitted when meta site name (URL slug) is changed. */
905
+ siteRenamedPayload?: SiteRenamed;
906
+ /** Emitted when meta site was permanently deleted. */
907
+ hardDeleted?: SiteHardDeleted;
908
+ /** Emitted on a namespace change. */
909
+ namespaceChanged?: NamespaceChanged;
910
+ /** Emitted when Studio is attached. */
911
+ studioAssigned?: StudioAssigned;
912
+ /** Emitted when Studio is detached. */
913
+ studioUnassigned?: StudioUnassigned;
914
+ }
915
+ export interface Asset {
916
+ /** An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum). */
917
+ appDefId?: string;
918
+ /** An instance id. For legacy reasons may be UUID or a string. */
919
+ instanceId?: string;
920
+ /** An application state. */
921
+ state?: State;
922
+ }
923
+ export declare enum State {
924
+ UNKNOWN = "UNKNOWN",
925
+ ENABLED = "ENABLED",
926
+ DISABLED = "DISABLED",
927
+ PENDING = "PENDING",
928
+ DEMO = "DEMO"
929
+ }
930
+ export interface SiteCreated {
931
+ /** A template identifier (empty if not created from a template). */
932
+ originTemplateId?: string;
933
+ /** An account id of the owner. */
934
+ ownerId?: string;
935
+ /** A context in which meta site was created. */
936
+ context?: SiteCreatedContext;
937
+ /**
938
+ * A meta site id from which this site was created.
939
+ *
940
+ * In case of a creation from a template it's a template id.
941
+ * In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site.
942
+ */
943
+ originMetaSiteId?: string | null;
944
+ /** A meta site name (URL slug). */
945
+ siteName?: string;
946
+ /** A namespace. */
947
+ namespace?: Namespace;
948
+ }
949
+ export declare enum SiteCreatedContext {
950
+ /** A valid option, we don't expose all reasons why site might be created. */
951
+ OTHER = "OTHER",
952
+ /** A meta site was created from template. */
953
+ FROM_TEMPLATE = "FROM_TEMPLATE",
954
+ /** A meta site was created by copying of the transfferred meta site. */
955
+ DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER",
956
+ /** A copy of existing meta site. */
957
+ DUPLICATE = "DUPLICATE",
958
+ /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
959
+ OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER",
960
+ /** deprecated A meta site was created for Flash editor. */
961
+ FLASH = "FLASH"
962
+ }
963
+ export declare enum Namespace {
964
+ UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
965
+ /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
966
+ WIX = "WIX",
967
+ /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */
968
+ SHOUT_OUT = "SHOUT_OUT",
969
+ /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */
970
+ ALBUMS = "ALBUMS",
971
+ /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */
972
+ WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE",
973
+ /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
974
+ HOTELS = "HOTELS",
975
+ /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
976
+ CLUBS = "CLUBS",
977
+ /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
978
+ ONBOARDING_DRAFT = "ONBOARDING_DRAFT",
979
+ /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
980
+ DEV_SITE = "DEV_SITE",
981
+ /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
982
+ LOGOS = "LOGOS",
983
+ /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
984
+ VIDEO_MAKER = "VIDEO_MAKER",
985
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
986
+ PARTNER_DASHBOARD = "PARTNER_DASHBOARD",
987
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
988
+ DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY",
989
+ /**
990
+ * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
991
+ *
992
+ * Meta site with this namespace will *not* be shown in a user's site list by default.
993
+ */
994
+ HTML_DRAFT = "HTML_DRAFT",
995
+ /**
996
+ * the user-journey for Fitness users who want to start from managing their business instead of designing their website.
997
+ * Will be accessible from Site List and will not have a website app.
998
+ * Once the user attaches a site, the site will become a regular wixsite.
999
+ */
1000
+ SITELESS_BUSINESS = "SITELESS_BUSINESS",
1001
+ /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
1002
+ CREATOR_ECONOMY = "CREATOR_ECONOMY",
1003
+ /** It is to be used in the Business First efforts. */
1004
+ DASHBOARD_FIRST = "DASHBOARD_FIRST",
1005
+ /** Bookings business flow with no site. */
1006
+ ANYWHERE = "ANYWHERE",
1007
+ /** Namespace for Headless Backoffice with no editor */
1008
+ HEADLESS = "HEADLESS",
1009
+ /**
1010
+ * Namespace for master site that will exist in parent account that will be referenced by subaccounts
1011
+ * The site will be used for account level CSM feature for enterprise
1012
+ */
1013
+ ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS",
1014
+ /** Rise.ai Siteless account management for Gift Cards and Store Credit. */
1015
+ RISE = "RISE",
1016
+ /**
1017
+ * As part of the branded app new funnel, users now can create a meta site that will be branded app first.
1018
+ * There's a blank site behind the scene but it's blank).
1019
+ * The Mobile company will be the owner of this namespace.
1020
+ */
1021
+ BRANDED_FIRST = "BRANDED_FIRST",
1022
+ /** Nownia.com Siteless account management for Ai Scheduling Assistant. */
1023
+ NOWNIA = "NOWNIA",
1024
+ /**
1025
+ * UGC Templates are templates that are created by users for personal use and to sale to other users.
1026
+ * The Partners company owns this namespace.
1027
+ */
1028
+ UGC_TEMPLATE = "UGC_TEMPLATE",
1029
+ /** Codux Headless Sites */
1030
+ CODUX = "CODUX",
1031
+ /** Bobb - AI Design Creator. */
1032
+ MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR",
1033
+ /**
1034
+ * Shared Blog Site is a unique single site across Enterprise account,
1035
+ * This site will hold all Blog posts related to the Marketing product.
1036
+ */
1037
+ SHARED_BLOG_ENTERPRISE = "SHARED_BLOG_ENTERPRISE"
1038
+ }
1039
+ /** Site transferred to another user. */
1040
+ export interface SiteTransferred {
1041
+ /** A previous owner id (user that transfers meta site). */
1042
+ oldOwnerId?: string;
1043
+ /** A new owner id (user that accepts meta site). */
1044
+ newOwnerId?: string;
1045
+ }
1046
+ /** Soft deletion of the meta site. Could be restored. */
1047
+ export interface SiteDeleted {
1048
+ /** A deletion context. */
1049
+ deleteContext?: DeleteContext;
1050
+ }
1051
+ export interface DeleteContext {
1052
+ /** When the meta site was deleted. */
1053
+ dateDeleted?: Date | null;
1054
+ /** A status. */
1055
+ deleteStatus?: DeleteStatus;
1056
+ /** A reason (flow). */
1057
+ deleteOrigin?: string;
1058
+ /** A service that deleted it. */
1059
+ initiatorId?: string | null;
1060
+ }
1061
+ export declare enum DeleteStatus {
1062
+ UNKNOWN = "UNKNOWN",
1063
+ TRASH = "TRASH",
1064
+ DELETED = "DELETED",
1065
+ PENDING_PURGE = "PENDING_PURGE"
1066
+ }
1067
+ /** Restoration of the meta site. */
1068
+ export interface SiteUndeleted {
1069
+ }
1070
+ /** First publish of a meta site. Or subsequent publish after unpublish. */
1071
+ export interface SitePublished {
1072
+ }
1073
+ export interface SiteUnpublished {
1074
+ /** A list of URLs previously associated with the meta site. */
1075
+ urls?: string[];
1076
+ }
1077
+ export interface SiteMarkedAsTemplate {
1078
+ }
1079
+ export interface SiteMarkedAsWixSite {
1080
+ }
1081
+ /**
1082
+ * Represents a service provisioned a site.
1083
+ *
1084
+ * Note on `origin_instance_id`:
1085
+ * There is no guarantee that you will be able to find a meta site using `origin_instance_id`.
1086
+ * This is because of the following scenario:
1087
+ *
1088
+ * Imagine you have a template where a third-party application (TPA) includes some stub data,
1089
+ * such as a product catalog. When you create a site from this template, you inherit this
1090
+ * default product catalog. However, if the template's product catalog is modified,
1091
+ * your site will retain the catalog as it was at the time of site creation. This ensures that
1092
+ * your site remains consistent with what you initially received and does not include any
1093
+ * changes made to the original template afterward.
1094
+ * To ensure this, the TPA on the template gets a new instance_id.
1095
+ */
1096
+ export interface ServiceProvisioned {
1097
+ /** Either UUID or EmbeddedServiceType. */
1098
+ appDefId?: string;
1099
+ /** Not only UUID. Something here could be something weird. */
1100
+ instanceId?: string;
1101
+ /** An instance id from which this instance is originated. */
1102
+ originInstanceId?: string;
1103
+ /** A version. */
1104
+ version?: string | null;
1105
+ /** The origin meta site id */
1106
+ originMetaSiteId?: string | null;
1107
+ }
1108
+ export interface ServiceRemoved {
1109
+ /** Either UUID or EmbeddedServiceType. */
1110
+ appDefId?: string;
1111
+ /** Not only UUID. Something here could be something weird. */
1112
+ instanceId?: string;
1113
+ /** A version. */
1114
+ version?: string | null;
1115
+ }
1116
+ /** Rename of the site. Meaning, free public url has been changed as well. */
1117
+ export interface SiteRenamed {
1118
+ /** A new meta site name (URL slug). */
1119
+ newSiteName?: string;
1120
+ /** A previous meta site name (URL slug). */
1121
+ oldSiteName?: string;
1122
+ }
1123
+ /**
1124
+ * Hard deletion of the meta site.
1125
+ *
1126
+ * Could not be restored. Therefore it's desirable to cleanup data.
1127
+ */
1128
+ export interface SiteHardDeleted {
1129
+ /** A deletion context. */
1130
+ deleteContext?: DeleteContext;
1131
+ }
1132
+ export interface NamespaceChanged {
1133
+ /** A previous namespace. */
1134
+ oldNamespace?: Namespace;
1135
+ /** A new namespace. */
1136
+ newNamespace?: Namespace;
1137
+ }
1138
+ /** Assigned Studio editor */
1139
+ export interface StudioAssigned {
1140
+ }
1141
+ /** Unassigned Studio editor */
1142
+ export interface StudioUnassigned {
1143
+ }
1144
+ export interface MessageEnvelope {
1145
+ /** App instance ID. */
1146
+ instanceId?: string | null;
1147
+ /** Event type. */
1148
+ eventType?: string;
1149
+ /** The identification type and identity data. */
1150
+ identity?: IdentificationData;
1151
+ /** Stringify payload. */
1152
+ data?: string;
1153
+ }
1154
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1155
+ /** ID of a site visitor that has not logged in to the site. */
1156
+ anonymousVisitorId?: string;
1157
+ /** ID of a site visitor that has logged in to the site. */
1158
+ memberId?: string;
1159
+ /** ID of a Wix user (site owner, contributor, etc.). */
1160
+ wixUserId?: string;
1161
+ /** ID of an app. */
1162
+ appId?: string;
1163
+ /** @readonly */
1164
+ identityType?: WebhookIdentityType;
1165
+ }
1166
+ /** @oneof */
1167
+ export interface IdentificationDataIdOneOf {
1168
+ /** ID of a site visitor that has not logged in to the site. */
1169
+ anonymousVisitorId?: string;
1170
+ /** ID of a site visitor that has logged in to the site. */
1171
+ memberId?: string;
1172
+ /** ID of a Wix user (site owner, contributor, etc.). */
1173
+ wixUserId?: string;
1174
+ /** ID of an app. */
1175
+ appId?: string;
1176
+ }
1177
+ export declare enum WebhookIdentityType {
1178
+ UNKNOWN = "UNKNOWN",
1179
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1180
+ MEMBER = "MEMBER",
1181
+ WIX_USER = "WIX_USER",
1182
+ APP = "APP"
1183
+ }
1184
+ interface PolicyDescriptionNonNullableFields {
1185
+ enabled: boolean;
1186
+ description: string;
1187
+ }
1188
+ interface LimitEarlyBookingPolicyNonNullableFields {
1189
+ enabled: boolean;
1190
+ earliestBookingInMinutes: number;
1191
+ }
1192
+ interface LimitLateBookingPolicyNonNullableFields {
1193
+ enabled: boolean;
1194
+ latestBookingInMinutes: number;
1195
+ }
1196
+ interface BookAfterStartPolicyNonNullableFields {
1197
+ enabled: boolean;
1198
+ }
1199
+ interface CancellationPolicyNonNullableFields {
1200
+ enabled: boolean;
1201
+ limitLatestCancellation: boolean;
1202
+ latestCancellationInMinutes: number;
1203
+ }
1204
+ interface ReschedulePolicyNonNullableFields {
1205
+ enabled: boolean;
1206
+ limitLatestReschedule: boolean;
1207
+ latestRescheduleInMinutes: number;
1208
+ }
1209
+ interface WaitlistPolicyNonNullableFields {
1210
+ enabled: boolean;
1211
+ capacity: number;
1212
+ reservationTimeInMinutes: number;
1213
+ }
1214
+ interface ParticipantsPolicyNonNullableFields {
1215
+ enabled: boolean;
1216
+ maxParticipantsPerBooking: number;
1217
+ }
1218
+ interface ResourcesPolicyNonNullableFields {
1219
+ enabled: boolean;
1220
+ autoAssignAllowed: boolean;
1221
+ }
1222
+ interface MoneyNonNullableFields {
1223
+ value: string;
1224
+ currency: string;
1225
+ }
1226
+ interface CancellationWindowNonNullableFields {
1227
+ amount?: MoneyNonNullableFields;
1228
+ percentage: string;
1229
+ }
1230
+ interface CancellationFeePolicyNonNullableFields {
1231
+ enabled: boolean;
1232
+ cancellationWindows: CancellationWindowNonNullableFields[];
1233
+ }
1234
+ interface SaveCreditCardPolicyNonNullableFields {
1235
+ enabled: boolean;
1236
+ }
1237
+ export interface BookingPolicyNonNullableFields {
1238
+ customPolicyDescription?: PolicyDescriptionNonNullableFields;
1239
+ limitEarlyBookingPolicy?: LimitEarlyBookingPolicyNonNullableFields;
1240
+ limitLateBookingPolicy?: LimitLateBookingPolicyNonNullableFields;
1241
+ bookAfterStartPolicy?: BookAfterStartPolicyNonNullableFields;
1242
+ cancellationPolicy?: CancellationPolicyNonNullableFields;
1243
+ reschedulePolicy?: ReschedulePolicyNonNullableFields;
1244
+ waitlistPolicy?: WaitlistPolicyNonNullableFields;
1245
+ participantsPolicy?: ParticipantsPolicyNonNullableFields;
1246
+ resourcesPolicy?: ResourcesPolicyNonNullableFields;
1247
+ cancellationFeePolicy?: CancellationFeePolicyNonNullableFields;
1248
+ saveCreditCardPolicy?: SaveCreditCardPolicyNonNullableFields;
1249
+ }
1250
+ export interface CreateBookingPolicyResponseNonNullableFields {
1251
+ bookingPolicy?: BookingPolicyNonNullableFields;
1252
+ }
1253
+ export interface GetBookingPolicyResponseNonNullableFields {
1254
+ bookingPolicy?: BookingPolicyNonNullableFields;
1255
+ }
1256
+ export interface GetStrictestBookingPolicyResponseNonNullableFields {
1257
+ bookingPolicy?: BookingPolicyNonNullableFields;
1258
+ }
1259
+ export interface UpdateBookingPolicyResponseNonNullableFields {
1260
+ bookingPolicy?: BookingPolicyNonNullableFields;
1261
+ }
1262
+ export interface SetDefaultBookingPolicyResponseNonNullableFields {
1263
+ currentDefaultBookingPolicy?: BookingPolicyNonNullableFields;
1264
+ previousDefaultBookingPolicy?: BookingPolicyNonNullableFields;
1265
+ }
1266
+ export interface QueryBookingPoliciesResponseNonNullableFields {
1267
+ bookingPolicies: BookingPolicyNonNullableFields[];
1268
+ }
1269
+ export interface CountBookingPoliciesResponseNonNullableFields {
1270
+ count: number;
1271
+ }
1272
+ export interface BaseEventMetadata {
1273
+ /** App instance ID. */
1274
+ instanceId?: string | null;
1275
+ /** Event type. */
1276
+ eventType?: string;
1277
+ /** The identification type and identity data. */
1278
+ identity?: IdentificationData;
1279
+ }
1280
+ export interface EventMetadata extends BaseEventMetadata {
1281
+ /**
1282
+ * Unique event ID.
1283
+ * Allows clients to ignore duplicate webhooks.
1284
+ */
1285
+ _id?: string;
1286
+ /**
1287
+ * Assumes actions are also always typed to an entity_type
1288
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1289
+ */
1290
+ entityFqdn?: string;
1291
+ /**
1292
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1293
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1294
+ * Example: created/updated/deleted/started/completed/email_opened
1295
+ */
1296
+ slug?: string;
1297
+ /** ID of the entity associated with the event. */
1298
+ entityId?: string;
1299
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1300
+ eventTime?: Date | null;
1301
+ /**
1302
+ * Whether the event was triggered as a result of a privacy regulation application
1303
+ * (for example, GDPR).
1304
+ */
1305
+ triggeredByAnonymizeRequest?: boolean | null;
1306
+ /** If present, indicates the action that triggered the event. */
1307
+ originatedFrom?: string | null;
1308
+ /**
1309
+ * A sequence number defining the order of updates to the underlying entity.
1310
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1311
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1312
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1313
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1314
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1315
+ */
1316
+ entityEventSequence?: string | null;
1317
+ }
1318
+ export interface BookingPolicyCreatedEnvelope {
1319
+ entity: BookingPolicy;
1320
+ metadata: EventMetadata;
1321
+ }
1322
+ /**
1323
+ * Triggered when a booking policy is created.
1324
+ * @permissionScope Read Bookings - Public Data
1325
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1326
+ * @permissionScope Manage Bookings Services and Settings
1327
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1328
+ * @permissionScope Manage Bookings
1329
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1330
+ * @permissionScope Read Bookings - Including Participants
1331
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1332
+ * @permissionScope Read Bookings - all read permissions
1333
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1334
+ * @permissionScope Manage Bookings - all permissions
1335
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1336
+ * @permissionId BOOKINGS.BOOKING_POLICY_READ
1337
+ * @webhook
1338
+ * @eventType wix.bookings.v1.booking_policy_created
1339
+ */
1340
+ export declare function onBookingPolicyCreated(handler: (event: BookingPolicyCreatedEnvelope) => void | Promise<void>): void;
1341
+ export interface BookingPolicyDefaultBookingPolicySetEnvelope {
1342
+ data: DefaultBookingPolicySet;
1343
+ metadata: EventMetadata;
1344
+ }
1345
+ /**
1346
+ * Triggered when the site's default policy changes. Then,
1347
+ * Booking Policy Updated*
1348
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/on-booking-policy-updated) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/booking-policy-updated))
1349
+ * is also triggered both for the new and the previous default policy.
1350
+ * @permissionScope Read Bookings - Public Data
1351
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1352
+ * @permissionScope Manage Bookings Services and Settings
1353
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1354
+ * @permissionScope Manage Bookings
1355
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1356
+ * @permissionScope Read Bookings - Including Participants
1357
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1358
+ * @permissionScope Read Bookings - all read permissions
1359
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1360
+ * @permissionScope Manage Bookings - all permissions
1361
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1362
+ * @permissionId BOOKINGS.BOOKING_POLICY_READ
1363
+ * @webhook
1364
+ * @eventType wix.bookings.v1.booking_policy_default_booking_policy_set
1365
+ */
1366
+ export declare function onBookingPolicyDefaultBookingPolicySet(handler: (event: BookingPolicyDefaultBookingPolicySetEnvelope) => void | Promise<void>): void;
1367
+ export interface BookingPolicyDeletedEnvelope {
1368
+ metadata: EventMetadata;
1369
+ }
1370
+ /**
1371
+ * Triggered when a booking policy is deleted.
1372
+ * @permissionScope Read Bookings - Public Data
1373
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1374
+ * @permissionScope Manage Bookings Services and Settings
1375
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1376
+ * @permissionScope Manage Bookings
1377
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1378
+ * @permissionScope Read Bookings - Including Participants
1379
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1380
+ * @permissionScope Read Bookings - all read permissions
1381
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1382
+ * @permissionScope Manage Bookings - all permissions
1383
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1384
+ * @permissionId BOOKINGS.BOOKING_POLICY_READ
1385
+ * @webhook
1386
+ * @eventType wix.bookings.v1.booking_policy_deleted
1387
+ */
1388
+ export declare function onBookingPolicyDeleted(handler: (event: BookingPolicyDeletedEnvelope) => void | Promise<void>): void;
1389
+ export interface BookingPolicyUpdatedEnvelope {
1390
+ entity: BookingPolicy;
1391
+ metadata: EventMetadata;
1392
+ }
1393
+ /**
1394
+ * Triggered when a booking policy is updated, including when a policy's
1395
+ * `default` attribute changes.
1396
+ * @permissionScope Read Bookings - Public Data
1397
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1398
+ * @permissionScope Manage Bookings Services and Settings
1399
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1400
+ * @permissionScope Manage Bookings
1401
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1402
+ * @permissionScope Read Bookings - Including Participants
1403
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1404
+ * @permissionScope Read Bookings - all read permissions
1405
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1406
+ * @permissionScope Manage Bookings - all permissions
1407
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1408
+ * @permissionId BOOKINGS.BOOKING_POLICY_READ
1409
+ * @webhook
1410
+ * @eventType wix.bookings.v1.booking_policy_updated
1411
+ */
1412
+ export declare function onBookingPolicyUpdated(handler: (event: BookingPolicyUpdatedEnvelope) => void | Promise<void>): void;
1413
+ /**
1414
+ * Creates a booking policy.
1415
+ * @param bookingPolicy - Booking policy to create.
1416
+ * @public
1417
+ * @requiredField bookingPolicy
1418
+ * @permissionId BOOKINGS.BOOKING_POLICY_CREATE
1419
+ * @permissionScope Manage Bookings Services and Settings
1420
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1421
+ * @permissionScope Manage Bookings
1422
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1423
+ * @permissionScope Manage Bookings - all permissions
1424
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1425
+ * @applicableIdentity APP
1426
+ * @returns Created booking policy.
1427
+ * @fqn wix.bookings.v1.BookingPoliciesService.CreateBookingPolicy
1428
+ */
1429
+ export declare function createBookingPolicy(bookingPolicy: BookingPolicy): Promise<BookingPolicy & BookingPolicyNonNullableFields>;
1430
+ /**
1431
+ * Retrieves a booking policy.
1432
+ * @param bookingPolicyId - ID of the booking policy to retrieve.
1433
+ * @public
1434
+ * @requiredField bookingPolicyId
1435
+ * @permissionId BOOKINGS.BOOKING_POLICY_READ
1436
+ * @permissionScope Read Bookings - Public Data
1437
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1438
+ * @permissionScope Manage Bookings Services and Settings
1439
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1440
+ * @permissionScope Manage Bookings
1441
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1442
+ * @permissionScope Read Bookings - Including Participants
1443
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1444
+ * @permissionScope Read Bookings - all read permissions
1445
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1446
+ * @permissionScope Manage Bookings - all permissions
1447
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1448
+ * @applicableIdentity APP
1449
+ * @applicableIdentity VISITOR
1450
+ * @returns Retrieved booking policy.
1451
+ * @fqn wix.bookings.v1.BookingPoliciesService.GetBookingPolicy
1452
+ */
1453
+ export declare function getBookingPolicy(bookingPolicyId: string): Promise<BookingPolicy & BookingPolicyNonNullableFields>;
1454
+ /**
1455
+ * Retrieves the strictest version of each policy rule from a list of booking
1456
+ * policies.
1457
+ *
1458
+ *
1459
+ * Returns a hypothetical `bookingPolicy` object that combines the strictest
1460
+ * version of each rule. The `id` of the returned policy is `null` and no
1461
+ * corresponding `bookingPolicy` object is created. To create a new policy, you
1462
+ * can call *Create Booking Policy*
1463
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/create-booking-policy) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/create-booking-policy)).
1464
+ * @param bookingPolicyIds - IDs of the booking policies for which to retrieve the strictest rules for.
1465
+ * @public
1466
+ * @requiredField bookingPolicyIds
1467
+ * @permissionId BOOKINGS.BOOKING_POLICY_READ
1468
+ * @permissionScope Read Bookings - Public Data
1469
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1470
+ * @permissionScope Manage Bookings Services and Settings
1471
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1472
+ * @permissionScope Manage Bookings
1473
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1474
+ * @permissionScope Read Bookings - Including Participants
1475
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1476
+ * @permissionScope Read Bookings - all read permissions
1477
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1478
+ * @permissionScope Manage Bookings - all permissions
1479
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1480
+ * @applicableIdentity APP
1481
+ * @applicableIdentity VISITOR
1482
+ * @fqn wix.bookings.v1.BookingPoliciesService.GetStrictestBookingPolicy
1483
+ */
1484
+ export declare function getStrictestBookingPolicy(bookingPolicyIds: string[]): Promise<GetStrictestBookingPolicyResponse & GetStrictestBookingPolicyResponseNonNullableFields>;
1485
+ /**
1486
+ * Updates a booking policy.
1487
+ *
1488
+ *
1489
+ * Each time the booking policy is updated, `revision` increments by 1.
1490
+ * The current `revision` must be specified when updating the booking policy.
1491
+ * This ensures you're working with the latest booking policy and prevents unintended overwrites.
1492
+ * @param _id - ID of the booking policy.
1493
+ * @public
1494
+ * @requiredField _id
1495
+ * @requiredField bookingPolicy
1496
+ * @requiredField bookingPolicy.revision
1497
+ * @permissionId BOOKINGS.BOOKING_POLICY_UPDATE
1498
+ * @permissionScope Manage Bookings Services and Settings
1499
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1500
+ * @permissionScope Manage Bookings
1501
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1502
+ * @permissionScope Manage Bookings - all permissions
1503
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1504
+ * @applicableIdentity APP
1505
+ * @returns Updated booking policy.
1506
+ * @fqn wix.bookings.v1.BookingPoliciesService.UpdateBookingPolicy
1507
+ */
1508
+ export declare function updateBookingPolicy(_id: string | null, bookingPolicy: UpdateBookingPolicy): Promise<BookingPolicy & BookingPolicyNonNullableFields>;
1509
+ export interface UpdateBookingPolicy {
1510
+ /**
1511
+ * ID of the booking policy.
1512
+ * @readonly
1513
+ */
1514
+ _id?: string | null;
1515
+ /**
1516
+ * Revision number, which increments by 1 each time the booking policy is updated.
1517
+ * To prevent conflicting changes, the current `revision` must be passed when
1518
+ * updating the booking policy.
1519
+ * @readonly
1520
+ */
1521
+ revision?: string | null;
1522
+ /**
1523
+ * Date and time the booking policy was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
1524
+ * @readonly
1525
+ */
1526
+ _createdDate?: Date | null;
1527
+ /**
1528
+ * Date and time the booking policy was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
1529
+ * @readonly
1530
+ */
1531
+ _updatedDate?: Date | null;
1532
+ /** Name of the booking policy. */
1533
+ name?: string | null;
1534
+ /**
1535
+ * Custom description for the booking policy and whether it's displayed to the
1536
+ * participant.
1537
+ */
1538
+ customPolicyDescription?: PolicyDescription;
1539
+ /**
1540
+ * Whether the booking policy is the default.
1541
+ * @readonly
1542
+ */
1543
+ default?: boolean | null;
1544
+ /** Rule for limiting early bookings. */
1545
+ limitEarlyBookingPolicy?: LimitEarlyBookingPolicy;
1546
+ /**
1547
+ * Rule for limiting late bookings. This rule and `bookAfterStartPolicy` can't
1548
+ * be both enabled at the same time.
1549
+ */
1550
+ limitLateBookingPolicy?: LimitLateBookingPolicy;
1551
+ /**
1552
+ * Rule for booking after the start of a session or course. This rule and
1553
+ * `limitLateBookingPolicy` can't be both enabled at the same time.
1554
+ */
1555
+ bookAfterStartPolicy?: BookAfterStartPolicy;
1556
+ /** Rule for canceling a booking. */
1557
+ cancellationPolicy?: CancellationPolicy;
1558
+ /** Rule for rescheduling a booking. */
1559
+ reschedulePolicy?: ReschedulePolicy;
1560
+ /** Waitlist rule for the service. */
1561
+ waitlistPolicy?: WaitlistPolicy;
1562
+ /** Rule for participants per booking. */
1563
+ participantsPolicy?: ParticipantsPolicy;
1564
+ /** Rules for cancellation fees. */
1565
+ cancellationFeePolicy?: CancellationFeePolicy;
1566
+ /** Rule for saving credit card details. */
1567
+ saveCreditCardPolicy?: SaveCreditCardPolicy;
1568
+ /** Extensions enabling users to save custom data related to the booking policies. */
1569
+ extendedFields?: ExtendedFields;
1570
+ }
1571
+ /**
1572
+ * Sets a booking policy as the default.
1573
+ *
1574
+ *
1575
+ * Also updates the site's current default policy by setting its `default`
1576
+ * attribute to `false`. If the provided policy is already the site's
1577
+ * default, the call succeeds without changing any `bookingPolicy` object.
1578
+ * @param bookingPolicyId - ID of the booking policy that's set as default.
1579
+ * @public
1580
+ * @requiredField bookingPolicyId
1581
+ * @permissionId BOOKINGS.BOOKING_POLICY_SET_DEFAULT
1582
+ * @permissionScope Manage Bookings Services and Settings
1583
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1584
+ * @permissionScope Manage Bookings
1585
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1586
+ * @permissionScope Manage Bookings - all permissions
1587
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1588
+ * @applicableIdentity APP
1589
+ * @fqn wix.bookings.v1.BookingPoliciesService.SetDefaultBookingPolicy
1590
+ */
1591
+ export declare function setDefaultBookingPolicy(bookingPolicyId: string): Promise<SetDefaultBookingPolicyResponse & SetDefaultBookingPolicyResponseNonNullableFields>;
1592
+ /**
1593
+ * Deletes a booking policy.
1594
+ *
1595
+ *
1596
+ * You can't delete the default policy without first *setting a different policy as default*
1597
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/set-default-booking-policy) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/set-default-booking-policy)).
1598
+ * @param bookingPolicyId - ID of the booking policy to delete.
1599
+ * @public
1600
+ * @requiredField bookingPolicyId
1601
+ * @permissionId BOOKINGS.BOOKING_POLICY_DELETE
1602
+ * @permissionScope Manage Bookings Services and Settings
1603
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1604
+ * @permissionScope Manage Bookings
1605
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1606
+ * @permissionScope Manage Bookings - all permissions
1607
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1608
+ * @applicableIdentity APP
1609
+ * @fqn wix.bookings.v1.BookingPoliciesService.DeleteBookingPolicy
1610
+ */
1611
+ export declare function deleteBookingPolicy(bookingPolicyId: string): Promise<void>;
1612
+ /**
1613
+ * Retrieves a list of booking policies, given the provided paging, filtering, and sorting.
1614
+ *
1615
+ *
1616
+ * Query Booking Policies runs with these defaults, which you can override:
1617
+ *
1618
+ * - Sorted by `createdDate` in ascending order.
1619
+ * - `cursorPaging.limit` set to `100`.
1620
+ *
1621
+ * For details about all supported filters and sorting options, see
1622
+ * [supported filters](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters).
1623
+ *
1624
+ * To learn about working with _Query_ endpoints, see
1625
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
1626
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
1627
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
1628
+ * @public
1629
+ * @permissionScope Read Bookings - Public Data
1630
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1631
+ * @permissionScope Manage Bookings Services and Settings
1632
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1633
+ * @permissionScope Manage Bookings
1634
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1635
+ * @permissionScope Read Bookings - Including Participants
1636
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1637
+ * @permissionScope Read Bookings - all read permissions
1638
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1639
+ * @permissionScope Manage Bookings - all permissions
1640
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1641
+ * @permissionId BOOKINGS.BOOKING_POLICY_READ
1642
+ * @applicableIdentity APP
1643
+ * @applicableIdentity VISITOR
1644
+ * @fqn wix.bookings.v1.BookingPoliciesService.QueryBookingPolicies
1645
+ */
1646
+ export declare function queryBookingPolicies(): BookingPoliciesQueryBuilder;
1647
+ interface QueryCursorResult {
1648
+ cursors: Cursors;
1649
+ hasNext: () => boolean;
1650
+ hasPrev: () => boolean;
1651
+ length: number;
1652
+ pageSize: number;
1653
+ }
1654
+ export interface BookingPoliciesQueryResult extends QueryCursorResult {
1655
+ items: BookingPolicy[];
1656
+ query: BookingPoliciesQueryBuilder;
1657
+ next: () => Promise<BookingPoliciesQueryResult>;
1658
+ prev: () => Promise<BookingPoliciesQueryResult>;
1659
+ }
1660
+ export interface BookingPoliciesQueryBuilder {
1661
+ /** @param propertyName - Property whose value is compared with `value`.
1662
+ * @param value - Value to compare against.
1663
+ */
1664
+ eq: (propertyName: '_id' | 'name' | 'customPolicyDescription.enabled' | 'customPolicyDescription.description' | 'default' | 'limitEarlyBookingPolicy.enabled' | 'limitEarlyBookingPolicy.earliestBookingInMinutes' | 'limitLateBookingPolicy.enabled' | 'limitLateBookingPolicy.latestBookingInMinutes' | 'bookAfterStartPolicy.enabled' | 'cancellationPolicy.enabled' | 'cancellationPolicy.limitLatestCancellation' | 'cancellationPolicy.latestCancellationInMinutes' | 'reschedulePolicy.enabled' | 'reschedulePolicy.limitLatestReschedule' | 'reschedulePolicy.latestRescheduleInMinutes' | 'waitlistPolicy.enabled' | 'waitlistPolicy.capacity' | 'waitlistPolicy.reservationTimeInMinutes' | 'participantsPolicy.maxParticipantsPerBooking' | 'resourcesPolicy.enabled' | 'resourcesPolicy.autoAssignAllowed', value: any) => BookingPoliciesQueryBuilder;
1665
+ /** @param propertyName - Property whose value is compared with `value`.
1666
+ * @param value - Value to compare against.
1667
+ */
1668
+ ne: (propertyName: '_id' | 'name' | 'customPolicyDescription.enabled' | 'customPolicyDescription.description' | 'default' | 'limitEarlyBookingPolicy.enabled' | 'limitEarlyBookingPolicy.earliestBookingInMinutes' | 'limitLateBookingPolicy.enabled' | 'limitLateBookingPolicy.latestBookingInMinutes' | 'bookAfterStartPolicy.enabled' | 'cancellationPolicy.enabled' | 'cancellationPolicy.limitLatestCancellation' | 'cancellationPolicy.latestCancellationInMinutes' | 'reschedulePolicy.enabled' | 'reschedulePolicy.limitLatestReschedule' | 'reschedulePolicy.latestRescheduleInMinutes' | 'waitlistPolicy.enabled' | 'waitlistPolicy.capacity' | 'waitlistPolicy.reservationTimeInMinutes' | 'participantsPolicy.maxParticipantsPerBooking' | 'resourcesPolicy.enabled' | 'resourcesPolicy.autoAssignAllowed', value: any) => BookingPoliciesQueryBuilder;
1669
+ /** @param propertyName - Property whose value is compared with `value`.
1670
+ * @param value - Value to compare against.
1671
+ */
1672
+ ge: (propertyName: 'limitEarlyBookingPolicy.earliestBookingInMinutes' | 'limitLateBookingPolicy.latestBookingInMinutes' | 'cancellationPolicy.latestCancellationInMinutes' | 'reschedulePolicy.latestRescheduleInMinutes' | 'waitlistPolicy.capacity' | 'waitlistPolicy.reservationTimeInMinutes' | 'participantsPolicy.maxParticipantsPerBooking', value: any) => BookingPoliciesQueryBuilder;
1673
+ /** @param propertyName - Property whose value is compared with `value`.
1674
+ * @param value - Value to compare against.
1675
+ */
1676
+ gt: (propertyName: 'limitEarlyBookingPolicy.earliestBookingInMinutes' | 'limitLateBookingPolicy.latestBookingInMinutes' | 'cancellationPolicy.latestCancellationInMinutes' | 'reschedulePolicy.latestRescheduleInMinutes' | 'waitlistPolicy.capacity' | 'waitlistPolicy.reservationTimeInMinutes' | 'participantsPolicy.maxParticipantsPerBooking', value: any) => BookingPoliciesQueryBuilder;
1677
+ /** @param propertyName - Property whose value is compared with `value`.
1678
+ * @param value - Value to compare against.
1679
+ */
1680
+ le: (propertyName: 'limitEarlyBookingPolicy.earliestBookingInMinutes' | 'limitLateBookingPolicy.latestBookingInMinutes' | 'cancellationPolicy.latestCancellationInMinutes' | 'reschedulePolicy.latestRescheduleInMinutes' | 'waitlistPolicy.capacity' | 'waitlistPolicy.reservationTimeInMinutes' | 'participantsPolicy.maxParticipantsPerBooking', value: any) => BookingPoliciesQueryBuilder;
1681
+ /** @param propertyName - Property whose value is compared with `value`.
1682
+ * @param value - Value to compare against.
1683
+ */
1684
+ lt: (propertyName: 'limitEarlyBookingPolicy.earliestBookingInMinutes' | 'limitLateBookingPolicy.latestBookingInMinutes' | 'cancellationPolicy.latestCancellationInMinutes' | 'reschedulePolicy.latestRescheduleInMinutes' | 'waitlistPolicy.capacity' | 'waitlistPolicy.reservationTimeInMinutes' | 'participantsPolicy.maxParticipantsPerBooking', value: any) => BookingPoliciesQueryBuilder;
1685
+ /** @param propertyName - Property whose value is compared with `string`.
1686
+ * @param string - String to compare against. Case-insensitive.
1687
+ */
1688
+ startsWith: (propertyName: 'name' | 'customPolicyDescription.description', value: string) => BookingPoliciesQueryBuilder;
1689
+ in: (propertyName: '_id' | 'limitEarlyBookingPolicy.earliestBookingInMinutes' | 'limitLateBookingPolicy.latestBookingInMinutes' | 'cancellationPolicy.latestCancellationInMinutes' | 'reschedulePolicy.latestRescheduleInMinutes' | 'waitlistPolicy.capacity' | 'waitlistPolicy.reservationTimeInMinutes' | 'participantsPolicy.maxParticipantsPerBooking', value: any) => BookingPoliciesQueryBuilder;
1690
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
1691
+ ascending: (...propertyNames: Array<'_id' | 'name' | 'customPolicyDescription.enabled' | 'customPolicyDescription.description' | 'default' | 'limitEarlyBookingPolicy.enabled' | 'limitEarlyBookingPolicy.earliestBookingInMinutes' | 'limitLateBookingPolicy.enabled' | 'limitLateBookingPolicy.latestBookingInMinutes' | 'bookAfterStartPolicy.enabled' | 'cancellationPolicy.enabled' | 'cancellationPolicy.limitLatestCancellation' | 'cancellationPolicy.latestCancellationInMinutes' | 'reschedulePolicy.enabled' | 'reschedulePolicy.limitLatestReschedule' | 'reschedulePolicy.latestRescheduleInMinutes' | 'waitlistPolicy.enabled' | 'waitlistPolicy.capacity' | 'waitlistPolicy.reservationTimeInMinutes' | 'participantsPolicy.enabled' | 'participantsPolicy.maxParticipantsPerBooking' | 'resourcesPolicy.enabled' | 'resourcesPolicy.autoAssignAllowed'>) => BookingPoliciesQueryBuilder;
1692
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
1693
+ descending: (...propertyNames: Array<'_id' | 'name' | 'customPolicyDescription.enabled' | 'customPolicyDescription.description' | 'default' | 'limitEarlyBookingPolicy.enabled' | 'limitEarlyBookingPolicy.earliestBookingInMinutes' | 'limitLateBookingPolicy.enabled' | 'limitLateBookingPolicy.latestBookingInMinutes' | 'bookAfterStartPolicy.enabled' | 'cancellationPolicy.enabled' | 'cancellationPolicy.limitLatestCancellation' | 'cancellationPolicy.latestCancellationInMinutes' | 'reschedulePolicy.enabled' | 'reschedulePolicy.limitLatestReschedule' | 'reschedulePolicy.latestRescheduleInMinutes' | 'waitlistPolicy.enabled' | 'waitlistPolicy.capacity' | 'waitlistPolicy.reservationTimeInMinutes' | 'participantsPolicy.enabled' | 'participantsPolicy.maxParticipantsPerBooking' | 'resourcesPolicy.enabled' | 'resourcesPolicy.autoAssignAllowed'>) => BookingPoliciesQueryBuilder;
1694
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
1695
+ limit: (limit: number) => BookingPoliciesQueryBuilder;
1696
+ /** @param cursor - A pointer to specific record */
1697
+ skipTo: (cursor: string) => BookingPoliciesQueryBuilder;
1698
+ find: () => Promise<BookingPoliciesQueryResult>;
1699
+ }
1700
+ /**
1701
+ * Counts booking policies, given the provided filtering.
1702
+ *
1703
+ *
1704
+ * See *supported filters*
1705
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))
1706
+ * for a complete list of supported filters.
1707
+ * @public
1708
+ * @permissionId BOOKINGS.BOOKING_POLICY_READ
1709
+ * @permissionScope Read Bookings - Public Data
1710
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1711
+ * @permissionScope Manage Bookings Services and Settings
1712
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1713
+ * @permissionScope Manage Bookings
1714
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1715
+ * @permissionScope Read Bookings - Including Participants
1716
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1717
+ * @permissionScope Read Bookings - all read permissions
1718
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1719
+ * @permissionScope Manage Bookings - all permissions
1720
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1721
+ * @applicableIdentity APP
1722
+ * @applicableIdentity VISITOR
1723
+ * @fqn wix.bookings.v1.BookingPoliciesService.CountBookingPolicies
1724
+ */
1725
+ export declare function countBookingPolicies(options?: CountBookingPoliciesOptions): Promise<CountBookingPoliciesResponse & CountBookingPoliciesResponseNonNullableFields>;
1726
+ export interface CountBookingPoliciesOptions {
1727
+ /**
1728
+ * Filter to base the count on. See
1729
+ * supported filters*
1730
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))
1731
+ * for details.
1732
+ */
1733
+ filter?: Record<string, any> | null;
1734
+ }
1735
+ export {};