@wix/auto_sdk_bookings_pricing 1.0.12 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/bookings-v2-price-info-pricing.context.d.ts +6 -0
  11. package/build/cjs/src/bookings-v2-price-info-pricing.context.js +18 -0
  12. package/build/cjs/src/bookings-v2-price-info-pricing.context.js.map +1 -0
  13. package/build/cjs/src/bookings-v2-price-info-pricing.http.d.ts +59 -0
  14. package/build/cjs/src/bookings-v2-price-info-pricing.http.js +184 -0
  15. package/build/cjs/src/bookings-v2-price-info-pricing.http.js.map +1 -0
  16. package/build/cjs/src/bookings-v2-price-info-pricing.meta.d.ts +14 -0
  17. package/build/cjs/src/bookings-v2-price-info-pricing.meta.js +66 -0
  18. package/build/cjs/src/bookings-v2-price-info-pricing.meta.js.map +1 -0
  19. package/build/{internal/index.d.ts → cjs/src/bookings-v2-price-info-pricing.public.d.ts} +8 -11
  20. package/build/cjs/src/bookings-v2-price-info-pricing.public.js +28 -0
  21. package/build/cjs/src/bookings-v2-price-info-pricing.public.js.map +1 -0
  22. package/build/{bookings-v2-price-info-pricing.universal-Ci_8AyL2.d.mts → cjs/src/bookings-v2-price-info-pricing.types.d.ts} +55 -73
  23. package/build/cjs/src/bookings-v2-price-info-pricing.types.js +133 -0
  24. package/build/cjs/src/bookings-v2-price-info-pricing.types.js.map +1 -0
  25. package/build/cjs/src/bookings-v2-price-info-pricing.universal.d.ts +991 -0
  26. package/build/cjs/src/bookings-v2-price-info-pricing.universal.js +299 -0
  27. package/build/cjs/src/bookings-v2-price-info-pricing.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/bookings-v2-price-info-pricing.context.d.ts +6 -0
  39. package/build/es/src/bookings-v2-price-info-pricing.context.js +6 -0
  40. package/build/es/src/bookings-v2-price-info-pricing.context.js.map +1 -0
  41. package/build/es/src/bookings-v2-price-info-pricing.http.d.ts +59 -0
  42. package/build/es/src/bookings-v2-price-info-pricing.http.js +179 -0
  43. package/build/es/src/bookings-v2-price-info-pricing.http.js.map +1 -0
  44. package/build/es/src/bookings-v2-price-info-pricing.meta.d.ts +14 -0
  45. package/build/es/src/bookings-v2-price-info-pricing.meta.js +38 -0
  46. package/build/es/src/bookings-v2-price-info-pricing.meta.js.map +1 -0
  47. package/build/{index.d.ts → es/src/bookings-v2-price-info-pricing.public.d.ts} +8 -11
  48. package/build/es/src/bookings-v2-price-info-pricing.public.js +14 -0
  49. package/build/es/src/bookings-v2-price-info-pricing.public.js.map +1 -0
  50. package/build/{bookings-v2-price-info-pricing.universal-Ci_8AyL2.d.ts → es/src/bookings-v2-price-info-pricing.types.d.ts} +55 -73
  51. package/build/es/src/bookings-v2-price-info-pricing.types.js +130 -0
  52. package/build/es/src/bookings-v2-price-info-pricing.types.js.map +1 -0
  53. package/build/es/src/bookings-v2-price-info-pricing.universal.d.ts +991 -0
  54. package/build/es/src/bookings-v2-price-info-pricing.universal.js +271 -0
  55. package/build/es/src/bookings-v2-price-info-pricing.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/bookings-v2-price-info-pricing.context.d.ts +6 -0
  66. package/build/internal/cjs/src/bookings-v2-price-info-pricing.context.js +18 -0
  67. package/build/internal/cjs/src/bookings-v2-price-info-pricing.context.js.map +1 -0
  68. package/build/internal/cjs/src/bookings-v2-price-info-pricing.http.d.ts +59 -0
  69. package/build/internal/cjs/src/bookings-v2-price-info-pricing.http.js +184 -0
  70. package/build/internal/cjs/src/bookings-v2-price-info-pricing.http.js.map +1 -0
  71. package/build/internal/cjs/src/bookings-v2-price-info-pricing.meta.d.ts +14 -0
  72. package/build/internal/cjs/src/bookings-v2-price-info-pricing.meta.js +66 -0
  73. package/build/internal/cjs/src/bookings-v2-price-info-pricing.meta.js.map +1 -0
  74. package/build/internal/{index.d.mts → cjs/src/bookings-v2-price-info-pricing.public.d.ts} +8 -11
  75. package/build/internal/cjs/src/bookings-v2-price-info-pricing.public.js +28 -0
  76. package/build/internal/cjs/src/bookings-v2-price-info-pricing.public.js.map +1 -0
  77. package/build/internal/{bookings-v2-price-info-pricing.universal-Ci_8AyL2.d.ts → cjs/src/bookings-v2-price-info-pricing.types.d.ts} +55 -73
  78. package/build/internal/cjs/src/bookings-v2-price-info-pricing.types.js +133 -0
  79. package/build/internal/cjs/src/bookings-v2-price-info-pricing.types.js.map +1 -0
  80. package/build/internal/cjs/src/bookings-v2-price-info-pricing.universal.d.ts +991 -0
  81. package/build/internal/cjs/src/bookings-v2-price-info-pricing.universal.js +299 -0
  82. package/build/internal/cjs/src/bookings-v2-price-info-pricing.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/bookings-v2-price-info-pricing.context.d.ts +6 -0
  93. package/build/internal/es/src/bookings-v2-price-info-pricing.context.js +6 -0
  94. package/build/internal/es/src/bookings-v2-price-info-pricing.context.js.map +1 -0
  95. package/build/internal/es/src/bookings-v2-price-info-pricing.http.d.ts +59 -0
  96. package/build/internal/es/src/bookings-v2-price-info-pricing.http.js +179 -0
  97. package/build/internal/es/src/bookings-v2-price-info-pricing.http.js.map +1 -0
  98. package/build/internal/es/src/bookings-v2-price-info-pricing.meta.d.ts +14 -0
  99. package/build/internal/es/src/bookings-v2-price-info-pricing.meta.js +38 -0
  100. package/build/internal/es/src/bookings-v2-price-info-pricing.meta.js.map +1 -0
  101. package/build/{index.d.mts → internal/es/src/bookings-v2-price-info-pricing.public.d.ts} +8 -11
  102. package/build/internal/es/src/bookings-v2-price-info-pricing.public.js +14 -0
  103. package/build/internal/es/src/bookings-v2-price-info-pricing.public.js.map +1 -0
  104. package/build/internal/{bookings-v2-price-info-pricing.universal-Ci_8AyL2.d.mts → es/src/bookings-v2-price-info-pricing.types.d.ts} +55 -73
  105. package/build/internal/es/src/bookings-v2-price-info-pricing.types.js +130 -0
  106. package/build/internal/es/src/bookings-v2-price-info-pricing.types.js.map +1 -0
  107. package/build/internal/es/src/bookings-v2-price-info-pricing.universal.d.ts +991 -0
  108. package/build/internal/es/src/bookings-v2-price-info-pricing.universal.js +271 -0
  109. package/build/internal/es/src/bookings-v2-price-info-pricing.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.js +0 -314
  112. package/build/index.js.map +0 -1
  113. package/build/index.mjs +0 -280
  114. package/build/index.mjs.map +0 -1
  115. package/build/internal/index.js +0 -314
  116. package/build/internal/index.js.map +0 -1
  117. package/build/internal/index.mjs +0 -280
  118. package/build/internal/index.mjs.map +0 -1
  119. package/build/internal/meta.d.mts +0 -793
  120. package/build/internal/meta.d.ts +0 -793
  121. package/build/internal/meta.js +0 -194
  122. package/build/internal/meta.js.map +0 -1
  123. package/build/internal/meta.mjs +0 -166
  124. package/build/internal/meta.mjs.map +0 -1
  125. package/build/meta.d.mts +0 -793
  126. package/build/meta.d.ts +0 -793
  127. package/build/meta.js +0 -194
  128. package/build/meta.js.map +0 -1
  129. package/build/meta.mjs +0 -166
  130. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,991 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+ export interface PriceInfo extends PriceInfoTotalPriceOneOf {
3
+ /**
4
+ * Calculated total price. Available if the _service's_
5
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
6
+ * `payment.rateType` is `FIXED`, `VARIED`, or `NO_FEE`.
7
+ */
8
+ calculatedPrice?: number;
9
+ /**
10
+ * Description of the total price. Available if the _service's_
11
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
12
+ * `payment.rateType` is `CUSTOM`.
13
+ * @deprecated Description of the total price. Available if the _service's_
14
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
15
+ * `payment.rateType` is `CUSTOM`.
16
+ * @replacedBy price_description_info.original
17
+ * @targetRemovalDate 2025-01-10
18
+ */
19
+ priceDescription?: string;
20
+ /**
21
+ * Description of the total price. Available if the _service's_
22
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
23
+ * `payment.rateType` is `CUSTOM`.
24
+ */
25
+ priceDescriptionInfo?: PriceDescriptionInfo;
26
+ /**
27
+ * List of line items, including the number of participants and the price per participant.
28
+ * @maxSize 20
29
+ */
30
+ bookingLineItems?: BookingLineItem[];
31
+ /**
32
+ * Total deposit the customer must pay when booking the service. Available if
33
+ * the _service's_
34
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
35
+ * `payment.options.deposit` is set to `true`.
36
+ */
37
+ deposit?: number | null;
38
+ }
39
+ /** @oneof */
40
+ export interface PriceInfoTotalPriceOneOf {
41
+ /**
42
+ * Calculated total price. Available if the _service's_
43
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
44
+ * `payment.rateType` is `FIXED`, `VARIED`, or `NO_FEE`.
45
+ */
46
+ calculatedPrice?: number;
47
+ /**
48
+ * Description of the total price. Available if the _service's_
49
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
50
+ * `payment.rateType` is `CUSTOM`.
51
+ * @deprecated Description of the total price. Available if the _service's_
52
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
53
+ * `payment.rateType` is `CUSTOM`.
54
+ * @replacedBy price_description_info.original
55
+ * @targetRemovalDate 2025-01-10
56
+ */
57
+ priceDescription?: string;
58
+ /**
59
+ * Description of the total price. Available if the _service's_
60
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
61
+ * `payment.rateType` is `CUSTOM`.
62
+ */
63
+ priceDescriptionInfo?: PriceDescriptionInfo;
64
+ }
65
+ export interface BookingLineItem {
66
+ /**
67
+ * _Service ID_
68
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)).
69
+ *
70
+ * Required in *Calculate Price*
71
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/pricing/calculate-price) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/calculate-price))
72
+ * if the site uses Wix Bookings' default pricing logic.
73
+ *
74
+ * Optional in *Calculate Price*
75
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/pricing/calculate-price) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/calculate-price))
76
+ * if the site use pricing logic defined by a
77
+ * Wix Bookings Pricing Integration service plugin*
78
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/introduction))
79
+ * integration.
80
+ * @format GUID
81
+ */
82
+ serviceId?: string | null;
83
+ /**
84
+ * _Resource ID_
85
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction)).
86
+ * Required in *Calculate Price*
87
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/pricing/calculate-price) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/calculate-price))
88
+ * and *Preview Price*
89
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/pricing/preview-price) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/preview-price))
90
+ * for appointment-based services and classes.
91
+ * @format GUID
92
+ */
93
+ resourceId?: string | null;
94
+ /**
95
+ * Custom choices. Choices are specific values for an option the customer can choose to book.
96
+ * For example, the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
97
+ * Each choice may have a different price. Refer to the *Service Options And Variants API*
98
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction))
99
+ * for more details.
100
+ */
101
+ choices?: ServiceChoice[];
102
+ /**
103
+ * Number of participants for the line item.
104
+ * @min 1
105
+ */
106
+ numberOfParticipants?: number | null;
107
+ /**
108
+ * Price per participant for the line item.
109
+ * @readonly
110
+ */
111
+ pricePerParticipant?: number | null;
112
+ }
113
+ export interface ServiceChoice extends ServiceChoiceChoiceOneOf {
114
+ /**
115
+ * Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
116
+ * Choices are specific values for an option the customer can choose to book. For example,
117
+ * the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
118
+ * Each choice may have a different price.
119
+ */
120
+ custom?: string;
121
+ duration?: Duration;
122
+ /**
123
+ * ID of the corresponding option for the choice. For example, the choice `child`
124
+ * could correspond to the option `ageGroup`. In this case, `optionId` is the ID
125
+ * for the `ageGroup` option.
126
+ * @format GUID
127
+ */
128
+ optionId?: string;
129
+ }
130
+ /** @oneof */
131
+ export interface ServiceChoiceChoiceOneOf {
132
+ /**
133
+ * Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
134
+ * Choices are specific values for an option the customer can choose to book. For example,
135
+ * the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
136
+ * Each choice may have a different price.
137
+ */
138
+ custom?: string;
139
+ duration?: Duration;
140
+ }
141
+ export interface Duration {
142
+ /**
143
+ * Duration of the service in minutes.
144
+ * Min: 1 minute, Max: 30 days, 23 hours, and 59 minutes
145
+ * @min 1
146
+ * @max 44639
147
+ */
148
+ minutes?: number;
149
+ /**
150
+ * Name of the duration option.
151
+ * Defaults to the formatted duration e.g. "1 hour, 30 minutes".
152
+ * @maxLength 255
153
+ */
154
+ name?: string | null;
155
+ }
156
+ export interface PriceDescriptionInfo {
157
+ /**
158
+ * Price description in the site's main language. Refer to the *Site Properties API*
159
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/site-properties/properties/introduction))
160
+ * for more details.
161
+ * @maxLength 50
162
+ */
163
+ original?: string;
164
+ /**
165
+ * Translated price description. Available if the booking was made in a
166
+ * secondary language.
167
+ * @maxLength 50
168
+ */
169
+ translated?: string | null;
170
+ }
171
+ export interface PreviewPriceRequest {
172
+ /**
173
+ * List of line items to preview the price for.
174
+ * @minSize 1
175
+ * @maxSize 20
176
+ */
177
+ bookingLineItems: BookingLineItem[];
178
+ }
179
+ export interface PreviewPriceResponse {
180
+ /** Information about each line item's price and the estimated total price based on the line items. */
181
+ priceInfo?: PriceInfo;
182
+ }
183
+ export interface CalculatePriceRequest {
184
+ /**
185
+ * _Booking_
186
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/introduction))
187
+ * to calculate the base price for.
188
+ */
189
+ booking: Booking;
190
+ }
191
+ /** An entity representing a scheduled appointment, class session, or course. */
192
+ export interface Booking extends BookingParticipantsInfoOneOf {
193
+ /**
194
+ * Total number of participants. Available only when the relevant service
195
+ * doesn't have _variants and options_
196
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
197
+ * @min 1
198
+ */
199
+ totalParticipants?: number;
200
+ /**
201
+ * Information about the booked service choices and participants.
202
+ * Available only when the booking includes multiple _service variants_
203
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
204
+ */
205
+ participantsChoices?: ParticipantChoices;
206
+ /**
207
+ * Booking ID.
208
+ * @format GUID
209
+ * @readonly
210
+ */
211
+ _id?: string | null;
212
+ /**
213
+ * An object describing the *slot*
214
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability))
215
+ * or *schedule*
216
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction))
217
+ * that was booked.
218
+ */
219
+ bookedEntity?: BookedEntity;
220
+ /**
221
+ * Contact details of the site visitor or *member*
222
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/members/members/introduction) | [REST](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/introduction))
223
+ * making the booking.
224
+ */
225
+ contactDetails?: ContactDetails;
226
+ /** Additional custom fields submitted with the booking form. */
227
+ additionalFields?: CustomFormField[];
228
+ /**
229
+ * Booking status. A booking is automatically confirmed if the service allows it
230
+ * and an eCommerce order is created. It is automatically declined if there is a
231
+ * double booking and the customer hasn't paid or is eligible for an automatic
232
+ * refund. Currently, only payments with pricing plans are automatically refundable.
233
+ */
234
+ status?: BookingStatus;
235
+ /**
236
+ * The payment status of the booking corresponds to the `paymentStatus` of the
237
+ * related *eCommerce order*
238
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup)| [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction)),
239
+ * if one exists. All payment statuses are supported for every booking `status`.
240
+ */
241
+ paymentStatus?: PaymentStatus;
242
+ /**
243
+ * Payment option selected by the customer. If the customer hasn't completed their
244
+ * checkout, they may still change the payment method. Must be one of the payment
245
+ * options offered by the service ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)),
246
+ * unless `skipSelectedPaymentOptionValidation` is `true`.
247
+ * When undefined during an *eCommerce checkout*
248
+ * ([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)),
249
+ * Wix Bookings uses the service's default payment option
250
+ */
251
+ selectedPaymentOption?: SelectedPaymentOption;
252
+ /**
253
+ * Date and time the booking was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
254
+ * @readonly
255
+ */
256
+ _createdDate?: Date | null;
257
+ /** External user ID that you can provide. */
258
+ externalUserId?: string | null;
259
+ /**
260
+ * Revision number to be used when updating, rescheduling, or cancelling the
261
+ * booking. Increments by 1 each time the booking is updated, rescheduled, or
262
+ * canceled. To prevent conflicting changes, the current revision must be
263
+ * specified when updating the booking.
264
+ */
265
+ revision?: string | null;
266
+ /**
267
+ * ID of the creator of the booking.
268
+ * If `appId` and another ID are present, the other ID takes precedence.
269
+ * @readonly
270
+ */
271
+ createdBy?: IdentificationData;
272
+ /**
273
+ * The start date of the booking in `YYYY-MM-DDThh:mm:ss.sssZ` format.
274
+ * For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session.
275
+ * @readonly
276
+ */
277
+ startDate?: Date | null;
278
+ /**
279
+ * The end date of the booking in `YYYY-MM-DDThh:mm:ss.sssZ` format.
280
+ * For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session.
281
+ * @readonly
282
+ */
283
+ endDate?: Date | null;
284
+ /**
285
+ * Date and time the booking was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
286
+ * @readonly
287
+ */
288
+ _updatedDate?: Date | null;
289
+ /**
290
+ * Custom field data for this object.
291
+ * Extended fields must be configured in the app dashboard before they can be accessed with API calls.
292
+ */
293
+ extendedFields?: ExtendedFields;
294
+ /**
295
+ * Whether this booking overlaps with another confirmed booking. Returned
296
+ * only if set to `true`.
297
+ * @readonly
298
+ */
299
+ doubleBooked?: boolean | null;
300
+ }
301
+ /** @oneof */
302
+ export interface BookingParticipantsInfoOneOf {
303
+ /**
304
+ * Total number of participants. Available only when the relevant service
305
+ * doesn't have _variants and options_
306
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
307
+ * @min 1
308
+ */
309
+ totalParticipants?: number;
310
+ /**
311
+ * Information about the booked service choices and participants.
312
+ * Available only when the booking includes multiple _service variants_
313
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
314
+ */
315
+ participantsChoices?: ParticipantChoices;
316
+ }
317
+ /**
318
+ * A multi-service booking is considered available if all individual bookings are available as returned from List Multi Service Availability Time Slots.
319
+ * Currently, `SEPARATE_BOOKINGS` and `PARALLEL_BOOKINGS` are not supported.
320
+ * Multi-service booking is available if each of its bookings is available separately.
321
+ * For `SEQUENTIAL_BOOKINGS`, see `List Multi Service Availability Time Slots` documentation.
322
+ */
323
+ export declare enum MultiServiceBookingType {
324
+ SEQUENTIAL_BOOKINGS = "SEQUENTIAL_BOOKINGS",
325
+ SEPARATE_BOOKINGS = "SEPARATE_BOOKINGS",
326
+ PARALLEL_BOOKINGS = "PARALLEL_BOOKINGS"
327
+ }
328
+ export interface BookedEntity extends BookedEntityItemOneOf {
329
+ /**
330
+ * Booked *slot*
331
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability)).
332
+ * Available only for appointment-based services and classes.
333
+ * For appointment-based services, a new session is created, while for classes,
334
+ * the booking is automatically linked to the existing session.
335
+ */
336
+ slot?: BookedSlot;
337
+ /**
338
+ * Booked *schedule*
339
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
340
+ * Available only for course bookings.
341
+ */
342
+ schedule?: BookedSchedule;
343
+ /**
344
+ * Session title at the time of booking. If there is no pre-existing session,
345
+ * for example for appointment-based services, `title` is set to the service name.
346
+ * @readonly
347
+ * @maxLength 6000
348
+ */
349
+ title?: string | null;
350
+ /**
351
+ * List of tags for the booking.
352
+ *
353
+ * - "INDIVIDUAL": For bookings of appointment-based services. Including when the appointment is for a group of participants.
354
+ * - "GROUP": For bookings of individual class sessions.
355
+ * - "COURSE": For course bookings.
356
+ */
357
+ tags?: string[] | null;
358
+ }
359
+ /** @oneof */
360
+ export interface BookedEntityItemOneOf {
361
+ /**
362
+ * Booked *slot*
363
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/availability-calendar/query-availability) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability)).
364
+ * Available only for appointment-based services and classes.
365
+ * For appointment-based services, a new session is created, while for classes,
366
+ * the booking is automatically linked to the existing session.
367
+ */
368
+ slot?: BookedSlot;
369
+ /**
370
+ * Booked *schedule*
371
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
372
+ * Available only for course bookings.
373
+ */
374
+ schedule?: BookedSchedule;
375
+ }
376
+ export interface BookedSlot {
377
+ /** Session ID. */
378
+ sessionId?: string | null;
379
+ /** Service ID. */
380
+ serviceId?: string;
381
+ /** Schedule ID. */
382
+ scheduleId?: string;
383
+ /**
384
+ * ID of the corresponding *event*
385
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)).
386
+ * Available for both appointment and class bookings, not available for course bookings.
387
+ * For appointment-based services, Wix Bookings automatically populates `eventId`
388
+ * when the booking `status` changes to `CONFIRMED`. For class bookings, it's
389
+ * automatically populated upon booking creation.
390
+ * @minLength 36
391
+ * @maxLength 250
392
+ */
393
+ eventId?: string | null;
394
+ /**
395
+ * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
396
+ * format.
397
+ */
398
+ startDate?: string | null;
399
+ /**
400
+ * The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
401
+ * format.
402
+ */
403
+ endDate?: string | null;
404
+ /** The timezone according to which the slot was shown to the user when booking, and should be shown in the future. */
405
+ timezone?: string | null;
406
+ /**
407
+ * Primary *resource*
408
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/introduction))
409
+ * for the booking. For example, the *staff member*
410
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction))
411
+ * providing the
412
+ * service.
413
+ */
414
+ resource?: BookedResource;
415
+ /** Location where the session takes place. */
416
+ location?: Location;
417
+ }
418
+ export interface BookedResource {
419
+ /**
420
+ * ID of the booking's primary resource.
421
+ * @format GUID
422
+ */
423
+ _id?: string;
424
+ /**
425
+ * Resource's name at the time of booking.
426
+ * @maxLength 40
427
+ */
428
+ name?: string | null;
429
+ /**
430
+ * Resource's email at the time of booking.
431
+ * @maxLength 500
432
+ */
433
+ email?: string | null;
434
+ /**
435
+ * ID of the schedule belonging to the booking's primary resource.
436
+ * @format GUID
437
+ */
438
+ scheduleId?: string | null;
439
+ }
440
+ export interface Location {
441
+ /**
442
+ * Business location ID. Available only for locations that are business locations,
443
+ * meaning the `location_type` is `"OWNER_BUSINESS"`.
444
+ * @format GUID
445
+ */
446
+ _id?: string | null;
447
+ /** Location name. */
448
+ name?: string | null;
449
+ /** The full address of this location. */
450
+ formattedAddress?: string | null;
451
+ /**
452
+ * The full translated address of this location.
453
+ * @maxLength 512
454
+ */
455
+ formattedAddressTranslated?: string | null;
456
+ /**
457
+ * Location type.
458
+ *
459
+ * - `"OWNER_BUSINESS"`: The business address, as set in the site’s general settings.
460
+ * - `"OWNER_CUSTOM"`: The address as set when creating the service.
461
+ * - `"CUSTOM"`: The address as set for the individual session.
462
+ */
463
+ locationType?: LocationType;
464
+ }
465
+ export declare enum LocationType {
466
+ UNDEFINED = "UNDEFINED",
467
+ OWNER_BUSINESS = "OWNER_BUSINESS",
468
+ OWNER_CUSTOM = "OWNER_CUSTOM",
469
+ CUSTOM = "CUSTOM"
470
+ }
471
+ export interface BookedSchedule {
472
+ /**
473
+ * _Schedule ID_
474
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
475
+ */
476
+ scheduleId?: string;
477
+ /**
478
+ * Booked service ID.
479
+ * @format GUID
480
+ */
481
+ serviceId?: string | null;
482
+ /**
483
+ * _Location_
484
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))
485
+ * where the schedule's sessions take place.
486
+ * @readonly
487
+ */
488
+ location?: Location;
489
+ /**
490
+ * Timezone in which the slot or session was shown to the customer when they booked.
491
+ * Also used whenever the customer reviews the booking's timing in the future.
492
+ */
493
+ timezone?: string | null;
494
+ /**
495
+ * Start time of the first session related to the booking in
496
+ * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
497
+ * @readonly
498
+ */
499
+ firstSessionStart?: string | null;
500
+ /**
501
+ * End time of the last session related to the booking in
502
+ * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
503
+ * @readonly
504
+ */
505
+ lastSessionEnd?: string | null;
506
+ }
507
+ export interface ContactDetails {
508
+ /**
509
+ * Contact ID.
510
+ * @format GUID
511
+ */
512
+ contactId?: string | null;
513
+ /**
514
+ * Contact's first name. When populated from a standard booking form, this
515
+ * property corresponds to the `name` field.
516
+ */
517
+ firstName?: string | null;
518
+ /** Contact's last name. */
519
+ lastName?: string | null;
520
+ /**
521
+ * Contact's email. If no [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)
522
+ * with this email exist, a new contact is created.
523
+ * Used to validate coupon usage limitations per contact. If not specified,
524
+ * the coupon usage limitation will not be enforced. (Coupon usage limitation
525
+ * validation is not supported yet).
526
+ * @format EMAIL
527
+ */
528
+ email?: string | null;
529
+ /** Contact's phone number. */
530
+ phone?: string | null;
531
+ /** Contact's full address. */
532
+ fullAddress?: Address;
533
+ /**
534
+ * Contact's time zone.
535
+ * @deprecated
536
+ */
537
+ timeZone?: string | null;
538
+ /**
539
+ * Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
540
+ * format.
541
+ * @format COUNTRY
542
+ */
543
+ countryCode?: string | null;
544
+ }
545
+ /** Physical address */
546
+ export interface Address extends AddressStreetOneOf {
547
+ /** Street name, number and apartment number. */
548
+ streetAddress?: StreetAddress;
549
+ /** Main address line, usually street and number, as free text. */
550
+ addressLine?: string | null;
551
+ /**
552
+ * Country code.
553
+ * @format COUNTRY
554
+ */
555
+ country?: string | null;
556
+ /** Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
557
+ subdivision?: string | null;
558
+ /** City name. */
559
+ city?: string | null;
560
+ /** Zip/postal code. */
561
+ postalCode?: string | null;
562
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
563
+ addressLine2?: string | null;
564
+ /** A string containing the full address of this location. */
565
+ formattedAddress?: string | null;
566
+ /** Free text to help find the address. */
567
+ hint?: string | null;
568
+ /** Coordinates of the physical address. */
569
+ geocode?: AddressLocation;
570
+ /** Country full name. */
571
+ countryFullname?: string | null;
572
+ /** Multi-level subdivisions from top to bottom. */
573
+ subdivisions?: Subdivision[];
574
+ }
575
+ /** @oneof */
576
+ export interface AddressStreetOneOf {
577
+ /** Street name, number and apartment number. */
578
+ streetAddress?: StreetAddress;
579
+ /** Main address line, usually street and number, as free text. */
580
+ addressLine?: string | null;
581
+ }
582
+ export interface StreetAddress {
583
+ /** Street number. */
584
+ number?: string;
585
+ /** Street name. */
586
+ name?: string;
587
+ /** Apartment number. */
588
+ apt?: string;
589
+ }
590
+ export interface AddressLocation {
591
+ /** Address latitude. */
592
+ latitude?: number | null;
593
+ /** Address longitude. */
594
+ longitude?: number | null;
595
+ }
596
+ export interface Subdivision {
597
+ /** Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
598
+ code?: string;
599
+ /** Subdivision full name. */
600
+ name?: string;
601
+ }
602
+ export interface CustomFormField {
603
+ /**
604
+ * ID of the form field as defined in the form.
605
+ * @format GUID
606
+ */
607
+ _id?: string;
608
+ /** Value that was submitted for this field. */
609
+ value?: string | null;
610
+ /**
611
+ * Form field's label at the time of submission.
612
+ * @readonly
613
+ */
614
+ label?: string | null;
615
+ valueType?: ValueType;
616
+ }
617
+ export declare enum ValueType {
618
+ /** Short text. This is the default value type. */
619
+ SHORT_TEXT = "SHORT_TEXT",
620
+ /** Long text. */
621
+ LONG_TEXT = "LONG_TEXT",
622
+ /** A text that represents the check box value. If selected the value is `true`, otherwise `false`. */
623
+ CHECK_BOX = "CHECK_BOX"
624
+ }
625
+ /** Booking status. */
626
+ export declare enum BookingStatus {
627
+ /**
628
+ * The booking was created, but the customer hasn't completed the related
629
+ * eCommerce order yet.
630
+ */
631
+ CREATED = "CREATED",
632
+ /**
633
+ * The merchant has confirmed the booking and it appears in the
634
+ * business calendar. Merchants can set up their *services*
635
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/setup) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction))
636
+ * to automatically confirm all `PENDING` bookings.
637
+ */
638
+ CONFIRMED = "CONFIRMED",
639
+ /**
640
+ * The customer has canceled the booking. Depending on the relevant service's
641
+ * _policy snapshot_
642
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policy-snapshots/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policy-snapshots/introduction))
643
+ * they may have to pay a _cancellation fee_
644
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-fees/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/booking-fees/introduction)).
645
+ */
646
+ CANCELED = "CANCELED",
647
+ /**
648
+ * The merchant must manually confirm the booking before it appears
649
+ * in the business calendar.
650
+ */
651
+ PENDING = "PENDING",
652
+ /** The merchant has declined the booking before the customer was charged. */
653
+ DECLINED = "DECLINED",
654
+ /**
655
+ * The booking is on a waitlist.
656
+ * Currently, you can't call Register to Waitlist
657
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/waitlist/register-to-waitlist))
658
+ * for course or appointment bookings, even though this is supported in live sites.
659
+ * You can call Register to Waitlist only for class session bookings.
660
+ */
661
+ WAITING_LIST = "WAITING_LIST"
662
+ }
663
+ /**
664
+ * Payment status.
665
+ * Automatically updated when using eCommerce checkout APIs.
666
+ */
667
+ export declare enum PaymentStatus {
668
+ /** Undefined payment status. */
669
+ UNDEFINED = "UNDEFINED",
670
+ /** The booking isn't paid. */
671
+ NOT_PAID = "NOT_PAID",
672
+ /** The booking is fully paid. */
673
+ PAID = "PAID",
674
+ /** The booking is partially paid. */
675
+ PARTIALLY_PAID = "PARTIALLY_PAID",
676
+ /** The booking is refunded. */
677
+ REFUNDED = "REFUNDED",
678
+ /** The booking is free of charge. */
679
+ EXEMPT = "EXEMPT"
680
+ }
681
+ /**
682
+ * Selected payment option.
683
+ *
684
+ * One of the payment options offered by the service.
685
+ * This field is set when the user selects an option during booking.
686
+ * If left undefined, the payment option is resolved by the service configuration on checkout.
687
+ */
688
+ export declare enum SelectedPaymentOption {
689
+ /** Undefined payment option. */
690
+ UNDEFINED = "UNDEFINED",
691
+ /** Offline payment. */
692
+ OFFLINE = "OFFLINE",
693
+ /** Online payment. */
694
+ ONLINE = "ONLINE",
695
+ /** Payment using a Wix Pricing Plan. */
696
+ MEMBERSHIP = "MEMBERSHIP",
697
+ /**
698
+ * Customers can pay only in person with a Wix Pricing Plan, while the Wix user
699
+ * must manually redeem the pricing plan in the dashboard.
700
+ */
701
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
702
+ }
703
+ export interface BookingSource {
704
+ /** Platform from which a booking was created. */
705
+ platform?: Platform;
706
+ /** Actor that created this booking. */
707
+ actor?: Actor;
708
+ /**
709
+ * Wix site ID of the application that created the booking.
710
+ * @format GUID
711
+ * @readonly
712
+ */
713
+ appDefId?: string | null;
714
+ /**
715
+ * Name of the application that created the booking, as saved in Wix Developers Center at the time of booking.
716
+ * @readonly
717
+ */
718
+ appName?: string | null;
719
+ }
720
+ export declare enum Platform {
721
+ UNDEFINED_PLATFORM = "UNDEFINED_PLATFORM",
722
+ WEB = "WEB",
723
+ MOBILE_APP = "MOBILE_APP"
724
+ }
725
+ export declare enum Actor {
726
+ UNDEFINED_ACTOR = "UNDEFINED_ACTOR",
727
+ BUSINESS = "BUSINESS",
728
+ CUSTOMER = "CUSTOMER"
729
+ }
730
+ export interface ParticipantNotification {
731
+ /**
732
+ * Whether to send the message about the changes to the customer.
733
+ *
734
+ * Default: `false`
735
+ */
736
+ notifyParticipants?: boolean;
737
+ /** Custom message to send to the participants about the changes to the booking. */
738
+ message?: string | null;
739
+ }
740
+ export interface IdentificationData extends IdentificationDataIdOneOf {
741
+ /**
742
+ * ID of a site visitor that has not logged in to the site.
743
+ * @format GUID
744
+ */
745
+ anonymousVisitorId?: string;
746
+ /**
747
+ * ID of a site visitor that has logged in to the site.
748
+ * @format GUID
749
+ */
750
+ memberId?: string;
751
+ /**
752
+ * ID of a Wix user (site owner, contributor, etc.).
753
+ * @format GUID
754
+ */
755
+ wixUserId?: string;
756
+ /**
757
+ * ID of an app.
758
+ * @format GUID
759
+ */
760
+ appId?: string;
761
+ /**
762
+ * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
763
+ * @format GUID
764
+ */
765
+ contactId?: string | null;
766
+ }
767
+ /** @oneof */
768
+ export interface IdentificationDataIdOneOf {
769
+ /**
770
+ * ID of a site visitor that has not logged in to the site.
771
+ * @format GUID
772
+ */
773
+ anonymousVisitorId?: string;
774
+ /**
775
+ * ID of a site visitor that has logged in to the site.
776
+ * @format GUID
777
+ */
778
+ memberId?: string;
779
+ /**
780
+ * ID of a Wix user (site owner, contributor, etc.).
781
+ * @format GUID
782
+ */
783
+ wixUserId?: string;
784
+ /**
785
+ * ID of an app.
786
+ * @format GUID
787
+ */
788
+ appId?: string;
789
+ }
790
+ export declare enum IdentityType {
791
+ UNKNOWN = "UNKNOWN",
792
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
793
+ MEMBER = "MEMBER",
794
+ WIX_USER = "WIX_USER",
795
+ APP = "APP"
796
+ }
797
+ export interface FlowControlSettings {
798
+ /** Whether availability is checked when creating or confirming the booking. */
799
+ skipAvailabilityValidation?: boolean;
800
+ /**
801
+ * Whether the booking's `status` is automatically updated to `CONFIRMED` when
802
+ * the customer completes the *eCommerce checkout*
803
+ * ([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)),
804
+ * regardless of whether the relevant service requires manual business confirmation.
805
+ */
806
+ skipBusinessConfirmation?: boolean;
807
+ /**
808
+ * Whether the customer is allowed to pay with a payment method that isn't
809
+ * supported for the relevant service.
810
+ */
811
+ skipSelectedPaymentOptionValidation?: boolean;
812
+ /**
813
+ * Whether the customer receives an automatic refund if there's a double booking
814
+ * conflict. Only available if the customer has paid with a
815
+ * pricing plan.
816
+ */
817
+ withRefund?: boolean | null;
818
+ }
819
+ export interface ExtendedFields {
820
+ /**
821
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
822
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
823
+ *
824
+ * You can only access fields for which you have the appropriate permissions.
825
+ *
826
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
827
+ */
828
+ namespaces?: Record<string, Record<string, any>>;
829
+ }
830
+ export interface ParticipantChoices {
831
+ /**
832
+ * Information about the booked service choices. Includes the number of participants.
833
+ * @minSize 1
834
+ * @maxSize 20
835
+ */
836
+ serviceChoices?: ServiceChoices[];
837
+ }
838
+ export interface ServiceChoices {
839
+ /**
840
+ * Number of participants for this _variant_
841
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
842
+ * @min 1
843
+ */
844
+ numberOfParticipants?: number | null;
845
+ /**
846
+ * Service choices for these participants.
847
+ * @maxSize 5
848
+ */
849
+ choices?: ServiceChoice[];
850
+ }
851
+ export interface MultiServiceBookingInfo {
852
+ /**
853
+ * Multi-service booking ID.
854
+ * @format GUID
855
+ * @readonly
856
+ */
857
+ _id?: string | null;
858
+ /** Type of the multi-service booking. */
859
+ type?: MultiServiceBookingType;
860
+ }
861
+ export interface BookedAddOn {
862
+ /**
863
+ * The ID of the Add-On.
864
+ * @format GUID
865
+ */
866
+ _id?: string;
867
+ /**
868
+ * The ID of the Add-Ons group.
869
+ * @format GUID
870
+ */
871
+ groupId?: string;
872
+ /**
873
+ * The Add-On duration in minutes at the time of Booking.
874
+ * @min 1
875
+ * @max 1440
876
+ * @readonly
877
+ */
878
+ durationInMinutes?: number | null;
879
+ /**
880
+ * The quantity of booked Add-Ons.
881
+ * @min 1
882
+ * @max 1000
883
+ */
884
+ quantity?: number | null;
885
+ }
886
+ export interface CalculatePriceResponse {
887
+ /** Information about each line item's base price and the total base price. */
888
+ priceInfo?: PriceInfo;
889
+ }
890
+ type PriceInfoNonNullablePaths = `calculatedPrice` | `priceDescription` | `priceDescriptionInfo.original` | `bookingLineItems`;
891
+ /**
892
+ * Previews the base price for a set of line items belonging to the same
893
+ * service, before a booking is created. During the booking flow, additional
894
+ * taxes and fees may be added to the base price.
895
+ *
896
+ *
897
+ * ## Response
898
+ *
899
+ * The response includes each line item's individual preview price and the
900
+ * total of all line item preview prices. Note that the final price upon
901
+ * booking creation may differ from the preview price.
902
+ *
903
+ * ## Errors
904
+ *
905
+ * _Preview Price_ fails if:
906
+ *
907
+ * - You specify line items that belong to different *services*
908
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)).
909
+ * - The site is using the *Bookings Pricing Integration SPI*
910
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/introduction)).
911
+ *
912
+ * ## When to call Calculate Price instead
913
+ *
914
+ * To retrieve the price of an existing booking, call *Calculate Price*
915
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/pricing/calculate-price) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/calculate-price)).
916
+ * @param bookingLineItems - List of line items to preview the price for.
917
+ * @public
918
+ * @documentationMaturity preview
919
+ * @requiredField bookingLineItems
920
+ * @permissionId BOOKINGS.PRICE_PREVIEW
921
+ * @permissionScope Manage Bookings Services and Settings
922
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
923
+ * @permissionScope Manage Bookings
924
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
925
+ * @permissionScope Read Bookings - Including Participants
926
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
927
+ * @permissionScope Read Bookings - all read permissions
928
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
929
+ * @permissionScope Manage Bookings - all permissions
930
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
931
+ * @applicableIdentity APP
932
+ * @applicableIdentity VISITOR
933
+ * @fqn com.wixpress.bookings.pricing.BookingsPricingService.PreviewPrice
934
+ */
935
+ export declare function previewPrice(bookingLineItems: BookingLineItem[]): Promise<NonNullablePaths<PreviewPriceResponse, {
936
+ [P in PriceInfoNonNullablePaths]: `priceInfo.${P}`;
937
+ }[PriceInfoNonNullablePaths]>>;
938
+ /**
939
+ * Calculates the base price of a booking.
940
+ *
941
+ *
942
+ * The returned price serves as the foundation for charging the customer. During the
943
+ * _eCommerce checkout_
944
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/introduction)),
945
+ * additional taxes and fees may be added to this base price.
946
+ *
947
+ * ## Price calculation method
948
+ *
949
+ * By default, Wix Bookings calculates a booking's price based on the relevant
950
+ * `serviceOptionsAndVariants.variants.values.price`
951
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/service-options-and-variants/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/service-options-and-variants/introduction)).
952
+ * You must then specify either `booking.bookedEntity.slot.serviceId` or
953
+ * `booking.bookedEntity.schedule.scheduleId`.
954
+ *
955
+ * If the business uses the *Wix Bookings Pricing Integration service plugin*
956
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/introduction)),
957
+ * the returned `priceInfo` object reflects values received from the SPI implementor in
958
+ * _Calculate Price_
959
+ * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/calculate-price)).
960
+ * In this case, it suffices to specify `booking.bookedEntity`.
961
+ *
962
+ * ## When to call Preview Price instead
963
+ *
964
+ * To estimate the price for multiple booking line items before the booking exists,
965
+ * call *Preview Price*
966
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/pricing/preview-price) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/preview-price)).
967
+ * @param booking - _Booking_
968
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/introduction))
969
+ * to calculate the base price for.
970
+ * @public
971
+ * @documentationMaturity preview
972
+ * @requiredField booking
973
+ * @permissionId BOOKINGS.PRICE_CALCULATE
974
+ * @permissionScope Manage Bookings Services and Settings
975
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
976
+ * @permissionScope Manage Bookings
977
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
978
+ * @permissionScope Read Bookings - Including Participants
979
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
980
+ * @permissionScope Read Bookings - all read permissions
981
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
982
+ * @permissionScope Manage Bookings - all permissions
983
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
984
+ * @applicableIdentity APP
985
+ * @applicableIdentity VISITOR
986
+ * @fqn com.wixpress.bookings.pricing.BookingsPricingService.CalculatePrice
987
+ */
988
+ export declare function calculatePrice(booking: Booking): Promise<NonNullablePaths<CalculatePriceResponse, {
989
+ [P in PriceInfoNonNullablePaths]: `priceInfo.${P}`;
990
+ }[PriceInfoNonNullablePaths]>>;
991
+ export {};