@wix/auto_sdk_bookings_booking-policies 1.0.30 → 1.0.32

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 (133) hide show
  1. package/build/{internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.d.ts → bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.mts} +131 -435
  2. package/build/{cjs/src/bookings-v1-booking-policy-booking-policies.universal.d.ts → bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.ts} +131 -435
  3. package/build/index.d.mts +146 -0
  4. package/build/index.d.ts +146 -0
  5. package/build/index.js +794 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +750 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{es/src/bookings-v1-booking-policy-booking-policies.universal.d.ts → bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.mts} +131 -435
  10. package/build/{es/src/bookings-v1-booking-policy-booking-policies.universal.d.ts → internal/bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.d.ts} +131 -435
  11. package/build/internal/index.d.mts +146 -0
  12. package/build/internal/index.d.ts +146 -0
  13. package/build/internal/index.js +794 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +750 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +545 -0
  18. package/build/internal/meta.d.ts +545 -0
  19. package/build/internal/meta.js +448 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +414 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +545 -0
  24. package/build/meta.d.ts +545 -0
  25. package/build/meta.js +448 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +414 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.d.ts +0 -37
  40. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.js +0 -49
  41. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.context.js.map +0 -1
  42. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.d.ts +0 -71
  43. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.js +0 -330
  44. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.http.js.map +0 -1
  45. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +0 -28
  46. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js +0 -180
  47. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js.map +0 -1
  48. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.d.ts +0 -117
  49. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.js +0 -110
  50. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.public.js.map +0 -1
  51. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.d.ts +0 -1436
  52. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.js +0 -155
  53. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.types.js.map +0 -1
  54. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js +0 -594
  55. package/build/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/src/bookings-v1-booking-policy-booking-policies.context.d.ts +0 -37
  66. package/build/es/src/bookings-v1-booking-policy-booking-policies.context.js +0 -37
  67. package/build/es/src/bookings-v1-booking-policy-booking-policies.context.js.map +0 -1
  68. package/build/es/src/bookings-v1-booking-policy-booking-policies.http.d.ts +0 -71
  69. package/build/es/src/bookings-v1-booking-policy-booking-policies.http.js +0 -319
  70. package/build/es/src/bookings-v1-booking-policy-booking-policies.http.js.map +0 -1
  71. package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +0 -28
  72. package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.js +0 -146
  73. package/build/es/src/bookings-v1-booking-policy-booking-policies.meta.js.map +0 -1
  74. package/build/es/src/bookings-v1-booking-policy-booking-policies.public.d.ts +0 -117
  75. package/build/es/src/bookings-v1-booking-policy-booking-policies.public.js +0 -90
  76. package/build/es/src/bookings-v1-booking-policy-booking-policies.public.js.map +0 -1
  77. package/build/es/src/bookings-v1-booking-policy-booking-policies.types.d.ts +0 -1436
  78. package/build/es/src/bookings-v1-booking-policy-booking-policies.types.js +0 -152
  79. package/build/es/src/bookings-v1-booking-policy-booking-policies.types.js.map +0 -1
  80. package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.js +0 -560
  81. package/build/es/src/bookings-v1-booking-policy-booking-policies.universal.js.map +0 -1
  82. package/build/internal/cjs/index.d.ts +0 -1
  83. package/build/internal/cjs/index.js +0 -18
  84. package/build/internal/cjs/index.js.map +0 -1
  85. package/build/internal/cjs/index.typings.d.ts +0 -1
  86. package/build/internal/cjs/index.typings.js +0 -18
  87. package/build/internal/cjs/index.typings.js.map +0 -1
  88. package/build/internal/cjs/meta.d.ts +0 -1
  89. package/build/internal/cjs/meta.js +0 -18
  90. package/build/internal/cjs/meta.js.map +0 -1
  91. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.d.ts +0 -37
  92. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.js +0 -49
  93. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.context.js.map +0 -1
  94. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.d.ts +0 -71
  95. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.js +0 -330
  96. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.http.js.map +0 -1
  97. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +0 -28
  98. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js +0 -180
  99. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.meta.js.map +0 -1
  100. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.d.ts +0 -117
  101. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.js +0 -110
  102. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.public.js.map +0 -1
  103. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.d.ts +0 -1436
  104. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.js +0 -155
  105. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.types.js.map +0 -1
  106. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js +0 -594
  107. package/build/internal/cjs/src/bookings-v1-booking-policy-booking-policies.universal.js.map +0 -1
  108. package/build/internal/es/index.d.ts +0 -1
  109. package/build/internal/es/index.js +0 -2
  110. package/build/internal/es/index.js.map +0 -1
  111. package/build/internal/es/index.typings.d.ts +0 -1
  112. package/build/internal/es/index.typings.js +0 -2
  113. package/build/internal/es/index.typings.js.map +0 -1
  114. package/build/internal/es/meta.d.ts +0 -1
  115. package/build/internal/es/meta.js +0 -2
  116. package/build/internal/es/meta.js.map +0 -1
  117. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.d.ts +0 -37
  118. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.js +0 -37
  119. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.context.js.map +0 -1
  120. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.d.ts +0 -71
  121. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.js +0 -319
  122. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.http.js.map +0 -1
  123. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.d.ts +0 -28
  124. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.js +0 -146
  125. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.meta.js.map +0 -1
  126. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.d.ts +0 -117
  127. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.js +0 -90
  128. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.public.js.map +0 -1
  129. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.d.ts +0 -1436
  130. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.js +0 -152
  131. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.types.js.map +0 -1
  132. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.js +0 -560
  133. package/build/internal/es/src/bookings-v1-booking-policy-booking-policies.universal.js.map +0 -1
