@wix/bookings 1.0.102 → 1.0.104
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 -1
- package/build/cjs/index.js +2 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/src/bookings-reader-v2-extended-booking.http.d.ts +9 -14
- package/build/cjs/src/bookings-reader-v2-extended-booking.http.js +9 -14
- package/build/cjs/src/bookings-reader-v2-extended-booking.http.js.map +1 -1
- package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +2 -2
- package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +24 -39
- package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js +11 -16
- package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
- package/build/cjs/src/bookings-services-v2-service.http.js +4 -0
- package/build/cjs/src/bookings-services-v2-service.http.js.map +1 -1
- package/build/cjs/src/bookings-v2-booking.types.d.ts +2 -2
- package/build/cjs/src/bookings-v2-booking.universal.d.ts +2 -2
- package/build/cjs/src/bookings-v2-price-info.http.js +3 -3
- package/build/cjs/src/bookings-v2-price-info.http.js.map +1 -1
- package/build/cjs/src/bookings-v2-price-info.public.d.ts +3 -3
- package/build/cjs/src/bookings-v2-price-info.public.js +1 -1
- package/build/cjs/src/bookings-v2-price-info.public.js.map +1 -1
- package/build/cjs/src/bookings-v2-price-info.types.d.ts +3 -3
- package/build/cjs/src/bookings-v2-price-info.universal.d.ts +32 -38
- package/build/cjs/src/bookings-v2-price-info.universal.js +6 -4
- package/build/cjs/src/bookings-v2-price-info.universal.js.map +1 -1
- package/build/es/index.d.ts +1 -1
- package/build/es/index.js +1 -1
- package/build/es/index.js.map +1 -1
- package/build/es/src/bookings-reader-v2-extended-booking.http.d.ts +9 -14
- package/build/es/src/bookings-reader-v2-extended-booking.http.js +9 -14
- package/build/es/src/bookings-reader-v2-extended-booking.http.js.map +1 -1
- package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +2 -2
- package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +24 -39
- package/build/es/src/bookings-reader-v2-extended-booking.universal.js +11 -16
- package/build/es/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
- package/build/es/src/bookings-services-v2-service.http.js +4 -0
- package/build/es/src/bookings-services-v2-service.http.js.map +1 -1
- package/build/es/src/bookings-v2-booking.types.d.ts +2 -2
- package/build/es/src/bookings-v2-booking.universal.d.ts +2 -2
- package/build/es/src/bookings-v2-price-info.http.js +3 -3
- package/build/es/src/bookings-v2-price-info.http.js.map +1 -1
- package/build/es/src/bookings-v2-price-info.public.d.ts +3 -3
- package/build/es/src/bookings-v2-price-info.public.js +1 -1
- package/build/es/src/bookings-v2-price-info.public.js.map +1 -1
- package/build/es/src/bookings-v2-price-info.types.d.ts +3 -3
- package/build/es/src/bookings-v2-price-info.universal.d.ts +32 -38
- package/build/es/src/bookings-v2-price-info.universal.js +6 -4
- package/build/es/src/bookings-v2-price-info.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -146,12 +146,12 @@ export interface BookedSlot {
|
|
|
146
146
|
scheduleId?: string;
|
|
147
147
|
/**
|
|
148
148
|
* The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
149
|
-
* format.
|
|
149
|
+
* format.
|
|
150
150
|
*/
|
|
151
151
|
startDate?: string | null;
|
|
152
152
|
/**
|
|
153
153
|
* The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
154
|
-
* format.
|
|
154
|
+
* format.
|
|
155
155
|
*/
|
|
156
156
|
endDate?: string | null;
|
|
157
157
|
/** The timezone according to which the slot was shown to the user when booking, and should be shown in future. */
|
|
@@ -150,12 +150,12 @@ export interface BookedSlot {
|
|
|
150
150
|
scheduleId?: string;
|
|
151
151
|
/**
|
|
152
152
|
* The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
153
|
-
* format.
|
|
153
|
+
* format.
|
|
154
154
|
*/
|
|
155
155
|
startDate?: string | null;
|
|
156
156
|
/**
|
|
157
157
|
* The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
158
|
-
* format.
|
|
158
|
+
* format.
|
|
159
159
|
*/
|
|
160
160
|
endDate?: string | null;
|
|
161
161
|
/** The timezone according to which the slot was shown to the user when booking, and should be shown in future. */
|
|
@@ -47,12 +47,12 @@ function resolveComWixpressBookingsPricingBookingsPricingServiceUrl(opts) {
|
|
|
47
47
|
],
|
|
48
48
|
'www.wixapis.com': [
|
|
49
49
|
{
|
|
50
|
-
srcPath: '/bookings
|
|
51
|
-
destPath: '',
|
|
50
|
+
srcPath: '/bookings/v2/pricing/v2/pricing',
|
|
51
|
+
destPath: '/v2/pricing',
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
srcPath: '/bookings/v2/pricing',
|
|
55
|
-
destPath: '',
|
|
55
|
+
destPath: '/v2/pricing',
|
|
56
56
|
},
|
|
57
57
|
],
|
|
58
58
|
};
|
|
@@ -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;IACf,WAAW,EAAE,2BAA2B;IACxC,SAAS,EAAE,2BAA2B;IACtC,OAAO,EAAE,2BAA2B;IACpC,WAAW,EAAE,2BAA2B;IACxC,cAAc,EAAE,iBAAiB;CAClC,CAAC;AACF,MAAM,gBAAgB,GAAG,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,CAAC;AAChF,MAAM,sBAAsB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACvD,MAAM,uBAAuB,GAAG,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AAC5D,MAAM,eAAe,GAAG,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACpD,MAAM,oBAAoB,GAAG,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,CAAC;AACtE,MAAM,qBAAqB,GAAG,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AAC1D,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,6BAA6B;IACtC,eAAe,EAAE,QAAQ;IACzB,gBAAgB,EAAE,kBAAkB;CACrC,CAAC;AAEF,SAAS,0DAA0D,CACjE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,wBAAwB;gBACjC,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,iCAAiC;gBAC1C,QAAQ,EAAE,aAAa;aACxB;SACF;QACD,CAAC,EAAE;YACD;gBACE,OAAO,EAAE,wBAAwB;gBACjC,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,iCAAiC;gBAC1C,QAAQ,EAAE,aAAa;aACxB;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,
|
|
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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B,CAAC,EAAE,IAAI,EAAO;QACrC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,MAAM,EAAE,MAAa;YACrB,GAAG,EAAE,0DAA0D,CAAC;gBAC9D,SAAS,EAAE,uBAAuB;gBAClC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gBAAgB,CAAC,OAAO,GAAG,OAAO,CAAC;IAEnC,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export declare function previewPrice(httpClient: HttpClient): (
|
|
2
|
+
import { BookingLineItem, Booking } from './bookings-v2-price-info.universal';
|
|
3
|
+
export declare function previewPrice(httpClient: HttpClient): (bookingLineItems: BookingLineItem[]) => Promise<import("./bookings-v2-price-info.universal").PreviewPriceResponse>;
|
|
4
4
|
export declare function calculatePrice(httpClient: HttpClient): (booking: Booking) => Promise<import("./bookings-v2-price-info.universal").CalculatePriceResponse>;
|
|
5
5
|
export { LocationType, ValueType, BookingStatus, PaymentStatus, SelectedPaymentOption, Platform, Actor, IdentityType, } from './bookings-v2-price-info.universal';
|
|
6
|
-
export { PriceInfo, PriceInfoTotalPriceOneOf, BookingLineItem, ServiceChoice, ServiceChoiceChoiceOneOf, PreviewPriceRequest, PreviewPriceResponse, CalculatePriceRequest, Booking, BookingParticipantsInfoOneOf, BookedEntity, BookedEntityItemOneOf, BookedSlot, BookedResource, Location, BookedSchedule, ContactDetails, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, CustomFormField, BookingSource, ParticipantNotification, IdentificationData, IdentificationDataIdOneOf, FlowControlSettings, ExtendedFields, ParticipantChoices, ServiceChoices, CalculatePriceResponse,
|
|
6
|
+
export { PriceInfo, PriceInfoTotalPriceOneOf, BookingLineItem, ServiceChoice, ServiceChoiceChoiceOneOf, PreviewPriceRequest, PreviewPriceResponse, CalculatePriceRequest, Booking, BookingParticipantsInfoOneOf, BookedEntity, BookedEntityItemOneOf, BookedSlot, BookedResource, Location, BookedSchedule, ContactDetails, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, CustomFormField, BookingSource, ParticipantNotification, IdentificationData, IdentificationDataIdOneOf, FlowControlSettings, ExtendedFields, ParticipantChoices, ServiceChoices, CalculatePriceResponse, } from './bookings-v2-price-info.universal';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { previewPrice as universalPreviewPrice, calculatePrice as universalCalculatePrice, } from './bookings-v2-price-info.universal';
|
|
2
2
|
export function previewPrice(httpClient) {
|
|
3
|
-
return (
|
|
3
|
+
return (bookingLineItems) => universalPreviewPrice(bookingLineItems,
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
{ httpClient });
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookings-v2-price-info.public.js","sourceRoot":"","sources":["../../../src/bookings-v2-price-info.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,IAAI,qBAAqB,EACrC,cAAc,IAAI,uBAAuB,GAG1C,MAAM,oCAAoC,CAAC;AAE5C,MAAM,UAAU,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"bookings-v2-price-info.public.js","sourceRoot":"","sources":["../../../src/bookings-v2-price-info.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,IAAI,qBAAqB,EACrC,cAAc,IAAI,uBAAuB,GAG1C,MAAM,oCAAoC,CAAC;AAE5C,MAAM,UAAU,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,gBAAmC,EAAE,EAAE,CAC7C,qBAAqB,CACnB,gBAAgB;IAChB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,UAAsB;IACnD,OAAO,CAAC,OAAgB,EAAE,EAAE,CAC1B,uBAAuB,CACrB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EACL,YAAY,EACZ,SAAS,EACT,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACR,KAAK,EACL,YAAY,GACb,MAAM,oCAAoC,CAAC"}
|
|
@@ -92,7 +92,7 @@ export interface ServiceChoiceChoiceOneOf {
|
|
|
92
92
|
}
|
|
93
93
|
export interface PreviewPriceRequest {
|
|
94
94
|
/** List of line items to preview the price for. */
|
|
95
|
-
bookingLineItems
|
|
95
|
+
bookingLineItems: BookingLineItem[];
|
|
96
96
|
}
|
|
97
97
|
export interface PreviewPriceResponse {
|
|
98
98
|
/** Information about each line item's price and the estimated total price based on the line items. */
|
|
@@ -250,12 +250,12 @@ export interface BookedSlot {
|
|
|
250
250
|
scheduleId?: string;
|
|
251
251
|
/**
|
|
252
252
|
* The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
253
|
-
* format.
|
|
253
|
+
* format.
|
|
254
254
|
*/
|
|
255
255
|
startDate?: string | null;
|
|
256
256
|
/**
|
|
257
257
|
* The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
258
|
-
* format.
|
|
258
|
+
* format.
|
|
259
259
|
*/
|
|
260
260
|
endDate?: string | null;
|
|
261
261
|
/** The timezone according to which the slot was shown to the user when booking, and should be shown in future. */
|
|
@@ -15,16 +15,16 @@ export interface PriceInfo extends PriceInfoTotalPriceOneOf {
|
|
|
15
15
|
deposit?: number | null;
|
|
16
16
|
/**
|
|
17
17
|
* Calculated total price. Available only when the
|
|
18
|
-
*
|
|
18
|
+
* service's
|
|
19
19
|
* price has been set up as a numerical value in the
|
|
20
|
-
*
|
|
20
|
+
* `schedule.rate.labeledPriceOptions` object.
|
|
21
21
|
*/
|
|
22
22
|
calculatedPrice?: number;
|
|
23
23
|
/**
|
|
24
24
|
* Description of the total price. Available only when the
|
|
25
|
-
*
|
|
25
|
+
* service's
|
|
26
26
|
* price has been set up as a text value in the
|
|
27
|
-
*
|
|
27
|
+
* `schedule.rate.priceText` property.
|
|
28
28
|
*/
|
|
29
29
|
priceDescription?: string;
|
|
30
30
|
}
|
|
@@ -50,9 +50,6 @@ export interface BookingLineItem {
|
|
|
50
50
|
* Service ID.
|
|
51
51
|
*
|
|
52
52
|
* Required when not using Wix Booking's default pricing logic.
|
|
53
|
-
*
|
|
54
|
-
* Optional when using custom pricing logic defined with the
|
|
55
|
-
* [Bookings Pricing Provider SPI](https://example.com/).
|
|
56
53
|
*/
|
|
57
54
|
serviceId?: string | null;
|
|
58
55
|
/** Resource ID. Required for services of type appointment or class. */
|
|
@@ -89,7 +86,7 @@ export interface ServiceChoice extends ServiceChoiceChoiceOneOf {
|
|
|
89
86
|
/** @oneof */
|
|
90
87
|
export interface ServiceChoiceChoiceOneOf {
|
|
91
88
|
/**
|
|
92
|
-
* Value for one of the choices in the
|
|
89
|
+
* Value for one of the choices in the `CustomServiceOption.choices` list.
|
|
93
90
|
* Choices are specific values for an option the customer can choose to book. For example,
|
|
94
91
|
* the option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.
|
|
95
92
|
* Each choice may have a different price.
|
|
@@ -98,7 +95,7 @@ export interface ServiceChoiceChoiceOneOf {
|
|
|
98
95
|
}
|
|
99
96
|
export interface PreviewPriceRequest {
|
|
100
97
|
/** List of line items to preview the price for. */
|
|
101
|
-
bookingLineItems
|
|
98
|
+
bookingLineItems: BookingLineItem[];
|
|
102
99
|
}
|
|
103
100
|
export interface PreviewPriceResponse {
|
|
104
101
|
/** Information about each line item's price and the estimated total price based on the line items. */
|
|
@@ -126,24 +123,20 @@ export interface Booking extends BookingParticipantsInfoOneOf {
|
|
|
126
123
|
* One of:
|
|
127
124
|
* - `"CREATED"` - The booking was created.
|
|
128
125
|
* - `"UPDATED"` - The booking was updated.
|
|
129
|
-
* - `"CONFIRMED"` - The booking was confirmed and appears on the bookings calendar.
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* + The service is configured as automatically confirmed.
|
|
133
|
-
* + The system invoked the eCommerce checkout API and created an order.
|
|
126
|
+
* - `"CONFIRMED"` - The booking was confirmed and appears on the bookings calendar. A booking can be manually confirmed using the [`Confirm Or Decline API`](www.example.com). A booking can be automatically confirmed when the following requirements are met:
|
|
127
|
+
* + The service is configured as automatically confirmed.
|
|
128
|
+
* + The system invoked the eCommerce checkout API and created an order.
|
|
134
129
|
* - `"CANCELED"` - The booking has been canceled and synced to the bookings calendar.
|
|
135
130
|
* The booking can be canceled using [`Cancel Booking API`](www.example.com).
|
|
136
131
|
* - `"PENDING"` - The booking is waiting to be confirmed or declined by the owner and the booking is synced to the bookings calendar.
|
|
137
132
|
* Bookings can be manually set as `PENDING` using the [`setAsPending` API](www.example.com), by those with Manage Booking Status permissions scopes.
|
|
138
133
|
* Bookings can be automatically set as `PENDING` when the following requirements are met:
|
|
139
|
-
*
|
|
140
|
-
*
|
|
134
|
+
* + The service is configured as manually confirmed.
|
|
135
|
+
* + Invoking the eCommerce checkout API and an order has been created.
|
|
141
136
|
* - `"WAITING_LIST"` - The booking is on a waiting list.
|
|
142
|
-
* - `"DECLINED"` - The booking was declined by the owner and synced to the Bookings calendar.
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* + Invoking the `eCommerce checkout` API and the order declined event has been sent.
|
|
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.
|
|
137
|
+
* - `"DECLINED"` - The booking was declined by the owner and synced to the Bookings calendar. Bookings can be manually declined using the [`Decline Booking` API](www.example.com) by those with Manage Booking Status permission scopes. Booking can be automatically declined when one of the following requirements are met:
|
|
138
|
+
* + Invoking the `eCommerce checkout` API and the order declined event has been sent.
|
|
139
|
+
* + Invoking the `eCommerce checkout` API and order approved event has been sent, but the booking is offline and the booking causes a double booking.
|
|
147
140
|
*/
|
|
148
141
|
status?: BookingStatus;
|
|
149
142
|
/**
|
|
@@ -158,6 +151,9 @@ export interface Booking extends BookingParticipantsInfoOneOf {
|
|
|
158
151
|
paymentStatus?: PaymentStatus;
|
|
159
152
|
/**
|
|
160
153
|
* Selected payment option.
|
|
154
|
+
*
|
|
155
|
+
* Supported values: `"OFFLINE"`, `"ONLINE"`, `"MEMBERSHIP"`, `"MEMBERSHIP_OFFLINE"`.
|
|
156
|
+
*
|
|
161
157
|
* One of the payment options offered by the service, or another option if `skipSelectedPaymentOptionValidation` is `true`.
|
|
162
158
|
* When undefined, the payment option is resolved by the service configuration on checkout.
|
|
163
159
|
*/
|
|
@@ -256,12 +252,12 @@ export interface BookedSlot {
|
|
|
256
252
|
scheduleId?: string;
|
|
257
253
|
/**
|
|
258
254
|
* The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
259
|
-
* format.
|
|
255
|
+
* format.
|
|
260
256
|
*/
|
|
261
257
|
startDate?: string | null;
|
|
262
258
|
/**
|
|
263
259
|
* The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
264
|
-
* format.
|
|
260
|
+
* format.
|
|
265
261
|
*/
|
|
266
262
|
endDate?: string | null;
|
|
267
263
|
/** The timezone according to which the slot was shown to the user when booking, and should be shown in future. */
|
|
@@ -338,7 +334,7 @@ export interface ContactDetails {
|
|
|
338
334
|
firstName?: string | null;
|
|
339
335
|
/** Contact's last name. */
|
|
340
336
|
lastName?: string | null;
|
|
341
|
-
/** Contact's email, used to create a new contact or get existing one from the [Contacts API](https://
|
|
337
|
+
/** 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). */
|
|
342
338
|
email?: string | null;
|
|
343
339
|
/** Contact's phone number. */
|
|
344
340
|
phone?: string | null;
|
|
@@ -414,12 +410,9 @@ export interface CustomFormField {
|
|
|
414
410
|
*/
|
|
415
411
|
label?: string | null;
|
|
416
412
|
/**
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
* - `"LONG_TEXT"`
|
|
421
|
-
* - `"CHECK_BOX"`
|
|
422
|
-
* <!--END:ONLY:VELO-->
|
|
413
|
+
* Form field value's type at the time of submission.
|
|
414
|
+
*
|
|
415
|
+
* Supported values: `"SHORT_TEXT"`, `"LONG_TEXT"`, `"CHECK_BOX"`
|
|
423
416
|
*/
|
|
424
417
|
valueType?: ValueType;
|
|
425
418
|
}
|
|
@@ -570,9 +563,12 @@ export interface FlowControlSettings {
|
|
|
570
563
|
}
|
|
571
564
|
export interface ExtendedFields {
|
|
572
565
|
/**
|
|
573
|
-
* Data Extensions extended fields
|
|
574
|
-
*
|
|
575
|
-
*
|
|
566
|
+
* Data Extensions extended fields expressed as a set of key-value pairs:
|
|
567
|
+
*
|
|
568
|
+
* `key:value`
|
|
569
|
+
*
|
|
570
|
+
* + `key` is the namespace, type `string`.
|
|
571
|
+
* + `value` is the data of the extended fields data, type `struct`.
|
|
576
572
|
*/
|
|
577
573
|
namespaces?: Record<string, Record<string, any>>;
|
|
578
574
|
}
|
|
@@ -618,14 +614,12 @@ export interface CalculatePriceResponse {
|
|
|
618
614
|
* You cannot call `Preview Price` if you have customized Bookings pricing logic using the
|
|
619
615
|
* [Bookings Pricing Provider SPI](https://example.com/). Calling `Preview Price` if custom pricing
|
|
620
616
|
* logic has been implemented for the site results in an error.
|
|
617
|
+
* @param bookingLineItems - List of line items to preview the price for.
|
|
621
618
|
* @public
|
|
622
619
|
* @documentationMaturity preview
|
|
620
|
+
* @requiredField bookingLineItems
|
|
623
621
|
*/
|
|
624
|
-
export declare function previewPrice(
|
|
625
|
-
export interface PreviewPriceOptions {
|
|
626
|
-
/** List of line items to preview the price for. */
|
|
627
|
-
bookingLineItems?: BookingLineItem[];
|
|
628
|
-
}
|
|
622
|
+
export declare function previewPrice(bookingLineItems: BookingLineItem[]): Promise<PreviewPriceResponse>;
|
|
629
623
|
/**
|
|
630
624
|
* Calculates the base price of a booking.
|
|
631
625
|
*
|
|
@@ -132,13 +132,15 @@ const _previewPriceResponse = {};
|
|
|
132
132
|
* You cannot call `Preview Price` if you have customized Bookings pricing logic using the
|
|
133
133
|
* [Bookings Pricing Provider SPI](https://example.com/). Calling `Preview Price` if custom pricing
|
|
134
134
|
* logic has been implemented for the site results in an error.
|
|
135
|
+
* @param bookingLineItems - List of line items to preview the price for.
|
|
135
136
|
* @public
|
|
136
137
|
* @documentationMaturity preview
|
|
138
|
+
* @requiredField bookingLineItems
|
|
137
139
|
*/
|
|
138
|
-
export function previewPrice(
|
|
140
|
+
export function previewPrice(bookingLineItems) {
|
|
139
141
|
var _a, _b, _c;
|
|
140
142
|
return __awaiter(this, arguments, void 0, function* () {
|
|
141
|
-
const requestTransformation = { bookingLineItems: '$[0]
|
|
143
|
+
const requestTransformation = { bookingLineItems: '$[0]' };
|
|
142
144
|
const responseTransformation = '$';
|
|
143
145
|
// @ts-ignore
|
|
144
146
|
const { httpClient, sideEffects } = arguments[1];
|
|
@@ -160,7 +162,7 @@ export function previewPrice(options) {
|
|
|
160
162
|
},
|
|
161
163
|
customTransformation: responseTransformation,
|
|
162
164
|
});
|
|
163
|
-
const payload = toAmbassadorRequest([
|
|
165
|
+
const payload = toAmbassadorRequest([bookingLineItems]);
|
|
164
166
|
const reqOpts = ambassadorWixBookingsV2PriceInfo.previewPrice(payload);
|
|
165
167
|
__log(`"PreviewPrice" sending request with: ${__inspect(reqOpts)}`);
|
|
166
168
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
@@ -171,7 +173,7 @@ export function previewPrice(options) {
|
|
|
171
173
|
}
|
|
172
174
|
catch (err) {
|
|
173
175
|
const transformedError = transformError(err, requestTransformation, [
|
|
174
|
-
'
|
|
176
|
+
'bookingLineItems',
|
|
175
177
|
]);
|
|
176
178
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
177
179
|
throw transformedError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookings-v2-price-info.universal.js","sourceRoot":"","sources":["../../../src/bookings-v2-price-info.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,gCAAgC,MAAM,+BAA+B,CAAC;AAElF,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"bookings-v2-price-info.universal.js","sourceRoot":"","sources":["../../../src/bookings-v2-price-info.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,gCAAgC,MAAM,+BAA+B,CAAC;AAElF,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,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,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,cAAc,CAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/bookings",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.104",
|
|
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": "d129e2a630dfa605b0d8ae2a4d99e7e4aaee36a5b9dc87c35d6a8709"
|
|
37
37
|
}
|