@wix/auto_sdk_bookings_pricing 1.0.12 → 1.0.13

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} +54 -56
  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 +1007 -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} +54 -56
  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 +1007 -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} +54 -56
  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 +1007 -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} +54 -56
  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 +1007 -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
package/build/meta.d.ts DELETED
@@ -1,793 +0,0 @@
1
- import { j as PreviewPriceRequest$1, P as PreviewPriceResponse$1, k as CalculatePriceRequest$1, C as CalculatePriceResponse$1 } from './bookings-v2-price-info-pricing.universal-Ci_8AyL2.js';
2
-
3
- interface PriceInfo extends PriceInfoTotalPriceOneOf {
4
- /**
5
- * Calculated total price. Available if the _service's_
6
- * ([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))
7
- * `payment.rateType` is `FIXED`, `VARIED`, or `NO_FEE`.
8
- */
9
- calculatedPrice?: number;
10
- /**
11
- * Description of the total price. Available if the _service's_
12
- * ([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))
13
- * `payment.rateType` is `CUSTOM`.
14
- * @deprecated Description of the total price. Available if the _service's_
15
- * ([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))
16
- * `payment.rateType` is `CUSTOM`.
17
- * @replacedBy price_description_info.original
18
- * @targetRemovalDate 2025-01-10
19
- */
20
- priceDescription?: string;
21
- /**
22
- * Description of the total price. Available if the _service's_
23
- * ([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))
24
- * `payment.rateType` is `CUSTOM`.
25
- */
26
- priceDescriptionInfo?: PriceDescriptionInfo;
27
- /**
28
- * List of line items, including the number of participants and the price per participant.
29
- * @maxSize 20
30
- */
31
- bookingLineItems?: BookingLineItem[];
32
- /**
33
- * Total deposit the customer must pay when booking the service. Available if
34
- * the _service's_
35
- * ([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))
36
- * `payment.options.deposit` is set to `true`.
37
- */
38
- deposit?: number | null;
39
- }
40
- /** @oneof */
41
- interface PriceInfoTotalPriceOneOf {
42
- /**
43
- * Calculated total price. Available if the _service's_
44
- * ([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))
45
- * `payment.rateType` is `FIXED`, `VARIED`, or `NO_FEE`.
46
- */
47
- calculatedPrice?: number;
48
- /**
49
- * Description of the total price. Available if the _service's_
50
- * ([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))
51
- * `payment.rateType` is `CUSTOM`.
52
- * @deprecated Description of the total price. Available if the _service's_
53
- * ([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))
54
- * `payment.rateType` is `CUSTOM`.
55
- * @replacedBy price_description_info.original
56
- * @targetRemovalDate 2025-01-10
57
- */
58
- priceDescription?: string;
59
- /**
60
- * Description of the total price. Available if the _service's_
61
- * ([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))
62
- * `payment.rateType` is `CUSTOM`.
63
- */
64
- priceDescriptionInfo?: PriceDescriptionInfo;
65
- }
66
- interface BookingLineItem {
67
- /**
68
- * _Service ID_
69
- * ([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)).
70
- *
71
- * Required in *Calculate Price*
72
- * ([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))
73
- * if the site uses Wix Bookings' default pricing logic.
74
- *
75
- * Optional in *Calculate Price*
76
- * ([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))
77
- * if the site use pricing logic defined by a
78
- * Wix Bookings Pricing Integration service plugin*
79
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/introduction))
80
- * integration.
81
- * @format GUID
82
- */
83
- serviceId?: string | null;
84
- /**
85
- * _Resource ID_
86
- * ([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)).
87
- * Required in *Calculate Price*
88
- * ([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))
89
- * and *Preview Price*
90
- * ([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))
91
- * for appointment-based services and classes.
92
- * @format GUID
93
- */
94
- resourceId?: string | null;
95
- /**
96
- * Custom choices. Choices are specific values for an option the customer can choose to book.
97
- * For example, the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
98
- * Each choice may have a different price. Refer to the *Service Options And Variants API*
99
- * ([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))
100
- * for more details.
101
- */
102
- choices?: ServiceChoice[];
103
- /**
104
- * Number of participants for the line item.
105
- * @min 1
106
- */
107
- numberOfParticipants?: number | null;
108
- /**
109
- * Price per participant for the line item.
110
- * @readonly
111
- */
112
- pricePerParticipant?: number | null;
113
- }
114
- interface ServiceChoice extends ServiceChoiceChoiceOneOf {
115
- /**
116
- * Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
117
- * Choices are specific values for an option the customer can choose to book. For example,
118
- * the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
119
- * Each choice may have a different price.
120
- */
121
- custom?: string;
122
- duration?: Duration;
123
- /**
124
- * ID of the corresponding option for the choice. For example, the choice `child`
125
- * could correspond to the option `ageGroup`. In this case, `optionId` is the ID
126
- * for the `ageGroup` option.
127
- * @format GUID
128
- */
129
- optionId?: string;
130
- }
131
- /** @oneof */
132
- interface ServiceChoiceChoiceOneOf {
133
- /**
134
- * Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
135
- * Choices are specific values for an option the customer can choose to book. For example,
136
- * the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
137
- * Each choice may have a different price.
138
- */
139
- custom?: string;
140
- duration?: Duration;
141
- }
142
- interface Duration {
143
- /**
144
- * Duration of the service in minutes.
145
- * Min: 1 minute, Max: 30 days, 23 hours, and 59 minutes
146
- * @min 1
147
- * @max 44639
148
- */
149
- minutes?: number;
150
- /**
151
- * Name of the duration option.
152
- * Defaults to the formatted duration e.g. "1 hour, 30 minutes".
153
- * @maxLength 255
154
- */
155
- name?: string | null;
156
- }
157
- interface PriceDescriptionInfo {
158
- /**
159
- * Price description in the site's main language. Refer to the *Site Properties API*
160
- * ([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))
161
- * for more details.
162
- * @maxLength 50
163
- */
164
- original?: string;
165
- /**
166
- * Translated price description. Available if the booking was made in a
167
- * secondary language.
168
- * @maxLength 50
169
- */
170
- translated?: string | null;
171
- }
172
- interface PreviewPriceRequest {
173
- /**
174
- * List of line items to preview the price for.
175
- * @minSize 1
176
- * @maxSize 20
177
- */
178
- bookingLineItems: BookingLineItem[];
179
- }
180
- interface PreviewPriceResponse {
181
- /** Information about each line item's price and the estimated total price based on the line items. */
182
- priceInfo?: PriceInfo;
183
- }
184
- interface CalculatePriceRequest {
185
- /**
186
- * _Booking_
187
- * ([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))
188
- * to calculate the base price for.
189
- */
190
- booking: Booking;
191
- }
192
- /** An entity representing a scheduled appointment, class session, or course. */
193
- interface Booking extends BookingParticipantsInfoOneOf {
194
- /**
195
- * Total number of participants. Available only when the relevant service
196
- * doesn't have _variants and options_
197
- * ([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)).
198
- * @min 1
199
- */
200
- totalParticipants?: number;
201
- /**
202
- * Information about the booked service choices and participants.
203
- * Available only when the booking includes multiple _service variants_
204
- * ([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)).
205
- */
206
- participantsChoices?: ParticipantChoices;
207
- /**
208
- * Booking ID.
209
- * @format GUID
210
- * @readonly
211
- */
212
- id?: string | null;
213
- /**
214
- * An object describing the *slot*
215
- * ([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))
216
- * or *schedule*
217
- * ([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))
218
- * that was booked.
219
- */
220
- bookedEntity?: BookedEntity;
221
- /**
222
- * Contact details of the site visitor or *member*
223
- * ([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))
224
- * making the booking.
225
- */
226
- contactDetails?: ContactDetails;
227
- /** Additional custom fields submitted with the booking form. */
228
- additionalFields?: CustomFormField[];
229
- /**
230
- * Booking status. A booking is automatically confirmed if the service allows it
231
- * and an eCommerce order is created. It is automatically declined if there is a
232
- * double booking and the customer hasn't paid or is eligible for an automatic
233
- * refund. Currently, only payments with pricing plans are automatically refundable.
234
- */
235
- status?: BookingStatus;
236
- /**
237
- * The payment status of the booking corresponds to the `paymentStatus` of the
238
- * related *eCommerce order*
239
- * ([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)),
240
- * if one exists. All payment statuses are supported for every booking `status`.
241
- */
242
- paymentStatus?: PaymentStatus;
243
- /**
244
- * Payment option selected by the customer. If the customer hasn't completed their
245
- * checkout, they may still change the payment method. Must be one of the payment
246
- * 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)),
247
- * unless `skipSelectedPaymentOptionValidation` is `true`.
248
- * When undefined during an *eCommerce checkout*
249
- * ([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)),
250
- * Wix Bookings uses the service's default payment option
251
- */
252
- selectedPaymentOption?: SelectedPaymentOption;
253
- /**
254
- * Date and time the booking was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
255
- * @readonly
256
- */
257
- createdDate?: Date | null;
258
- /** External user ID that you can provide. */
259
- externalUserId?: string | null;
260
- /**
261
- * Revision number to be used when updating, rescheduling, or cancelling the
262
- * booking. Increments by 1 each time the booking is updated, rescheduled, or
263
- * canceled. To prevent conflicting changes, the current revision must be
264
- * specified when updating the booking.
265
- */
266
- revision?: string | null;
267
- /**
268
- * ID of the creator of the booking.
269
- * If `appId` and another ID are present, the other ID takes precedence.
270
- * @readonly
271
- */
272
- createdBy?: IdentificationData;
273
- /**
274
- * The start date of the booking in `YYYY-MM-DDThh:mm:ss.sssZ` format.
275
- * For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session.
276
- * @readonly
277
- */
278
- startDate?: Date | null;
279
- /**
280
- * The end date of the booking in `YYYY-MM-DDThh:mm:ss.sssZ` format.
281
- * For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session.
282
- * @readonly
283
- */
284
- endDate?: Date | null;
285
- /**
286
- * Date and time the booking was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
287
- * @readonly
288
- */
289
- updatedDate?: Date | null;
290
- /**
291
- * Custom field data for this object.
292
- * Extended fields must be configured in the app dashboard before they can be accessed with API calls.
293
- */
294
- extendedFields?: ExtendedFields;
295
- /**
296
- * Whether this booking overlaps with another confirmed booking. Returned
297
- * only if set to `true`.
298
- * @readonly
299
- */
300
- doubleBooked?: boolean | null;
301
- }
302
- /** @oneof */
303
- interface BookingParticipantsInfoOneOf {
304
- /**
305
- * Total number of participants. Available only when the relevant service
306
- * doesn't have _variants and options_
307
- * ([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)).
308
- * @min 1
309
- */
310
- totalParticipants?: number;
311
- /**
312
- * Information about the booked service choices and participants.
313
- * Available only when the booking includes multiple _service variants_
314
- * ([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)).
315
- */
316
- participantsChoices?: ParticipantChoices;
317
- }
318
- interface BookedEntity extends BookedEntityItemOneOf {
319
- /**
320
- * Booked *slot*
321
- * ([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)).
322
- * Available only for appointment-based services and classes.
323
- * For appointment-based services, a new session is created, while for classes,
324
- * the booking is automatically linked to the existing session.
325
- */
326
- slot?: BookedSlot;
327
- /**
328
- * Booked *schedule*
329
- * ([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)).
330
- * Available only for course bookings.
331
- */
332
- schedule?: BookedSchedule;
333
- /**
334
- * Session title at the time of booking. If there is no pre-existing session,
335
- * for example for appointment-based services, `title` is set to the service name.
336
- * @readonly
337
- * @maxLength 6000
338
- */
339
- title?: string | null;
340
- /**
341
- * List of tags for the booking.
342
- *
343
- * - "INDIVIDUAL": For bookings of appointment-based services. Including when the appointment is for a group of participants.
344
- * - "GROUP": For bookings of individual class sessions.
345
- * - "COURSE": For course bookings.
346
- */
347
- tags?: string[] | null;
348
- }
349
- /** @oneof */
350
- interface BookedEntityItemOneOf {
351
- /**
352
- * Booked *slot*
353
- * ([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)).
354
- * Available only for appointment-based services and classes.
355
- * For appointment-based services, a new session is created, while for classes,
356
- * the booking is automatically linked to the existing session.
357
- */
358
- slot?: BookedSlot;
359
- /**
360
- * Booked *schedule*
361
- * ([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)).
362
- * Available only for course bookings.
363
- */
364
- schedule?: BookedSchedule;
365
- }
366
- interface BookedSlot {
367
- /** Session ID. */
368
- sessionId?: string | null;
369
- /** Service ID. */
370
- serviceId?: string;
371
- /** Schedule ID. */
372
- scheduleId?: string;
373
- /**
374
- * ID of the corresponding *event*
375
- * ([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)).
376
- * Available for both appointment and class bookings, not available for course bookings.
377
- * For appointment-based services, Wix Bookings automatically populates `eventId`
378
- * when the booking `status` changes to `CONFIRMED`. For class bookings, it's
379
- * automatically populated upon booking creation.
380
- * @minLength 36
381
- * @maxLength 250
382
- */
383
- eventId?: string | null;
384
- /**
385
- * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
386
- * format.
387
- */
388
- startDate?: string | null;
389
- /**
390
- * The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
391
- * format.
392
- */
393
- endDate?: string | null;
394
- /** The timezone according to which the slot was shown to the user when booking, and should be shown in the future. */
395
- timezone?: string | null;
396
- /**
397
- * Primary *resource*
398
- * ([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))
399
- * for the booking. For example, the *staff member*
400
- * ([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))
401
- * providing the
402
- * service.
403
- */
404
- resource?: BookedResource;
405
- /** Location where the session takes place. */
406
- location?: Location;
407
- }
408
- interface BookedResource {
409
- /**
410
- * ID of the booking's primary resource.
411
- * @format GUID
412
- */
413
- id?: string;
414
- /**
415
- * Resource's name at the time of booking.
416
- * @maxLength 40
417
- */
418
- name?: string | null;
419
- /**
420
- * Resource's email at the time of booking.
421
- * @maxLength 500
422
- */
423
- email?: string | null;
424
- /**
425
- * ID of the schedule belonging to the booking's primary resource.
426
- * @format GUID
427
- */
428
- scheduleId?: string | null;
429
- }
430
- interface Location {
431
- /**
432
- * Business location ID. Available only for locations that are business locations,
433
- * meaning the `location_type` is `"OWNER_BUSINESS"`.
434
- * @format GUID
435
- */
436
- id?: string | null;
437
- /** Location name. */
438
- name?: string | null;
439
- /** The full address of this location. */
440
- formattedAddress?: string | null;
441
- /**
442
- * The full translated address of this location.
443
- * @maxLength 512
444
- */
445
- formattedAddressTranslated?: string | null;
446
- /**
447
- * Location type.
448
- *
449
- * - `"OWNER_BUSINESS"`: The business address, as set in the site’s general settings.
450
- * - `"OWNER_CUSTOM"`: The address as set when creating the service.
451
- * - `"CUSTOM"`: The address as set for the individual session.
452
- */
453
- locationType?: LocationType;
454
- }
455
- declare enum LocationType {
456
- UNDEFINED = "UNDEFINED",
457
- OWNER_BUSINESS = "OWNER_BUSINESS",
458
- OWNER_CUSTOM = "OWNER_CUSTOM",
459
- CUSTOM = "CUSTOM"
460
- }
461
- interface BookedSchedule {
462
- /**
463
- * _Schedule ID_
464
- * ([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)).
465
- */
466
- scheduleId?: string;
467
- /**
468
- * Booked service ID.
469
- * @format GUID
470
- */
471
- serviceId?: string | null;
472
- /**
473
- * _Location_
474
- * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))
475
- * where the schedule's sessions take place.
476
- * @readonly
477
- */
478
- location?: Location;
479
- /**
480
- * Timezone in which the slot or session was shown to the customer when they booked.
481
- * Also used whenever the customer reviews the booking's timing in the future.
482
- */
483
- timezone?: string | null;
484
- /**
485
- * Start time of the first session related to the booking in
486
- * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
487
- * @readonly
488
- */
489
- firstSessionStart?: string | null;
490
- /**
491
- * End time of the last session related to the booking in
492
- * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
493
- * @readonly
494
- */
495
- lastSessionEnd?: string | null;
496
- }
497
- interface ContactDetails {
498
- /**
499
- * Contact ID.
500
- * @format GUID
501
- */
502
- contactId?: string | null;
503
- /**
504
- * Contact's first name. When populated from a standard booking form, this
505
- * property corresponds to the `name` field.
506
- */
507
- firstName?: string | null;
508
- /** Contact's last name. */
509
- lastName?: string | null;
510
- /**
511
- * Contact's email. If no [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)
512
- * with this email exist, a new contact is created.
513
- * Used to validate coupon usage limitations per contact. If not specified,
514
- * the coupon usage limitation will not be enforced. (Coupon usage limitation
515
- * validation is not supported yet).
516
- * @format EMAIL
517
- */
518
- email?: string | null;
519
- /** Contact's phone number. */
520
- phone?: string | null;
521
- /** Contact's full address. */
522
- fullAddress?: Address;
523
- /**
524
- * Contact's time zone.
525
- * @deprecated
526
- */
527
- timeZone?: string | null;
528
- /**
529
- * Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
530
- * format.
531
- * @format COUNTRY
532
- */
533
- countryCode?: string | null;
534
- }
535
- /** Physical address */
536
- interface Address extends AddressStreetOneOf {
537
- /** Street name, number and apartment number. */
538
- streetAddress?: StreetAddress;
539
- /** Main address line, usually street and number, as free text. */
540
- addressLine?: string | null;
541
- /**
542
- * Country code.
543
- * @format COUNTRY
544
- */
545
- country?: string | null;
546
- /** Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
547
- subdivision?: string | null;
548
- /** City name. */
549
- city?: string | null;
550
- /** Zip/postal code. */
551
- postalCode?: string | null;
552
- /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
553
- addressLine2?: string | null;
554
- /** A string containing the full address of this location. */
555
- formattedAddress?: string | null;
556
- /** Free text to help find the address. */
557
- hint?: string | null;
558
- /** Coordinates of the physical address. */
559
- geocode?: AddressLocation;
560
- /** Country full name. */
561
- countryFullname?: string | null;
562
- /** Multi-level subdivisions from top to bottom. */
563
- subdivisions?: Subdivision[];
564
- }
565
- /** @oneof */
566
- interface AddressStreetOneOf {
567
- /** Street name, number and apartment number. */
568
- streetAddress?: StreetAddress;
569
- /** Main address line, usually street and number, as free text. */
570
- addressLine?: string | null;
571
- }
572
- interface StreetAddress {
573
- /** Street number. */
574
- number?: string;
575
- /** Street name. */
576
- name?: string;
577
- /** Apartment number. */
578
- apt?: string;
579
- }
580
- interface AddressLocation {
581
- /** Address latitude. */
582
- latitude?: number | null;
583
- /** Address longitude. */
584
- longitude?: number | null;
585
- }
586
- interface Subdivision {
587
- /** Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
588
- code?: string;
589
- /** Subdivision full name. */
590
- name?: string;
591
- }
592
- interface CustomFormField {
593
- /**
594
- * ID of the form field as defined in the form.
595
- * @format GUID
596
- */
597
- id?: string;
598
- /** Value that was submitted for this field. */
599
- value?: string | null;
600
- /**
601
- * Form field's label at the time of submission.
602
- * @readonly
603
- */
604
- label?: string | null;
605
- valueType?: ValueType;
606
- }
607
- declare enum ValueType {
608
- /** Short text. This is the default value type. */
609
- SHORT_TEXT = "SHORT_TEXT",
610
- /** Long text. */
611
- LONG_TEXT = "LONG_TEXT",
612
- /** A text that represents the check box value. If selected the value is `true`, otherwise `false`. */
613
- CHECK_BOX = "CHECK_BOX"
614
- }
615
- /** Booking status. */
616
- declare enum BookingStatus {
617
- /**
618
- * The booking was created, but the customer hasn't completed the related
619
- * eCommerce order yet.
620
- */
621
- CREATED = "CREATED",
622
- /**
623
- * The merchant has confirmed the booking and it appears in the
624
- * business calendar. Merchants can set up their *services*
625
- * ([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))
626
- * to automatically confirm all `PENDING` bookings.
627
- */
628
- CONFIRMED = "CONFIRMED",
629
- /**
630
- * The customer has canceled the booking. Depending on the relevant service's
631
- * _policy snapshot_
632
- * ([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))
633
- * they may have to pay a _cancellation fee_
634
- * ([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)).
635
- */
636
- CANCELED = "CANCELED",
637
- /**
638
- * The merchant must manually confirm the booking before it appears
639
- * in the business calendar.
640
- */
641
- PENDING = "PENDING",
642
- /** The merchant has declined the booking before the customer was charged. */
643
- DECLINED = "DECLINED",
644
- /**
645
- * The booking is on a waitlist.
646
- * Currently, you can't call Register to Waitlist
647
- * ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/waitlist/register-to-waitlist))
648
- * for course or appointment bookings, even though this is supported in live sites.
649
- * You can call Register to Waitlist only for class session bookings.
650
- */
651
- WAITING_LIST = "WAITING_LIST"
652
- }
653
- /**
654
- * Payment status.
655
- * Automatically updated when using eCommerce checkout APIs.
656
- */
657
- declare enum PaymentStatus {
658
- /** Undefined payment status. */
659
- UNDEFINED = "UNDEFINED",
660
- /** The booking isn't paid. */
661
- NOT_PAID = "NOT_PAID",
662
- /** The booking is fully paid. */
663
- PAID = "PAID",
664
- /** The booking is partially paid. */
665
- PARTIALLY_PAID = "PARTIALLY_PAID",
666
- /** The booking is refunded. */
667
- REFUNDED = "REFUNDED",
668
- /** The booking is free of charge. */
669
- EXEMPT = "EXEMPT"
670
- }
671
- /**
672
- * Selected payment option.
673
- *
674
- * One of the payment options offered by the service.
675
- * This field is set when the user selects an option during booking.
676
- * If left undefined, the payment option is resolved by the service configuration on checkout.
677
- */
678
- declare enum SelectedPaymentOption {
679
- /** Undefined payment option. */
680
- UNDEFINED = "UNDEFINED",
681
- /** Offline payment. */
682
- OFFLINE = "OFFLINE",
683
- /** Online payment. */
684
- ONLINE = "ONLINE",
685
- /** Payment using a Wix Pricing Plan. */
686
- MEMBERSHIP = "MEMBERSHIP",
687
- /**
688
- * Customers can pay only in person with a Wix Pricing Plan, while the Wix user
689
- * must manually redeem the pricing plan in the dashboard.
690
- */
691
- MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
692
- }
693
- interface IdentificationData extends IdentificationDataIdOneOf {
694
- /**
695
- * ID of a site visitor that has not logged in to the site.
696
- * @format GUID
697
- */
698
- anonymousVisitorId?: string;
699
- /**
700
- * ID of a site visitor that has logged in to the site.
701
- * @format GUID
702
- */
703
- memberId?: string;
704
- /**
705
- * ID of a Wix user (site owner, contributor, etc.).
706
- * @format GUID
707
- */
708
- wixUserId?: string;
709
- /**
710
- * ID of an app.
711
- * @format GUID
712
- */
713
- appId?: string;
714
- /**
715
- * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
716
- * @format GUID
717
- */
718
- contactId?: string | null;
719
- }
720
- /** @oneof */
721
- interface IdentificationDataIdOneOf {
722
- /**
723
- * ID of a site visitor that has not logged in to the site.
724
- * @format GUID
725
- */
726
- anonymousVisitorId?: string;
727
- /**
728
- * ID of a site visitor that has logged in to the site.
729
- * @format GUID
730
- */
731
- memberId?: string;
732
- /**
733
- * ID of a Wix user (site owner, contributor, etc.).
734
- * @format GUID
735
- */
736
- wixUserId?: string;
737
- /**
738
- * ID of an app.
739
- * @format GUID
740
- */
741
- appId?: string;
742
- }
743
- interface ExtendedFields {
744
- /**
745
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
746
- * The value of each key is structured according to the schema defined when the extended fields were configured.
747
- *
748
- * You can only access fields for which you have the appropriate permissions.
749
- *
750
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
751
- */
752
- namespaces?: Record<string, Record<string, any>>;
753
- }
754
- interface ParticipantChoices {
755
- /**
756
- * Information about the booked service choices. Includes the number of participants.
757
- * @minSize 1
758
- * @maxSize 20
759
- */
760
- serviceChoices?: ServiceChoices[];
761
- }
762
- interface ServiceChoices {
763
- /**
764
- * Number of participants for this _variant_
765
- * ([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)).
766
- * @min 1
767
- */
768
- numberOfParticipants?: number | null;
769
- /**
770
- * Service choices for these participants.
771
- * @maxSize 5
772
- */
773
- choices?: ServiceChoice[];
774
- }
775
- interface CalculatePriceResponse {
776
- /** Information about each line item's base price and the total base price. */
777
- priceInfo?: PriceInfo;
778
- }
779
-
780
- type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
781
- getUrl: (context: any) => string;
782
- httpMethod: K;
783
- path: string;
784
- pathParams: M;
785
- __requestType: T;
786
- __originalRequestType: S;
787
- __responseType: Q;
788
- __originalResponseType: R;
789
- };
790
- declare function previewPrice(): __PublicMethodMetaInfo<'POST', {}, PreviewPriceRequest$1, PreviewPriceRequest, PreviewPriceResponse$1, PreviewPriceResponse>;
791
- declare function calculatePrice(): __PublicMethodMetaInfo<'POST', {}, CalculatePriceRequest$1, CalculatePriceRequest, CalculatePriceResponse$1, CalculatePriceResponse>;
792
-
793
- export { type __PublicMethodMetaInfo, calculatePrice, previewPrice };