@wix/auto_sdk_bookings_pricing 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +59 -0
- package/build/cjs/src/bookings-v2-price-info-pricing.http.js +184 -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/{internal/index.d.ts → cjs/src/bookings-v2-price-info-pricing.public.d.ts} +8 -11
- 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/{bookings-v2-price-info-pricing.universal-Ci_8AyL2.d.mts → cjs/src/bookings-v2-price-info-pricing.types.d.ts} +54 -56
- 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 +1007 -0
- package/build/cjs/src/bookings-v2-price-info-pricing.universal.js +299 -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 +59 -0
- package/build/es/src/bookings-v2-price-info-pricing.http.js +179 -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/{index.d.ts → es/src/bookings-v2-price-info-pricing.public.d.ts} +8 -11
- 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/{bookings-v2-price-info-pricing.universal-Ci_8AyL2.d.ts → es/src/bookings-v2-price-info-pricing.types.d.ts} +54 -56
- 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 +1007 -0
- package/build/es/src/bookings-v2-price-info-pricing.universal.js +271 -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 +59 -0
- package/build/internal/cjs/src/bookings-v2-price-info-pricing.http.js +184 -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/{index.d.mts → cjs/src/bookings-v2-price-info-pricing.public.d.ts} +8 -11
- 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/{bookings-v2-price-info-pricing.universal-Ci_8AyL2.d.ts → cjs/src/bookings-v2-price-info-pricing.types.d.ts} +54 -56
- 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 +1007 -0
- package/build/internal/cjs/src/bookings-v2-price-info-pricing.universal.js +299 -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 +59 -0
- package/build/internal/es/src/bookings-v2-price-info-pricing.http.js +179 -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/{index.d.mts → internal/es/src/bookings-v2-price-info-pricing.public.d.ts} +8 -11
- 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/{bookings-v2-price-info-pricing.universal-Ci_8AyL2.d.mts → es/src/bookings-v2-price-info-pricing.types.d.ts} +54 -56
- 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 +1007 -0
- package/build/internal/es/src/bookings-v2-price-info-pricing.universal.js +271 -0
- package/build/internal/es/src/bookings-v2-price-info-pricing.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.js +0 -314
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -280
- package/build/index.mjs.map +0 -1
- package/build/internal/index.js +0 -314
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -280
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -793
- package/build/internal/meta.d.ts +0 -793
- package/build/internal/meta.js +0 -194
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -166
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -793
- package/build/meta.d.ts +0 -793
- package/build/meta.js +0 -194
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -166
- package/build/meta.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/bookings-v2-price-info-pricing.context.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/bookings-v2-price-info-pricing.context.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kFAAgE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/bookings-v2-price-info-pricing.universal.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/bookings-v2-price-info-pricing.universal.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.typings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oFAAkE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/bookings-v2-price-info-pricing.meta.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/bookings-v2-price-info-pricing.meta.js"), exports);
|
|
18
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+EAA6D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { previewPrice as publicPreviewPrice, calculatePrice as publicCalculatePrice } from './bookings-v2-price-info-pricing.public.js';
|
|
2
|
+
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
3
|
+
export declare const previewPrice: MaybeContext<BuildRESTFunction<typeof publicPreviewPrice> & typeof publicPreviewPrice>;
|
|
4
|
+
export declare const calculatePrice: MaybeContext<BuildRESTFunction<typeof publicCalculatePrice> & typeof publicCalculatePrice>;
|
|
5
|
+
export { MultiServiceBookingType, LocationType, ValueType, BookingStatus, PaymentStatus, SelectedPaymentOption, Platform, Actor, IdentityType, } from './bookings-v2-price-info-pricing.universal.js';
|
|
6
|
+
export { PriceInfo, PriceInfoTotalPriceOneOf, BookingLineItem, ServiceChoice, ServiceChoiceChoiceOneOf, Duration, PriceDescriptionInfo, 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, MultiServiceBookingInfo, BookedAddOn, BookedAddOnAddOnInfoOneOf, CalculatePriceResponse, } from './bookings-v2-price-info-pricing.universal.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IdentityType = exports.Actor = exports.Platform = exports.SelectedPaymentOption = exports.PaymentStatus = exports.BookingStatus = exports.ValueType = exports.LocationType = exports.MultiServiceBookingType = exports.calculatePrice = exports.previewPrice = void 0;
|
|
4
|
+
const bookings_v2_price_info_pricing_public_js_1 = require("./bookings-v2-price-info-pricing.public.js");
|
|
5
|
+
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
6
|
+
exports.previewPrice = (0, rest_modules_1.createRESTModule)(bookings_v2_price_info_pricing_public_js_1.previewPrice);
|
|
7
|
+
exports.calculatePrice = (0, rest_modules_1.createRESTModule)(bookings_v2_price_info_pricing_public_js_1.calculatePrice);
|
|
8
|
+
var bookings_v2_price_info_pricing_universal_js_1 = require("./bookings-v2-price-info-pricing.universal.js");
|
|
9
|
+
Object.defineProperty(exports, "MultiServiceBookingType", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_1.MultiServiceBookingType; } });
|
|
10
|
+
Object.defineProperty(exports, "LocationType", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_1.LocationType; } });
|
|
11
|
+
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_1.ValueType; } });
|
|
12
|
+
Object.defineProperty(exports, "BookingStatus", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_1.BookingStatus; } });
|
|
13
|
+
Object.defineProperty(exports, "PaymentStatus", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_1.PaymentStatus; } });
|
|
14
|
+
Object.defineProperty(exports, "SelectedPaymentOption", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_1.SelectedPaymentOption; } });
|
|
15
|
+
Object.defineProperty(exports, "Platform", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_1.Platform; } });
|
|
16
|
+
Object.defineProperty(exports, "Actor", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_1.Actor; } });
|
|
17
|
+
Object.defineProperty(exports, "IdentityType", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_1.IdentityType; } });
|
|
18
|
+
//# sourceMappingURL=bookings-v2-price-info-pricing.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-v2-price-info-pricing.context.js","sourceRoot":"","sources":["../../../src/bookings-v2-price-info-pricing.context.ts"],"names":[],"mappings":";;;AAAA,yGAGoD;AACpD,gEAAiE;AAGpD,QAAA,YAAY,GAEP,IAAA,+BAAgB,EAAC,uDAAkB,CAAC,CAAC;AAC1C,QAAA,cAAc,GAET,IAAA,+BAAgB,EAAC,yDAAoB,CAAC,CAAC;AAEzD,6GAUuD;AATrD,sJAAA,uBAAuB,OAAA;AACvB,2IAAA,YAAY,OAAA;AACZ,wIAAA,SAAS,OAAA;AACT,4IAAA,aAAa,OAAA;AACb,4IAAA,aAAa,OAAA;AACb,oJAAA,qBAAqB,OAAA;AACrB,uIAAA,QAAQ,OAAA;AACR,oIAAA,KAAK,OAAA;AACL,2IAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
/**
|
|
3
|
+
* Previews the base price for a set of line items belonging to the same
|
|
4
|
+
* service, before a booking is created. During the booking flow, additional
|
|
5
|
+
* taxes and fees may be added to the base price.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* ## Response
|
|
9
|
+
*
|
|
10
|
+
* The response includes each line item's individual preview price and the
|
|
11
|
+
* total of all line item preview prices. Note that the final price upon
|
|
12
|
+
* booking creation may differ from the preview price.
|
|
13
|
+
*
|
|
14
|
+
* ## Errors
|
|
15
|
+
*
|
|
16
|
+
* _Preview Price_ fails if:
|
|
17
|
+
*
|
|
18
|
+
* - You specify line items that belong to different *services*
|
|
19
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)).
|
|
20
|
+
* - The site is using the *Bookings Pricing Integration SPI*
|
|
21
|
+
* ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/introduction)).
|
|
22
|
+
*
|
|
23
|
+
* ## When to call Calculate Price instead
|
|
24
|
+
*
|
|
25
|
+
* To retrieve the price of an existing booking, call *Calculate Price*
|
|
26
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/pricing/calculate-price) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/calculate-price)).
|
|
27
|
+
*/
|
|
28
|
+
export declare function previewPrice(payload: object): RequestOptionsFactory<any>;
|
|
29
|
+
/**
|
|
30
|
+
* Calculates the base price of a booking.
|
|
31
|
+
*
|
|
32
|
+
*
|
|
33
|
+
* The returned price serves as the foundation for charging the customer. During the
|
|
34
|
+
* _eCommerce checkout_
|
|
35
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/introduction)),
|
|
36
|
+
* additional taxes and fees may be added to this base price.
|
|
37
|
+
*
|
|
38
|
+
* ## Price calculation method
|
|
39
|
+
*
|
|
40
|
+
* By default, Wix Bookings calculates a booking's price based on the relevant
|
|
41
|
+
* `serviceOptionsAndVariants.variants.values.price`
|
|
42
|
+
* ([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)).
|
|
43
|
+
* You must then specify either `booking.bookedEntity.slot.serviceId` or
|
|
44
|
+
* `booking.bookedEntity.schedule.scheduleId`.
|
|
45
|
+
*
|
|
46
|
+
* If the business uses the *Wix Bookings Pricing Integration service plugin*
|
|
47
|
+
* ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/introduction)),
|
|
48
|
+
* the returned `priceInfo` object reflects values received from the SPI implementor in
|
|
49
|
+
* _Calculate Price_
|
|
50
|
+
* ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/calculate-price)).
|
|
51
|
+
* In this case, it suffices to specify `booking.bookedEntity`.
|
|
52
|
+
*
|
|
53
|
+
* ## When to call Preview Price instead
|
|
54
|
+
*
|
|
55
|
+
* To estimate the price for multiple booking line items before the booking exists,
|
|
56
|
+
* call *Preview Price*
|
|
57
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/pricing/preview-price) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/preview-price)).
|
|
58
|
+
*/
|
|
59
|
+
export declare function calculatePrice(payload: object): RequestOptionsFactory<any>;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculatePrice = exports.previewPrice = void 0;
|
|
4
|
+
const float_1 = require("@wix/sdk-runtime/transformations/float");
|
|
5
|
+
const float_2 = require("@wix/sdk-runtime/transformations/float");
|
|
6
|
+
const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
7
|
+
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
8
|
+
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
9
|
+
function resolveComWixpressBookingsPricingBookingsPricingServiceUrl(opts) {
|
|
10
|
+
const domainToMappings = {
|
|
11
|
+
'manage._base_domain_': [
|
|
12
|
+
{
|
|
13
|
+
srcPath: '/_api/bookings-pricing',
|
|
14
|
+
destPath: '',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
srcPath: '/_api/bookings-pricing/v2/price',
|
|
18
|
+
destPath: '/v2/pricing',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
_: [
|
|
22
|
+
{
|
|
23
|
+
srcPath: '/_api/bookings-pricing',
|
|
24
|
+
destPath: '',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
srcPath: '/_api/bookings-pricing/v2/price',
|
|
28
|
+
destPath: '/v2/pricing',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
'www.wixapis.com': [
|
|
32
|
+
{
|
|
33
|
+
srcPath: '/bookings/v2/pricing/v2/pricing',
|
|
34
|
+
destPath: '/v2/pricing',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
srcPath: '/bookings/v2/pricing',
|
|
38
|
+
destPath: '/v2/pricing',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
return (0, rest_modules_1.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
43
|
+
}
|
|
44
|
+
const PACKAGE_NAME = '@wix/auto_sdk_bookings_pricing';
|
|
45
|
+
/**
|
|
46
|
+
* Previews the base price for a set of line items belonging to the same
|
|
47
|
+
* service, before a booking is created. During the booking flow, additional
|
|
48
|
+
* taxes and fees may be added to the base price.
|
|
49
|
+
*
|
|
50
|
+
*
|
|
51
|
+
* ## Response
|
|
52
|
+
*
|
|
53
|
+
* The response includes each line item's individual preview price and the
|
|
54
|
+
* total of all line item preview prices. Note that the final price upon
|
|
55
|
+
* booking creation may differ from the preview price.
|
|
56
|
+
*
|
|
57
|
+
* ## Errors
|
|
58
|
+
*
|
|
59
|
+
* _Preview Price_ fails if:
|
|
60
|
+
*
|
|
61
|
+
* - You specify line items that belong to different *services*
|
|
62
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/introduction)).
|
|
63
|
+
* - The site is using the *Bookings Pricing Integration SPI*
|
|
64
|
+
* ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/introduction)).
|
|
65
|
+
*
|
|
66
|
+
* ## When to call Calculate Price instead
|
|
67
|
+
*
|
|
68
|
+
* To retrieve the price of an existing booking, call *Calculate Price*
|
|
69
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/pricing/calculate-price) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/calculate-price)).
|
|
70
|
+
*/
|
|
71
|
+
function previewPrice(payload) {
|
|
72
|
+
function __previewPrice({ host }) {
|
|
73
|
+
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
|
74
|
+
{
|
|
75
|
+
transformFn: float_1.transformSDKFloatToRESTFloat,
|
|
76
|
+
paths: [{ path: 'bookingLineItems.pricePerParticipant' }],
|
|
77
|
+
},
|
|
78
|
+
]);
|
|
79
|
+
const metadata = {
|
|
80
|
+
entityFqdn: 'wix.bookings.v2.price_info',
|
|
81
|
+
method: 'POST',
|
|
82
|
+
methodFqn: 'com.wixpress.bookings.pricing.BookingsPricingService.PreviewPrice',
|
|
83
|
+
packageName: PACKAGE_NAME,
|
|
84
|
+
url: resolveComWixpressBookingsPricingBookingsPricingServiceUrl({
|
|
85
|
+
protoPath: '/v2/pricing/preview',
|
|
86
|
+
data: serializedData,
|
|
87
|
+
host,
|
|
88
|
+
}),
|
|
89
|
+
data: serializedData,
|
|
90
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
91
|
+
{
|
|
92
|
+
transformFn: float_2.transformRESTFloatToSDKFloat,
|
|
93
|
+
paths: [
|
|
94
|
+
{ path: 'priceInfo.calculatedPrice' },
|
|
95
|
+
{ path: 'priceInfo.deposit' },
|
|
96
|
+
{ path: 'priceInfo.bookingLineItems.pricePerParticipant' },
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
]),
|
|
100
|
+
};
|
|
101
|
+
return metadata;
|
|
102
|
+
}
|
|
103
|
+
return __previewPrice;
|
|
104
|
+
}
|
|
105
|
+
exports.previewPrice = previewPrice;
|
|
106
|
+
/**
|
|
107
|
+
* Calculates the base price of a booking.
|
|
108
|
+
*
|
|
109
|
+
*
|
|
110
|
+
* The returned price serves as the foundation for charging the customer. During the
|
|
111
|
+
* _eCommerce checkout_
|
|
112
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/introduction)),
|
|
113
|
+
* additional taxes and fees may be added to this base price.
|
|
114
|
+
*
|
|
115
|
+
* ## Price calculation method
|
|
116
|
+
*
|
|
117
|
+
* By default, Wix Bookings calculates a booking's price based on the relevant
|
|
118
|
+
* `serviceOptionsAndVariants.variants.values.price`
|
|
119
|
+
* ([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)).
|
|
120
|
+
* You must then specify either `booking.bookedEntity.slot.serviceId` or
|
|
121
|
+
* `booking.bookedEntity.schedule.scheduleId`.
|
|
122
|
+
*
|
|
123
|
+
* If the business uses the *Wix Bookings Pricing Integration service plugin*
|
|
124
|
+
* ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/introduction)),
|
|
125
|
+
* the returned `priceInfo` object reflects values received from the SPI implementor in
|
|
126
|
+
* _Calculate Price_
|
|
127
|
+
* ([REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-integration-service-plugin/calculate-price)).
|
|
128
|
+
* In this case, it suffices to specify `booking.bookedEntity`.
|
|
129
|
+
*
|
|
130
|
+
* ## When to call Preview Price instead
|
|
131
|
+
*
|
|
132
|
+
* To estimate the price for multiple booking line items before the booking exists,
|
|
133
|
+
* call *Preview Price*
|
|
134
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/pricing/preview-price) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/pricing/pricing-api/preview-price)).
|
|
135
|
+
*/
|
|
136
|
+
function calculatePrice(payload) {
|
|
137
|
+
function __calculatePrice({ host }) {
|
|
138
|
+
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
|
139
|
+
{
|
|
140
|
+
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
|
141
|
+
paths: [
|
|
142
|
+
{ path: 'booking.createdDate' },
|
|
143
|
+
{ path: 'booking.startDate' },
|
|
144
|
+
{ path: 'booking.endDate' },
|
|
145
|
+
{ path: 'booking.updatedDate' },
|
|
146
|
+
{ path: 'booking.canceledDate' },
|
|
147
|
+
],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
transformFn: float_1.transformSDKFloatToRESTFloat,
|
|
151
|
+
paths: [
|
|
152
|
+
{ path: 'booking.contactDetails.fullAddress.geocode.latitude' },
|
|
153
|
+
{ path: 'booking.contactDetails.fullAddress.geocode.longitude' },
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
]);
|
|
157
|
+
const metadata = {
|
|
158
|
+
entityFqdn: 'wix.bookings.v2.price_info',
|
|
159
|
+
method: 'POST',
|
|
160
|
+
methodFqn: 'com.wixpress.bookings.pricing.BookingsPricingService.CalculatePrice',
|
|
161
|
+
packageName: PACKAGE_NAME,
|
|
162
|
+
url: resolveComWixpressBookingsPricingBookingsPricingServiceUrl({
|
|
163
|
+
protoPath: '/v2/pricing/calculate',
|
|
164
|
+
data: serializedData,
|
|
165
|
+
host,
|
|
166
|
+
}),
|
|
167
|
+
data: serializedData,
|
|
168
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
169
|
+
{
|
|
170
|
+
transformFn: float_2.transformRESTFloatToSDKFloat,
|
|
171
|
+
paths: [
|
|
172
|
+
{ path: 'priceInfo.calculatedPrice' },
|
|
173
|
+
{ path: 'priceInfo.deposit' },
|
|
174
|
+
{ path: 'priceInfo.bookingLineItems.pricePerParticipant' },
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
]),
|
|
178
|
+
};
|
|
179
|
+
return metadata;
|
|
180
|
+
}
|
|
181
|
+
return __calculatePrice;
|
|
182
|
+
}
|
|
183
|
+
exports.calculatePrice = calculatePrice;
|
|
184
|
+
//# sourceMappingURL=bookings-v2-price-info-pricing.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-v2-price-info-pricing.http.js","sourceRoot":"","sources":["../../../src/bookings-v2-price-info-pricing.http.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as ambassadorWixBookingsV2PriceInfoTypes from './bookings-v2-price-info-pricing.types.js';
|
|
2
|
+
import * as ambassadorWixBookingsV2PriceInfoUniversalTypes from './bookings-v2-price-info-pricing.universal.js';
|
|
3
|
+
export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
|
+
getUrl: (context: any) => string;
|
|
5
|
+
httpMethod: K;
|
|
6
|
+
path: string;
|
|
7
|
+
pathParams: M;
|
|
8
|
+
__requestType: T;
|
|
9
|
+
__originalRequestType: S;
|
|
10
|
+
__responseType: Q;
|
|
11
|
+
__originalResponseType: R;
|
|
12
|
+
};
|
|
13
|
+
export declare function previewPrice(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixBookingsV2PriceInfoUniversalTypes.PreviewPriceRequest, ambassadorWixBookingsV2PriceInfoTypes.PreviewPriceRequest, ambassadorWixBookingsV2PriceInfoUniversalTypes.PreviewPriceResponse, ambassadorWixBookingsV2PriceInfoTypes.PreviewPriceResponse>;
|
|
14
|
+
export declare function calculatePrice(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixBookingsV2PriceInfoUniversalTypes.CalculatePriceRequest, ambassadorWixBookingsV2PriceInfoTypes.CalculatePriceRequest, ambassadorWixBookingsV2PriceInfoUniversalTypes.CalculatePriceResponse, ambassadorWixBookingsV2PriceInfoTypes.CalculatePriceResponse>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.calculatePrice = exports.previewPrice = void 0;
|
|
27
|
+
const ambassadorWixBookingsV2PriceInfo = __importStar(require("./bookings-v2-price-info-pricing.http.js"));
|
|
28
|
+
function previewPrice() {
|
|
29
|
+
const payload = {};
|
|
30
|
+
const getRequestOptions = ambassadorWixBookingsV2PriceInfo.previewPrice(payload);
|
|
31
|
+
const getUrl = (context) => {
|
|
32
|
+
const { url } = getRequestOptions(context);
|
|
33
|
+
return url;
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
getUrl,
|
|
37
|
+
httpMethod: 'POST',
|
|
38
|
+
path: '/v2/pricing/preview',
|
|
39
|
+
pathParams: {},
|
|
40
|
+
__requestType: null,
|
|
41
|
+
__originalRequestType: null,
|
|
42
|
+
__responseType: null,
|
|
43
|
+
__originalResponseType: null,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.previewPrice = previewPrice;
|
|
47
|
+
function calculatePrice() {
|
|
48
|
+
const payload = {};
|
|
49
|
+
const getRequestOptions = ambassadorWixBookingsV2PriceInfo.calculatePrice(payload);
|
|
50
|
+
const getUrl = (context) => {
|
|
51
|
+
const { url } = getRequestOptions(context);
|
|
52
|
+
return url;
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
getUrl,
|
|
56
|
+
httpMethod: 'POST',
|
|
57
|
+
path: '/v2/pricing/calculate',
|
|
58
|
+
pathParams: {},
|
|
59
|
+
__requestType: null,
|
|
60
|
+
__originalRequestType: null,
|
|
61
|
+
__responseType: null,
|
|
62
|
+
__originalResponseType: null,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
exports.calculatePrice = calculatePrice;
|
|
66
|
+
//# sourceMappingURL=bookings-v2-price-info-pricing.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-v2-price-info-pricing.meta.js","sourceRoot":"","sources":["../../../src/bookings-v2-price-info-pricing.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2GAA6F;AAsB7F,SAAgB,YAAY;IAQ1B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,gCAAgC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,oCA4BC;AAED,SAAgB,cAAc;IAQ5B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,gCAAgC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAE3D,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,uBAAuB;QAC7B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,wCA4BC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { HttpClient
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { Booking, BookingLineItem, CalculatePriceResponse, PreviewPriceResponse } from './bookings-v2-price-info-pricing.universal.js';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function previewPrice(httpClient: HttpClient): PreviewPriceSignature;
|
|
6
7
|
interface PreviewPriceSignature {
|
|
7
8
|
/**
|
|
8
9
|
* Previews the base price for a set of line items belonging to the same
|
|
@@ -33,7 +34,7 @@ interface PreviewPriceSignature {
|
|
|
33
34
|
*/
|
|
34
35
|
(bookingLineItems: BookingLineItem[]): Promise<PreviewPriceResponse>;
|
|
35
36
|
}
|
|
36
|
-
declare function calculatePrice
|
|
37
|
+
export declare function calculatePrice(httpClient: HttpClient): CalculatePriceSignature;
|
|
37
38
|
interface CalculatePriceSignature {
|
|
38
39
|
/**
|
|
39
40
|
* Calculates the base price of a booking.
|
|
@@ -70,8 +71,4 @@ interface CalculatePriceSignature {
|
|
|
70
71
|
*/
|
|
71
72
|
(booking: Booking): Promise<CalculatePriceResponse>;
|
|
72
73
|
}
|
|
73
|
-
|
|
74
|
-
declare const previewPrice: MaybeContext<BuildRESTFunction<typeof previewPrice$1> & typeof previewPrice$1>;
|
|
75
|
-
declare const calculatePrice: MaybeContext<BuildRESTFunction<typeof calculatePrice$1> & typeof calculatePrice$1>;
|
|
76
|
-
|
|
77
|
-
export { Booking, BookingLineItem, CalculatePriceResponse, PreviewPriceResponse, calculatePrice, previewPrice };
|
|
74
|
+
export { Actor, Address, AddressLocation, AddressStreetOneOf, BookedAddOn, BookedAddOnAddOnInfoOneOf, BookedEntity, BookedEntityItemOneOf, BookedResource, BookedSchedule, BookedSlot, Booking, BookingLineItem, BookingParticipantsInfoOneOf, BookingSource, BookingStatus, CalculatePriceRequest, CalculatePriceResponse, ContactDetails, CustomFormField, Duration, ExtendedFields, FlowControlSettings, IdentificationData, IdentificationDataIdOneOf, IdentityType, Location, LocationType, MultiServiceBookingInfo, MultiServiceBookingType, ParticipantChoices, ParticipantNotification, PaymentStatus, Platform, PreviewPriceRequest, PreviewPriceResponse, PriceDescriptionInfo, PriceInfo, PriceInfoTotalPriceOneOf, SelectedPaymentOption, ServiceChoice, ServiceChoiceChoiceOneOf, ServiceChoices, StreetAddress, Subdivision, ValueType, } from './bookings-v2-price-info-pricing.universal.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValueType = exports.SelectedPaymentOption = exports.Platform = exports.PaymentStatus = exports.MultiServiceBookingType = exports.LocationType = exports.IdentityType = exports.BookingStatus = exports.Actor = exports.calculatePrice = exports.previewPrice = exports.__metadata = void 0;
|
|
4
|
+
const bookings_v2_price_info_pricing_universal_js_1 = require("./bookings-v2-price-info-pricing.universal.js");
|
|
5
|
+
exports.__metadata = { PACKAGE_NAME: '@wix/bookings' };
|
|
6
|
+
function previewPrice(httpClient) {
|
|
7
|
+
return (bookingLineItems) => (0, bookings_v2_price_info_pricing_universal_js_1.previewPrice)(bookingLineItems,
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
{ httpClient });
|
|
10
|
+
}
|
|
11
|
+
exports.previewPrice = previewPrice;
|
|
12
|
+
function calculatePrice(httpClient) {
|
|
13
|
+
return (booking) => (0, bookings_v2_price_info_pricing_universal_js_1.calculatePrice)(booking,
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
{ httpClient });
|
|
16
|
+
}
|
|
17
|
+
exports.calculatePrice = calculatePrice;
|
|
18
|
+
var bookings_v2_price_info_pricing_universal_js_2 = require("./bookings-v2-price-info-pricing.universal.js");
|
|
19
|
+
Object.defineProperty(exports, "Actor", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_2.Actor; } });
|
|
20
|
+
Object.defineProperty(exports, "BookingStatus", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_2.BookingStatus; } });
|
|
21
|
+
Object.defineProperty(exports, "IdentityType", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_2.IdentityType; } });
|
|
22
|
+
Object.defineProperty(exports, "LocationType", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_2.LocationType; } });
|
|
23
|
+
Object.defineProperty(exports, "MultiServiceBookingType", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_2.MultiServiceBookingType; } });
|
|
24
|
+
Object.defineProperty(exports, "PaymentStatus", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_2.PaymentStatus; } });
|
|
25
|
+
Object.defineProperty(exports, "Platform", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_2.Platform; } });
|
|
26
|
+
Object.defineProperty(exports, "SelectedPaymentOption", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_2.SelectedPaymentOption; } });
|
|
27
|
+
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function () { return bookings_v2_price_info_pricing_universal_js_2.ValueType; } });
|
|
28
|
+
//# sourceMappingURL=bookings-v2-price-info-pricing.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-v2-price-info-pricing.public.js","sourceRoot":"","sources":["../../../src/bookings-v2-price-info-pricing.public.ts"],"names":[],"mappings":";;;AACA,+GAOuD;AAE1C,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAE5D,SAAgB,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,gBAAmC,EAAE,EAAE,CAC7C,IAAA,0DAAqB,EACnB,gBAAgB;IAChB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,oCAOC;AAiCD,SAAgB,cAAc,CAC5B,UAAsB;IAEtB,OAAO,CAAC,OAAgB,EAAE,EAAE,CAC1B,IAAA,4DAAuB,EACrB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,wCASC;AAuCD,6GA+CuD;AA9CrD,oIAAA,KAAK,OAAA;AAeL,4IAAA,aAAa,OAAA;AAUb,2IAAA,YAAY,OAAA;AAEZ,2IAAA,YAAY,OAAA;AAEZ,sJAAA,uBAAuB,OAAA;AAGvB,4IAAA,aAAa,OAAA;AACb,uIAAA,QAAQ,OAAA;AAMR,oJAAA,qBAAqB,OAAA;AAMrB,wIAAA,SAAS,OAAA"}
|