@@ -0,0 +1,545 @@
1
+ import { x as CreateBookingPolicyRequest$1, y as CreateBookingPolicyResponse$1, z as GetBookingPolicyRequest$1, A as GetBookingPolicyResponse$1, F as GetStrictestBookingPolicyRequest$1, G as GetStrictestBookingPolicyResponse$1, H as UpdateBookingPolicyRequest$1, I as UpdateBookingPolicyResponse$1, J as SetDefaultBookingPolicyRequest$1, S as SetDefaultBookingPolicyResponse$1, K as DeleteBookingPolicyRequest$1, O as DeleteBookingPolicyResponse$1, Q as QueryBookingPoliciesRequest$1, Z as QueryBookingPoliciesResponse$1, a0 as CountBookingPoliciesRequest$1, b as CountBookingPoliciesResponse$1 } from './bookings-v1-booking-policy-booking-policies.universal-Dn-27NDP.mjs';
2
+
3
+ /**
4
+ * A booking policy is a set of rules that determine how customers can book a
5
+ * service, including timeframes for booking, canceling, or rescheduling.
6
+ */
7
+ interface BookingPolicy {
8
+ /**
9
+ * ID of the booking policy.
10
+ * @format GUID
11
+ * @readonly
12
+ */
13
+ id?: string | null;
14
+ /**
15
+ * Revision number, which increments by 1 each time the booking policy is updated.
16
+ * To prevent conflicting changes, the current `revision` must be passed when
17
+ * updating the booking policy.
18
+ * @readonly
19
+ */
20
+ revision?: string | null;
21
+ /**
22
+ * Date and time the booking policy was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
23
+ * @readonly
24
+ */
25
+ createdDate?: Date | null;
26
+ /**
27
+ * Date and time the booking policy was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
28
+ * @readonly
29
+ */
30
+ updatedDate?: Date | null;
31
+ /**
32
+ * Name of the booking policy.
33
+ * @maxLength 400
34
+ */
35
+ name?: string | null;
36
+ /**
37
+ * Custom description for the booking policy and whether it's displayed to the
38
+ * participant.
39
+ */
40
+ customPolicyDescription?: PolicyDescription;
41
+ /**
42
+ * Whether the booking policy is the default.
43
+ * @readonly
44
+ */
45
+ default?: boolean | null;
46
+ /** Rule for limiting early bookings. */
47
+ limitEarlyBookingPolicy?: LimitEarlyBookingPolicy;
48
+ /**
49
+ * Rule for limiting late bookings. This rule and `bookAfterStartPolicy` can't
50
+ * be both enabled at the same time.
51
+ */
52
+ limitLateBookingPolicy?: LimitLateBookingPolicy;
53
+ /**
54
+ * Rule for booking after the start of a session or course. This rule and
55
+ * `limitLateBookingPolicy` can't be both enabled at the same time.
56
+ */
57
+ bookAfterStartPolicy?: BookAfterStartPolicy;
58
+ /** Rule for canceling a booking. */
59
+ cancellationPolicy?: CancellationPolicy;
60
+ /** Rule for rescheduling a booking. */
61
+ reschedulePolicy?: ReschedulePolicy;
62
+ /** Waitlist rule for the service. */
63
+ waitlistPolicy?: WaitlistPolicy;
64
+ /** Rule for participants per booking. */
65
+ participantsPolicy?: ParticipantsPolicy;
66
+ /** Rules for cancellation fees. */
67
+ cancellationFeePolicy?: CancellationFeePolicy;
68
+ /** Rule for saving credit card details. */
69
+ saveCreditCardPolicy?: SaveCreditCardPolicy;
70
+ /** Extensions enabling users to save custom data related to the booking policies. */
71
+ extendedFields?: ExtendedFields;
72
+ }
73
+ /** A description of the booking policy to display to participants. */
74
+ interface PolicyDescription {
75
+ /**
76
+ * Whether the description is displayed to the participant. `true` means the
77
+ * description is displayed.
78
+ *
79
+ * Default: `false`
80
+ */
81
+ enabled?: boolean;
82
+ /**
83
+ * Description of the booking policy.
84
+ *
85
+ * Default: Empty
86
+ * Max length: 2500 characters
87
+ * @maxLength 2500
88
+ */
89
+ description?: string;
90
+ }
91
+ /** The rule for limiting early bookings. */
92
+ interface LimitEarlyBookingPolicy {
93
+ /**
94
+ * Whether there's a limit about how early a customer can book. `false` means there's
95
+ * no limit to the earliest supported booking time.
96
+ *
97
+ * Default: `false`
98
+ */
99
+ enabled?: boolean;
100
+ /**
101
+ * Maximum number of minutes before the start of a session or course customers can book.
102
+ * Must be greater than `limitLateBookingPolicy.latestBookingInMinutes`.
103
+ *
104
+ * Default: `10080` minutes (7 days)
105
+ * Min: `1` minute
106
+ * @min 1
107
+ */
108
+ earliestBookingInMinutes?: number;
109
+ }
110
+ /**
111
+ * Rule limiting late bookings.
112
+ *
113
+ * This rule and `bookAfterStartPolicy` can't be both enabled at the same time.
114
+ */
115
+ interface LimitLateBookingPolicy {
116
+ /**
117
+ * Whether there's a limit about how late customers can book. `false` means
118
+ * customers can book up to the last minute. If specified as `true`,
119
+ * `bookAfterStartPolicy.enabled` must be `false`.
120
+ *
121
+ * Default: `false`
122
+ */
123
+ enabled?: boolean;
124
+ /**
125
+ * Minimum number of minutes before the start of the session customers can book.
126
+ * For courses, this is relative to the start time of the next session and doesn't
127
+ * consider course sessions in the past. This value must be less than
128
+ * `limitEarlyBookingPolicy.earliestBookingInMinutes`.
129
+ *
130
+ * Default: `1440` minutes (1 day)
131
+ * Min: `1` minute
132
+ * @min 1
133
+ */
134
+ latestBookingInMinutes?: number;
135
+ }
136
+ /**
137
+ * The rule for whether a session can be booked after the start of the schedule.
138
+ * This rule and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this rule
139
+ * is enabled, the `LimitLateBookingPolicy` rule must be disabled.
140
+ */
141
+ interface BookAfterStartPolicy {
142
+ /**
143
+ * Whether customers can book after the session has started. `true` means
144
+ * customers can book after the session has started. For courses, this refers to
145
+ * the start of the last course session. If specified as `true`,
146
+ * `limitLateBookingPolicy.enabled` must be `false`.
147
+ *
148
+ * Default: `false`
149
+ */
150
+ enabled?: boolean;
151
+ }
152
+ /** The rule for canceling a booked session. */
153
+ interface CancellationPolicy {
154
+ /**
155
+ * Whether customers can cancel the booking. `true` means customers can cancel
156
+ * the booking.
157
+ *
158
+ * Default: `false`
159
+ */
160
+ enabled?: boolean;
161
+ /**
162
+ * Whether there's a limit on the latest cancellation time. `false` means customers
163
+ * can cancel the booking until the last minute before the course or session starts.
164
+ *
165
+ * Default: `false`
166
+ */
167
+ limitLatestCancellation?: boolean;
168
+ /**
169
+ * Minimum number of minutes before the start of the session customers can cancel.
170
+ * For courses, this refers to the start of the first course session.
171
+ *
172
+ * Default: `1440` minutes (1 day)
173
+ * Min: `1` minute
174
+ * @min 1
175
+ */
176
+ latestCancellationInMinutes?: number;
177
+ }
178
+ /** The rule for rescheduling a booked session. */
179
+ interface ReschedulePolicy {
180
+ /**
181
+ * Whether customers can reschedule a booking for an appointment-based service.
182
+ * `true` means customers can reschedule.
183
+ *
184
+ * Default: `false`
185
+ */
186
+ enabled?: boolean;
187
+ /**
188
+ * Whether there's a limit on the latest supported rescheduling time. `false`
189
+ * means customers can reschedule until the last minute before the session start.
190
+ *
191
+ * Default: `false`
192
+ */
193
+ limitLatestReschedule?: boolean;
194
+ /**
195
+ * Minimum number of minutes before the session start session customers can
196
+ * reschedule their booking.
197
+ *
198
+ * Default: `1440` minutes (1 day)
199
+ * Min: `1` minute
200
+ * @min 1
201
+ */
202
+ latestRescheduleInMinutes?: number;
203
+ }
204
+ /** The rule for the waitlist. */
205
+ interface WaitlistPolicy {
206
+ /**
207
+ * Whether the service has a waitlist. `true` means there's a waitlist.
208
+ *
209
+ * Default: `false`
210
+ */
211
+ enabled?: boolean;
212
+ /**
213
+ * Number of spots in the waitlist.
214
+ *
215
+ * Default: `10` spots
216
+ * Min: `1` spot
217
+ * @min 1
218
+ */
219
+ capacity?: number;
220
+ /**
221
+ * Time in minutes the potential customer is given to book after they've been
222
+ * notified that a spot has opened up for them. If they don't respond in time,
223
+ * the open spot is offered to the next potential customer on the waitlist.
224
+ *
225
+ * Default: `10` minutes
226
+ * Min: `1` minute
227
+ * @min 1
228
+ */
229
+ reservationTimeInMinutes?: number;
230
+ }
231
+ /** The rule for the maximum number of participants per booking. */
232
+ interface ParticipantsPolicy {
233
+ /**
234
+ * Maximum number of participants per booking.
235
+ *
236
+ * Default: `1` participant
237
+ * Min: `1` participant
238
+ * @min 1
239
+ */
240
+ maxParticipantsPerBooking?: number;
241
+ }
242
+ interface CancellationFeePolicy {
243
+ /**
244
+ * Whether customers must pay a cancellation fee when canceling a booking.
245
+ *
246
+ * Default: `false`
247
+ */
248
+ enabled?: boolean;
249
+ /**
250
+ * Time windows relative to the session start during which customers can cancel
251
+ * their booking. Each window includes details about the fee for canceling within it.
252
+ * @maxSize 2
253
+ */
254
+ cancellationWindows?: CancellationWindow[];
255
+ /**
256
+ * Whether Wix automatically charges the cancellation fee from the customer once
257
+ * they cancel their booking.
258
+ *
259
+ * Default: `true`
260
+ */
261
+ autoCollectFeeEnabled?: boolean | null;
262
+ }
263
+ /**
264
+ * Money.
265
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
266
+ */
267
+ interface Money {
268
+ /**
269
+ * 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.
270
+ * @format DECIMAL_VALUE
271
+ * @decimalValue options { gt:0, maxScale:2 }
272
+ */
273
+ value?: string;
274
+ /**
275
+ * Currency code. Must be valid ISO 4217 currency code (e.g., USD).
276
+ * @format CURRENCY
277
+ * @readonly
278
+ */
279
+ currency?: string;
280
+ /**
281
+ * Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.
282
+ * @maxLength 50
283
+ */
284
+ formattedValue?: string | null;
285
+ }
286
+ interface CancellationWindow extends CancellationWindowFeeOneOf {
287
+ /** Fixed amount customers must pay when canceling the booking within this window. */
288
+ amount?: Money;
289
+ /**
290
+ * Percentage of the booking price customers must pay when canceling within
291
+ * this window.
292
+ *
293
+ * Min: `0.01` percent
294
+ * Max: `100` percent
295
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
296
+ */
297
+ percentage?: string;
298
+ /**
299
+ * Start of the cancellation window in minutes before the session start. For
300
+ * courses, this refers to the start of the first course session.
301
+ * @min 1
302
+ */
303
+ startInMinutes?: number | null;
304
+ }
305
+ /** @oneof */
306
+ interface CancellationWindowFeeOneOf {
307
+ /** Fixed amount customers must pay when canceling the booking within this window. */
308
+ amount?: Money;
309
+ /**
310
+ * Percentage of the booking price customers must pay when canceling within
311
+ * this window.
312
+ *
313
+ * Min: `0.01` percent
314
+ * Max: `100` percent
315
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
316
+ */
317
+ percentage?: string;
318
+ }
319
+ interface SaveCreditCardPolicy {
320
+ /**
321
+ * Whether Wix stores credit card details of the customer. Storing the details
322
+ * allows Wix to prefill the *eCommerce checkout*
323
+ * ([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))
324
+ * and thus increases the likelihood that the customer completes the booking
325
+ * process.
326
+ *
327
+ * Default: `false`
328
+ */
329
+ enabled?: boolean;
330
+ }
331
+ interface ExtendedFields {
332
+ /**
333
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
334
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
335
+ *
336
+ * You can only access fields for which you have the appropriate permissions.
337
+ *
338
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
339
+ */
340
+ namespaces?: Record<string, Record<string, any>>;
341
+ }
342
+ interface CreateBookingPolicyRequest {
343
+ /** Booking policy to create. */
344
+ bookingPolicy: BookingPolicy;
345
+ }
346
+ interface CreateBookingPolicyResponse {
347
+ /** Created booking policy. */
348
+ bookingPolicy?: BookingPolicy;
349
+ }
350
+ interface GetBookingPolicyRequest {
351
+ /**
352
+ * ID of the booking policy to retrieve.
353
+ * @format GUID
354
+ */
355
+ bookingPolicyId: string;
356
+ }
357
+ interface GetBookingPolicyResponse {
358
+ /** Retrieved booking policy. */
359
+ bookingPolicy?: BookingPolicy;
360
+ }
361
+ interface GetStrictestBookingPolicyRequest {
362
+ /**
363
+ * IDs of the booking policies for which to retrieve the strictest rules for.
364
+ * @format GUID
365
+ * @maxSize 100
366
+ */
367
+ bookingPolicyIds: string[];
368
+ }
369
+ interface GetStrictestBookingPolicyResponse {
370
+ /**
371
+ * Hypothetical `bookingPolicy` object that combines the strictest version of
372
+ * each rule. `bookingPolicy.id` is `null` and the returned object isn't actually
373
+ * created. To create a new policy, you can call *Create Booking Policy*
374
+ * ([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)).
375
+ */
376
+ bookingPolicy?: BookingPolicy;
377
+ }
378
+ interface UpdateBookingPolicyRequest {
379
+ /** Booking policy to update. */
380
+ bookingPolicy: BookingPolicy;
381
+ }
382
+ interface UpdateBookingPolicyResponse {
383
+ /** Updated booking policy. */
384
+ bookingPolicy?: BookingPolicy;
385
+ }
386
+ interface SetDefaultBookingPolicyRequest {
387
+ /**
388
+ * ID of the booking policy that's set as default.
389
+ * @format GUID
390
+ */
391
+ bookingPolicyId: string;
392
+ }
393
+ interface SetDefaultBookingPolicyResponse {
394
+ /** New default booking policy. */
395
+ currentDefaultBookingPolicy?: BookingPolicy;
396
+ /**
397
+ * Previous default booking policy. Not available if the provided booking policy
398
+ * was already the default.
399
+ */
400
+ previousDefaultBookingPolicy?: BookingPolicy;
401
+ }
402
+ interface DeleteBookingPolicyRequest {
403
+ /**
404
+ * ID of the booking policy to delete.
405
+ * @format GUID
406
+ */
407
+ bookingPolicyId: string;
408
+ }
409
+ interface DeleteBookingPolicyResponse {
410
+ }
411
+ interface QueryBookingPoliciesRequest {
412
+ /**
413
+ * The query by which to select booking policies. See
414
+ * [the supported filters article](https://dev.wix.com/docs/rest/business-solutions/bookings/services/booking-policy/supported-filters)
415
+ * for details.
416
+ */
417
+ query: CursorQuery;
418
+ }
419
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
420
+ /** 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`. */
421
+ cursorPaging?: CursorPaging;
422
+ /**
423
+ * Filter object in the following format:
424
+ * `"filter" : {
425
+ * "fieldName1": "value1",
426
+ * "fieldName2":{"$operator":"value2"}
427
+ * }`
428
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
429
+ */
430
+ filter?: Record<string, any> | null;
431
+ /**
432
+ * Sort object in the following format:
433
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
434
+ * @maxSize 10
435
+ */
436
+ sort?: Sorting[];
437
+ }
438
+ /** @oneof */
439
+ interface CursorQueryPagingMethodOneOf {
440
+ /** 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`. */
441
+ cursorPaging?: CursorPaging;
442
+ }
443
+ interface Sorting {
444
+ /**
445
+ * Name of the field to sort by.
446
+ * @maxLength 512
447
+ */
448
+ fieldName?: string;
449
+ /** Sort order. */
450
+ order?: SortOrderWithLiterals;
451
+ }
452
+ declare enum SortOrder {
453
+ ASC = "ASC",
454
+ DESC = "DESC"
455
+ }
456
+ /** @enumType */
457
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
458
+ interface CursorPaging {
459
+ /**
460
+ * Number of items to load.
461
+ * @max 100
462
+ */
463
+ limit?: number | null;
464
+ /**
465
+ * Pointer to the next or previous page in the list of results.
466
+ *
467
+ * You can get the relevant cursor token
468
+ * from the `pagingMetadata` object in the previous call's response.
469
+ * Not relevant for the first request.
470
+ * @maxLength 16000
471
+ */
472
+ cursor?: string | null;
473
+ }
474
+ interface QueryBookingPoliciesResponse {
475
+ /** Retrieved booking policies. */
476
+ bookingPolicies?: BookingPolicy[];
477
+ /** Paging metadata. */
478
+ pagingMetadata?: CursorPagingMetadata;
479
+ }
480
+ interface CursorPagingMetadata {
481
+ /** Number of items returned in the response. */
482
+ count?: number | null;
483
+ /** Offset that was requested. */
484
+ cursors?: Cursors;
485
+ /**
486
+ * Indicates if there are more results after the current page.
487
+ * If `true`, another page of results can be retrieved.
488
+ * If `false`, this is the last page.
489
+ */
490
+ hasNext?: boolean | null;
491
+ }
492
+ interface Cursors {
493
+ /**
494
+ * Cursor pointing to next page in the list of results.
495
+ * @maxLength 16000
496
+ */
497
+ next?: string | null;
498
+ /**
499
+ * Cursor pointing to previous page in the list of results.
500
+ * @maxLength 16000
501
+ */
502
+ prev?: string | null;
503
+ }
504
+ interface CountBookingPoliciesRequest {
505
+ /**
506
+ * Filter to base the count on. See
507
+ * supported filters*
508
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/supported-filters))
509
+ * for details.
510
+ */
511
+ filter?: Record<string, any> | null;
512
+ }
513
+ interface CountBookingPoliciesResponse {
514
+ /** Number of booking policies matching the provided filter. */
515
+ count?: number;
516
+ }
517
+
518
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
519
+ getUrl: (context: any) => string;
520
+ httpMethod: K;
521
+ path: string;
522
+ pathParams: M;
523
+ __requestType: T;
524
+ __originalRequestType: S;
525
+ __responseType: Q;
526
+ __originalResponseType: R;
527
+ };
528
+ declare function createBookingPolicy(): __PublicMethodMetaInfo<'POST', {}, CreateBookingPolicyRequest$1, CreateBookingPolicyRequest, CreateBookingPolicyResponse$1, CreateBookingPolicyResponse>;
529
+ declare function getBookingPolicy(): __PublicMethodMetaInfo<'GET', {
530
+ bookingPolicyId: string;
531
+ }, GetBookingPolicyRequest$1, GetBookingPolicyRequest, GetBookingPolicyResponse$1, GetBookingPolicyResponse>;
532
+ declare function getStrictestBookingPolicy(): __PublicMethodMetaInfo<'POST', {}, GetStrictestBookingPolicyRequest$1, GetStrictestBookingPolicyRequest, GetStrictestBookingPolicyResponse$1, GetStrictestBookingPolicyResponse>;
533
+ declare function updateBookingPolicy(): __PublicMethodMetaInfo<'PATCH', {
534
+ bookingPolicyId: string;
535
+ }, UpdateBookingPolicyRequest$1, UpdateBookingPolicyRequest, UpdateBookingPolicyResponse$1, UpdateBookingPolicyResponse>;
536
+ declare function setDefaultBookingPolicy(): __PublicMethodMetaInfo<'POST', {
537
+ bookingPolicyId: string;
538
+ }, SetDefaultBookingPolicyRequest$1, SetDefaultBookingPolicyRequest, SetDefaultBookingPolicyResponse$1, SetDefaultBookingPolicyResponse>;
539
+ declare function deleteBookingPolicy(): __PublicMethodMetaInfo<'DELETE', {
540
+ bookingPolicyId: string;
541
+ }, DeleteBookingPolicyRequest$1, DeleteBookingPolicyRequest, DeleteBookingPolicyResponse$1, DeleteBookingPolicyResponse>;
542
+ declare function queryBookingPolicies(): __PublicMethodMetaInfo<'POST', {}, QueryBookingPoliciesRequest$1, QueryBookingPoliciesRequest, QueryBookingPoliciesResponse$1, QueryBookingPoliciesResponse>;
543
+ declare function countBookingPolicies(): __PublicMethodMetaInfo<'POST', {}, CountBookingPoliciesRequest$1, CountBookingPoliciesRequest, CountBookingPoliciesResponse$1, CountBookingPoliciesResponse>;
544
+
545
+ export { type __PublicMethodMetaInfo, countBookingPolicies, createBookingPolicy, deleteBookingPolicy, getBookingPolicy, getStrictestBookingPolicy, queryBookingPolicies, setDefaultBookingPolicy, updateBookingPolicy };