@wix/bookings 1.0.0 → 1.0.2

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 (137) hide show
  1. package/build/cjs/index.d.ts +5 -0
  2. package/build/cjs/index.js +6 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/bookings-availability-v1-slot-availability.http.d.ts +6 -6
  5. package/build/cjs/src/bookings-availability-v1-slot-availability.http.js +6 -6
  6. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -29
  7. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js +7 -6
  8. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  9. package/build/cjs/src/bookings-calendar-v1-session.http.d.ts +75 -0
  10. package/build/cjs/src/bookings-calendar-v1-session.http.js +355 -0
  11. package/build/cjs/src/bookings-calendar-v1-session.http.js.map +1 -0
  12. package/build/cjs/src/bookings-calendar-v1-session.public.d.ts +8 -0
  13. package/build/cjs/src/bookings-calendar-v1-session.public.js +41 -0
  14. package/build/cjs/src/bookings-calendar-v1-session.public.js.map +1 -0
  15. package/build/cjs/src/bookings-calendar-v1-session.types.d.ts +1011 -0
  16. package/build/cjs/src/bookings-calendar-v1-session.types.js +110 -0
  17. package/build/cjs/src/bookings-calendar-v1-session.types.js.map +1 -0
  18. package/build/cjs/src/bookings-calendar-v1-session.universal.d.ts +1178 -0
  19. package/build/cjs/src/bookings-calendar-v1-session.universal.js +437 -0
  20. package/build/cjs/src/bookings-calendar-v1-session.universal.js.map +1 -0
  21. package/build/cjs/src/bookings-catalog-v1-resource.http.d.ts +195 -0
  22. package/build/cjs/src/bookings-catalog-v1-resource.http.js +564 -0
  23. package/build/cjs/src/bookings-catalog-v1-resource.http.js.map +1 -0
  24. package/build/cjs/src/bookings-catalog-v1-resource.public.d.ts +10 -0
  25. package/build/cjs/src/bookings-catalog-v1-resource.public.js +55 -0
  26. package/build/cjs/src/bookings-catalog-v1-resource.public.js.map +1 -0
  27. package/build/cjs/src/bookings-catalog-v1-resource.types.d.ts +931 -0
  28. package/build/cjs/src/bookings-catalog-v1-resource.types.js +125 -0
  29. package/build/cjs/src/bookings-catalog-v1-resource.types.js.map +1 -0
  30. package/build/cjs/src/bookings-catalog-v1-resource.universal.d.ts +1201 -0
  31. package/build/cjs/src/bookings-catalog-v1-resource.universal.js +740 -0
  32. package/build/cjs/src/bookings-catalog-v1-resource.universal.js.map +1 -0
  33. package/build/cjs/src/bookings-reader-v2-extended-booking.http.d.ts +38 -0
  34. package/build/cjs/src/bookings-reader-v2-extended-booking.http.js +117 -0
  35. package/build/cjs/src/bookings-reader-v2-extended-booking.http.js.map +1 -0
  36. package/build/cjs/src/bookings-reader-v2-extended-booking.public.d.ts +5 -0
  37. package/build/cjs/src/bookings-reader-v2-extended-booking.public.js +22 -0
  38. package/build/cjs/src/bookings-reader-v2-extended-booking.public.js.map +1 -0
  39. package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +730 -0
  40. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js +90 -0
  41. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js.map +1 -0
  42. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +786 -0
  43. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js +226 -0
  44. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js.map +1 -0
  45. package/build/cjs/src/bookings-v2-booking.http.d.ts +123 -0
  46. package/build/cjs/src/bookings-v2-booking.http.js +305 -0
  47. package/build/cjs/src/bookings-v2-booking.http.js.map +1 -0
  48. package/build/cjs/src/bookings-v2-booking.public.d.ts +9 -0
  49. package/build/cjs/src/bookings-v2-booking.public.js +47 -0
  50. package/build/cjs/src/bookings-v2-booking.public.js.map +1 -0
  51. package/build/cjs/src/bookings-v2-booking.types.d.ts +1594 -0
  52. package/build/cjs/src/bookings-v2-booking.types.js +99 -0
  53. package/build/cjs/src/bookings-v2-booking.types.js.map +1 -0
  54. package/build/cjs/src/bookings-v2-booking.universal.d.ts +1840 -0
  55. package/build/cjs/src/bookings-v2-booking.universal.js +561 -0
  56. package/build/cjs/src/bookings-v2-booking.universal.js.map +1 -0
  57. package/build/cjs/src/bookings-v2-price-info.http.d.ts +56 -0
  58. package/build/cjs/src/bookings-v2-price-info.http.js +164 -0
  59. package/build/cjs/src/bookings-v2-price-info.http.js.map +1 -0
  60. package/build/cjs/src/bookings-v2-price-info.public.d.ts +6 -0
  61. package/build/cjs/src/bookings-v2-price-info.public.js +26 -0
  62. package/build/cjs/src/bookings-v2-price-info.public.js.map +1 -0
  63. package/build/cjs/src/bookings-v2-price-info.types.d.ts +594 -0
  64. package/build/cjs/src/bookings-v2-price-info.types.js +79 -0
  65. package/build/cjs/src/bookings-v2-price-info.types.js.map +1 -0
  66. package/build/cjs/src/bookings-v2-price-info.universal.d.ts +664 -0
  67. package/build/cjs/src/bookings-v2-price-info.universal.js +274 -0
  68. package/build/cjs/src/bookings-v2-price-info.universal.js.map +1 -0
  69. package/build/es/index.d.ts +5 -0
  70. package/build/es/index.js +5 -0
  71. package/build/es/index.js.map +1 -1
  72. package/build/es/src/bookings-availability-v1-slot-availability.http.d.ts +6 -6
  73. package/build/es/src/bookings-availability-v1-slot-availability.http.js +6 -6
  74. package/build/es/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -29
  75. package/build/es/src/bookings-availability-v1-slot-availability.universal.js +7 -6
  76. package/build/es/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  77. package/build/es/src/bookings-calendar-v1-session.http.d.ts +75 -0
  78. package/build/es/src/bookings-calendar-v1-session.http.js +348 -0
  79. package/build/es/src/bookings-calendar-v1-session.http.js.map +1 -0
  80. package/build/es/src/bookings-calendar-v1-session.public.d.ts +8 -0
  81. package/build/es/src/bookings-calendar-v1-session.public.js +23 -0
  82. package/build/es/src/bookings-calendar-v1-session.public.js.map +1 -0
  83. package/build/es/src/bookings-calendar-v1-session.types.d.ts +1011 -0
  84. package/build/es/src/bookings-calendar-v1-session.types.js +107 -0
  85. package/build/es/src/bookings-calendar-v1-session.types.js.map +1 -0
  86. package/build/es/src/bookings-calendar-v1-session.universal.d.ts +1178 -0
  87. package/build/es/src/bookings-calendar-v1-session.universal.js +411 -0
  88. package/build/es/src/bookings-calendar-v1-session.universal.js.map +1 -0
  89. package/build/es/src/bookings-catalog-v1-resource.http.d.ts +195 -0
  90. package/build/es/src/bookings-catalog-v1-resource.http.js +555 -0
  91. package/build/es/src/bookings-catalog-v1-resource.http.js.map +1 -0
  92. package/build/es/src/bookings-catalog-v1-resource.public.d.ts +10 -0
  93. package/build/es/src/bookings-catalog-v1-resource.public.js +33 -0
  94. package/build/es/src/bookings-catalog-v1-resource.public.js.map +1 -0
  95. package/build/es/src/bookings-catalog-v1-resource.types.d.ts +931 -0
  96. package/build/es/src/bookings-catalog-v1-resource.types.js +122 -0
  97. package/build/es/src/bookings-catalog-v1-resource.types.js.map +1 -0
  98. package/build/es/src/bookings-catalog-v1-resource.universal.d.ts +1201 -0
  99. package/build/es/src/bookings-catalog-v1-resource.universal.js +712 -0
  100. package/build/es/src/bookings-catalog-v1-resource.universal.js.map +1 -0
  101. package/build/es/src/bookings-reader-v2-extended-booking.http.d.ts +38 -0
  102. package/build/es/src/bookings-reader-v2-extended-booking.http.js +113 -0
  103. package/build/es/src/bookings-reader-v2-extended-booking.http.js.map +1 -0
  104. package/build/es/src/bookings-reader-v2-extended-booking.public.d.ts +5 -0
  105. package/build/es/src/bookings-reader-v2-extended-booking.public.js +8 -0
  106. package/build/es/src/bookings-reader-v2-extended-booking.public.js.map +1 -0
  107. package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +730 -0
  108. package/build/es/src/bookings-reader-v2-extended-booking.types.js +87 -0
  109. package/build/es/src/bookings-reader-v2-extended-booking.types.js.map +1 -0
  110. package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +786 -0
  111. package/build/es/src/bookings-reader-v2-extended-booking.universal.js +203 -0
  112. package/build/es/src/bookings-reader-v2-extended-booking.universal.js.map +1 -0
  113. package/build/es/src/bookings-v2-booking.http.d.ts +123 -0
  114. package/build/es/src/bookings-v2-booking.http.js +297 -0
  115. package/build/es/src/bookings-v2-booking.http.js.map +1 -0
  116. package/build/es/src/bookings-v2-booking.public.d.ts +9 -0
  117. package/build/es/src/bookings-v2-booking.public.js +28 -0
  118. package/build/es/src/bookings-v2-booking.public.js.map +1 -0
  119. package/build/es/src/bookings-v2-booking.types.d.ts +1594 -0
  120. package/build/es/src/bookings-v2-booking.types.js +96 -0
  121. package/build/es/src/bookings-v2-booking.types.js.map +1 -0
  122. package/build/es/src/bookings-v2-booking.universal.d.ts +1840 -0
  123. package/build/es/src/bookings-v2-booking.universal.js +534 -0
  124. package/build/es/src/bookings-v2-booking.universal.js.map +1 -0
  125. package/build/es/src/bookings-v2-price-info.http.d.ts +56 -0
  126. package/build/es/src/bookings-v2-price-info.http.js +159 -0
  127. package/build/es/src/bookings-v2-price-info.http.js.map +1 -0
  128. package/build/es/src/bookings-v2-price-info.public.d.ts +6 -0
  129. package/build/es/src/bookings-v2-price-info.public.js +13 -0
  130. package/build/es/src/bookings-v2-price-info.public.js.map +1 -0
  131. package/build/es/src/bookings-v2-price-info.types.d.ts +594 -0
  132. package/build/es/src/bookings-v2-price-info.types.js +76 -0
  133. package/build/es/src/bookings-v2-price-info.types.js.map +1 -0
  134. package/build/es/src/bookings-v2-price-info.universal.d.ts +664 -0
  135. package/build/es/src/bookings-v2-price-info.universal.js +250 -0
  136. package/build/es/src/bookings-v2-price-info.universal.js.map +1 -0
  137. package/package.json +2 -2
