@wix/auto_sdk_bookings_booking-policies 1.0.18 → 1.0.19
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.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.js +49 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.d.ts +71 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.js +330 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js +180 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.d.ts +117 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.js +110 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1400 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.js +155 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
- package/build/{bookings-v1-booking-policy-booking-policies.universal-BOznK2N1.d.mts → cjs/src/bookings-v1-booking-policy-booking-policies.universal.d.ts} +406 -116
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js +584 -0
- package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.context.js +37 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.http.d.ts +71 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.http.js +319 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.js +146 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.public.d.ts +117 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.public.js +90 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1400 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.types.js +152 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
- package/build/{bookings-v1-booking-policy-booking-policies.universal-BOznK2N1.d.ts → es/src/bookings-v1-booking-policy-booking-policies.universal.d.ts} +406 -116
- package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.js +550 -0
- package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.js +49 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.d.ts +71 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.js +330 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js +180 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.d.ts +117 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.js +110 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1400 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.js +155 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
- package/build/internal/{bookings-v1-booking-policy-booking-policies.universal-BOznK2N1.d.ts → cjs/src/bookings-v1-booking-policy-booking-policies.universal.d.ts} +406 -116
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js +584 -0
- package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.d.ts +37 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.js +37 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.js.map +1 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.d.ts +71 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.js +319 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.js.map +1 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +28 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.js +146 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.js.map +1 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.d.ts +117 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.js +90 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.js.map +1 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.d.ts +1400 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.js +152 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.js.map +1 -0
- package/build/internal/{bookings-v1-booking-policy-booking-policies.universal-BOznK2N1.d.mts → es/src/bookings-v1-booking-policy-booking-policies.universal.d.ts} +406 -116
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.js +550 -0
- package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -143
- package/build/index.d.ts +0 -143
- package/build/index.js +0 -791
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -747
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -143
- package/build/internal/index.d.ts +0 -143
- package/build/internal/index.js +0 -791
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -747
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -543
- package/build/internal/meta.d.ts +0 -543
- package/build/internal/meta.js +0 -448
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -414
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -543
- package/build/meta.d.ts +0 -543
- package/build/meta.js +0 -448
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -414
- package/build/meta.mjs.map +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
1
2
|
/**
|
|
2
3
|
* A booking policy is a set of rules that determine how customers can book a
|
|
3
4
|
* service, including timeframes for booking, canceling, or rescheduling.
|
|
4
5
|
*/
|
|
5
|
-
interface BookingPolicy {
|
|
6
|
+
export interface BookingPolicy {
|
|
6
7
|
/**
|
|
7
8
|
* ID of the booking policy.
|
|
8
9
|
* @format GUID
|
|
@@ -69,7 +70,7 @@ interface BookingPolicy {
|
|
|
69
70
|
extendedFields?: ExtendedFields;
|
|
70
71
|
}
|
|
71
72
|
/** A description of the booking policy to display to participants. */
|
|
72
|
-
interface PolicyDescription {
|
|
73
|
+
export interface PolicyDescription {
|
|
73
74
|
/**
|
|
74
75
|
* Whether the description is displayed to the participant. `true` means the
|
|
75
76
|
* description is displayed.
|
|
@@ -87,7 +88,7 @@ interface PolicyDescription {
|
|
|
87
88
|
description?: string;
|
|
88
89
|
}
|
|
89
90
|
/** The rule for limiting early bookings. */
|
|
90
|
-
interface LimitEarlyBookingPolicy {
|
|
91
|
+
export interface LimitEarlyBookingPolicy {
|
|
91
92
|
/**
|
|
92
93
|
* Whether there's a limit about how early a customer can book. `false` means there's
|
|
93
94
|
* no limit to the earliest supported booking time.
|
|
@@ -110,7 +111,7 @@ interface LimitEarlyBookingPolicy {
|
|
|
110
111
|
*
|
|
111
112
|
* This rule and `bookAfterStartPolicy` can't be both enabled at the same time.
|
|
112
113
|
*/
|
|
113
|
-
interface LimitLateBookingPolicy {
|
|
114
|
+
export interface LimitLateBookingPolicy {
|
|
114
115
|
/**
|
|
115
116
|
* Whether there's a limit about how late customers can book. `false` means
|
|
116
117
|
* customers can book up to the last minute. If specified as `true`,
|
|
@@ -136,7 +137,7 @@ interface LimitLateBookingPolicy {
|
|
|
136
137
|
* This rule and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this rule
|
|
137
138
|
* is enabled, the `LimitLateBookingPolicy` rule must be disabled.
|
|
138
139
|
*/
|
|
139
|
-
interface BookAfterStartPolicy {
|
|
140
|
+
export interface BookAfterStartPolicy {
|
|
140
141
|
/**
|
|
141
142
|
* Whether customers can book after the session has started. `true` means
|
|
142
143
|
* customers can book after the session has started. For courses, this refers to
|
|
@@ -148,7 +149,7 @@ interface BookAfterStartPolicy {
|
|
|
148
149
|
enabled?: boolean;
|
|
149
150
|
}
|
|
150
151
|
/** The rule for canceling a booked session. */
|
|
151
|
-
interface CancellationPolicy {
|
|
152
|
+
export interface CancellationPolicy {
|
|
152
153
|
/**
|
|
153
154
|
* Whether customers can cancel the booking. `true` means customers can cancel
|
|
154
155
|
* the booking.
|
|
@@ -174,7 +175,7 @@ interface CancellationPolicy {
|
|
|
174
175
|
latestCancellationInMinutes?: number;
|
|
175
176
|
}
|
|
176
177
|
/** The rule for rescheduling a booked session. */
|
|
177
|
-
interface ReschedulePolicy {
|
|
178
|
+
export interface ReschedulePolicy {
|
|
178
179
|
/**
|
|
179
180
|
* Whether customers can reschedule a booking for an appointment-based service.
|
|
180
181
|
* `true` means customers can reschedule.
|
|
@@ -200,7 +201,7 @@ interface ReschedulePolicy {
|
|
|
200
201
|
latestRescheduleInMinutes?: number;
|
|
201
202
|
}
|
|
202
203
|
/** The rule for the waitlist. */
|
|
203
|
-
interface WaitlistPolicy {
|
|
204
|
+
export interface WaitlistPolicy {
|
|
204
205
|
/**
|
|
205
206
|
* Whether the service has a waitlist. `true` means there's a waitlist.
|
|
206
207
|
*
|
|
@@ -227,7 +228,7 @@ interface WaitlistPolicy {
|
|
|
227
228
|
reservationTimeInMinutes?: number;
|
|
228
229
|
}
|
|
229
230
|
/** The rule for the maximum number of participants per booking. */
|
|
230
|
-
interface ParticipantsPolicy {
|
|
231
|
+
export interface ParticipantsPolicy {
|
|
231
232
|
/**
|
|
232
233
|
* Maximum number of participants per booking.
|
|
233
234
|
*
|
|
@@ -238,7 +239,7 @@ interface ParticipantsPolicy {
|
|
|
238
239
|
maxParticipantsPerBooking?: number;
|
|
239
240
|
}
|
|
240
241
|
/** The rule regarding the allocation of resources (e.g. staff members). */
|
|
241
|
-
interface ResourcesPolicy {
|
|
242
|
+
export interface ResourcesPolicy {
|
|
242
243
|
/**
|
|
243
244
|
* Whether the customer must select a resource, for example a staff member, when
|
|
244
245
|
* booking. `false` means the customer can book without selecting a resource.
|
|
@@ -256,7 +257,7 @@ interface ResourcesPolicy {
|
|
|
256
257
|
*/
|
|
257
258
|
autoAssignAllowed?: boolean;
|
|
258
259
|
}
|
|
259
|
-
interface CancellationFeePolicy {
|
|
260
|
+
export interface CancellationFeePolicy {
|
|
260
261
|
/**
|
|
261
262
|
* Whether customers must pay a cancellation fee when canceling a booking.
|
|
262
263
|
*
|
|
@@ -281,7 +282,7 @@ interface CancellationFeePolicy {
|
|
|
281
282
|
* Money.
|
|
282
283
|
* Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
|
|
283
284
|
*/
|
|
284
|
-
interface Money {
|
|
285
|
+
export interface Money {
|
|
285
286
|
/**
|
|
286
287
|
* 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.
|
|
287
288
|
* @format DECIMAL_VALUE
|
|
@@ -300,7 +301,7 @@ interface Money {
|
|
|
300
301
|
*/
|
|
301
302
|
formattedValue?: string | null;
|
|
302
303
|
}
|
|
303
|
-
interface CancellationWindow extends CancellationWindowFeeOneOf {
|
|
304
|
+
export interface CancellationWindow extends CancellationWindowFeeOneOf {
|
|
304
305
|
/** Fixed amount customers must pay when canceling the booking within this window. */
|
|
305
306
|
amount?: Money;
|
|
306
307
|
/**
|
|
@@ -320,7 +321,7 @@ interface CancellationWindow extends CancellationWindowFeeOneOf {
|
|
|
320
321
|
startInMinutes?: number | null;
|
|
321
322
|
}
|
|
322
323
|
/** @oneof */
|
|
323
|
-
interface CancellationWindowFeeOneOf {
|
|
324
|
+
export interface CancellationWindowFeeOneOf {
|
|
324
325
|
/** Fixed amount customers must pay when canceling the booking within this window. */
|
|
325
326
|
amount?: Money;
|
|
326
327
|
/**
|
|
@@ -333,7 +334,7 @@ interface CancellationWindowFeeOneOf {
|
|
|
333
334
|
*/
|
|
334
335
|
percentage?: string;
|
|
335
336
|
}
|
|
336
|
-
interface SaveCreditCardPolicy {
|
|
337
|
+
export interface SaveCreditCardPolicy {
|
|
337
338
|
/**
|
|
338
339
|
* Whether Wix stores credit card details of the customer. Storing the details
|
|
339
340
|
* allows Wix to prefill the *eCommerce checkout*
|
|
@@ -345,7 +346,7 @@ interface SaveCreditCardPolicy {
|
|
|
345
346
|
*/
|
|
346
347
|
enabled?: boolean;
|
|
347
348
|
}
|
|
348
|
-
interface ExtendedFields {
|
|
349
|
+
export interface ExtendedFields {
|
|
349
350
|
/**
|
|
350
351
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
351
352
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -357,7 +358,7 @@ interface ExtendedFields {
|
|
|
357
358
|
namespaces?: Record<string, Record<string, any>>;
|
|
358
359
|
}
|
|
359
360
|
/** This event is triggered when a different booking policy has been set as the default policy. */
|
|
360
|
-
interface DefaultBookingPolicySet {
|
|
361
|
+
export interface DefaultBookingPolicySet {
|
|
361
362
|
/** The new default booking policy. */
|
|
362
363
|
currentDefaultBookingPolicy?: BookingPolicy;
|
|
363
364
|
/**
|
|
@@ -366,26 +367,26 @@ interface DefaultBookingPolicySet {
|
|
|
366
367
|
*/
|
|
367
368
|
previousDefaultBookingPolicy?: BookingPolicy;
|
|
368
369
|
}
|
|
369
|
-
interface CreateBookingPolicyRequest {
|
|
370
|
+
export interface CreateBookingPolicyRequest {
|
|
370
371
|
/** Booking policy to create. */
|
|
371
372
|
bookingPolicy: BookingPolicy;
|
|
372
373
|
}
|
|
373
|
-
interface CreateBookingPolicyResponse {
|
|
374
|
+
export interface CreateBookingPolicyResponse {
|
|
374
375
|
/** Created booking policy. */
|
|
375
376
|
bookingPolicy?: BookingPolicy;
|
|
376
377
|
}
|
|
377
|
-
interface GetBookingPolicyRequest {
|
|
378
|
+
export interface GetBookingPolicyRequest {
|
|
378
379
|
/**
|
|
379
380
|
* ID of the booking policy to retrieve.
|
|
380
381
|
* @format GUID
|
|
381
382
|
*/
|
|
382
383
|
bookingPolicyId: string;
|
|
383
384
|
}
|
|
384
|
-
interface GetBookingPolicyResponse {
|
|
385
|
+
export interface GetBookingPolicyResponse {
|
|
385
386
|
/** Retrieved booking policy. */
|
|
386
387
|
bookingPolicy?: BookingPolicy;
|
|
387
388
|
}
|
|
388
|
-
interface GetStrictestBookingPolicyRequest {
|
|
389
|
+
export interface GetStrictestBookingPolicyRequest {
|
|
389
390
|
/**
|
|
390
391
|
* IDs of the booking policies for which to retrieve the strictest rules for.
|
|
391
392
|
* @format GUID
|
|
@@ -393,7 +394,7 @@ interface GetStrictestBookingPolicyRequest {
|
|
|
393
394
|
*/
|
|
394
395
|
bookingPolicyIds: string[];
|
|
395
396
|
}
|
|
396
|
-
interface GetStrictestBookingPolicyResponse {
|
|
397
|
+
export interface GetStrictestBookingPolicyResponse {
|
|
397
398
|
/**
|
|
398
399
|
* Hypothetical `bookingPolicy` object that combines the strictest version of
|
|
399
400
|
* each rule. `bookingPolicy.id` is `null` and the returned object isn't actually
|
|
@@ -402,22 +403,22 @@ interface GetStrictestBookingPolicyResponse {
|
|
|
402
403
|
*/
|
|
403
404
|
bookingPolicy?: BookingPolicy;
|
|
404
405
|
}
|
|
405
|
-
interface UpdateBookingPolicyRequest {
|
|
406
|
+
export interface UpdateBookingPolicyRequest {
|
|
406
407
|
/** Booking policy to update. */
|
|
407
408
|
bookingPolicy: BookingPolicy;
|
|
408
409
|
}
|
|
409
|
-
interface UpdateBookingPolicyResponse {
|
|
410
|
+
export interface UpdateBookingPolicyResponse {
|
|
410
411
|
/** Updated booking policy. */
|
|
411
412
|
bookingPolicy?: BookingPolicy;
|
|
412
413
|
}
|
|
413
|
-
interface SetDefaultBookingPolicyRequest {
|
|
414
|
+
export interface SetDefaultBookingPolicyRequest {
|
|
414
415
|
/**
|
|
415
416
|
* ID of the booking policy that's set as default.
|
|
416
417
|
* @format GUID
|
|
417
418
|
*/
|
|
418
419
|
bookingPolicyId: string;
|
|
419
420
|
}
|
|
420
|
-
interface SetDefaultBookingPolicyResponse {
|
|
421
|
+
export interface SetDefaultBookingPolicyResponse {
|
|
421
422
|
/** New default booking policy. */
|
|
422
423
|
currentDefaultBookingPolicy?: BookingPolicy;
|
|
423
424
|
/**
|
|
@@ -426,16 +427,16 @@ interface SetDefaultBookingPolicyResponse {
|
|
|
426
427
|
*/
|
|
427
428
|
previousDefaultBookingPolicy?: BookingPolicy;
|
|
428
429
|
}
|
|
429
|
-
interface DeleteBookingPolicyRequest {
|
|
430
|
+
export interface DeleteBookingPolicyRequest {
|
|
430
431
|
/**
|
|
431
432
|
* ID of the booking policy to delete.
|
|
432
433
|
* @format GUID
|
|
433
434
|
*/
|
|
434
435
|
bookingPolicyId: string;
|
|
435
436
|
}
|
|
436
|
-
interface DeleteBookingPolicyResponse {
|
|
437
|
+
export interface DeleteBookingPolicyResponse {
|
|
437
438
|
}
|
|
438
|
-
interface QueryBookingPoliciesRequest {
|
|
439
|
+
export interface QueryBookingPoliciesRequest {
|
|
439
440
|
/**
|
|
440
441
|
* The query by which to select booking policies. See
|
|
441
442
|
* [the supported filters article](https://dev.wix.com/docs/rest/business-solutions/bookings/services/booking-policy/supported-filters)
|
|
@@ -443,7 +444,7 @@ interface QueryBookingPoliciesRequest {
|
|
|
443
444
|
*/
|
|
444
445
|
query: CursorQuery;
|
|
445
446
|
}
|
|
446
|
-
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
447
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
447
448
|
/** 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`. */
|
|
448
449
|
cursorPaging?: CursorPaging;
|
|
449
450
|
/**
|
|
@@ -463,11 +464,11 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
463
464
|
sort?: Sorting[];
|
|
464
465
|
}
|
|
465
466
|
/** @oneof */
|
|
466
|
-
interface CursorQueryPagingMethodOneOf {
|
|
467
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
467
468
|
/** 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`. */
|
|
468
469
|
cursorPaging?: CursorPaging;
|
|
469
470
|
}
|
|
470
|
-
interface Sorting {
|
|
471
|
+
export interface Sorting {
|
|
471
472
|
/**
|
|
472
473
|
* Name of the field to sort by.
|
|
473
474
|
* @maxLength 512
|
|
@@ -476,11 +477,11 @@ interface Sorting {
|
|
|
476
477
|
/** Sort order. */
|
|
477
478
|
order?: SortOrder;
|
|
478
479
|
}
|
|
479
|
-
declare enum SortOrder {
|
|
480
|
+
export declare enum SortOrder {
|
|
480
481
|
ASC = "ASC",
|
|
481
482
|
DESC = "DESC"
|
|
482
483
|
}
|
|
483
|
-
interface CursorPaging {
|
|
484
|
+
export interface CursorPaging {
|
|
484
485
|
/**
|
|
485
486
|
* Number of items to load.
|
|
486
487
|
* @max 100
|
|
@@ -496,13 +497,13 @@ interface CursorPaging {
|
|
|
496
497
|
*/
|
|
497
498
|
cursor?: string | null;
|
|
498
499
|
}
|
|
499
|
-
interface QueryBookingPoliciesResponse {
|
|
500
|
+
export interface QueryBookingPoliciesResponse {
|
|
500
501
|
/** Retrieved booking policies. */
|
|
501
502
|
bookingPolicies?: BookingPolicy[];
|
|
502
503
|
/** Paging metadata. */
|
|
503
504
|
pagingMetadata?: CursorPagingMetadata;
|
|
504
505
|
}
|
|
505
|
-
interface CursorPagingMetadata {
|
|
506
|
+
export interface CursorPagingMetadata {
|
|
506
507
|
/** Number of items returned in the response. */
|
|
507
508
|
count?: number | null;
|
|
508
509
|
/** Offset that was requested. */
|
|
@@ -514,7 +515,7 @@ interface CursorPagingMetadata {
|
|
|
514
515
|
*/
|
|
515
516
|
hasNext?: boolean | null;
|
|
516
517
|
}
|
|
517
|
-
interface Cursors {
|
|
518
|
+
export interface Cursors {
|
|
518
519
|
/**
|
|
519
520
|
* Cursor pointing to next page in the list of results.
|
|
520
521
|
* @maxLength 16000
|
|
@@ -526,7 +527,7 @@ interface Cursors {
|
|
|
526
527
|
*/
|
|
527
528
|
prev?: string | null;
|
|
528
529
|
}
|
|
529
|
-
interface CountBookingPoliciesRequest {
|
|
530
|
+
export interface CountBookingPoliciesRequest {
|
|
530
531
|
/**
|
|
531
532
|
* Filter to base the count on. See
|
|
532
533
|
* supported filters*
|
|
@@ -535,27 +536,27 @@ interface CountBookingPoliciesRequest {
|
|
|
535
536
|
*/
|
|
536
537
|
filter?: Record<string, any> | null;
|
|
537
538
|
}
|
|
538
|
-
interface CountBookingPoliciesResponse {
|
|
539
|
+
export interface CountBookingPoliciesResponse {
|
|
539
540
|
/** Number of booking policies matching the provided filter. */
|
|
540
541
|
count?: number;
|
|
541
542
|
}
|
|
542
|
-
interface UpdateAllPoliciesRequest {
|
|
543
|
+
export interface UpdateAllPoliciesRequest {
|
|
543
544
|
/** Fields to set to all booking policies. */
|
|
544
545
|
bookingPolicy?: BookingPolicy;
|
|
545
546
|
/** List of fields to update */
|
|
546
547
|
mask?: string[];
|
|
547
548
|
}
|
|
548
|
-
interface UpdateAllPoliciesResponse {
|
|
549
|
+
export interface UpdateAllPoliciesResponse {
|
|
549
550
|
}
|
|
550
|
-
interface CreateMissingDefaultPolicyRequest {
|
|
551
|
+
export interface CreateMissingDefaultPolicyRequest {
|
|
551
552
|
}
|
|
552
|
-
interface CreateMissingDefaultPolicyResponse {
|
|
553
|
+
export interface CreateMissingDefaultPolicyResponse {
|
|
553
554
|
/** The default booking policy. */
|
|
554
555
|
defaultBookingPolicy?: BookingPolicy;
|
|
555
556
|
/** Whether a new default policy was created. */
|
|
556
557
|
wasANewPolicyCreated?: boolean;
|
|
557
558
|
}
|
|
558
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
559
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
559
560
|
createdEvent?: EntityCreatedEvent;
|
|
560
561
|
updatedEvent?: EntityUpdatedEvent;
|
|
561
562
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -598,19 +599,19 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
598
599
|
entityEventSequence?: string | null;
|
|
599
600
|
}
|
|
600
601
|
/** @oneof */
|
|
601
|
-
interface DomainEventBodyOneOf {
|
|
602
|
+
export interface DomainEventBodyOneOf {
|
|
602
603
|
createdEvent?: EntityCreatedEvent;
|
|
603
604
|
updatedEvent?: EntityUpdatedEvent;
|
|
604
605
|
deletedEvent?: EntityDeletedEvent;
|
|
605
606
|
actionEvent?: ActionEvent;
|
|
606
607
|
}
|
|
607
|
-
interface EntityCreatedEvent {
|
|
608
|
+
export interface EntityCreatedEvent {
|
|
608
609
|
entity?: string;
|
|
609
610
|
}
|
|
610
|
-
interface RestoreInfo {
|
|
611
|
+
export interface RestoreInfo {
|
|
611
612
|
deletedDate?: Date | null;
|
|
612
613
|
}
|
|
613
|
-
interface EntityUpdatedEvent {
|
|
614
|
+
export interface EntityUpdatedEvent {
|
|
614
615
|
/**
|
|
615
616
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
616
617
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -618,17 +619,17 @@ interface EntityUpdatedEvent {
|
|
|
618
619
|
*/
|
|
619
620
|
currentEntity?: string;
|
|
620
621
|
}
|
|
621
|
-
interface EntityDeletedEvent {
|
|
622
|
+
export interface EntityDeletedEvent {
|
|
622
623
|
/** Entity that was deleted */
|
|
623
624
|
deletedEntity?: string | null;
|
|
624
625
|
}
|
|
625
|
-
interface ActionEvent {
|
|
626
|
+
export interface ActionEvent {
|
|
626
627
|
body?: string;
|
|
627
628
|
}
|
|
628
|
-
interface Empty {
|
|
629
|
+
export interface Empty {
|
|
629
630
|
}
|
|
630
631
|
/** Encapsulates all details written to the Greyhound topic when a site's properties are updated. */
|
|
631
|
-
interface SitePropertiesNotification {
|
|
632
|
+
export interface SitePropertiesNotification {
|
|
632
633
|
/** The site ID for which this update notification applies. */
|
|
633
634
|
metasiteId?: string;
|
|
634
635
|
/** The actual update event. */
|
|
@@ -642,7 +643,7 @@ interface SitePropertiesNotification {
|
|
|
642
643
|
changeContext?: ChangeContext;
|
|
643
644
|
}
|
|
644
645
|
/** The actual update event for a particular notification. */
|
|
645
|
-
interface SitePropertiesEvent {
|
|
646
|
+
export interface SitePropertiesEvent {
|
|
646
647
|
/** Version of the site's properties represented by this update. */
|
|
647
648
|
version?: number;
|
|
648
649
|
/** Set of properties that were updated - corresponds to the fields in "properties". */
|
|
@@ -650,7 +651,7 @@ interface SitePropertiesEvent {
|
|
|
650
651
|
/** Updated properties. */
|
|
651
652
|
properties?: Properties;
|
|
652
653
|
}
|
|
653
|
-
interface Properties {
|
|
654
|
+
export interface Properties {
|
|
654
655
|
/** Site categories. */
|
|
655
656
|
categories?: Categories;
|
|
656
657
|
/** Site locale. */
|
|
@@ -706,7 +707,7 @@ interface Properties {
|
|
|
706
707
|
/** Track clicks analytics. */
|
|
707
708
|
trackClicksAnalytics?: boolean;
|
|
708
709
|
}
|
|
709
|
-
interface Categories {
|
|
710
|
+
export interface Categories {
|
|
710
711
|
/** Primary site category. */
|
|
711
712
|
primary?: string;
|
|
712
713
|
/**
|
|
@@ -717,13 +718,13 @@ interface Categories {
|
|
|
717
718
|
/** Business Term Id */
|
|
718
719
|
businessTermId?: string | null;
|
|
719
720
|
}
|
|
720
|
-
interface Locale {
|
|
721
|
+
export interface Locale {
|
|
721
722
|
/** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
|
|
722
723
|
languageCode?: string;
|
|
723
724
|
/** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
|
|
724
725
|
country?: string;
|
|
725
726
|
}
|
|
726
|
-
interface Address {
|
|
727
|
+
export interface Address {
|
|
727
728
|
/** Street name. */
|
|
728
729
|
street?: string;
|
|
729
730
|
/** City name. */
|
|
@@ -755,27 +756,27 @@ interface Address {
|
|
|
755
756
|
* This is used for display purposes. Used to add additional data about the address, such as "In the passage".
|
|
756
757
|
* Free text. In addition, the user can state where to display the additional description - before, after, or instead of the address string.
|
|
757
758
|
*/
|
|
758
|
-
interface AddressHint {
|
|
759
|
+
export interface AddressHint {
|
|
759
760
|
/** Extra text displayed next to, or instead of, the actual address. */
|
|
760
761
|
text?: string;
|
|
761
762
|
/** Where the extra text should be displayed. */
|
|
762
763
|
placement?: PlacementType;
|
|
763
764
|
}
|
|
764
765
|
/** Where the extra text should be displayed: before, after or instead of the actual address. */
|
|
765
|
-
declare enum PlacementType {
|
|
766
|
+
export declare enum PlacementType {
|
|
766
767
|
BEFORE = "BEFORE",
|
|
767
768
|
AFTER = "AFTER",
|
|
768
769
|
REPLACE = "REPLACE"
|
|
769
770
|
}
|
|
770
771
|
/** Geocoordinates for a particular address. */
|
|
771
|
-
interface GeoCoordinates {
|
|
772
|
+
export interface GeoCoordinates {
|
|
772
773
|
/** Latitude of the location. Must be between -90 and 90. */
|
|
773
774
|
latitude?: number;
|
|
774
775
|
/** Longitude of the location. Must be between -180 and 180. */
|
|
775
776
|
longitude?: number;
|
|
776
777
|
}
|
|
777
778
|
/** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */
|
|
778
|
-
interface BusinessSchedule {
|
|
779
|
+
export interface BusinessSchedule {
|
|
779
780
|
/**
|
|
780
781
|
* Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods.
|
|
781
782
|
* @maxSize 100
|
|
@@ -788,7 +789,7 @@ interface BusinessSchedule {
|
|
|
788
789
|
specialHourPeriod?: SpecialHourPeriod[];
|
|
789
790
|
}
|
|
790
791
|
/** Weekly recurring time periods when the business is regularly open or the service is available. */
|
|
791
|
-
interface TimePeriod {
|
|
792
|
+
export interface TimePeriod {
|
|
792
793
|
/** Day of the week the period starts on. */
|
|
793
794
|
openDay?: DayOfWeek;
|
|
794
795
|
/**
|
|
@@ -807,7 +808,7 @@ interface TimePeriod {
|
|
|
807
808
|
closeTime?: string;
|
|
808
809
|
}
|
|
809
810
|
/** Enumerates the days of the week. */
|
|
810
|
-
declare enum DayOfWeek {
|
|
811
|
+
export declare enum DayOfWeek {
|
|
811
812
|
MONDAY = "MONDAY",
|
|
812
813
|
TUESDAY = "TUESDAY",
|
|
813
814
|
WEDNESDAY = "WEDNESDAY",
|
|
@@ -817,7 +818,7 @@ declare enum DayOfWeek {
|
|
|
817
818
|
SUNDAY = "SUNDAY"
|
|
818
819
|
}
|
|
819
820
|
/** Exception to the business's regular hours. The business can be open or closed during the exception. */
|
|
820
|
-
interface SpecialHourPeriod {
|
|
821
|
+
export interface SpecialHourPeriod {
|
|
821
822
|
/** 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). */
|
|
822
823
|
startDate?: string;
|
|
823
824
|
/** 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). */
|
|
@@ -831,7 +832,7 @@ interface SpecialHourPeriod {
|
|
|
831
832
|
/** Additional info about the exception. For example, "We close earlier on New Year's Eve." */
|
|
832
833
|
comment?: string;
|
|
833
834
|
}
|
|
834
|
-
interface Multilingual {
|
|
835
|
+
export interface Multilingual {
|
|
835
836
|
/**
|
|
836
837
|
* Supported languages list.
|
|
837
838
|
* @maxSize 200
|
|
@@ -840,7 +841,7 @@ interface Multilingual {
|
|
|
840
841
|
/** Whether to redirect to user language. */
|
|
841
842
|
autoRedirect?: boolean;
|
|
842
843
|
}
|
|
843
|
-
interface SupportedLanguage {
|
|
844
|
+
export interface SupportedLanguage {
|
|
844
845
|
/** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
|
|
845
846
|
languageCode?: string;
|
|
846
847
|
/** Locale. */
|
|
@@ -852,12 +853,12 @@ interface SupportedLanguage {
|
|
|
852
853
|
/** How the language will be resolved. For internal use. */
|
|
853
854
|
resolutionMethod?: ResolutionMethod;
|
|
854
855
|
}
|
|
855
|
-
declare enum ResolutionMethod {
|
|
856
|
+
export declare enum ResolutionMethod {
|
|
856
857
|
QUERY_PARAM = "QUERY_PARAM",
|
|
857
858
|
SUBDOMAIN = "SUBDOMAIN",
|
|
858
859
|
SUBDIRECTORY = "SUBDIRECTORY"
|
|
859
860
|
}
|
|
860
|
-
interface ConsentPolicy {
|
|
861
|
+
export interface ConsentPolicy {
|
|
861
862
|
/** Whether the site uses cookies that are essential to site operation. Always `true`. */
|
|
862
863
|
essential?: boolean | null;
|
|
863
864
|
/** Whether the site uses cookies that affect site performance and other functional measurements. */
|
|
@@ -870,7 +871,7 @@ interface ConsentPolicy {
|
|
|
870
871
|
dataToThirdParty?: boolean | null;
|
|
871
872
|
}
|
|
872
873
|
/** A single mapping from the MetaSite ID to a particular service. */
|
|
873
|
-
interface Translation {
|
|
874
|
+
export interface Translation {
|
|
874
875
|
/** The service type. */
|
|
875
876
|
serviceType?: string;
|
|
876
877
|
/** The application definition ID; this only applies to services of type ThirdPartyApps. */
|
|
@@ -878,7 +879,7 @@ interface Translation {
|
|
|
878
879
|
/** The instance ID of the service. */
|
|
879
880
|
instanceId?: string;
|
|
880
881
|
}
|
|
881
|
-
interface ChangeContext extends ChangeContextPayloadOneOf {
|
|
882
|
+
export interface ChangeContext extends ChangeContextPayloadOneOf {
|
|
882
883
|
/** Properties were updated. */
|
|
883
884
|
propertiesChange?: PropertiesChange;
|
|
884
885
|
/** Default properties were created on site creation. */
|
|
@@ -887,7 +888,7 @@ interface ChangeContext extends ChangeContextPayloadOneOf {
|
|
|
887
888
|
siteCloned?: SiteCloned;
|
|
888
889
|
}
|
|
889
890
|
/** @oneof */
|
|
890
|
-
interface ChangeContextPayloadOneOf {
|
|
891
|
+
export interface ChangeContextPayloadOneOf {
|
|
891
892
|
/** Properties were updated. */
|
|
892
893
|
propertiesChange?: PropertiesChange;
|
|
893
894
|
/** Default properties were created on site creation. */
|
|
@@ -895,17 +896,17 @@ interface ChangeContextPayloadOneOf {
|
|
|
895
896
|
/** Properties were cloned on site cloning. */
|
|
896
897
|
siteCloned?: SiteCloned;
|
|
897
898
|
}
|
|
898
|
-
interface PropertiesChange {
|
|
899
|
+
export interface PropertiesChange {
|
|
899
900
|
}
|
|
900
|
-
interface V4SiteCreated {
|
|
901
|
+
export interface V4SiteCreated {
|
|
901
902
|
/** Origin template site id. */
|
|
902
903
|
originTemplateId?: string | null;
|
|
903
904
|
}
|
|
904
|
-
interface SiteCloned {
|
|
905
|
+
export interface SiteCloned {
|
|
905
906
|
/** Origin site id. */
|
|
906
907
|
originMetaSiteId?: string;
|
|
907
908
|
}
|
|
908
|
-
interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
909
|
+
export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
909
910
|
/** Emitted on a meta site creation. */
|
|
910
911
|
siteCreated?: SiteCreated;
|
|
911
912
|
/** Emitted on a meta site transfer completion. */
|
|
@@ -963,7 +964,7 @@ interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
|
963
964
|
assets?: Asset[];
|
|
964
965
|
}
|
|
965
966
|
/** @oneof */
|
|
966
|
-
interface MetaSiteSpecialEventPayloadOneOf {
|
|
967
|
+
export interface MetaSiteSpecialEventPayloadOneOf {
|
|
967
968
|
/** Emitted on a meta site creation. */
|
|
968
969
|
siteCreated?: SiteCreated;
|
|
969
970
|
/** Emitted on a meta site transfer completion. */
|
|
@@ -1005,7 +1006,7 @@ interface MetaSiteSpecialEventPayloadOneOf {
|
|
|
1005
1006
|
/** Site is marked as PurgedExternally */
|
|
1006
1007
|
sitePurgedExternally?: SitePurgedExternally;
|
|
1007
1008
|
}
|
|
1008
|
-
interface Asset {
|
|
1009
|
+
export interface Asset {
|
|
1009
1010
|
/**
|
|
1010
1011
|
* An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).
|
|
1011
1012
|
* @maxLength 36
|
|
@@ -1019,14 +1020,14 @@ interface Asset {
|
|
|
1019
1020
|
/** An application state. */
|
|
1020
1021
|
state?: State;
|
|
1021
1022
|
}
|
|
1022
|
-
declare enum State {
|
|
1023
|
+
export declare enum State {
|
|
1023
1024
|
UNKNOWN = "UNKNOWN",
|
|
1024
1025
|
ENABLED = "ENABLED",
|
|
1025
1026
|
DISABLED = "DISABLED",
|
|
1026
1027
|
PENDING = "PENDING",
|
|
1027
1028
|
DEMO = "DEMO"
|
|
1028
1029
|
}
|
|
1029
|
-
interface SiteCreated {
|
|
1030
|
+
export interface SiteCreated {
|
|
1030
1031
|
/**
|
|
1031
1032
|
* A template identifier (empty if not created from a template).
|
|
1032
1033
|
* @maxLength 36
|
|
@@ -1055,7 +1056,7 @@ interface SiteCreated {
|
|
|
1055
1056
|
/** A namespace. */
|
|
1056
1057
|
namespace?: Namespace;
|
|
1057
1058
|
}
|
|
1058
|
-
declare enum SiteCreatedContext {
|
|
1059
|
+
export declare enum SiteCreatedContext {
|
|
1059
1060
|
/** A valid option, we don't expose all reasons why site might be created. */
|
|
1060
1061
|
OTHER = "OTHER",
|
|
1061
1062
|
/** A meta site was created from template. */
|
|
@@ -1069,7 +1070,7 @@ declare enum SiteCreatedContext {
|
|
|
1069
1070
|
/** deprecated A meta site was created for Flash editor. */
|
|
1070
1071
|
FLASH = "FLASH"
|
|
1071
1072
|
}
|
|
1072
|
-
declare enum Namespace {
|
|
1073
|
+
export declare enum Namespace {
|
|
1073
1074
|
UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
|
|
1074
1075
|
/** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
|
|
1075
1076
|
WIX = "WIX",
|
|
@@ -1152,7 +1153,7 @@ declare enum Namespace {
|
|
|
1152
1153
|
MIMIR = "MIMIR"
|
|
1153
1154
|
}
|
|
1154
1155
|
/** Site transferred to another user. */
|
|
1155
|
-
interface SiteTransferred {
|
|
1156
|
+
export interface SiteTransferred {
|
|
1156
1157
|
/**
|
|
1157
1158
|
* A previous owner id (user that transfers meta site).
|
|
1158
1159
|
* @format GUID
|
|
@@ -1165,11 +1166,11 @@ interface SiteTransferred {
|
|
|
1165
1166
|
newOwnerId?: string;
|
|
1166
1167
|
}
|
|
1167
1168
|
/** Soft deletion of the meta site. Could be restored. */
|
|
1168
|
-
interface SiteDeleted {
|
|
1169
|
+
export interface SiteDeleted {
|
|
1169
1170
|
/** A deletion context. */
|
|
1170
1171
|
deleteContext?: DeleteContext;
|
|
1171
1172
|
}
|
|
1172
|
-
interface DeleteContext {
|
|
1173
|
+
export interface DeleteContext {
|
|
1173
1174
|
/** When the meta site was deleted. */
|
|
1174
1175
|
dateDeleted?: Date | null;
|
|
1175
1176
|
/** A status. */
|
|
@@ -1185,7 +1186,7 @@ interface DeleteContext {
|
|
|
1185
1186
|
*/
|
|
1186
1187
|
initiatorId?: string | null;
|
|
1187
1188
|
}
|
|
1188
|
-
declare enum DeleteStatus {
|
|
1189
|
+
export declare enum DeleteStatus {
|
|
1189
1190
|
UNKNOWN = "UNKNOWN",
|
|
1190
1191
|
TRASH = "TRASH",
|
|
1191
1192
|
DELETED = "DELETED",
|
|
@@ -1193,12 +1194,12 @@ declare enum DeleteStatus {
|
|
|
1193
1194
|
PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
|
|
1194
1195
|
}
|
|
1195
1196
|
/** Restoration of the meta site. */
|
|
1196
|
-
interface SiteUndeleted {
|
|
1197
|
+
export interface SiteUndeleted {
|
|
1197
1198
|
}
|
|
1198
1199
|
/** First publish of a meta site. Or subsequent publish after unpublish. */
|
|
1199
|
-
interface SitePublished {
|
|
1200
|
+
export interface SitePublished {
|
|
1200
1201
|
}
|
|
1201
|
-
interface SiteUnpublished {
|
|
1202
|
+
export interface SiteUnpublished {
|
|
1202
1203
|
/**
|
|
1203
1204
|
* A list of URLs previously associated with the meta site.
|
|
1204
1205
|
* @maxLength 4000
|
|
@@ -1206,9 +1207,9 @@ interface SiteUnpublished {
|
|
|
1206
1207
|
*/
|
|
1207
1208
|
urls?: string[];
|
|
1208
1209
|
}
|
|
1209
|
-
interface SiteMarkedAsTemplate {
|
|
1210
|
+
export interface SiteMarkedAsTemplate {
|
|
1210
1211
|
}
|
|
1211
|
-
interface SiteMarkedAsWixSite {
|
|
1212
|
+
export interface SiteMarkedAsWixSite {
|
|
1212
1213
|
}
|
|
1213
1214
|
/**
|
|
1214
1215
|
* Represents a service provisioned a site.
|
|
@@ -1225,7 +1226,7 @@ interface SiteMarkedAsWixSite {
|
|
|
1225
1226
|
* changes made to the original template afterward.
|
|
1226
1227
|
* To ensure this, the TPA on the template gets a new instance_id.
|
|
1227
1228
|
*/
|
|
1228
|
-
interface ServiceProvisioned {
|
|
1229
|
+
export interface ServiceProvisioned {
|
|
1229
1230
|
/**
|
|
1230
1231
|
* Either UUID or EmbeddedServiceType.
|
|
1231
1232
|
* @maxLength 36
|
|
@@ -1252,7 +1253,7 @@ interface ServiceProvisioned {
|
|
|
1252
1253
|
*/
|
|
1253
1254
|
originMetaSiteId?: string | null;
|
|
1254
1255
|
}
|
|
1255
|
-
interface ServiceRemoved {
|
|
1256
|
+
export interface ServiceRemoved {
|
|
1256
1257
|
/**
|
|
1257
1258
|
* Either UUID or EmbeddedServiceType.
|
|
1258
1259
|
* @maxLength 36
|
|
@@ -1270,7 +1271,7 @@ interface ServiceRemoved {
|
|
|
1270
1271
|
version?: string | null;
|
|
1271
1272
|
}
|
|
1272
1273
|
/** Rename of the site. Meaning, free public url has been changed as well. */
|
|
1273
|
-
interface SiteRenamed {
|
|
1274
|
+
export interface SiteRenamed {
|
|
1274
1275
|
/**
|
|
1275
1276
|
* A new meta site name (URL slug).
|
|
1276
1277
|
* @maxLength 20
|
|
@@ -1287,21 +1288,21 @@ interface SiteRenamed {
|
|
|
1287
1288
|
*
|
|
1288
1289
|
* Could not be restored. Therefore it's desirable to cleanup data.
|
|
1289
1290
|
*/
|
|
1290
|
-
interface SiteHardDeleted {
|
|
1291
|
+
export interface SiteHardDeleted {
|
|
1291
1292
|
/** A deletion context. */
|
|
1292
1293
|
deleteContext?: DeleteContext;
|
|
1293
1294
|
}
|
|
1294
|
-
interface NamespaceChanged {
|
|
1295
|
+
export interface NamespaceChanged {
|
|
1295
1296
|
/** A previous namespace. */
|
|
1296
1297
|
oldNamespace?: Namespace;
|
|
1297
1298
|
/** A new namespace. */
|
|
1298
1299
|
newNamespace?: Namespace;
|
|
1299
1300
|
}
|
|
1300
1301
|
/** Assigned Studio editor */
|
|
1301
|
-
interface StudioAssigned {
|
|
1302
|
+
export interface StudioAssigned {
|
|
1302
1303
|
}
|
|
1303
1304
|
/** Unassigned Studio editor */
|
|
1304
|
-
interface StudioUnassigned {
|
|
1305
|
+
export interface StudioUnassigned {
|
|
1305
1306
|
}
|
|
1306
1307
|
/**
|
|
1307
1308
|
* Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.
|
|
@@ -1311,13 +1312,13 @@ interface StudioUnassigned {
|
|
|
1311
1312
|
*
|
|
1312
1313
|
* https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service
|
|
1313
1314
|
*/
|
|
1314
|
-
interface SiteUrlChanged {
|
|
1315
|
+
export interface SiteUrlChanged {
|
|
1315
1316
|
}
|
|
1316
1317
|
/**
|
|
1317
1318
|
* Used at the end of the deletion flow for both draft sites and when a user deletes a site.
|
|
1318
1319
|
* Consumed by other teams to remove relevant data.
|
|
1319
1320
|
*/
|
|
1320
|
-
interface SitePurgedExternally {
|
|
1321
|
+
export interface SitePurgedExternally {
|
|
1321
1322
|
/**
|
|
1322
1323
|
* @maxLength 2048
|
|
1323
1324
|
* @maxSize 100
|
|
@@ -1326,7 +1327,7 @@ interface SitePurgedExternally {
|
|
|
1326
1327
|
*/
|
|
1327
1328
|
appDefId?: string[];
|
|
1328
1329
|
}
|
|
1329
|
-
interface MessageEnvelope {
|
|
1330
|
+
export interface MessageEnvelope {
|
|
1330
1331
|
/**
|
|
1331
1332
|
* App instance ID.
|
|
1332
1333
|
* @format GUID
|
|
@@ -1342,7 +1343,7 @@ interface MessageEnvelope {
|
|
|
1342
1343
|
/** Stringify payload. */
|
|
1343
1344
|
data?: string;
|
|
1344
1345
|
}
|
|
1345
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1346
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1346
1347
|
/**
|
|
1347
1348
|
* ID of a site visitor that has not logged in to the site.
|
|
1348
1349
|
* @format GUID
|
|
@@ -1367,7 +1368,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
1367
1368
|
identityType?: WebhookIdentityType;
|
|
1368
1369
|
}
|
|
1369
1370
|
/** @oneof */
|
|
1370
|
-
interface IdentificationDataIdOneOf {
|
|
1371
|
+
export interface IdentificationDataIdOneOf {
|
|
1371
1372
|
/**
|
|
1372
1373
|
* ID of a site visitor that has not logged in to the site.
|
|
1373
1374
|
* @format GUID
|
|
@@ -1389,14 +1390,14 @@ interface IdentificationDataIdOneOf {
|
|
|
1389
1390
|
*/
|
|
1390
1391
|
appId?: string;
|
|
1391
1392
|
}
|
|
1392
|
-
declare enum WebhookIdentityType {
|
|
1393
|
+
export declare enum WebhookIdentityType {
|
|
1393
1394
|
UNKNOWN = "UNKNOWN",
|
|
1394
1395
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1395
1396
|
MEMBER = "MEMBER",
|
|
1396
1397
|
WIX_USER = "WIX_USER",
|
|
1397
1398
|
APP = "APP"
|
|
1398
1399
|
}
|
|
1399
|
-
interface BaseEventMetadata {
|
|
1400
|
+
export interface BaseEventMetadata {
|
|
1400
1401
|
/**
|
|
1401
1402
|
* App instance ID.
|
|
1402
1403
|
* @format GUID
|
|
@@ -1410,7 +1411,7 @@ interface BaseEventMetadata {
|
|
|
1410
1411
|
/** The identification type and identity data. */
|
|
1411
1412
|
identity?: IdentificationData;
|
|
1412
1413
|
}
|
|
1413
|
-
interface EventMetadata extends BaseEventMetadata {
|
|
1414
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
1414
1415
|
/**
|
|
1415
1416
|
* Unique event ID.
|
|
1416
1417
|
* Allows clients to ignore duplicate webhooks.
|
|
@@ -1448,22 +1449,205 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
1448
1449
|
*/
|
|
1449
1450
|
entityEventSequence?: string | null;
|
|
1450
1451
|
}
|
|
1451
|
-
interface BookingPolicyCreatedEnvelope {
|
|
1452
|
+
export interface BookingPolicyCreatedEnvelope {
|
|
1452
1453
|
entity: BookingPolicy;
|
|
1453
1454
|
metadata: EventMetadata;
|
|
1454
1455
|
}
|
|
1455
|
-
|
|
1456
|
+
/**
|
|
1457
|
+
* Triggered when a booking policy is created.
|
|
1458
|
+
* @permissionScope Read Bookings - Public Data
|
|
1459
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1460
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1461
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1462
|
+
* @permissionScope Manage Bookings
|
|
1463
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1464
|
+
* @permissionScope Read Bookings - Including Participants
|
|
1465
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1466
|
+
* @permissionScope Read Bookings - all read permissions
|
|
1467
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1468
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1469
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1470
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_READ
|
|
1471
|
+
* @webhook
|
|
1472
|
+
* @eventType wix.bookings.v1.booking_policy_created
|
|
1473
|
+
* @slug created
|
|
1474
|
+
*/
|
|
1475
|
+
export declare function onBookingPolicyCreated(handler: (event: BookingPolicyCreatedEnvelope) => void | Promise<void>): void;
|
|
1476
|
+
export interface BookingPolicyDefaultBookingPolicySetEnvelope {
|
|
1456
1477
|
data: DefaultBookingPolicySet;
|
|
1457
1478
|
metadata: EventMetadata;
|
|
1458
1479
|
}
|
|
1459
|
-
|
|
1480
|
+
/**
|
|
1481
|
+
* Triggered when the site's default policy changes. Then,
|
|
1482
|
+
* _Booking Policy Updated_
|
|
1483
|
+
* ([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))
|
|
1484
|
+
* is also triggered both for the new and the previous default policy.
|
|
1485
|
+
* @permissionScope Read Bookings - Public Data
|
|
1486
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1487
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1488
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1489
|
+
* @permissionScope Manage Bookings
|
|
1490
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1491
|
+
* @permissionScope Read Bookings - Including Participants
|
|
1492
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1493
|
+
* @permissionScope Read Bookings - all read permissions
|
|
1494
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1495
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1496
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1497
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_READ
|
|
1498
|
+
* @webhook
|
|
1499
|
+
* @eventType wix.bookings.v1.booking_policy_default_booking_policy_set
|
|
1500
|
+
* @slug default_booking_policy_set
|
|
1501
|
+
*/
|
|
1502
|
+
export declare function onBookingPolicyDefaultBookingPolicySet(handler: (event: BookingPolicyDefaultBookingPolicySetEnvelope) => void | Promise<void>): void;
|
|
1503
|
+
export interface BookingPolicyDeletedEnvelope {
|
|
1460
1504
|
metadata: EventMetadata;
|
|
1461
1505
|
}
|
|
1462
|
-
|
|
1506
|
+
/**
|
|
1507
|
+
* Triggered when a booking policy is deleted.
|
|
1508
|
+
* @permissionScope Read Bookings - Public Data
|
|
1509
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1510
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1511
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1512
|
+
* @permissionScope Manage Bookings
|
|
1513
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1514
|
+
* @permissionScope Read Bookings - Including Participants
|
|
1515
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1516
|
+
* @permissionScope Read Bookings - all read permissions
|
|
1517
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1518
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1519
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1520
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_READ
|
|
1521
|
+
* @webhook
|
|
1522
|
+
* @eventType wix.bookings.v1.booking_policy_deleted
|
|
1523
|
+
* @slug deleted
|
|
1524
|
+
*/
|
|
1525
|
+
export declare function onBookingPolicyDeleted(handler: (event: BookingPolicyDeletedEnvelope) => void | Promise<void>): void;
|
|
1526
|
+
export interface BookingPolicyUpdatedEnvelope {
|
|
1463
1527
|
entity: BookingPolicy;
|
|
1464
1528
|
metadata: EventMetadata;
|
|
1465
1529
|
}
|
|
1466
|
-
|
|
1530
|
+
/**
|
|
1531
|
+
* Triggered when a booking policy is updated, including when a policy's
|
|
1532
|
+
* `default` attribute changes.
|
|
1533
|
+
* @permissionScope Read Bookings - Public Data
|
|
1534
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1535
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1536
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1537
|
+
* @permissionScope Manage Bookings
|
|
1538
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1539
|
+
* @permissionScope Read Bookings - Including Participants
|
|
1540
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1541
|
+
* @permissionScope Read Bookings - all read permissions
|
|
1542
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1543
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1544
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1545
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_READ
|
|
1546
|
+
* @webhook
|
|
1547
|
+
* @eventType wix.bookings.v1.booking_policy_updated
|
|
1548
|
+
* @slug updated
|
|
1549
|
+
*/
|
|
1550
|
+
export declare function onBookingPolicyUpdated(handler: (event: BookingPolicyUpdatedEnvelope) => void | Promise<void>): void;
|
|
1551
|
+
type BookingPolicyNonNullablePaths = `customPolicyDescription.enabled` | `customPolicyDescription.description` | `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` | `cancellationFeePolicy.enabled` | `cancellationFeePolicy.cancellationWindows` | `cancellationFeePolicy.cancellationWindows.${number}.amount.value` | `cancellationFeePolicy.cancellationWindows.${number}.amount.currency` | `cancellationFeePolicy.cancellationWindows.${number}.percentage` | `saveCreditCardPolicy.enabled`;
|
|
1552
|
+
/**
|
|
1553
|
+
* Creates a booking policy.
|
|
1554
|
+
* @param bookingPolicy - Booking policy to create.
|
|
1555
|
+
* @public
|
|
1556
|
+
* @requiredField bookingPolicy
|
|
1557
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_CREATE
|
|
1558
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1559
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1560
|
+
* @permissionScope Manage Bookings
|
|
1561
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1562
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1563
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1564
|
+
* @applicableIdentity APP
|
|
1565
|
+
* @returns Created booking policy.
|
|
1566
|
+
* @fqn wix.bookings.v1.BookingPoliciesService.CreateBookingPolicy
|
|
1567
|
+
*/
|
|
1568
|
+
export declare function createBookingPolicy(bookingPolicy: BookingPolicy): Promise<NonNullablePaths<BookingPolicy, BookingPolicyNonNullablePaths>>;
|
|
1569
|
+
/**
|
|
1570
|
+
* Retrieves a booking policy.
|
|
1571
|
+
* @param bookingPolicyId - ID of the booking policy to retrieve.
|
|
1572
|
+
* @public
|
|
1573
|
+
* @requiredField bookingPolicyId
|
|
1574
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_READ
|
|
1575
|
+
* @permissionScope Read Bookings - Public Data
|
|
1576
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1577
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1578
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1579
|
+
* @permissionScope Manage Bookings
|
|
1580
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1581
|
+
* @permissionScope Read Bookings - Including Participants
|
|
1582
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1583
|
+
* @permissionScope Read Bookings - all read permissions
|
|
1584
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1585
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1586
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1587
|
+
* @applicableIdentity APP
|
|
1588
|
+
* @applicableIdentity VISITOR
|
|
1589
|
+
* @returns Retrieved booking policy.
|
|
1590
|
+
* @fqn wix.bookings.v1.BookingPoliciesService.GetBookingPolicy
|
|
1591
|
+
*/
|
|
1592
|
+
export declare function getBookingPolicy(bookingPolicyId: string): Promise<NonNullablePaths<BookingPolicy, BookingPolicyNonNullablePaths>>;
|
|
1593
|
+
/**
|
|
1594
|
+
* Retrieves the strictest version of each policy rule from a list of booking
|
|
1595
|
+
* policies.
|
|
1596
|
+
*
|
|
1597
|
+
*
|
|
1598
|
+
* Returns a hypothetical `bookingPolicy` object that combines the strictest
|
|
1599
|
+
* version of each rule. The `id` of the returned policy is `null` and no
|
|
1600
|
+
* corresponding `bookingPolicy` object is created. To create a new policy, you
|
|
1601
|
+
* can call *Create Booking Policy*
|
|
1602
|
+
* ([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)).
|
|
1603
|
+
* @param bookingPolicyIds - IDs of the booking policies for which to retrieve the strictest rules for.
|
|
1604
|
+
* @public
|
|
1605
|
+
* @requiredField bookingPolicyIds
|
|
1606
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_READ
|
|
1607
|
+
* @permissionScope Read Bookings - Public Data
|
|
1608
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1609
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1610
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1611
|
+
* @permissionScope Manage Bookings
|
|
1612
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1613
|
+
* @permissionScope Read Bookings - Including Participants
|
|
1614
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1615
|
+
* @permissionScope Read Bookings - all read permissions
|
|
1616
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1617
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1618
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1619
|
+
* @applicableIdentity APP
|
|
1620
|
+
* @applicableIdentity VISITOR
|
|
1621
|
+
* @fqn wix.bookings.v1.BookingPoliciesService.GetStrictestBookingPolicy
|
|
1622
|
+
*/
|
|
1623
|
+
export declare function getStrictestBookingPolicy(bookingPolicyIds: string[]): Promise<NonNullablePaths<GetStrictestBookingPolicyResponse, {
|
|
1624
|
+
[P in BookingPolicyNonNullablePaths]: `bookingPolicy.${P}`;
|
|
1625
|
+
}[BookingPolicyNonNullablePaths]>>;
|
|
1626
|
+
/**
|
|
1627
|
+
* Updates a booking policy.
|
|
1628
|
+
*
|
|
1629
|
+
*
|
|
1630
|
+
* Each time the booking policy is updated, `revision` increments by 1.
|
|
1631
|
+
* The current `revision` must be specified when updating the booking policy.
|
|
1632
|
+
* This ensures you're working with the latest booking policy and prevents unintended overwrites.
|
|
1633
|
+
* @param _id - ID of the booking policy.
|
|
1634
|
+
* @public
|
|
1635
|
+
* @requiredField _id
|
|
1636
|
+
* @requiredField bookingPolicy
|
|
1637
|
+
* @requiredField bookingPolicy.revision
|
|
1638
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_UPDATE
|
|
1639
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1640
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1641
|
+
* @permissionScope Manage Bookings
|
|
1642
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1643
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1644
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1645
|
+
* @applicableIdentity APP
|
|
1646
|
+
* @returns Updated booking policy.
|
|
1647
|
+
* @fqn wix.bookings.v1.BookingPoliciesService.UpdateBookingPolicy
|
|
1648
|
+
*/
|
|
1649
|
+
export declare function updateBookingPolicy(_id: string, bookingPolicy: NonNullablePaths<UpdateBookingPolicy, `revision`>): Promise<NonNullablePaths<BookingPolicy, BookingPolicyNonNullablePaths>>;
|
|
1650
|
+
export interface UpdateBookingPolicy {
|
|
1467
1651
|
/**
|
|
1468
1652
|
* ID of the booking policy.
|
|
1469
1653
|
* @format GUID
|
|
@@ -1529,6 +1713,87 @@ interface UpdateBookingPolicy {
|
|
|
1529
1713
|
/** Extensions enabling users to save custom data related to the booking policies. */
|
|
1530
1714
|
extendedFields?: ExtendedFields;
|
|
1531
1715
|
}
|
|
1716
|
+
/**
|
|
1717
|
+
* Sets a booking policy as the default.
|
|
1718
|
+
*
|
|
1719
|
+
*
|
|
1720
|
+
* Also updates the site's current default policy by setting its `default`
|
|
1721
|
+
* attribute to `false`. If the provided policy is already the site's
|
|
1722
|
+
* default, the call succeeds without changing any `bookingPolicy` object.
|
|
1723
|
+
* @param bookingPolicyId - ID of the booking policy that's set as default.
|
|
1724
|
+
* @public
|
|
1725
|
+
* @requiredField bookingPolicyId
|
|
1726
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_SET_DEFAULT
|
|
1727
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1728
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1729
|
+
* @permissionScope Manage Bookings
|
|
1730
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1731
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1732
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1733
|
+
* @applicableIdentity APP
|
|
1734
|
+
* @fqn wix.bookings.v1.BookingPoliciesService.SetDefaultBookingPolicy
|
|
1735
|
+
*/
|
|
1736
|
+
export declare function setDefaultBookingPolicy(bookingPolicyId: string): Promise<NonNullablePaths<SetDefaultBookingPolicyResponse, {
|
|
1737
|
+
[P in BookingPolicyNonNullablePaths]: `currentDefaultBookingPolicy.${P}`;
|
|
1738
|
+
}[BookingPolicyNonNullablePaths] | {
|
|
1739
|
+
[P in BookingPolicyNonNullablePaths]: `previousDefaultBookingPolicy.${P}`;
|
|
1740
|
+
}[BookingPolicyNonNullablePaths]>>;
|
|
1741
|
+
/**
|
|
1742
|
+
* Deletes a booking policy.
|
|
1743
|
+
*
|
|
1744
|
+
*
|
|
1745
|
+
* You can't delete the default policy without first *setting a different policy as default*
|
|
1746
|
+
* ([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)).
|
|
1747
|
+
* @param bookingPolicyId - ID of the booking policy to delete.
|
|
1748
|
+
* @public
|
|
1749
|
+
* @requiredField bookingPolicyId
|
|
1750
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_DELETE
|
|
1751
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1752
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1753
|
+
* @permissionScope Manage Bookings
|
|
1754
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1755
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1756
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1757
|
+
* @applicableIdentity APP
|
|
1758
|
+
* @fqn wix.bookings.v1.BookingPoliciesService.DeleteBookingPolicy
|
|
1759
|
+
*/
|
|
1760
|
+
export declare function deleteBookingPolicy(bookingPolicyId: string): Promise<void>;
|
|
1761
|
+
/**
|
|
1762
|
+
* Creates a query to retrieve a list of `bookingPolicy` objects.
|
|
1763
|
+
*
|
|
1764
|
+
* The `queryBookingPolicies()` function builds a query to retrieve a list of `bookingPolicy` objects and returns a `BookingPoliciesQueryBuilder` object.
|
|
1765
|
+
*
|
|
1766
|
+
* The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/booking-policies-query-builder/find) function.
|
|
1767
|
+
*
|
|
1768
|
+
* You can refine the query by chaining `BookingPoliciesQueryBuilder` functions onto the query. `BookingPoliciesQueryBuilder` functions enable you to sort, filter, and control the results that `queryBookingPolicies()` returns.
|
|
1769
|
+
*
|
|
1770
|
+
* `queryBookingPolicies()` runs with the following `BookingPoliciesQueryBuilder` defaults that you can override:
|
|
1771
|
+
*
|
|
1772
|
+
* + `limit` is `50`.
|
|
1773
|
+
* + Sorted by `createdDate` in ascending order.
|
|
1774
|
+
*
|
|
1775
|
+
* The functions that are chained to `queryBookingPolicies()` are applied in the order they are called. For example, if you apply `ascending("waitlistPolicy.capacity")` and then `ascending("name")`, the results are sorted first by `waitlistPolicy.capacity`, and then, if there are multiple results with the same `waitlistPolicy.capacity`, the items are sorted by `name`.
|
|
1776
|
+
*
|
|
1777
|
+
* The following `BookingPoliciesQueryBuilder` functions are supported for the `queryBookingPolicies()` function. For a full description of the `bookingPolicy` object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/booking-policies-query-result/items) property in `BookingPoliciesQueryResult`.
|
|
1778
|
+
* @public
|
|
1779
|
+
* @permissionScope Read Bookings - Public Data
|
|
1780
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1781
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1782
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1783
|
+
* @permissionScope Manage Bookings
|
|
1784
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1785
|
+
* @permissionScope Read Bookings - Including Participants
|
|
1786
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1787
|
+
* @permissionScope Read Bookings - all read permissions
|
|
1788
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1789
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1790
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1791
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_READ
|
|
1792
|
+
* @applicableIdentity APP
|
|
1793
|
+
* @applicableIdentity VISITOR
|
|
1794
|
+
* @fqn wix.bookings.v1.BookingPoliciesService.QueryBookingPolicies
|
|
1795
|
+
*/
|
|
1796
|
+
export declare function queryBookingPolicies(): BookingPoliciesQueryBuilder;
|
|
1532
1797
|
interface QueryCursorResult {
|
|
1533
1798
|
cursors: Cursors;
|
|
1534
1799
|
hasNext: () => boolean;
|
|
@@ -1536,13 +1801,13 @@ interface QueryCursorResult {
|
|
|
1536
1801
|
length: number;
|
|
1537
1802
|
pageSize: number;
|
|
1538
1803
|
}
|
|
1539
|
-
interface BookingPoliciesQueryResult extends QueryCursorResult {
|
|
1804
|
+
export interface BookingPoliciesQueryResult extends QueryCursorResult {
|
|
1540
1805
|
items: BookingPolicy[];
|
|
1541
1806
|
query: BookingPoliciesQueryBuilder;
|
|
1542
1807
|
next: () => Promise<BookingPoliciesQueryResult>;
|
|
1543
1808
|
prev: () => Promise<BookingPoliciesQueryResult>;
|
|
1544
1809
|
}
|
|
1545
|
-
interface BookingPoliciesQueryBuilder {
|
|
1810
|
+
export interface BookingPoliciesQueryBuilder {
|
|
1546
1811
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1547
1812
|
* @param value - Value to compare against.
|
|
1548
1813
|
*/
|
|
@@ -1582,7 +1847,33 @@ interface BookingPoliciesQueryBuilder {
|
|
|
1582
1847
|
skipTo: (cursor: string) => BookingPoliciesQueryBuilder;
|
|
1583
1848
|
find: () => Promise<BookingPoliciesQueryResult>;
|
|
1584
1849
|
}
|
|
1585
|
-
|
|
1850
|
+
/**
|
|
1851
|
+
* Counts booking policies, given the provided filtering.
|
|
1852
|
+
*
|
|
1853
|
+
*
|
|
1854
|
+
* See *supported filters*
|
|
1855
|
+
* ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))
|
|
1856
|
+
* for a complete list of supported filters.
|
|
1857
|
+
* @public
|
|
1858
|
+
* @permissionId BOOKINGS.BOOKING_POLICY_READ
|
|
1859
|
+
* @permissionScope Read Bookings - Public Data
|
|
1860
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1861
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
1862
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1863
|
+
* @permissionScope Manage Bookings
|
|
1864
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1865
|
+
* @permissionScope Read Bookings - Including Participants
|
|
1866
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1867
|
+
* @permissionScope Read Bookings - all read permissions
|
|
1868
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1869
|
+
* @permissionScope Manage Bookings - all permissions
|
|
1870
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1871
|
+
* @applicableIdentity APP
|
|
1872
|
+
* @applicableIdentity VISITOR
|
|
1873
|
+
* @fqn wix.bookings.v1.BookingPoliciesService.CountBookingPolicies
|
|
1874
|
+
*/
|
|
1875
|
+
export declare function countBookingPolicies(options?: CountBookingPoliciesOptions): Promise<NonNullablePaths<CountBookingPoliciesResponse, `count`>>;
|
|
1876
|
+
export interface CountBookingPoliciesOptions {
|
|
1586
1877
|
/**
|
|
1587
1878
|
* Filter to base the count on. See
|
|
1588
1879
|
* supported filters*
|
|
@@ -1591,5 +1882,4 @@ interface CountBookingPoliciesOptions {
|
|
|
1591
1882
|
*/
|
|
1592
1883
|
filter?: Record<string, any> | null;
|
|
1593
1884
|
}
|
|
1594
|
-
|
|
1595
|
-
export { type CreateMissingDefaultPolicyRequest as $, type SetDefaultBookingPolicyRequest as A, type BookingPolicy as B, type CountBookingPoliciesOptions as C, DayOfWeek as D, type ExtendedFields as E, type DeleteBookingPolicyRequest as F, type GetStrictestBookingPolicyResponse as G, type DeleteBookingPolicyResponse as H, type CursorQuery as I, type CursorQueryPagingMethodOneOf as J, type Sorting as K, type LimitEarlyBookingPolicy as L, type Money as M, Namespace as N, type CursorPaging as O, PlacementType as P, type QueryBookingPoliciesRequest as Q, ResolutionMethod as R, type SetDefaultBookingPolicyResponse as S, type QueryBookingPoliciesResponse as T, type UpdateBookingPolicy as U, type CursorPagingMetadata as V, WebhookIdentityType as W, type Cursors as X, type CountBookingPoliciesRequest as Y, type UpdateAllPoliciesRequest as Z, type UpdateAllPoliciesResponse as _, type BookingPoliciesQueryBuilder as a, type CreateMissingDefaultPolicyResponse as a0, type DomainEvent as a1, type DomainEventBodyOneOf as a2, type EntityCreatedEvent as a3, type RestoreInfo as a4, type EntityUpdatedEvent as a5, type EntityDeletedEvent as a6, type ActionEvent as a7, type Empty as a8, type SitePropertiesNotification as a9, type SiteUndeleted as aA, type SitePublished as aB, type SiteUnpublished as aC, type SiteMarkedAsTemplate as aD, type SiteMarkedAsWixSite as aE, type ServiceProvisioned as aF, type ServiceRemoved as aG, type SiteRenamed as aH, type SiteHardDeleted as aI, type NamespaceChanged as aJ, type StudioAssigned as aK, type StudioUnassigned as aL, type SiteUrlChanged as aM, type SitePurgedExternally as aN, type MessageEnvelope as aO, type IdentificationData as aP, type IdentificationDataIdOneOf as aQ, type BaseEventMetadata as aR, type EventMetadata as aS, type BookingPolicyCreatedEnvelope as aT, type BookingPolicyDefaultBookingPolicySetEnvelope as aU, type BookingPolicyDeletedEnvelope as aV, type BookingPolicyUpdatedEnvelope as aW, type BookingPoliciesQueryResult as aX, type SitePropertiesEvent as aa, type Properties as ab, type Categories as ac, type Locale as ad, type Address as ae, type AddressHint as af, type GeoCoordinates as ag, type BusinessSchedule as ah, type TimePeriod as ai, type SpecialHourPeriod as aj, type Multilingual as ak, type SupportedLanguage as al, type ConsentPolicy as am, type Translation as an, type ChangeContext as ao, type ChangeContextPayloadOneOf as ap, type PropertiesChange as aq, type V4SiteCreated as ar, type SiteCloned as as, type MetaSiteSpecialEvent as at, type MetaSiteSpecialEventPayloadOneOf as au, type Asset as av, type SiteCreated as aw, type SiteTransferred as ax, type SiteDeleted as ay, type DeleteContext as az, type CountBookingPoliciesResponse as b, SortOrder as c, State as d, SiteCreatedContext as e, DeleteStatus as f, type PolicyDescription as g, type LimitLateBookingPolicy as h, type BookAfterStartPolicy as i, type CancellationPolicy as j, type ReschedulePolicy as k, type WaitlistPolicy as l, type ParticipantsPolicy as m, type ResourcesPolicy as n, type CancellationFeePolicy as o, type CancellationWindow as p, type CancellationWindowFeeOneOf as q, type SaveCreditCardPolicy as r, type DefaultBookingPolicySet as s, type CreateBookingPolicyRequest as t, type CreateBookingPolicyResponse as u, type GetBookingPolicyRequest as v, type GetBookingPolicyResponse as w, type GetStrictestBookingPolicyRequest as x, type UpdateBookingPolicyRequest as y, type UpdateBookingPolicyResponse as z };
|
|
1885
|
+
export {};
|