@wix/auto_sdk_bookings_pricing 1.0.8 → 1.0.10

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