@@ -0,0 +1,594 @@
1
+ export interface PriceInfo extends PriceInfoTotalPriceOneOf {
2
+ /** List of line items, including the number of participants and the price per participant. */
3
+ bookingLineItems?: BookingLineItem[];
4
+ /**
5
+ * Total deposit the customer must pay when booking the service.
6
+ *
7
+ * Available when: The service includes a deposit.
8
+ */
9
+ deposit?: number | null;
10
+ /**
11
+ * 3-letter currency code in
12
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
13
+ */
14
+ currency?: string | null;
15
+ /**
16
+ * Calculated total price. Available only when the
17
+ * [service](https://dev.wix.com/api/rest/wix-bookings/services/service/create-service)'s
18
+ * price has been set up as a numerical value in the
19
+ * [`schedule.rate.labeledPriceOptions`](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object) object.
20
+ */
21
+ calculatedPrice?: number;
22
+ /**
23
+ * Description of the total price. Available only when the
24
+ * [service](https://dev.wix.com/api/rest/wix-bookings/services/service/create-service)'s
25
+ * price has been set up as a text value in the
26
+ * [`schedule.rate.priceText`](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object) property.
27
+ */
28
+ priceDescription?: string;
29
+ }
30
+ /** @oneof */
31
+ export interface PriceInfoTotalPriceOneOf {
32
+ /**
33
+ * Calculated total price. Available only when the
34
+ * [service](https://dev.wix.com/api/rest/wix-bookings/services/service/create-service)'s
35
+ * price has been set up as a numerical value in the
36
+ * [`schedule.rate.labeledPriceOptions`](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object) object.
37
+ */
38
+ calculatedPrice?: number;
39
+ /**
40
+ * Description of the total price. Available only when the
41
+ * [service](https://dev.wix.com/api/rest/wix-bookings/services/service/create-service)'s
42
+ * price has been set up as a text value in the
43
+ * [`schedule.rate.priceText`](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object) property.
44
+ */
45
+ priceDescription?: string;
46
+ }
47
+ export interface BookingLineItem {
48
+ /**
49
+ * Service ID.
50
+ *
51
+ * Required when not using Wix Booking's default pricing logic.
52
+ *
53
+ * Optional when using custom pricing logic defined with the
54
+ * [Bookings Pricing Provider SPI](https://example.com/).
55
+ */
56
+ serviceId?: string | null;
57
+ /** Resource ID. Required for services of type appointment or class. */
58
+ resourceId?: string | null;
59
+ /**
60
+ * Custom choices. Choices are specific values for an option the customer can choose to book.
61
+ * For example, the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
62
+ * Each choice may have a different price.
63
+ */
64
+ choices?: ServiceChoice[];
65
+ /** Number of participants for the line item. */
66
+ numberOfParticipants?: number | null;
67
+ /**
68
+ * Price per participant for the line item.
69
+ * @readonly
70
+ */
71
+ pricePerParticipant?: number | null;
72
+ }
73
+ export interface ServiceChoice extends ServiceChoiceChoiceOneOf {
74
+ /**
75
+ * ID of the corresponding option for the choice. For example, the choice `child`
76
+ * could correspond to the option `ageGroup`. In this case, `optionId` is the ID
77
+ * for the `ageGroup` option.
78
+ */
79
+ optionId?: string;
80
+ /**
81
+ * Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
82
+ * Choices are specific values for an option the customer can choose to book. For example,
83
+ * the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
84
+ * Each choice may have a different price.
85
+ */
86
+ custom?: string;
87
+ }
88
+ /** @oneof */
89
+ export interface ServiceChoiceChoiceOneOf {
90
+ /**
91
+ * Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
92
+ * Choices are specific values for an option the customer can choose to book. For example,
93
+ * the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
94
+ * Each choice may have a different price.
95
+ */
96
+ custom?: string;
97
+ }
98
+ export interface PreviewPriceRequest {
99
+ /** List of line items to preview the price for. */
100
+ bookingLineItems?: BookingLineItem[];
101
+ }
102
+ export interface PreviewPriceResponse {
103
+ /** Information about each line item's price and the estimated total price based on the line items. */
104
+ priceInfo?: PriceInfo;
105
+ }
106
+ export interface CalculatePriceRequest {
107
+ /** Booking to calculate the price for. */
108
+ booking: Booking;
109
+ }
110
+ /** The booking object, version 2. */
111
+ export interface Booking extends BookingParticipantsInfoOneOf {
112
+ /**
113
+ * Booking ID.
114
+ * @readonly
115
+ */
116
+ id?: string | null;
117
+ /** An object describing the slot or schedule that was booked. */
118
+ bookedEntity?: BookedEntity;
119
+ /** Contact details of the site visitor or member making the booking. */
120
+ contactDetails?: ContactDetails;
121
+ /** Additional custom fields submitted with the booking form. */
122
+ additionalFields?: CustomFormField[];
123
+ /**
124
+ * Booking status.
125
+ * One of:
126
+ * - `"CREATED"` - The booking was created.
127
+ * - `"UPDATED"` - The booking was updated.
128
+ * - `"CONFIRMED"` - The booking has been confirmed and appears on the bookings calendar.
129
+ * Booking can be manually confirmed using the Set As Confirmed endpoint.
130
+ * Booking can be automatically confirmed when the following requirements are met:
131
+ * + The service is configured as automatically confirmed.
132
+ * + Invoking eCommerce checkout API and an order has been created.
133
+ * - `"CANCELED"` - The booking has been canceled and synced to bookings calendar.
134
+ * The booking can be canceled using cancel API.
135
+ * - `"PENDING"` - The booking waiting to be confirmed or declined buy the owner and is synced to bookings calendar.
136
+ * Bookings can be manually set as pending using setAsPending API, requires manage booking status permissions.
137
+ * Booking can be automatically set as pending when the following requirements are met:
138
+ * + The Service is configured as manually confirmed.
139
+ * + Invoking the eCommerce checkout API and an order has been created.
140
+ * - `"WAITING_LIST"` - The booking is pending on a waiting list.
141
+ * Booking can be created with this status when invoking waiting list join API.
142
+ * - `"DECLINED"` - The booking was declined by the owner and synced to bookings calendar.
143
+ * Booking can be manually declined using decline API and requires manage booking permissions.
144
+ * Booking can be automatically declined when the following requirements are met:
145
+ * + Invoking eCommerce checkout API and the order declined event has been sent.
146
+ * + Invoking eCommerce checkout API and order approved event has been sent, but the booking is offline and the booking causes a double booking.
147
+ */
148
+ status?: BookingStatus;
149
+ /**
150
+ * Payment status.
151
+ * One of:
152
+ * - `"NOT_PAID"` The booking is not paid for.
153
+ * - `"PAID"` The booking is fully paid.
154
+ * - `"PARTIALLY_PAID"` The booking is partially paid.
155
+ * - `"REFUNDED"` The booking is refunded.
156
+ * @readonly
157
+ */
158
+ paymentStatus?: PaymentStatus;
159
+ /**
160
+ * Selected payment option.
161
+ * One of the payment options offered by the service, or another option if `skipSelectedPaymentOptionValidation` is `true`.
162
+ * When undefined, the payment option is resolved by the service configuration on checkout.
163
+ */
164
+ selectedPaymentOption?: SelectedPaymentOption;
165
+ /**
166
+ * Date and time the booking was created.
167
+ * @readonly
168
+ */
169
+ createdDate?: Date;
170
+ /** External ID provided by the client app on creation. */
171
+ externalUserId?: string | null;
172
+ /** Revision number to be used when updating, rescheduling, or cancelling the booking. The revision number is automatically incremented when the booing is updated. */
173
+ revision?: string | null;
174
+ /**
175
+ * ID of the creator of the Booking
176
+ * If `appId` and another ID are present, the other ID takes precedence.
177
+ * @readonly
178
+ */
179
+ createdBy?: IdentificationData;
180
+ /**
181
+ * The start date of this booking. For a slot, this is the start date of the slot. For a schedule, the start date of the first session.
182
+ * @readonly
183
+ */
184
+ startDate?: Date;
185
+ /**
186
+ * The end date of this booking. For a slot, this is the end date of the slot. For a schedule, the end date of the last session.
187
+ * @readonly
188
+ */
189
+ endDate?: Date;
190
+ /**
191
+ * Date and time the booking was updated.
192
+ * @readonly
193
+ */
194
+ updatedDate?: Date;
195
+ /**
196
+ * Additional custom fields. This includes fields managed by Wix, by 3rd-party apps, and by the site.
197
+ *
198
+ * Empty fields are not returned.
199
+ */
200
+ extendedFields?: ExtendedFields;
201
+ /**
202
+ * Indicating if this booking overlaps another existing confirmed booking
203
+ * @readonly
204
+ */
205
+ doubleBooked?: boolean | null;
206
+ /** Total number of participants. Available only when the booking includes a single service variant. */
207
+ totalParticipants?: number;
208
+ /**
209
+ * Information about the booked service choices and participants.
210
+ * Available only when the booking includes multiple service variants.
211
+ */
212
+ participantsChoices?: ParticipantChoices;
213
+ }
214
+ /** @oneof */
215
+ export interface BookingParticipantsInfoOneOf {
216
+ /** Total number of participants. Available only when the booking includes a single service variant. */
217
+ totalParticipants?: number;
218
+ /**
219
+ * Information about the booked service choices and participants.
220
+ * Available only when the booking includes multiple service variants.
221
+ */
222
+ participantsChoices?: ParticipantChoices;
223
+ }
224
+ export interface BookedEntity extends BookedEntityItemOneOf {
225
+ /** Session title at the time of booking. */
226
+ title?: string | null;
227
+ /**
228
+ * List of tags for the booking.
229
+ * System-assigned tags for sessions and schedules are:
230
+ * + "INDIVIDUAL" Appointments, including appointments with more than 1 participant.
231
+ * + "GROUP" Individual classes.
232
+ * + "COURSE" Courses.
233
+ */
234
+ tags?: string[] | null;
235
+ /** The booked slot, which once booked becomes a session. The booking is automatically assigned to the session if given, or a session is be created if one doesn't already exist. */
236
+ slot?: BookedSlot;
237
+ /** The booked schedule. The booking is automatically assigned to the schedule's sessions. */
238
+ schedule?: BookedSchedule;
239
+ }
240
+ /** @oneof */
241
+ export interface BookedEntityItemOneOf {
242
+ /** The booked slot, which once booked becomes a session. The booking is automatically assigned to the session if given, or a session is be created if one doesn't already exist. */
243
+ slot?: BookedSlot;
244
+ /** The booked schedule. The booking is automatically assigned to the schedule's sessions. */
245
+ schedule?: BookedSchedule;
246
+ }
247
+ export interface BookedSlot {
248
+ /**
249
+ * ID of the underlying session when session is a single session or generated from a recurring session.
250
+ * If `sessionId` is defined in the Create Booking request, the `startDate`, `endDate`, timezone, resource, and location fields from the request are ignored and populated from the session's information.
251
+ */
252
+ sessionId?: string | null;
253
+ /** Service ID. */
254
+ serviceId?: string;
255
+ /** Schedule ID. Required. */
256
+ scheduleId?: string;
257
+ /**
258
+ * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
259
+ * format. Required.
260
+ */
261
+ startDate?: string | null;
262
+ /**
263
+ * The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
264
+ * format. Required.
265
+ */
266
+ endDate?: string | null;
267
+ /** The timezone according to which the slot was shown to the user when booking, and should be shown in future. */
268
+ timezone?: string | null;
269
+ /** The resource used on the slot. */
270
+ resource?: BookedResource;
271
+ /** Location where the slot's session takes place. */
272
+ location?: Location;
273
+ }
274
+ export interface BookedResource {
275
+ /** Booked resource ID. */
276
+ id?: string;
277
+ /** Resource's name at the time of booking. */
278
+ name?: string | null;
279
+ /** Resource's email at the time of booking. */
280
+ email?: string | null;
281
+ /** Resources schedule ID. */
282
+ scheduleId?: string | null;
283
+ }
284
+ export interface Location {
285
+ /**
286
+ * Business location ID. Available only for locations that are business locations,
287
+ * meaning the `location_type` is `"OWNER_BUSINESS"`.
288
+ */
289
+ id?: string | null;
290
+ /** Location name. */
291
+ name?: string | null;
292
+ /** The full address of this location. */
293
+ formattedAddress?: string | null;
294
+ /**
295
+ * Location type.
296
+ *
297
+ * - `"OWNER_BUSINESS"`: The business address, as set in the site’s general settings.
298
+ * - `"OWNER_CUSTOM"`: The address as set when creating the service.
299
+ * - `"CUSTOM"`: The address as set for the individual session.
300
+ */
301
+ locationType?: LocationType;
302
+ }
303
+ export declare enum LocationType {
304
+ UNDEFINED = "UNDEFINED",
305
+ OWNER_BUSINESS = "OWNER_BUSINESS",
306
+ OWNER_CUSTOM = "OWNER_CUSTOM",
307
+ CUSTOM = "CUSTOM"
308
+ }
309
+ export interface BookedSchedule {
310
+ /** Schedule ID. */
311
+ scheduleId?: string;
312
+ /** ID of the booked service. */
313
+ serviceId?: string | null;
314
+ /**
315
+ * Location where the schedule's sessions take place. Read only.
316
+ * @readonly
317
+ */
318
+ location?: Location;
319
+ /** The timezone according to which the slot was shown to the user when booking, and should be shown in future. */
320
+ timezone?: string | null;
321
+ /**
322
+ * The start time of the first session in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
323
+ * format. Required.
324
+ * @readonly
325
+ */
326
+ firstSessionStart?: string | null;
327
+ /**
328
+ * The end time of the last session in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
329
+ * format. Required.
330
+ * @readonly
331
+ */
332
+ lastSessionEnd?: string | null;
333
+ }
334
+ export interface ContactDetails {
335
+ /** Contact's ID. */
336
+ contactId?: string | null;
337
+ /** Contact's first name. When populated from a standard booking form, this property corresponds to the **Name** field. */
338
+ firstName?: string | null;
339
+ /** Contact's last name. */
340
+ lastName?: string | null;
341
+ /** Contact's email, used to create a new contact or get existing one from the [Contacts API](https://dev.wix.com/api/rest/contacts/contacts). Used to validate coupon usage limitations per contact. If not passed, the coupon usage limitation will not be enforced. (Coupon usage limitation validation is not supported yet). */
342
+ email?: string | null;
343
+ /** Contact's phone number. */
344
+ phone?: string | null;
345
+ /** Contact's full address. */
346
+ fullAddress?: Address;
347
+ /** Contact's time zone. */
348
+ timeZone?: string | null;
349
+ /** Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */
350
+ countryCode?: string | null;
351
+ }
352
+ /** Physical address */
353
+ export interface Address extends AddressStreetOneOf {
354
+ /** Country code. */
355
+ country?: string | null;
356
+ /** Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
357
+ subdivision?: string | null;
358
+ /** City name. */
359
+ city?: string | null;
360
+ /** Zip/postal code. */
361
+ postalCode?: string | null;
362
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
363
+ addressLine2?: string | null;
364
+ /** A string containing the full address of this location. */
365
+ formattedAddress?: string | null;
366
+ /** Free text to help find the address. */
367
+ hint?: string | null;
368
+ /** Coordinates of the physical address. */
369
+ geocode?: AddressLocation;
370
+ /** Country full name. */
371
+ countryFullname?: string | null;
372
+ /** Multi-level subdivisions from top to bottom. */
373
+ subdivisions?: Subdivision[];
374
+ /** Street name, number and apartment number. */
375
+ streetAddress?: StreetAddress;
376
+ /** Main address line, usually street and number, as free text. */
377
+ addressLine?: string | null;
378
+ }
379
+ /** @oneof */
380
+ export interface AddressStreetOneOf {
381
+ /** Street name, number and apartment number. */
382
+ streetAddress?: StreetAddress;
383
+ /** Main address line, usually street and number, as free text. */
384
+ addressLine?: string | null;
385
+ }
386
+ export interface StreetAddress {
387
+ /** Street number. */
388
+ number?: string;
389
+ /** Street name. */
390
+ name?: string;
391
+ /** Apartment number. */
392
+ apt?: string;
393
+ }
394
+ export interface AddressLocation {
395
+ /** Address latitude. */
396
+ latitude?: number | null;
397
+ /** Address longitude. */
398
+ longitude?: number | null;
399
+ }
400
+ export interface Subdivision {
401
+ /** Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
402
+ code?: string;
403
+ /** Subdivision full name. */
404
+ name?: string;
405
+ }
406
+ export interface CustomFormField {
407
+ /** ID of the form field as defined in the form. */
408
+ id?: string;
409
+ /** Value that was submitted for this field. */
410
+ value?: string | null;
411
+ /**
412
+ * Form field's label at the time of submission.
413
+ * @readonly
414
+ */
415
+ label?: string | null;
416
+ /**
417
+ * <!--ONLY:VELO
418
+ * One of:
419
+ * - `"SHORT_TEXT"`
420
+ * - `"LONG_TEXT"`
421
+ * - `"CHECK_BOX"`
422
+ * <!--END:ONLY:VELO-->
423
+ */
424
+ valueType?: ValueType;
425
+ }
426
+ export declare enum ValueType {
427
+ /** Short text. This is the default value type. */
428
+ SHORT_TEXT = "SHORT_TEXT",
429
+ /** Long text */
430
+ LONG_TEXT = "LONG_TEXT",
431
+ /** a text that represent the check box value: if selected the value is "true", otherwise "false". */
432
+ CHECK_BOX = "CHECK_BOX"
433
+ }
434
+ /** Booking status. */
435
+ export declare enum BookingStatus {
436
+ CREATED = "CREATED",
437
+ CONFIRMED = "CONFIRMED",
438
+ CANCELED = "CANCELED",
439
+ PENDING = "PENDING",
440
+ DECLINED = "DECLINED",
441
+ WAITING_LIST = "WAITING_LIST"
442
+ }
443
+ /**
444
+ * Payment status.
445
+ * Automatically updated when using eCom checkout APIs.
446
+ */
447
+ export declare enum PaymentStatus {
448
+ UNDEFINED = "UNDEFINED",
449
+ NOT_PAID = "NOT_PAID",
450
+ PAID = "PAID",
451
+ /** not supported yet. */
452
+ PARTIALLY_PAID = "PARTIALLY_PAID",
453
+ /** not supported yet */
454
+ REFUNDED = "REFUNDED"
455
+ }
456
+ /**
457
+ * The selected payment option.
458
+ * One of the payment options offered by the service.
459
+ * This field is be set when the user selects an option during booking.
460
+ * If left undefined, the payment option is resolved by the service configuration on checkout.
461
+ */
462
+ export declare enum SelectedPaymentOption {
463
+ UNDEFINED = "UNDEFINED",
464
+ OFFLINE = "OFFLINE",
465
+ ONLINE = "ONLINE",
466
+ MEMBERSHIP = "MEMBERSHIP",
467
+ /** Payment can only be done using a membership and must be manually redeemed in the dashboard by the site owner. */
468
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
469
+ }
470
+ export interface BookingSource {
471
+ /**
472
+ * Platform from which a booking was created
473
+ * <!--ONLY:VELO
474
+ * One of:
475
+ * - `"WEB"` Desktop browser.
476
+ * - `"MOBILE_APP"` Mobile application.
477
+ * <!--END:ONLY:VELO-->
478
+ */
479
+ platform?: Platform;
480
+ /**
481
+ * Actor that created this booking.
482
+ * <!--ONLY:VELO
483
+ * One of:
484
+ * - `"BUSINESS"`
485
+ * - `"CUSTOMER"`
486
+ * <!--END:ONLY:VELO-->
487
+ */
488
+ actor?: Actor;
489
+ /**
490
+ * Wix site ID of the application that created the booking.
491
+ * @readonly
492
+ */
493
+ appDefId?: string | null;
494
+ /**
495
+ * Name of the application that created the booking, as saved in Wix Developers Center at the time of booking.
496
+ * @readonly
497
+ */
498
+ appName?: string | null;
499
+ }
500
+ export declare enum Platform {
501
+ UNDEFINED_PLATFORM = "UNDEFINED_PLATFORM",
502
+ WEB = "WEB",
503
+ MOBILE_APP = "MOBILE_APP"
504
+ }
505
+ export declare enum Actor {
506
+ UNDEFINED_ACTOR = "UNDEFINED_ACTOR",
507
+ BUSINESS = "BUSINESS",
508
+ CUSTOMER = "CUSTOMER"
509
+ }
510
+ export interface ParticipantNotification {
511
+ /**
512
+ * Whether to send the message about the changes to the customer.
513
+ *
514
+ * Default: `false`
515
+ */
516
+ notifyParticipants?: boolean;
517
+ /** Custom message to send to the participants about the changes to the booking. */
518
+ message?: string | null;
519
+ }
520
+ export interface IdentificationData extends IdentificationDataIdOneOf {
521
+ /**
522
+ * ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
523
+ * @readonly
524
+ */
525
+ contactId?: string | null;
526
+ /** ID of a site visitor that has not logged in to the site. */
527
+ anonymousVisitorId?: string;
528
+ /** ID of a site visitor that has logged in to the site. */
529
+ memberId?: string;
530
+ /** ID of a Wix user (site owner, contributor, etc.). */
531
+ wixUserId?: string;
532
+ /** ID of an app. */
533
+ appId?: string;
534
+ }
535
+ /** @oneof */
536
+ export interface IdentificationDataIdOneOf {
537
+ /** ID of a site visitor that has not logged in to the site. */
538
+ anonymousVisitorId?: string;
539
+ /** ID of a site visitor that has logged in to the site. */
540
+ memberId?: string;
541
+ /** ID of a Wix user (site owner, contributor, etc.). */
542
+ wixUserId?: string;
543
+ /** ID of an app. */
544
+ appId?: string;
545
+ }
546
+ export declare enum IdentityType {
547
+ UNKNOWN = "UNKNOWN",
548
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
549
+ MEMBER = "MEMBER",
550
+ WIX_USER = "WIX_USER",
551
+ APP = "APP"
552
+ }
553
+ export interface FlowControlSettings {
554
+ /**
555
+ * When true, skips availability checking and allows booking.
556
+ * Requires BOOKINGS.OVERRIDE_AVAILABILITY permissions.
557
+ */
558
+ skipAvailabilityValidation?: boolean;
559
+ /**
560
+ * When true, allows booking a confirmation-required service without requiring confirmation.
561
+ * Requires BOOKINGS.IGNORE_BOOKING_POLICY permissions.
562
+ */
563
+ skipBusinessConfirmation?: boolean;
564
+ /**
565
+ * When true, skips selected payment option checking as defined in `selectedPaymentOption` field
566
+ * and allows booking.
567
+ * Requires BOOKINGS.MANAGE_PAYMENTS permissions.
568
+ */
569
+ skipSelectedPaymentOptionValidation?: boolean;
570
+ /** When true, refunds the booking's payment when the booking is canceled. */
571
+ withRefund?: boolean | null;
572
+ }
573
+ export interface ExtendedFields {
574
+ /**
575
+ * Data Extensions extended fields
576
+ * Key: Namespace
577
+ * Value: extended fields data in Struct format
578
+ */
579
+ namespaces?: Record<string, Record<string, any>>;
580
+ }
581
+ export interface ParticipantChoices {
582
+ /** Information about the booked service choices. Includes the number of participants. */
583
+ serviceChoices?: ServiceChoices[];
584
+ }
585
+ export interface ServiceChoices {
586
+ /** Number of participants for this variant. */
587
+ numberOfParticipants?: number | null;
588
+ /** Service choices for these participants. */
589
+ choices?: ServiceChoice[];
590
+ }
591
+ export interface CalculatePriceResponse {
592
+ /** Information about each line item's price and the actual total base price. */
593
+ priceInfo?: PriceInfo;
594
+ }
@@ -0,0 +1,76 @@
1
+ export var LocationType;
2
+ (function (LocationType) {
3
+ LocationType["UNDEFINED"] = "UNDEFINED";
4
+ LocationType["OWNER_BUSINESS"] = "OWNER_BUSINESS";
5
+ LocationType["OWNER_CUSTOM"] = "OWNER_CUSTOM";
6
+ LocationType["CUSTOM"] = "CUSTOM";
7
+ })(LocationType || (LocationType = {}));
8
+ export var ValueType;
9
+ (function (ValueType) {
10
+ /** Short text. This is the default value type. */
11
+ ValueType["SHORT_TEXT"] = "SHORT_TEXT";
12
+ /** Long text */
13
+ ValueType["LONG_TEXT"] = "LONG_TEXT";
14
+ /** a text that represent the check box value: if selected the value is "true", otherwise "false". */
15
+ ValueType["CHECK_BOX"] = "CHECK_BOX";
16
+ })(ValueType || (ValueType = {}));
17
+ /** Booking status. */
18
+ export var BookingStatus;
19
+ (function (BookingStatus) {
20
+ BookingStatus["CREATED"] = "CREATED";
21
+ BookingStatus["CONFIRMED"] = "CONFIRMED";
22
+ BookingStatus["CANCELED"] = "CANCELED";
23
+ BookingStatus["PENDING"] = "PENDING";
24
+ BookingStatus["DECLINED"] = "DECLINED";
25
+ BookingStatus["WAITING_LIST"] = "WAITING_LIST";
26
+ })(BookingStatus || (BookingStatus = {}));
27
+ /**
28
+ * Payment status.
29
+ * Automatically updated when using eCom checkout APIs.
30
+ */
31
+ export var PaymentStatus;
32
+ (function (PaymentStatus) {
33
+ PaymentStatus["UNDEFINED"] = "UNDEFINED";
34
+ PaymentStatus["NOT_PAID"] = "NOT_PAID";
35
+ PaymentStatus["PAID"] = "PAID";
36
+ /** not supported yet. */
37
+ PaymentStatus["PARTIALLY_PAID"] = "PARTIALLY_PAID";
38
+ /** not supported yet */
39
+ PaymentStatus["REFUNDED"] = "REFUNDED";
40
+ })(PaymentStatus || (PaymentStatus = {}));
41
+ /**
42
+ * The selected payment option.
43
+ * One of the payment options offered by the service.
44
+ * This field is be set when the user selects an option during booking.
45
+ * If left undefined, the payment option is resolved by the service configuration on checkout.
46
+ */
47
+ export var SelectedPaymentOption;
48
+ (function (SelectedPaymentOption) {
49
+ SelectedPaymentOption["UNDEFINED"] = "UNDEFINED";
50
+ SelectedPaymentOption["OFFLINE"] = "OFFLINE";
51
+ SelectedPaymentOption["ONLINE"] = "ONLINE";
52
+ SelectedPaymentOption["MEMBERSHIP"] = "MEMBERSHIP";
53
+ /** Payment can only be done using a membership and must be manually redeemed in the dashboard by the site owner. */
54
+ SelectedPaymentOption["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
55
+ })(SelectedPaymentOption || (SelectedPaymentOption = {}));
56
+ export var Platform;
57
+ (function (Platform) {
58
+ Platform["UNDEFINED_PLATFORM"] = "UNDEFINED_PLATFORM";
59
+ Platform["WEB"] = "WEB";
60
+ Platform["MOBILE_APP"] = "MOBILE_APP";
61
+ })(Platform || (Platform = {}));
62
+ export var Actor;
63
+ (function (Actor) {
64
+ Actor["UNDEFINED_ACTOR"] = "UNDEFINED_ACTOR";
65
+ Actor["BUSINESS"] = "BUSINESS";
66
+ Actor["CUSTOMER"] = "CUSTOMER";
67
+ })(Actor || (Actor = {}));
68
+ export var IdentityType;
69
+ (function (IdentityType) {
70
+ IdentityType["UNKNOWN"] = "UNKNOWN";
71
+ IdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
72
+ IdentityType["MEMBER"] = "MEMBER";
73
+ IdentityType["WIX_USER"] = "WIX_USER";
74
+ IdentityType["APP"] = "APP";
75
+ })(IdentityType || (IdentityType = {}));
76
+ //# sourceMappingURL=bookings-v2-price-info.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-v2-price-info.types.js","sourceRoot":"","sources":["../../../src/bookings-v2-price-info.types.ts"],"names":[],"mappings":"AA6TA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AA+HD,MAAM,CAAN,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,kDAAkD;IAClD,sCAAyB,CAAA;IACzB,gBAAgB;IAChB,oCAAuB,CAAA;IACvB,qGAAqG;IACrG,oCAAuB,CAAA;AACzB,CAAC,EAPW,SAAS,KAAT,SAAS,QAOpB;AAED,sBAAsB;AACtB,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;IACrB,8CAA6B,CAAA;AAC/B,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,8BAAa,CAAA;IACb,yBAAyB;IACzB,kDAAiC,CAAA;IACjC,wBAAwB;IACxB,sCAAqB,CAAA;AACvB,CAAC,EARW,aAAa,KAAb,aAAa,QAQxB;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,gDAAuB,CAAA;IACvB,4CAAmB,CAAA;IACnB,0CAAiB,CAAA;IACjB,kDAAyB,CAAA;IACzB,oHAAoH;IACpH,kEAAyC,CAAA;AAC3C,CAAC,EAPW,qBAAqB,KAArB,qBAAqB,QAOhC;AAiCD,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,qDAAyC,CAAA;IACzC,uBAAW,CAAA;IACX,qCAAyB,CAAA;AAC3B,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB;AAED,MAAM,CAAN,IAAY,KAIX;AAJD,WAAY,KAAK;IACf,4CAAmC,CAAA;IACnC,8BAAqB,CAAA;IACrB,8BAAqB,CAAA;AACvB,CAAC,EAJW,KAAK,KAAL,KAAK,QAIhB;AAyCD,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,uDAAuC,CAAA;IACvC,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,2BAAW,CAAA;AACb,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB"}