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