@wix/bookings 1.0.105 → 1.0.107
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/src/bookings-availability-v1-slot-availability.types.d.ts +2 -2
- package/build/cjs/src/bookings-availability-v1-slot-availability.universal.d.ts +2 -2
- package/build/cjs/src/bookings-calendar-v1-session.types.d.ts +13 -15
- package/build/cjs/src/bookings-calendar-v1-session.types.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v1-session.universal.d.ts +13 -17
- package/build/cjs/src/bookings-calendar-v1-session.universal.js +0 -1
- package/build/cjs/src/bookings-calendar-v1-session.universal.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-external-calendar.public.d.ts +3 -3
- package/build/cjs/src/bookings-calendar-v2-external-calendar.public.js +1 -1
- package/build/cjs/src/bookings-calendar-v2-external-calendar.public.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-external-calendar.types.d.ts +14 -16
- package/build/cjs/src/bookings-calendar-v2-external-calendar.types.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-external-calendar.universal.d.ts +15 -21
- package/build/cjs/src/bookings-calendar-v2-external-calendar.universal.js +4 -9
- package/build/cjs/src/bookings-calendar-v2-external-calendar.universal.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-session-view.types.d.ts +11 -11
- package/build/cjs/src/bookings-calendar-v2-session-view.universal.d.ts +11 -11
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +3 -3
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.js +1 -1
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.d.ts +24 -26
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +25 -31
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js +3 -9
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -1
- package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +31 -31
- package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +31 -31
- package/build/cjs/src/bookings-services-v2-service.http.js +1 -1
- package/build/cjs/src/bookings-services-v2-service.http.js.map +1 -1
- package/build/cjs/src/bookings-services-v2-service.public.d.ts +1 -1
- package/build/cjs/src/bookings-services-v2-service.types.d.ts +96 -48
- package/build/cjs/src/bookings-services-v2-service.types.js.map +1 -1
- package/build/cjs/src/bookings-services-v2-service.universal.d.ts +96 -48
- package/build/cjs/src/bookings-services-v2-service.universal.js.map +1 -1
- package/build/cjs/src/bookings-v2-booking.types.d.ts +72 -72
- package/build/cjs/src/bookings-v2-booking.universal.d.ts +72 -72
- package/build/cjs/src/bookings-v2-price-info.http.d.ts +11 -11
- package/build/cjs/src/bookings-v2-price-info.http.js +12 -12
- package/build/cjs/src/bookings-v2-price-info.http.js.map +1 -1
- package/build/cjs/src/bookings-v2-price-info.types.d.ts +32 -32
- package/build/cjs/src/bookings-v2-price-info.universal.d.ts +47 -47
- package/build/cjs/src/bookings-v2-price-info.universal.js +11 -11
- package/build/es/src/bookings-availability-v1-slot-availability.types.d.ts +2 -2
- package/build/es/src/bookings-availability-v1-slot-availability.universal.d.ts +2 -2
- package/build/es/src/bookings-calendar-v1-session.types.d.ts +13 -15
- package/build/es/src/bookings-calendar-v1-session.types.js.map +1 -1
- package/build/es/src/bookings-calendar-v1-session.universal.d.ts +13 -17
- package/build/es/src/bookings-calendar-v1-session.universal.js +0 -1
- package/build/es/src/bookings-calendar-v1-session.universal.js.map +1 -1
- package/build/es/src/bookings-calendar-v2-external-calendar.public.d.ts +3 -3
- package/build/es/src/bookings-calendar-v2-external-calendar.public.js +1 -1
- package/build/es/src/bookings-calendar-v2-external-calendar.public.js.map +1 -1
- package/build/es/src/bookings-calendar-v2-external-calendar.types.d.ts +14 -16
- package/build/es/src/bookings-calendar-v2-external-calendar.types.js.map +1 -1
- package/build/es/src/bookings-calendar-v2-external-calendar.universal.d.ts +15 -21
- package/build/es/src/bookings-calendar-v2-external-calendar.universal.js +4 -9
- package/build/es/src/bookings-calendar-v2-external-calendar.universal.js.map +1 -1
- package/build/es/src/bookings-calendar-v2-session-view.types.d.ts +11 -11
- package/build/es/src/bookings-calendar-v2-session-view.universal.d.ts +11 -11
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +3 -3
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.js +1 -1
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.js.map +1 -1
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.d.ts +24 -26
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -1
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +25 -31
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js +3 -9
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -1
- package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +31 -31
- package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +31 -31
- package/build/es/src/bookings-services-v2-service.http.js +1 -1
- package/build/es/src/bookings-services-v2-service.http.js.map +1 -1
- package/build/es/src/bookings-services-v2-service.public.d.ts +1 -1
- package/build/es/src/bookings-services-v2-service.types.d.ts +96 -48
- package/build/es/src/bookings-services-v2-service.types.js.map +1 -1
- package/build/es/src/bookings-services-v2-service.universal.d.ts +96 -48
- package/build/es/src/bookings-services-v2-service.universal.js.map +1 -1
- package/build/es/src/bookings-v2-booking.types.d.ts +72 -72
- package/build/es/src/bookings-v2-booking.universal.d.ts +72 -72
- package/build/es/src/bookings-v2-price-info.http.d.ts +11 -11
- package/build/es/src/bookings-v2-price-info.http.js +12 -12
- package/build/es/src/bookings-v2-price-info.http.js.map +1 -1
- package/build/es/src/bookings-v2-price-info.types.d.ts +32 -32
- package/build/es/src/bookings-v2-price-info.universal.d.ts +47 -47
- package/build/es/src/bookings-v2-price-info.universal.js +11 -11
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ import { CalculatePriceRequest, CalculatePriceResponse, PreviewPriceRequest, Pre
|
|
|
14
14
|
* of each line item before
|
|
15
15
|
* the booking is actually created.
|
|
16
16
|
*
|
|
17
|
-
* Use [`Calculate Price`](https://
|
|
17
|
+
* Use [`Calculate Price`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) to get the base price
|
|
18
18
|
* after the booking is created.
|
|
19
19
|
*
|
|
20
20
|
* Passing line items that belong to different services results in an error.
|
|
@@ -23,10 +23,10 @@ import { CalculatePriceRequest, CalculatePriceResponse, PreviewPriceRequest, Pre
|
|
|
23
23
|
*
|
|
24
24
|
* Wix Bookings has its own default pricing logic for previewing the price. You must
|
|
25
25
|
* pass the `serviceId` in the `slot`
|
|
26
|
-
* or `schedule` object to [`
|
|
26
|
+
* or `schedule` object to [`previewPrice()`].
|
|
27
27
|
*
|
|
28
|
-
* You cannot call `
|
|
29
|
-
* [Bookings Pricing
|
|
28
|
+
* You cannot call `previewPrice()` if you have customized Bookings pricing logic using the
|
|
29
|
+
* [Bookings Pricing Integration REST SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-provider). Calling `previewPrice` if custom pricing
|
|
30
30
|
* logic has been implemented for the site results in an error.
|
|
31
31
|
*/
|
|
32
32
|
export declare function previewPrice(payload: PreviewPriceRequest): RequestOptionsFactory<PreviewPriceResponse>;
|
|
@@ -35,10 +35,10 @@ export declare function previewPrice(payload: PreviewPriceRequest): RequestOptio
|
|
|
35
35
|
*
|
|
36
36
|
*
|
|
37
37
|
*
|
|
38
|
-
* You can call [`
|
|
38
|
+
* You can call [`calculatePrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) after a booking is created. The returned calculated price includes information about each line
|
|
39
39
|
* item's price and the booking's total price.
|
|
40
40
|
*
|
|
41
|
-
* You can use [`
|
|
41
|
+
* You can use [`previewPrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/previewprice) to get the base price
|
|
42
42
|
* before a booking is created.
|
|
43
43
|
*
|
|
44
44
|
* The calculated price is the base price that will be used as a basis for charging the customer.
|
|
@@ -49,13 +49,13 @@ export declare function previewPrice(payload: PreviewPriceRequest): RequestOptio
|
|
|
49
49
|
*
|
|
50
50
|
* Wix Bookings has its own default pricing logic for calculating the price. When
|
|
51
51
|
* using Wix Bookings' default pricing logic, you must pass the `serviceId` in the `slot`
|
|
52
|
-
* or `schedule` object to [`
|
|
52
|
+
* or `schedule` object to [`calculatePrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice).
|
|
53
53
|
*
|
|
54
54
|
* Alternatively you can customize the pricing logic using the
|
|
55
|
-
* [Bookings Pricing
|
|
55
|
+
* [Bookings Pricing Integration REST SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-provider).
|
|
56
56
|
* If you integrate with a pricing provider, the customized pricing logic becomes
|
|
57
|
-
* the default logic. This means that, if the
|
|
58
|
-
* when calling the API's `
|
|
59
|
-
* the
|
|
57
|
+
* the default logic. This means that, if the Pricing Integration SPI is implemented,
|
|
58
|
+
* when calling the API's `calculatePrice()` function,
|
|
59
|
+
* the REST SPI's `Calculate Price` endpoint is used instead.
|
|
60
60
|
*/
|
|
61
61
|
export declare function calculatePrice(payload: CalculatePriceRequest): RequestOptionsFactory<CalculatePriceResponse>;
|
|
@@ -19,8 +19,8 @@ const _contactDetails = { fullAddress: '_address' };
|
|
|
19
19
|
const _previewPriceRequest = { bookingLineItems: '_bookingLineItem' };
|
|
20
20
|
const _previewPriceResponse = { priceInfo: '_priceInfo' };
|
|
21
21
|
const _priceInfo = {
|
|
22
|
-
deposit: 'google.protobuf.DoubleValue',
|
|
23
22
|
calculatedPrice: 'DOUBLE',
|
|
23
|
+
deposit: 'google.protobuf.DoubleValue',
|
|
24
24
|
bookingLineItems: '_bookingLineItem',
|
|
25
25
|
};
|
|
26
26
|
function resolveComWixpressBookingsPricingBookingsPricingServiceUrl(opts) {
|
|
@@ -72,7 +72,7 @@ function resolveComWixpressBookingsPricingBookingsPricingServiceUrl(opts) {
|
|
|
72
72
|
* of each line item before
|
|
73
73
|
* the booking is actually created.
|
|
74
74
|
*
|
|
75
|
-
* Use [`Calculate Price`](https://
|
|
75
|
+
* Use [`Calculate Price`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) to get the base price
|
|
76
76
|
* after the booking is created.
|
|
77
77
|
*
|
|
78
78
|
* Passing line items that belong to different services results in an error.
|
|
@@ -81,10 +81,10 @@ function resolveComWixpressBookingsPricingBookingsPricingServiceUrl(opts) {
|
|
|
81
81
|
*
|
|
82
82
|
* Wix Bookings has its own default pricing logic for previewing the price. You must
|
|
83
83
|
* pass the `serviceId` in the `slot`
|
|
84
|
-
* or `schedule` object to [`
|
|
84
|
+
* or `schedule` object to [`previewPrice()`].
|
|
85
85
|
*
|
|
86
|
-
* You cannot call `
|
|
87
|
-
* [Bookings Pricing
|
|
86
|
+
* You cannot call `previewPrice()` if you have customized Bookings pricing logic using the
|
|
87
|
+
* [Bookings Pricing Integration REST SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-provider). Calling `previewPrice` if custom pricing
|
|
88
88
|
* logic has been implemented for the site results in an error.
|
|
89
89
|
*/
|
|
90
90
|
export function previewPrice(payload) {
|
|
@@ -115,10 +115,10 @@ export function previewPrice(payload) {
|
|
|
115
115
|
*
|
|
116
116
|
*
|
|
117
117
|
*
|
|
118
|
-
* You can call [`
|
|
118
|
+
* You can call [`calculatePrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) after a booking is created. The returned calculated price includes information about each line
|
|
119
119
|
* item's price and the booking's total price.
|
|
120
120
|
*
|
|
121
|
-
* You can use [`
|
|
121
|
+
* You can use [`previewPrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/previewprice) to get the base price
|
|
122
122
|
* before a booking is created.
|
|
123
123
|
*
|
|
124
124
|
* The calculated price is the base price that will be used as a basis for charging the customer.
|
|
@@ -129,14 +129,14 @@ export function previewPrice(payload) {
|
|
|
129
129
|
*
|
|
130
130
|
* Wix Bookings has its own default pricing logic for calculating the price. When
|
|
131
131
|
* using Wix Bookings' default pricing logic, you must pass the `serviceId` in the `slot`
|
|
132
|
-
* or `schedule` object to [`
|
|
132
|
+
* or `schedule` object to [`calculatePrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice).
|
|
133
133
|
*
|
|
134
134
|
* Alternatively you can customize the pricing logic using the
|
|
135
|
-
* [Bookings Pricing
|
|
135
|
+
* [Bookings Pricing Integration REST SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-provider).
|
|
136
136
|
* If you integrate with a pricing provider, the customized pricing logic becomes
|
|
137
|
-
* the default logic. This means that, if the
|
|
138
|
-
* when calling the API's `
|
|
139
|
-
* the
|
|
137
|
+
* the default logic. This means that, if the Pricing Integration SPI is implemented,
|
|
138
|
+
* when calling the API's `calculatePrice()` function,
|
|
139
|
+
* the REST SPI's `Calculate Price` endpoint is used instead.
|
|
140
140
|
*/
|
|
141
141
|
export function calculatePrice(payload) {
|
|
142
142
|
const { toJSON: toReq, fromJSON: fromReq } = serializer(_calculatePriceRequest, { _address, _addressLocation, _booking, _contactDetails });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookings-v2-price-info.http.js","sourceRoot":"","sources":["../../../src/bookings-v2-price-info.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAUhD,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACjD,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,6BAA6B;CACzC,CAAC;AACF,MAAM,QAAQ,GAAG;IAC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AAQ,CAAC;IAClB,CAAC;IAED,gBAAgB,CAAC,OAAO,GAAG,OAAO,CAAC;IAEnC,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
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
2
|
/**
|
|
11
3
|
* Calculated total price. Available only when the
|
|
12
4
|
* [service](https://dev.wix.com/api/rest/wix-bookings/services/service/create-service)'s
|
|
@@ -21,6 +13,14 @@ export interface PriceInfo extends PriceInfoTotalPriceOneOf {
|
|
|
21
13
|
* [`schedule.rate.priceText`](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object) property.
|
|
22
14
|
*/
|
|
23
15
|
priceDescription?: string;
|
|
16
|
+
/** List of line items, including the number of participants and the price per participant. */
|
|
17
|
+
bookingLineItems?: BookingLineItem[];
|
|
18
|
+
/**
|
|
19
|
+
* Total deposit the customer must pay when booking the service.
|
|
20
|
+
*
|
|
21
|
+
* Available when: The service includes a deposit.
|
|
22
|
+
*/
|
|
23
|
+
deposit?: number | null;
|
|
24
24
|
}
|
|
25
25
|
/** @oneof */
|
|
26
26
|
export interface PriceInfoTotalPriceOneOf {
|
|
@@ -46,7 +46,7 @@ export interface BookingLineItem {
|
|
|
46
46
|
* Required when not using Wix Booking's default pricing logic.
|
|
47
47
|
*
|
|
48
48
|
* Optional when using custom pricing logic defined with the
|
|
49
|
-
* [Bookings Pricing
|
|
49
|
+
* [Bookings Pricing Integration SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-provider).
|
|
50
50
|
*/
|
|
51
51
|
serviceId?: string | null;
|
|
52
52
|
/** Resource ID. Required for services of type appointment or class. */
|
|
@@ -66,12 +66,6 @@ export interface BookingLineItem {
|
|
|
66
66
|
pricePerParticipant?: number | null;
|
|
67
67
|
}
|
|
68
68
|
export interface ServiceChoice extends ServiceChoiceChoiceOneOf {
|
|
69
|
-
/**
|
|
70
|
-
* ID of the corresponding option for the choice. For example, the choice `child`
|
|
71
|
-
* could correspond to the option `ageGroup`. In this case, `optionId` is the ID
|
|
72
|
-
* for the `ageGroup` option.
|
|
73
|
-
*/
|
|
74
|
-
optionId?: string;
|
|
75
69
|
/**
|
|
76
70
|
* Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
|
|
77
71
|
* Choices are specific values for an option the customer can choose to book. For example,
|
|
@@ -79,6 +73,12 @@ export interface ServiceChoice extends ServiceChoiceChoiceOneOf {
|
|
|
79
73
|
* Each choice may have a different price.
|
|
80
74
|
*/
|
|
81
75
|
custom?: string;
|
|
76
|
+
/**
|
|
77
|
+
* ID of the corresponding option for the choice. For example, the choice `child`
|
|
78
|
+
* could correspond to the option `ageGroup`. In this case, `optionId` is the ID
|
|
79
|
+
* for the `ageGroup` option.
|
|
80
|
+
*/
|
|
81
|
+
optionId?: string;
|
|
82
82
|
}
|
|
83
83
|
/** @oneof */
|
|
84
84
|
export interface ServiceChoiceChoiceOneOf {
|
|
@@ -104,6 +104,13 @@ export interface CalculatePriceRequest {
|
|
|
104
104
|
}
|
|
105
105
|
/** The booking object, version 2. */
|
|
106
106
|
export interface Booking extends BookingParticipantsInfoOneOf {
|
|
107
|
+
/** Total number of participants. Available only when the booking includes a single service variant. */
|
|
108
|
+
totalParticipants?: number;
|
|
109
|
+
/**
|
|
110
|
+
* Information about the booked service choices and participants.
|
|
111
|
+
* Available only when the booking includes multiple service variants.
|
|
112
|
+
*/
|
|
113
|
+
participantsChoices?: ParticipantChoices;
|
|
107
114
|
/**
|
|
108
115
|
* Booking ID.
|
|
109
116
|
* @readonly
|
|
@@ -197,13 +204,6 @@ export interface Booking extends BookingParticipantsInfoOneOf {
|
|
|
197
204
|
* @readonly
|
|
198
205
|
*/
|
|
199
206
|
doubleBooked?: boolean | null;
|
|
200
|
-
/** Total number of participants. Available only when the booking includes a single service variant. */
|
|
201
|
-
totalParticipants?: number;
|
|
202
|
-
/**
|
|
203
|
-
* Information about the booked service choices and participants.
|
|
204
|
-
* Available only when the booking includes multiple service variants.
|
|
205
|
-
*/
|
|
206
|
-
participantsChoices?: ParticipantChoices;
|
|
207
207
|
}
|
|
208
208
|
/** @oneof */
|
|
209
209
|
export interface BookingParticipantsInfoOneOf {
|
|
@@ -216,6 +216,10 @@ export interface BookingParticipantsInfoOneOf {
|
|
|
216
216
|
participantsChoices?: ParticipantChoices;
|
|
217
217
|
}
|
|
218
218
|
export interface BookedEntity extends BookedEntityItemOneOf {
|
|
219
|
+
/** The booked slot, once booked becomes a session, The booking is automatically assigned to the session if it already exists, or creates a session if one doesn't already exist. */
|
|
220
|
+
slot?: BookedSlot;
|
|
221
|
+
/** The booked schedule. The booking is automatically assigned to the schedule's sessions. */
|
|
222
|
+
schedule?: BookedSchedule;
|
|
219
223
|
/** Session title at the time of booking. */
|
|
220
224
|
title?: string | null;
|
|
221
225
|
/**
|
|
@@ -226,10 +230,6 @@ export interface BookedEntity extends BookedEntityItemOneOf {
|
|
|
226
230
|
* + "COURSE" Courses.
|
|
227
231
|
*/
|
|
228
232
|
tags?: string[] | null;
|
|
229
|
-
/** The booked slot, once booked becomes a session, The booking is automatically assigned to the session if it already exists, or creates a session if one doesn't already exist. */
|
|
230
|
-
slot?: BookedSlot;
|
|
231
|
-
/** The booked schedule. The booking is automatically assigned to the schedule's sessions. */
|
|
232
|
-
schedule?: BookedSchedule;
|
|
233
233
|
}
|
|
234
234
|
/** @oneof */
|
|
235
235
|
export interface BookedEntityItemOneOf {
|
|
@@ -345,6 +345,10 @@ export interface ContactDetails {
|
|
|
345
345
|
}
|
|
346
346
|
/** Physical address */
|
|
347
347
|
export interface Address extends AddressStreetOneOf {
|
|
348
|
+
/** Street name, number and apartment number. */
|
|
349
|
+
streetAddress?: StreetAddress;
|
|
350
|
+
/** Main address line, usually street and number, as free text. */
|
|
351
|
+
addressLine?: string | null;
|
|
348
352
|
/** Country code. */
|
|
349
353
|
country?: string | null;
|
|
350
354
|
/** Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
@@ -365,10 +369,6 @@ export interface Address extends AddressStreetOneOf {
|
|
|
365
369
|
countryFullname?: string | null;
|
|
366
370
|
/** Multi-level subdivisions from top to bottom. */
|
|
367
371
|
subdivisions?: Subdivision[];
|
|
368
|
-
/** Street name, number and apartment number. */
|
|
369
|
-
streetAddress?: StreetAddress;
|
|
370
|
-
/** Main address line, usually street and number, as free text. */
|
|
371
|
-
addressLine?: string | null;
|
|
372
372
|
}
|
|
373
373
|
/** @oneof */
|
|
374
374
|
export interface AddressStreetOneOf {
|
|
@@ -513,8 +513,6 @@ export interface ParticipantNotification {
|
|
|
513
513
|
message?: string | null;
|
|
514
514
|
}
|
|
515
515
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
516
|
-
/** ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system. */
|
|
517
|
-
contactId?: string | null;
|
|
518
516
|
/** ID of a site visitor that has not logged in to the site. */
|
|
519
517
|
anonymousVisitorId?: string;
|
|
520
518
|
/** ID of a site visitor that has logged in to the site. */
|
|
@@ -523,6 +521,8 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
523
521
|
wixUserId?: string;
|
|
524
522
|
/** ID of an app. */
|
|
525
523
|
appId?: string;
|
|
524
|
+
/** ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system. */
|
|
525
|
+
contactId?: string | null;
|
|
526
526
|
}
|
|
527
527
|
/** @oneof */
|
|
528
528
|
export interface IdentificationDataIdOneOf {
|
|
@@ -5,14 +5,6 @@ export declare const __debug: {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
export interface PriceInfo extends PriceInfoTotalPriceOneOf {
|
|
8
|
-
/** List of line items, including the number of participants and the price per participant. */
|
|
9
|
-
bookingLineItems?: BookingLineItem[];
|
|
10
|
-
/**
|
|
11
|
-
* Total deposit the customer must pay when booking the service.
|
|
12
|
-
*
|
|
13
|
-
* Available when: The service includes a deposit.
|
|
14
|
-
*/
|
|
15
|
-
deposit?: number | null;
|
|
16
8
|
/**
|
|
17
9
|
* Calculated total price. Available only when the
|
|
18
10
|
* service's
|
|
@@ -27,6 +19,14 @@ export interface PriceInfo extends PriceInfoTotalPriceOneOf {
|
|
|
27
19
|
* `schedule.rate.priceText` property.
|
|
28
20
|
*/
|
|
29
21
|
priceDescription?: string;
|
|
22
|
+
/** List of line items, including the number of participants and the price per participant. */
|
|
23
|
+
bookingLineItems?: BookingLineItem[];
|
|
24
|
+
/**
|
|
25
|
+
* Total deposit the customer must pay when booking the service.
|
|
26
|
+
*
|
|
27
|
+
* Available when: The service includes a deposit.
|
|
28
|
+
*/
|
|
29
|
+
deposit?: number | null;
|
|
30
30
|
}
|
|
31
31
|
/** @oneof */
|
|
32
32
|
export interface PriceInfoTotalPriceOneOf {
|
|
@@ -70,18 +70,18 @@ export interface BookingLineItem {
|
|
|
70
70
|
}
|
|
71
71
|
export interface ServiceChoice extends ServiceChoiceChoiceOneOf {
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
74
|
-
* could correspond to the option `ageGroup`. In this case, `optionId` is the ID
|
|
75
|
-
* for the `ageGroup` option.
|
|
76
|
-
*/
|
|
77
|
-
optionId?: string;
|
|
78
|
-
/**
|
|
79
|
-
* Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.
|
|
73
|
+
* Value for one of the choices in the `CustomServiceOption.choices` list.
|
|
80
74
|
* Choices are specific values for an option the customer can choose to book. For example,
|
|
81
75
|
* the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
|
|
82
76
|
* Each choice may have a different price.
|
|
83
77
|
*/
|
|
84
78
|
custom?: string;
|
|
79
|
+
/**
|
|
80
|
+
* ID of the corresponding option for the choice. For example, the choice `child`
|
|
81
|
+
* could correspond to the option `ageGroup`. In this case, `optionId` is the ID
|
|
82
|
+
* for the `ageGroup` option.
|
|
83
|
+
*/
|
|
84
|
+
optionId?: string;
|
|
85
85
|
}
|
|
86
86
|
/** @oneof */
|
|
87
87
|
export interface ServiceChoiceChoiceOneOf {
|
|
@@ -107,6 +107,13 @@ export interface CalculatePriceRequest {
|
|
|
107
107
|
}
|
|
108
108
|
/** The booking object, version 2. */
|
|
109
109
|
export interface Booking extends BookingParticipantsInfoOneOf {
|
|
110
|
+
/** Total number of participants. Available only when the booking includes a single service variant. */
|
|
111
|
+
totalParticipants?: number;
|
|
112
|
+
/**
|
|
113
|
+
* Information about the booked service choices and participants.
|
|
114
|
+
* Available only when the booking includes multiple service variants.
|
|
115
|
+
*/
|
|
116
|
+
participantsChoices?: ParticipantChoices;
|
|
110
117
|
/**
|
|
111
118
|
* Booking ID.
|
|
112
119
|
* @readonly
|
|
@@ -123,18 +130,18 @@ export interface Booking extends BookingParticipantsInfoOneOf {
|
|
|
123
130
|
* One of:
|
|
124
131
|
* - `"CREATED"` - The booking was created.
|
|
125
132
|
* - `"UPDATED"` - The booking was updated.
|
|
126
|
-
* - `"CONFIRMED"` - The booking was confirmed and appears on the bookings calendar. A booking can be manually confirmed using the [`
|
|
133
|
+
* - `"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:
|
|
127
134
|
* + The service is configured as automatically confirmed.
|
|
128
135
|
* + The system invoked the eCommerce checkout API and created an order.
|
|
129
136
|
* - `"CANCELED"` - The booking has been canceled and synced to the bookings calendar.
|
|
130
|
-
* The booking can be canceled using [`
|
|
137
|
+
* The booking can be canceled using [`cancelBooking()`](https://www.wix.com/velo/reference/wix-bookings-v2/bookings/cancelbooking) API.
|
|
131
138
|
* - `"PENDING"` - The booking is waiting to be confirmed or declined by the owner and the booking is synced to the bookings calendar.
|
|
132
|
-
* Bookings can be manually set as `PENDING` using the
|
|
139
|
+
* Bookings can be manually set as `PENDING` using the `setAsPending()` API, by those with Manage Booking Status permissions scopes.
|
|
133
140
|
* Bookings can be automatically set as `PENDING` when the following requirements are met:
|
|
134
141
|
* + The service is configured as manually confirmed.
|
|
135
142
|
* + Invoking the eCommerce checkout API and an order has been created.
|
|
136
143
|
* - `"WAITING_LIST"` - The booking is on a waiting list.
|
|
137
|
-
* - `"DECLINED"` - The booking was declined by the owner and synced to the Bookings calendar. Bookings can be manually declined using the [`
|
|
144
|
+
* - `"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:
|
|
138
145
|
* + Invoking the `eCommerce checkout` API and the order declined event has been sent.
|
|
139
146
|
* + Invoking the `eCommerce checkout` API and order approved event has been sent, but the booking is offline and the booking causes a double booking.
|
|
140
147
|
*/
|
|
@@ -199,13 +206,6 @@ export interface Booking extends BookingParticipantsInfoOneOf {
|
|
|
199
206
|
* @readonly
|
|
200
207
|
*/
|
|
201
208
|
doubleBooked?: boolean | null;
|
|
202
|
-
/** Total number of participants. Available only when the booking includes a single service variant. */
|
|
203
|
-
totalParticipants?: number;
|
|
204
|
-
/**
|
|
205
|
-
* Information about the booked service choices and participants.
|
|
206
|
-
* Available only when the booking includes multiple service variants.
|
|
207
|
-
*/
|
|
208
|
-
participantsChoices?: ParticipantChoices;
|
|
209
209
|
}
|
|
210
210
|
/** @oneof */
|
|
211
211
|
export interface BookingParticipantsInfoOneOf {
|
|
@@ -218,6 +218,10 @@ export interface BookingParticipantsInfoOneOf {
|
|
|
218
218
|
participantsChoices?: ParticipantChoices;
|
|
219
219
|
}
|
|
220
220
|
export interface BookedEntity extends BookedEntityItemOneOf {
|
|
221
|
+
/** The booked slot, once booked becomes a session, The booking is automatically assigned to the session if it already exists, or creates a session if one doesn't already exist. */
|
|
222
|
+
slot?: BookedSlot;
|
|
223
|
+
/** The booked schedule. The booking is automatically assigned to the schedule's sessions. */
|
|
224
|
+
schedule?: BookedSchedule;
|
|
221
225
|
/** Session title at the time of booking. */
|
|
222
226
|
title?: string | null;
|
|
223
227
|
/**
|
|
@@ -228,10 +232,6 @@ export interface BookedEntity extends BookedEntityItemOneOf {
|
|
|
228
232
|
* + "COURSE" Courses.
|
|
229
233
|
*/
|
|
230
234
|
tags?: string[] | null;
|
|
231
|
-
/** The booked slot, once booked becomes a session, The booking is automatically assigned to the session if it already exists, or creates a session if one doesn't already exist. */
|
|
232
|
-
slot?: BookedSlot;
|
|
233
|
-
/** The booked schedule. The booking is automatically assigned to the schedule's sessions. */
|
|
234
|
-
schedule?: BookedSchedule;
|
|
235
235
|
}
|
|
236
236
|
/** @oneof */
|
|
237
237
|
export interface BookedEntityItemOneOf {
|
|
@@ -347,6 +347,10 @@ export interface ContactDetails {
|
|
|
347
347
|
}
|
|
348
348
|
/** Physical address */
|
|
349
349
|
export interface Address extends AddressStreetOneOf {
|
|
350
|
+
/** Street name, number and apartment number. */
|
|
351
|
+
streetAddress?: StreetAddress;
|
|
352
|
+
/** Main address line, usually street and number, as free text. */
|
|
353
|
+
addressLine?: string | null;
|
|
350
354
|
/** Country code. */
|
|
351
355
|
country?: string | null;
|
|
352
356
|
/** Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
@@ -367,10 +371,6 @@ export interface Address extends AddressStreetOneOf {
|
|
|
367
371
|
countryFullname?: string | null;
|
|
368
372
|
/** Multi-level subdivisions from top to bottom. */
|
|
369
373
|
subdivisions?: Subdivision[];
|
|
370
|
-
/** Street name, number and apartment number. */
|
|
371
|
-
streetAddress?: StreetAddress;
|
|
372
|
-
/** Main address line, usually street and number, as free text. */
|
|
373
|
-
addressLine?: string | null;
|
|
374
374
|
}
|
|
375
375
|
/** @oneof */
|
|
376
376
|
export interface AddressStreetOneOf {
|
|
@@ -512,8 +512,6 @@ export interface ParticipantNotification {
|
|
|
512
512
|
message?: string | null;
|
|
513
513
|
}
|
|
514
514
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
515
|
-
/** ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system. */
|
|
516
|
-
contactId?: string | null;
|
|
517
515
|
/** ID of a site visitor that has not logged in to the site. */
|
|
518
516
|
anonymousVisitorId?: string;
|
|
519
517
|
/** ID of a site visitor that has logged in to the site. */
|
|
@@ -522,6 +520,8 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
522
520
|
wixUserId?: string;
|
|
523
521
|
/** ID of an app. */
|
|
524
522
|
appId?: string;
|
|
523
|
+
/** ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system. */
|
|
524
|
+
contactId?: string | null;
|
|
525
525
|
}
|
|
526
526
|
/** @oneof */
|
|
527
527
|
export interface IdentificationDataIdOneOf {
|
|
@@ -600,7 +600,7 @@ export interface CalculatePriceResponse {
|
|
|
600
600
|
* of each line item before
|
|
601
601
|
* the booking is actually created.
|
|
602
602
|
*
|
|
603
|
-
* Use [`Calculate Price`](https://
|
|
603
|
+
* Use [`Calculate Price`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) to get the base price
|
|
604
604
|
* after the booking is created.
|
|
605
605
|
*
|
|
606
606
|
* Passing line items that belong to different services results in an error.
|
|
@@ -609,10 +609,10 @@ export interface CalculatePriceResponse {
|
|
|
609
609
|
*
|
|
610
610
|
* Wix Bookings has its own default pricing logic for previewing the price. You must
|
|
611
611
|
* pass the `serviceId` in the `slot`
|
|
612
|
-
* or `schedule` object to [`
|
|
612
|
+
* or `schedule` object to [`previewPrice()`].
|
|
613
613
|
*
|
|
614
|
-
* You cannot call `
|
|
615
|
-
* [Bookings Pricing
|
|
614
|
+
* You cannot call `previewPrice()` if you have customized Bookings pricing logic using the
|
|
615
|
+
* [Bookings Pricing Integration REST SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-provider). Calling `previewPrice` if custom pricing
|
|
616
616
|
* logic has been implemented for the site results in an error.
|
|
617
617
|
* @param bookingLineItems - List of line items to preview the price for.
|
|
618
618
|
* @public
|
|
@@ -625,10 +625,10 @@ export declare function previewPrice(bookingLineItems: BookingLineItem[]): Promi
|
|
|
625
625
|
*
|
|
626
626
|
*
|
|
627
627
|
*
|
|
628
|
-
* You can call [`
|
|
628
|
+
* You can call [`calculatePrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) after a booking is created. The returned calculated price includes information about each line
|
|
629
629
|
* item's price and the booking's total price.
|
|
630
630
|
*
|
|
631
|
-
* You can use [`
|
|
631
|
+
* You can use [`previewPrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/previewprice) to get the base price
|
|
632
632
|
* before a booking is created.
|
|
633
633
|
*
|
|
634
634
|
* The calculated price is the base price that will be used as a basis for charging the customer.
|
|
@@ -639,14 +639,14 @@ export declare function previewPrice(bookingLineItems: BookingLineItem[]): Promi
|
|
|
639
639
|
*
|
|
640
640
|
* Wix Bookings has its own default pricing logic for calculating the price. When
|
|
641
641
|
* using Wix Bookings' default pricing logic, you must pass the `serviceId` in the `slot`
|
|
642
|
-
* or `schedule` object to [`
|
|
642
|
+
* or `schedule` object to [`calculatePrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice).
|
|
643
643
|
*
|
|
644
644
|
* Alternatively you can customize the pricing logic using the
|
|
645
|
-
* [Bookings Pricing
|
|
645
|
+
* [Bookings Pricing Integration REST SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-provider).
|
|
646
646
|
* If you integrate with a pricing provider, the customized pricing logic becomes
|
|
647
|
-
* the default logic. This means that, if the
|
|
648
|
-
* when calling the API's `
|
|
649
|
-
* the
|
|
647
|
+
* the default logic. This means that, if the Pricing Integration SPI is implemented,
|
|
648
|
+
* when calling the API's `calculatePrice()` function,
|
|
649
|
+
* the REST SPI's `Calculate Price` endpoint is used instead.
|
|
650
650
|
* @param booking - Booking to calculate the price for.
|
|
651
651
|
* @public
|
|
652
652
|
* @documentationMaturity preview
|
|
@@ -118,7 +118,7 @@ const _previewPriceResponse = {};
|
|
|
118
118
|
* of each line item before
|
|
119
119
|
* the booking is actually created.
|
|
120
120
|
*
|
|
121
|
-
* Use [`Calculate Price`](https://
|
|
121
|
+
* Use [`Calculate Price`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) to get the base price
|
|
122
122
|
* after the booking is created.
|
|
123
123
|
*
|
|
124
124
|
* Passing line items that belong to different services results in an error.
|
|
@@ -127,10 +127,10 @@ const _previewPriceResponse = {};
|
|
|
127
127
|
*
|
|
128
128
|
* Wix Bookings has its own default pricing logic for previewing the price. You must
|
|
129
129
|
* pass the `serviceId` in the `slot`
|
|
130
|
-
* or `schedule` object to [`
|
|
130
|
+
* or `schedule` object to [`previewPrice()`].
|
|
131
131
|
*
|
|
132
|
-
* You cannot call `
|
|
133
|
-
* [Bookings Pricing
|
|
132
|
+
* You cannot call `previewPrice()` if you have customized Bookings pricing logic using the
|
|
133
|
+
* [Bookings Pricing Integration REST SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-provider). Calling `previewPrice` if custom pricing
|
|
134
134
|
* logic has been implemented for the site results in an error.
|
|
135
135
|
* @param bookingLineItems - List of line items to preview the price for.
|
|
136
136
|
* @public
|
|
@@ -185,10 +185,10 @@ export function previewPrice(bookingLineItems) {
|
|
|
185
185
|
*
|
|
186
186
|
*
|
|
187
187
|
*
|
|
188
|
-
* You can call [`
|
|
188
|
+
* You can call [`calculatePrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) after a booking is created. The returned calculated price includes information about each line
|
|
189
189
|
* item's price and the booking's total price.
|
|
190
190
|
*
|
|
191
|
-
* You can use [`
|
|
191
|
+
* You can use [`previewPrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/previewprice) to get the base price
|
|
192
192
|
* before a booking is created.
|
|
193
193
|
*
|
|
194
194
|
* The calculated price is the base price that will be used as a basis for charging the customer.
|
|
@@ -199,14 +199,14 @@ export function previewPrice(bookingLineItems) {
|
|
|
199
199
|
*
|
|
200
200
|
* Wix Bookings has its own default pricing logic for calculating the price. When
|
|
201
201
|
* using Wix Bookings' default pricing logic, you must pass the `serviceId` in the `slot`
|
|
202
|
-
* or `schedule` object to [`
|
|
202
|
+
* or `schedule` object to [`calculatePrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice).
|
|
203
203
|
*
|
|
204
204
|
* Alternatively you can customize the pricing logic using the
|
|
205
|
-
* [Bookings Pricing
|
|
205
|
+
* [Bookings Pricing Integration REST SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-provider).
|
|
206
206
|
* If you integrate with a pricing provider, the customized pricing logic becomes
|
|
207
|
-
* the default logic. This means that, if the
|
|
208
|
-
* when calling the API's `
|
|
209
|
-
* the
|
|
207
|
+
* the default logic. This means that, if the Pricing Integration SPI is implemented,
|
|
208
|
+
* when calling the API's `calculatePrice()` function,
|
|
209
|
+
* the REST SPI's `Calculate Price` endpoint is used instead.
|
|
210
210
|
* @param booking - Booking to calculate the price for.
|
|
211
211
|
* @public
|
|
212
212
|
* @documentationMaturity preview
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/bookings",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.107",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"groupId": "com.wixpress.public-sdk-autogen"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"falconPackageHash": "
|
|
36
|
+
"falconPackageHash": "d597f7450c4ff61e7af7117c5dba54bdd0ed3c90ee42f9612463bf78"
|
|
37
37
|
}
|