@wix/bookings 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/build/cjs/index.d.ts +4 -1
  2. package/build/cjs/index.js +5 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/bookings-availability-v1-slot-availability.http.d.ts +6 -6
  5. package/build/cjs/src/bookings-availability-v1-slot-availability.http.js +6 -6
  6. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -29
  7. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js +7 -6
  8. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  9. package/build/cjs/src/bookings-reader-v2-extended-booking.http.d.ts +38 -0
  10. package/build/cjs/src/bookings-reader-v2-extended-booking.http.js +117 -0
  11. package/build/cjs/src/bookings-reader-v2-extended-booking.http.js.map +1 -0
  12. package/build/cjs/src/bookings-reader-v2-extended-booking.public.d.ts +5 -0
  13. package/build/cjs/src/bookings-reader-v2-extended-booking.public.js +22 -0
  14. package/build/cjs/src/bookings-reader-v2-extended-booking.public.js.map +1 -0
  15. package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +730 -0
  16. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js +90 -0
  17. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js.map +1 -0
  18. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +786 -0
  19. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js +226 -0
  20. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js.map +1 -0
  21. package/build/cjs/src/bookings-v2-booking.http.d.ts +123 -0
  22. package/build/cjs/src/bookings-v2-booking.http.js +305 -0
  23. package/build/cjs/src/bookings-v2-booking.http.js.map +1 -0
  24. package/build/cjs/src/bookings-v2-booking.public.d.ts +9 -0
  25. package/build/cjs/src/bookings-v2-booking.public.js +47 -0
  26. package/build/cjs/src/bookings-v2-booking.public.js.map +1 -0
  27. package/build/cjs/src/bookings-v2-booking.types.d.ts +1594 -0
  28. package/build/cjs/src/bookings-v2-booking.types.js +99 -0
  29. package/build/cjs/src/bookings-v2-booking.types.js.map +1 -0
  30. package/build/cjs/src/bookings-v2-booking.universal.d.ts +1840 -0
  31. package/build/cjs/src/bookings-v2-booking.universal.js +561 -0
  32. package/build/cjs/src/bookings-v2-booking.universal.js.map +1 -0
  33. package/build/cjs/src/bookings-v2-price-info.http.d.ts +56 -0
  34. package/build/cjs/src/bookings-v2-price-info.http.js +164 -0
  35. package/build/cjs/src/bookings-v2-price-info.http.js.map +1 -0
  36. package/build/cjs/src/bookings-v2-price-info.public.d.ts +6 -0
  37. package/build/cjs/src/bookings-v2-price-info.public.js +26 -0
  38. package/build/cjs/src/bookings-v2-price-info.public.js.map +1 -0
  39. package/build/cjs/src/bookings-v2-price-info.types.d.ts +594 -0
  40. package/build/cjs/src/bookings-v2-price-info.types.js +79 -0
  41. package/build/cjs/src/bookings-v2-price-info.types.js.map +1 -0
  42. package/build/cjs/src/bookings-v2-price-info.universal.d.ts +664 -0
  43. package/build/cjs/src/bookings-v2-price-info.universal.js +274 -0
  44. package/build/cjs/src/bookings-v2-price-info.universal.js.map +1 -0
  45. package/build/es/index.d.ts +4 -1
  46. package/build/es/index.js +4 -1
  47. package/build/es/index.js.map +1 -1
  48. package/build/es/src/bookings-availability-v1-slot-availability.http.d.ts +6 -6
  49. package/build/es/src/bookings-availability-v1-slot-availability.http.js +6 -6
  50. package/build/es/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -29
  51. package/build/es/src/bookings-availability-v1-slot-availability.universal.js +7 -6
  52. package/build/es/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  53. package/build/es/src/bookings-reader-v2-extended-booking.http.d.ts +38 -0
  54. package/build/es/src/bookings-reader-v2-extended-booking.http.js +113 -0
  55. package/build/es/src/bookings-reader-v2-extended-booking.http.js.map +1 -0
  56. package/build/es/src/bookings-reader-v2-extended-booking.public.d.ts +5 -0
  57. package/build/es/src/bookings-reader-v2-extended-booking.public.js +8 -0
  58. package/build/es/src/bookings-reader-v2-extended-booking.public.js.map +1 -0
  59. package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +730 -0
  60. package/build/es/src/bookings-reader-v2-extended-booking.types.js +87 -0
  61. package/build/es/src/bookings-reader-v2-extended-booking.types.js.map +1 -0
  62. package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +786 -0
  63. package/build/es/src/bookings-reader-v2-extended-booking.universal.js +203 -0
  64. package/build/es/src/bookings-reader-v2-extended-booking.universal.js.map +1 -0
  65. package/build/es/src/bookings-v2-booking.http.d.ts +123 -0
  66. package/build/es/src/bookings-v2-booking.http.js +297 -0
  67. package/build/es/src/bookings-v2-booking.http.js.map +1 -0
  68. package/build/es/src/bookings-v2-booking.public.d.ts +9 -0
  69. package/build/es/src/bookings-v2-booking.public.js +28 -0
  70. package/build/es/src/bookings-v2-booking.public.js.map +1 -0
  71. package/build/es/src/bookings-v2-booking.types.d.ts +1594 -0
  72. package/build/es/src/bookings-v2-booking.types.js +96 -0
  73. package/build/es/src/bookings-v2-booking.types.js.map +1 -0
  74. package/build/es/src/bookings-v2-booking.universal.d.ts +1840 -0
  75. package/build/es/src/bookings-v2-booking.universal.js +534 -0
  76. package/build/es/src/bookings-v2-booking.universal.js.map +1 -0
  77. package/build/es/src/bookings-v2-price-info.http.d.ts +56 -0
  78. package/build/es/src/bookings-v2-price-info.http.js +159 -0
  79. package/build/es/src/bookings-v2-price-info.http.js.map +1 -0
  80. package/build/es/src/bookings-v2-price-info.public.d.ts +6 -0
  81. package/build/es/src/bookings-v2-price-info.public.js +13 -0
  82. package/build/es/src/bookings-v2-price-info.public.js.map +1 -0
  83. package/build/es/src/bookings-v2-price-info.types.d.ts +594 -0
  84. package/build/es/src/bookings-v2-price-info.types.js +76 -0
  85. package/build/es/src/bookings-v2-price-info.types.js.map +1 -0
  86. package/build/es/src/bookings-v2-price-info.universal.d.ts +664 -0
  87. package/build/es/src/bookings-v2-price-info.universal.js +250 -0
  88. package/build/es/src/bookings-v2-price-info.universal.js.map +1 -0
  89. package/package.json +2 -2
@@ -0,0 +1,203 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { serializer, transformError } from '@wix/metro-runtime/velo';
11
+ import * as ambassadorWixBookingsReaderV2ExtendedBooking from './bookings-reader-v2-extended-booking.http';
12
+ let __verbose = false;
13
+ function __log(...args) {
14
+ __verbose && console.log(...args);
15
+ }
16
+ function __inspect(obj) {
17
+ return obj;
18
+ }
19
+ export const __debug = {
20
+ verboseLogging: {
21
+ on: () => (__verbose = true),
22
+ off: () => (__verbose = false),
23
+ },
24
+ };
25
+ const _toVeloEntity = '$';
26
+ const _fromVeloEntity = '$';
27
+ export var AttendanceStatus;
28
+ (function (AttendanceStatus) {
29
+ AttendanceStatus["NOT_SET"] = "NOT_SET";
30
+ AttendanceStatus["ATTENDED"] = "ATTENDED";
31
+ AttendanceStatus["NOT_ATTENDED"] = "NOT_ATTENDED";
32
+ })(AttendanceStatus || (AttendanceStatus = {}));
33
+ export var LocationType;
34
+ (function (LocationType) {
35
+ LocationType["UNDEFINED"] = "UNDEFINED";
36
+ LocationType["OWNER_BUSINESS"] = "OWNER_BUSINESS";
37
+ LocationType["OWNER_CUSTOM"] = "OWNER_CUSTOM";
38
+ LocationType["CUSTOM"] = "CUSTOM";
39
+ })(LocationType || (LocationType = {}));
40
+ export var ValueType;
41
+ (function (ValueType) {
42
+ /** Short text. This is the default value type. */
43
+ ValueType["SHORT_TEXT"] = "SHORT_TEXT";
44
+ /** Long text */
45
+ ValueType["LONG_TEXT"] = "LONG_TEXT";
46
+ /** a text that represent the check box value: if selected the value is "true", otherwise "false". */
47
+ ValueType["CHECK_BOX"] = "CHECK_BOX";
48
+ })(ValueType || (ValueType = {}));
49
+ /** Booking status. */
50
+ export var BookingStatus;
51
+ (function (BookingStatus) {
52
+ BookingStatus["CREATED"] = "CREATED";
53
+ BookingStatus["CONFIRMED"] = "CONFIRMED";
54
+ BookingStatus["CANCELED"] = "CANCELED";
55
+ BookingStatus["PENDING"] = "PENDING";
56
+ BookingStatus["DECLINED"] = "DECLINED";
57
+ BookingStatus["WAITING_LIST"] = "WAITING_LIST";
58
+ })(BookingStatus || (BookingStatus = {}));
59
+ /**
60
+ * Payment status.
61
+ * Automatically updated when using eCom checkout APIs.
62
+ */
63
+ export var PaymentStatus;
64
+ (function (PaymentStatus) {
65
+ PaymentStatus["UNDEFINED"] = "UNDEFINED";
66
+ PaymentStatus["NOT_PAID"] = "NOT_PAID";
67
+ PaymentStatus["PAID"] = "PAID";
68
+ /** not supported yet. */
69
+ PaymentStatus["PARTIALLY_PAID"] = "PARTIALLY_PAID";
70
+ /** not supported yet */
71
+ PaymentStatus["REFUNDED"] = "REFUNDED";
72
+ })(PaymentStatus || (PaymentStatus = {}));
73
+ /**
74
+ * The selected payment option.
75
+ * One of the payment options offered by the service.
76
+ * This field is be set when the user selects an option during booking.
77
+ * If left undefined, the payment option is resolved by the service configuration on checkout.
78
+ */
79
+ export var SelectedPaymentOption;
80
+ (function (SelectedPaymentOption) {
81
+ SelectedPaymentOption["UNDEFINED"] = "UNDEFINED";
82
+ SelectedPaymentOption["OFFLINE"] = "OFFLINE";
83
+ SelectedPaymentOption["ONLINE"] = "ONLINE";
84
+ SelectedPaymentOption["MEMBERSHIP"] = "MEMBERSHIP";
85
+ /** Payment can only be done using a membership and must be manually redeemed in the dashboard by the site owner. */
86
+ SelectedPaymentOption["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
87
+ })(SelectedPaymentOption || (SelectedPaymentOption = {}));
88
+ export var Platform;
89
+ (function (Platform) {
90
+ Platform["UNDEFINED_PLATFORM"] = "UNDEFINED_PLATFORM";
91
+ Platform["WEB"] = "WEB";
92
+ Platform["MOBILE_APP"] = "MOBILE_APP";
93
+ })(Platform || (Platform = {}));
94
+ export var Actor;
95
+ (function (Actor) {
96
+ Actor["UNDEFINED_ACTOR"] = "UNDEFINED_ACTOR";
97
+ Actor["BUSINESS"] = "BUSINESS";
98
+ Actor["CUSTOMER"] = "CUSTOMER";
99
+ })(Actor || (Actor = {}));
100
+ export var IdentityType;
101
+ (function (IdentityType) {
102
+ IdentityType["UNKNOWN"] = "UNKNOWN";
103
+ IdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
104
+ IdentityType["MEMBER"] = "MEMBER";
105
+ IdentityType["WIX_USER"] = "WIX_USER";
106
+ IdentityType["APP"] = "APP";
107
+ })(IdentityType || (IdentityType = {}));
108
+ export var SortOrder;
109
+ (function (SortOrder) {
110
+ SortOrder["ASC"] = "ASC";
111
+ SortOrder["DESC"] = "DESC";
112
+ })(SortOrder || (SortOrder = {}));
113
+ const _queryExtendedBookingsRequest = {};
114
+ const _queryExtendedBookingsResponse = {};
115
+ /**
116
+ * Retrieves a list of bookings, given the provided paging, filtering, and sorting.
117
+ *
118
+ * Up to 100 bookings can be returned per request.
119
+ *
120
+ * Query Extended Bookings runs with these defaults, which you can override:
121
+ *
122
+ * - `createdDate` sorted in `DESC` order
123
+ * - `cursorPaging.limit` is `50`
124
+ *
125
+ *
126
+ * You can retrieve information about which actions the customer can perform
127
+ * for the bookings. To do so, pass `withBookingAllowedActions` as `true`.
128
+ *
129
+ *
130
+ * For field support see
131
+ * [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/supported-filters)
132
+ * for more information.
133
+ *
134
+ * You can only specify a filter only once per query. If a filter is provided
135
+ * more than once, only the first occurrence affects the returned bookings.
136
+ *
137
+ * When using filters for dates, you must use [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
138
+ *
139
+ * Bookings that are part of a schedule don't have a `sessionId`. Therefore you
140
+ * must use the `sessionId` filter that isn't part of the `query` object to
141
+ * filter bookings for courses.
142
+ *
143
+ * To learn about working with _Query_ endpoints, see
144
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
145
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging),
146
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
147
+ *
148
+ * When calling Query Extended Bookings, the retrieved data may not contain your most recent changes.
149
+ * @param query - Information about filters, paging, and sorting.
150
+ * __Note__: `fields` and `fieldsets` aren't supported.
151
+ * @public
152
+ * @documentationMaturity preview
153
+ * @requiredField query
154
+ */
155
+ export function queryExtendedBookings(query, options) {
156
+ var _a, _b, _c;
157
+ return __awaiter(this, arguments, void 0, function* () {
158
+ const requestTransformation = {
159
+ query: '$[0]',
160
+ withBookingAllowedActions: '$[1].withBookingAllowedActions',
161
+ withBookingAttendanceInfo: '$[1].withBookingAttendanceInfo',
162
+ };
163
+ const responseTransformation = '$';
164
+ // @ts-ignore
165
+ const { httpClient, sideEffects } = arguments[2];
166
+ const { toAmbassadorRequest } = serializer({
167
+ rootSchema: _queryExtendedBookingsRequest,
168
+ depSchemas: {},
169
+ fqdnTransformation: {
170
+ paths: [],
171
+ transformation: _fromVeloEntity,
172
+ },
173
+ customTransformation: requestTransformation,
174
+ });
175
+ const { fromJSON } = serializer({
176
+ rootSchema: _queryExtendedBookingsResponse,
177
+ depSchemas: {},
178
+ fqdnTransformation: {
179
+ paths: [...['Array#extendedBookings']],
180
+ transformation: _toVeloEntity,
181
+ },
182
+ customTransformation: responseTransformation,
183
+ });
184
+ const payload = toAmbassadorRequest([query, options]);
185
+ const reqOpts = ambassadorWixBookingsReaderV2ExtendedBooking.queryExtendedBookings(payload);
186
+ __log(`"QueryExtendedBookings" sending request with: ${__inspect(reqOpts)}`);
187
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
188
+ try {
189
+ const result = yield httpClient.request(reqOpts);
190
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
191
+ return fromJSON(result.data);
192
+ }
193
+ catch (err) {
194
+ const transformedError = transformError(err, requestTransformation, [
195
+ 'query',
196
+ 'options',
197
+ ]);
198
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
199
+ throw transformedError;
200
+ }
201
+ });
202
+ }
203
+ //# sourceMappingURL=bookings-reader-v2-extended-booking.universal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-reader-v2-extended-booking.universal.js","sourceRoot":"","sources":["../../../src/bookings-reader-v2-extended-booking.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,4CAA4C,MAAM,4CAA4C,CAAC;AAE3G,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,CA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 import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ import { CancelBookingRequest, CancelBookingResponse, ConfirmBookingRequest, ConfirmBookingResponse, DeclineBookingRequest, DeclineBookingResponse, RescheduleBookingRequest, RescheduleBookingResponse, UpdateNumberOfParticipantsRequest, UpdateNumberOfParticipantsResponse } from './bookings-v2-booking.types';
3
+ /**
4
+ * Reschedules a booking to a different slot or session.
5
+ *
6
+ *
7
+ * You can only reschedule bookings for appointments or classes, you can't
8
+ * reschedule course bookings.
9
+ *
10
+ * The old session is removed from the calendar and the new session is
11
+ * added.
12
+ *
13
+ * If you reschedule a booking for a class session the new session must be an
14
+ * existing session for the same class.
15
+ *
16
+ * You can pass a `participantNotification.message` to notify the customer of
17
+ * the rescheduling. You also need to pass `participantNotification.notifyParticipants`
18
+ * as `true` to actually send the message.
19
+ *
20
+ * In case the service has
21
+ * variants, you can call this endpoint to update the booking's `totalParticipants` or `participantsChoices`.
22
+ * If you provide `participantsChoices`, all of the provided choices must exist for
23
+ * the service. Otherwise, the call returns an `INVALID_SERVICE_CHOICES` error.
24
+ * If you omit `participantsChoices` in the request, the existing choices are
25
+ * kept and not replaced with an empty object.
26
+ *
27
+ * <!-- INTERNAL PERMISSION COMMENT:
28
+ * You need to have the `BOOKINGS.NUMBER_OF_PARTICIPANTS_UPDATE` permission
29
+ * to reschedule bookings including `participantsInfo`.
30
+ * <!--END: INTERNAL PERMISSION COMMENT-->
31
+ *
32
+ * In case you want to reschedule a booking on behalf of a customer, we recommend
33
+ * to pass `flowControlSettings.ignoreReschedulePolicy` as `false`. This
34
+ * ensures that the rescheduling is validated against the service's rescheduling
35
+ * policy.
36
+ */
37
+ export declare function rescheduleBooking(payload: RescheduleBookingRequest): RequestOptionsFactory<RescheduleBookingResponse>;
38
+ /**
39
+ * Confirms a booking request and changes the booking status to `CONFIRMED`.
40
+ *
41
+ *
42
+ * Calling this method doesn't check whether a slot or schedule is still
43
+ * available at this time.
44
+ *
45
+ * You can only confirm bookings for services that require the owner's manual
46
+ * approval for bookings and that have a status of `PENDING`.
47
+ *
48
+ * For appointment services the slot may become unavailable, depending on the
49
+ * [service's](https://support.wix.com/en/article/creating-the-right-booking-service-for-your-business)
50
+ * `policy.bookingApprovalPolicy.requestsAffectsAvailability`.
51
+ *
52
+ * Calling this method also changes the
53
+ * [session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)
54
+ * `participants.approvalStatus` to `APPROVED`.
55
+ *
56
+ * You can pass a `participantNotification.message` to notify the customer of
57
+ * the confirmation. You also need to pass `participantNotification.notifyParticipants`
58
+ * as `true` to actually send the message.
59
+ *
60
+ * Bookings are automatically confirmed when the
61
+ * service is configured to automatically confirm
62
+ * bookings and the [eCommerce order](https://www.wix.com/velo/reference/wix-ecom-backend/orders)
63
+ * has been approved. The slot's or schedule's availability is checked just
64
+ * before confirming the booking as part of the automatic flow.
65
+ */
66
+ export declare function bookingsConfirmBooking(payload: ConfirmBookingRequest): RequestOptionsFactory<ConfirmBookingResponse>;
67
+ /**
68
+ * Declines a `PENDING` booking request and changes the booking status to
69
+ * `DECLINED`.
70
+ *
71
+ * Calling this method also changes the
72
+ * [session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)
73
+ * `participants.approvalStatus` to `DECLINED`.
74
+ *
75
+ * You can only decline bookings for services that require the owner's manual
76
+ * approval for bookings and that have a status of `PENDING`.
77
+ *
78
+ * You can pass a `participantNotification.message` to notify the customer of
79
+ * the decline. You also need to pass `participantNotification.notifyParticipants`
80
+ * as `true` to actually send the message.
81
+ */
82
+ export declare function bookingsDeclineBooking(payload: DeclineBookingRequest): RequestOptionsFactory<DeclineBookingResponse>;
83
+ /**
84
+ * Cancels a booking.
85
+ *
86
+ *
87
+ * The booking status changes to `CANCELED`.
88
+ *
89
+ * If the booking was for an appointment, the corresponding session is
90
+ * deleted from the business calendar.
91
+ *
92
+ * If the booking was for a class or course, the participants are removed
93
+ * from the class session or the course. But the course or class session
94
+ * remains on the business calendar.
95
+ *
96
+ * You can pass a `participantNotification.message` to notify the customer of
97
+ * the cancelation. You also need to pass `participantNotification.notifyParticipants`
98
+ * as `true` to actually send the message.
99
+ *
100
+ * In case you want to cancel a booking on behalf of a customer, we recommend
101
+ * to pass `flowControlSettings.ignoreCancellationPolicy` as `false`. This
102
+ * ensures that the cancelation is validated against the service's cancelation
103
+ * policy.
104
+ */
105
+ export declare function bookingsCancelBooking(payload: CancelBookingRequest): RequestOptionsFactory<CancelBookingResponse>;
106
+ /**
107
+ * Updates the number of participants for a booking.
108
+ *
109
+ *
110
+ * You can only update the number of participants for class and course
111
+ * bookings, you can't update it for appointment bookings.
112
+ *
113
+ * Calling this method also changes the
114
+ * [session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)
115
+ * `totalNumberOfParticipants`.
116
+ *
117
+ * When updating the number of participants for a booking you must pass either
118
+ * `participantsChoices` or `totalParticipants`. If you pass `participantsChoices`
119
+ * for services that have variants,
120
+ * all of the provided choices must exist for the service. Otherwise, the
121
+ * call returns an `INVALID_SERVICE_CHOICES` error.
122
+ */
123
+ export declare function bookingsUpdateNumberOfParticipants(payload: UpdateNumberOfParticipantsRequest): RequestOptionsFactory<UpdateNumberOfParticipantsResponse>;
@@ -0,0 +1,297 @@
1
+ import { serializer } from '@wix/metro-runtime/ambassador';
2
+ import { resolveUrl } from '@wix/metro-runtime';
3
+ const _address = { geocode: '_addressLocation' };
4
+ const _addressLocation = {
5
+ latitude: 'google.protobuf.DoubleValue',
6
+ longitude: 'google.protobuf.DoubleValue',
7
+ };
8
+ const _booking = {
9
+ createdDate: 'google.protobuf.Timestamp',
10
+ startDate: 'google.protobuf.Timestamp',
11
+ endDate: 'google.protobuf.Timestamp',
12
+ updatedDate: 'google.protobuf.Timestamp',
13
+ contactDetails: '_contactDetails',
14
+ };
15
+ const _cancelBookingRequest = {};
16
+ const _cancelBookingResponse = { booking: '_booking' };
17
+ const _confirmBookingRequest = {};
18
+ const _confirmBookingResponse = { booking: '_booking' };
19
+ const _contactDetails = { fullAddress: '_address' };
20
+ const _declineBookingRequest = {};
21
+ const _declineBookingResponse = { booking: '_booking' };
22
+ const _rescheduleBookingRequest = {};
23
+ const _rescheduleBookingResponse = { booking: '_booking' };
24
+ const _updateNumberOfParticipantsRequest = {};
25
+ const _updateNumberOfParticipantsResponse = { booking: '_booking' };
26
+ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
27
+ const domainToMappings = {
28
+ _: [
29
+ {
30
+ srcPath: '/_api/bookings-service/v2/bookings',
31
+ destPath: '/v2/bookings',
32
+ },
33
+ ],
34
+ 'manage._base_domain_': [
35
+ {
36
+ srcPath: '/_api/bookings-service/v2/bookings',
37
+ destPath: '/v2/bookings',
38
+ },
39
+ {
40
+ srcPath: '/_api/bookings-service/v2/bulk/bookings',
41
+ destPath: '/v2/bulk/bookings',
42
+ },
43
+ ],
44
+ 'www.wixapis.com': [
45
+ {
46
+ srcPath: '/_api/bookings-service/v2/bookings',
47
+ destPath: '/v2/bookings',
48
+ },
49
+ {
50
+ srcPath: '/bookings/v2/bookings',
51
+ destPath: '/v2/bookings',
52
+ },
53
+ {
54
+ srcPath: '/bookings/v2/bulk/bookings',
55
+ destPath: '/v2/bulk/bookings',
56
+ },
57
+ ],
58
+ };
59
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
60
+ }
61
+ /**
62
+ * Reschedules a booking to a different slot or session.
63
+ *
64
+ *
65
+ * You can only reschedule bookings for appointments or classes, you can't
66
+ * reschedule course bookings.
67
+ *
68
+ * The old session is removed from the calendar and the new session is
69
+ * added.
70
+ *
71
+ * If you reschedule a booking for a class session the new session must be an
72
+ * existing session for the same class.
73
+ *
74
+ * You can pass a `participantNotification.message` to notify the customer of
75
+ * the rescheduling. You also need to pass `participantNotification.notifyParticipants`
76
+ * as `true` to actually send the message.
77
+ *
78
+ * In case the service has
79
+ * variants, you can call this endpoint to update the booking's `totalParticipants` or `participantsChoices`.
80
+ * If you provide `participantsChoices`, all of the provided choices must exist for
81
+ * the service. Otherwise, the call returns an `INVALID_SERVICE_CHOICES` error.
82
+ * If you omit `participantsChoices` in the request, the existing choices are
83
+ * kept and not replaced with an empty object.
84
+ *
85
+ * <!-- INTERNAL PERMISSION COMMENT:
86
+ * You need to have the `BOOKINGS.NUMBER_OF_PARTICIPANTS_UPDATE` permission
87
+ * to reschedule bookings including `participantsInfo`.
88
+ * <!--END: INTERNAL PERMISSION COMMENT-->
89
+ *
90
+ * In case you want to reschedule a booking on behalf of a customer, we recommend
91
+ * to pass `flowControlSettings.ignoreReschedulePolicy` as `false`. This
92
+ * ensures that the rescheduling is validated against the service's rescheduling
93
+ * policy.
94
+ */
95
+ export function rescheduleBooking(payload) {
96
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_rescheduleBookingRequest, {});
97
+ const { fromJSON: fromRes } = serializer(_rescheduleBookingResponse, {
98
+ _address,
99
+ _addressLocation,
100
+ _booking,
101
+ _contactDetails,
102
+ });
103
+ function __rescheduleBooking({ host }) {
104
+ const serializedData = toReq(payload);
105
+ const metadata = {
106
+ method: 'POST',
107
+ url: resolveComWixpressBookingsBookingsV2BookingsUrl({
108
+ protoPath: '/v2/bookings/{bookingId}/reschedule',
109
+ data: serializedData,
110
+ host,
111
+ }),
112
+ data: serializedData,
113
+ transformResponse: fromRes,
114
+ };
115
+ return metadata;
116
+ }
117
+ __rescheduleBooking.fromReq = fromReq;
118
+ return __rescheduleBooking;
119
+ }
120
+ /**
121
+ * Confirms a booking request and changes the booking status to `CONFIRMED`.
122
+ *
123
+ *
124
+ * Calling this method doesn't check whether a slot or schedule is still
125
+ * available at this time.
126
+ *
127
+ * You can only confirm bookings for services that require the owner's manual
128
+ * approval for bookings and that have a status of `PENDING`.
129
+ *
130
+ * For appointment services the slot may become unavailable, depending on the
131
+ * [service's](https://support.wix.com/en/article/creating-the-right-booking-service-for-your-business)
132
+ * `policy.bookingApprovalPolicy.requestsAffectsAvailability`.
133
+ *
134
+ * Calling this method also changes the
135
+ * [session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)
136
+ * `participants.approvalStatus` to `APPROVED`.
137
+ *
138
+ * You can pass a `participantNotification.message` to notify the customer of
139
+ * the confirmation. You also need to pass `participantNotification.notifyParticipants`
140
+ * as `true` to actually send the message.
141
+ *
142
+ * Bookings are automatically confirmed when the
143
+ * service is configured to automatically confirm
144
+ * bookings and the [eCommerce order](https://www.wix.com/velo/reference/wix-ecom-backend/orders)
145
+ * has been approved. The slot's or schedule's availability is checked just
146
+ * before confirming the booking as part of the automatic flow.
147
+ */
148
+ export function bookingsConfirmBooking(payload) {
149
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_confirmBookingRequest, {});
150
+ const { fromJSON: fromRes } = serializer(_confirmBookingResponse, {
151
+ _address,
152
+ _addressLocation,
153
+ _booking,
154
+ _contactDetails,
155
+ });
156
+ function __bookingsConfirmBooking({ host }) {
157
+ const serializedData = toReq(payload);
158
+ const metadata = {
159
+ method: 'POST',
160
+ url: resolveComWixpressBookingsBookingsV2BookingsUrl({
161
+ protoPath: '/v2/bookings/{bookingId}/confirm',
162
+ data: serializedData,
163
+ host,
164
+ }),
165
+ data: serializedData,
166
+ transformResponse: fromRes,
167
+ };
168
+ return metadata;
169
+ }
170
+ __bookingsConfirmBooking.fromReq = fromReq;
171
+ return __bookingsConfirmBooking;
172
+ }
173
+ /**
174
+ * Declines a `PENDING` booking request and changes the booking status to
175
+ * `DECLINED`.
176
+ *
177
+ * Calling this method also changes the
178
+ * [session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)
179
+ * `participants.approvalStatus` to `DECLINED`.
180
+ *
181
+ * You can only decline bookings for services that require the owner's manual
182
+ * approval for bookings and that have a status of `PENDING`.
183
+ *
184
+ * You can pass a `participantNotification.message` to notify the customer of
185
+ * the decline. You also need to pass `participantNotification.notifyParticipants`
186
+ * as `true` to actually send the message.
187
+ */
188
+ export function bookingsDeclineBooking(payload) {
189
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_declineBookingRequest, {});
190
+ const { fromJSON: fromRes } = serializer(_declineBookingResponse, {
191
+ _address,
192
+ _addressLocation,
193
+ _booking,
194
+ _contactDetails,
195
+ });
196
+ function __bookingsDeclineBooking({ host }) {
197
+ const serializedData = toReq(payload);
198
+ const metadata = {
199
+ method: 'POST',
200
+ url: resolveComWixpressBookingsBookingsV2BookingsUrl({
201
+ protoPath: '/v2/bookings/{bookingId}/decline',
202
+ data: serializedData,
203
+ host,
204
+ }),
205
+ data: serializedData,
206
+ transformResponse: fromRes,
207
+ };
208
+ return metadata;
209
+ }
210
+ __bookingsDeclineBooking.fromReq = fromReq;
211
+ return __bookingsDeclineBooking;
212
+ }
213
+ /**
214
+ * Cancels a booking.
215
+ *
216
+ *
217
+ * The booking status changes to `CANCELED`.
218
+ *
219
+ * If the booking was for an appointment, the corresponding session is
220
+ * deleted from the business calendar.
221
+ *
222
+ * If the booking was for a class or course, the participants are removed
223
+ * from the class session or the course. But the course or class session
224
+ * remains on the business calendar.
225
+ *
226
+ * You can pass a `participantNotification.message` to notify the customer of
227
+ * the cancelation. You also need to pass `participantNotification.notifyParticipants`
228
+ * as `true` to actually send the message.
229
+ *
230
+ * In case you want to cancel a booking on behalf of a customer, we recommend
231
+ * to pass `flowControlSettings.ignoreCancellationPolicy` as `false`. This
232
+ * ensures that the cancelation is validated against the service's cancelation
233
+ * policy.
234
+ */
235
+ export function bookingsCancelBooking(payload) {
236
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_cancelBookingRequest, {});
237
+ const { fromJSON: fromRes } = serializer(_cancelBookingResponse, {
238
+ _address,
239
+ _addressLocation,
240
+ _booking,
241
+ _contactDetails,
242
+ });
243
+ function __bookingsCancelBooking({ host }) {
244
+ const serializedData = toReq(payload);
245
+ const metadata = {
246
+ method: 'POST',
247
+ url: resolveComWixpressBookingsBookingsV2BookingsUrl({
248
+ protoPath: '/v2/bookings/{bookingId}/cancel',
249
+ data: serializedData,
250
+ host,
251
+ }),
252
+ data: serializedData,
253
+ transformResponse: fromRes,
254
+ };
255
+ return metadata;
256
+ }
257
+ __bookingsCancelBooking.fromReq = fromReq;
258
+ return __bookingsCancelBooking;
259
+ }
260
+ /**
261
+ * Updates the number of participants for a booking.
262
+ *
263
+ *
264
+ * You can only update the number of participants for class and course
265
+ * bookings, you can't update it for appointment bookings.
266
+ *
267
+ * Calling this method also changes the
268
+ * [session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)
269
+ * `totalNumberOfParticipants`.
270
+ *
271
+ * When updating the number of participants for a booking you must pass either
272
+ * `participantsChoices` or `totalParticipants`. If you pass `participantsChoices`
273
+ * for services that have variants,
274
+ * all of the provided choices must exist for the service. Otherwise, the
275
+ * call returns an `INVALID_SERVICE_CHOICES` error.
276
+ */
277
+ export function bookingsUpdateNumberOfParticipants(payload) {
278
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateNumberOfParticipantsRequest, {});
279
+ const { fromJSON: fromRes } = serializer(_updateNumberOfParticipantsResponse, { _address, _addressLocation, _booking, _contactDetails });
280
+ function __bookingsUpdateNumberOfParticipants({ host }) {
281
+ const serializedData = toReq(payload);
282
+ const metadata = {
283
+ method: 'POST',
284
+ url: resolveComWixpressBookingsBookingsV2BookingsUrl({
285
+ protoPath: '/v2/bookings/{bookingId}/update_number_of_participants',
286
+ data: serializedData,
287
+ host,
288
+ }),
289
+ data: serializedData,
290
+ transformResponse: fromRes,
291
+ };
292
+ return metadata;
293
+ }
294
+ __bookingsUpdateNumberOfParticipants.fromReq = fromReq;
295
+ return __bookingsUpdateNumberOfParticipants;
296
+ }
297
+ //# sourceMappingURL=bookings-v2-booking.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-v2-booking.http.js","sourceRoot":"","sources":["../../../src/bookings-v2-booking.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgBhD,MAA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,EAAE,gBAAgB,EAAE,QAAQ,EAAE,eAAe,EAAE,CAC1D,CAAC;IAEF,SAAS,oCAAoC,CAAC,EAAE,IAAI,EAAO;QACzD,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,MAAM,EAAE,MAAa;YACrB,GAAG,EAAE,+CAA+C,CAAC;gBACnD,SAAS,EAAE,wDAAwD;gBACnE,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,oCAAoC,CAAC,OAAO,GAAG,OAAO,CAAC;IAEvD,OAAO,oCAAoC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { V2Slot, CancelBookingOptions, ConfirmBookingOptions, DeclineBookingOptions, RescheduleBookingOptions, UpdateNumberOfParticipantsOptions } from './bookings-v2-booking.universal';
3
+ export declare function rescheduleBooking(httpClient: HttpClient): (bookingId: string, slot: V2Slot, options?: RescheduleBookingOptions | undefined) => Promise<import("./bookings-v2-booking.universal").RescheduleBookingResponse>;
4
+ export declare function confirmBooking(httpClient: HttpClient): (bookingId: string, revision: string | null, options?: ConfirmBookingOptions | undefined) => Promise<import("./bookings-v2-booking.universal").ConfirmBookingResponse>;
5
+ export declare function declineBooking(httpClient: HttpClient): (bookingId: string, revision: string | null, options?: DeclineBookingOptions | undefined) => Promise<import("./bookings-v2-booking.universal").DeclineBookingResponse>;
6
+ export declare function cancelBooking(httpClient: HttpClient): (bookingId: string, options?: CancelBookingOptions | undefined) => Promise<import("./bookings-v2-booking.universal").CancelBookingResponse>;
7
+ export declare function updateNumberOfParticipants(httpClient: HttpClient): (bookingId: string, options?: UpdateNumberOfParticipantsOptions | undefined) => Promise<import("./bookings-v2-booking.universal").UpdateNumberOfParticipantsResponse>;
8
+ export { LocationType, ValueType, BookingStatus, PaymentStatus, SelectedPaymentOption, Platform, Actor, IdentificationDataIdentityType, LocationLocationType, SortOrder, IdentityType, } from './bookings-v2-booking.universal';
9
+ export { Booking, BookingParticipantsInfoOneOf, BookedEntity, BookedEntityItemOneOf, BookedSlot, BookedResource, Location, BookedSchedule, ContactDetails, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, CustomFormField, BookingSource, ParticipantNotification, CommonIdentificationData, CommonIdentificationDataIdOneOf, FlowControlSettings, ExtendedFields, ParticipantChoices, ServiceChoices, ServiceChoice, ServiceChoiceChoiceOneOf, BookingChanged, CreateBookingRequest, CreateBookingFlowControlSettings, CreateBookingResponse, UpdateBookingRequest, UpdateBookingResponse, LegacyCreateBookingRequest, LegacyCreateBookingResponse, BulkUpdateBookingRequest, MaskedBooking, BulkUpdateBookingResponse, ItemMetadata, ApplicationError, BulkActionMetadata, BulkCreateBookingRequest, CreateBookingInfo, BulkCreateBookingResponse, BulkBookingResult, RescheduleBookingRequest, RescheduleBookingRequestParticipantsInfoOneOf, V2Slot, SlotSlotResource, SlotLocation, RescheduleBookingRequestFlowControlSettings, RescheduleBookingResponse, BulkRescheduleBookingRequest, BulkRescheduleBookingRequestBooking, SlotBookings, BulkRescheduleBookingResponse, BulkUpdateBookedScheduleRequest, BookingDetails, BulkUpdateBookedScheduleResponse, QueryBookingsRequest, QueryV2, QueryV2PagingMethodOneOf, Sorting, Paging, CursorPaging, QueryBookingsResponse, PagingMetadataV2, Cursors, ConfirmRequest, ConfirmResponse, ConfirmBookingRequest, ConfirmBookingResponse, PartySizeRequest, PartySizeRequestPartySizeForOneOf, PartySizeResponse, ConsistentQueryBookingsRequest, ConsistentQueryBookingsResponse, SetBookingSessionIdRequest, SetBookingSessionIdResponse, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse, DeclineBookingRequest, DeclineBookingResponse, BookingDeclined, IdentificationData, IdentificationDataIdOneOf, CancelBookingRequest, CancelBookingRequestFlowControlSettings, CancelBookingResponse, BookingCanceled, UpdateNumberOfParticipantsRequest, UpdateNumberOfParticipantsRequestParticipantsInfoOneOf, UpdateNumberOfParticipantsResponse, CalculateAllowedActionsRequest, CalculateAllowedActionsResponse, AllowedActions, BulkCalculateAllowedActionsRequest, BulkCalculateAllowedActionsResponse, BulkCalculateAllowedActionsResult, GetSlotAvailabilityRequest, GetSlotAvailabilityResponse, SlotAvailability, WaitingList, BookingPolicyViolations, BookingPolicySettings, GetScheduleAvailabilityRequest, GetScheduleAvailabilityResponse, ScheduleAvailability, ConfirmOrDeclineRequest, ConfirmOrDeclineResponse, ConfirmOrDeclineBookingRequest, ConfirmOrDeclineBookingResponse, V2CreateBookingRequest, V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf, Slot, SlotResource, CreateBookingRequestFlowControlSettings, V2CreateBookingResponse, V2CancelBookingRequest, V2CancelBookingRequestFlowControlSettings, V2CancelBookingResponse, V2RescheduleBookingRequest, V2RescheduleBookingRequestParticipantsInfoOneOf, V2RescheduleBookingRequestFlowControlSettings, V2RescheduleBookingResponse, V2ConfirmBookingRequest, V2ConfirmBookingResponse, V2DeclineBookingRequest, V2DeclineBookingResponse, V2UpdateNumberOfParticipantsRequest, V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf, V2UpdateNumberOfParticipantsResponse, RescheduleBookingOptions, ConfirmBookingOptions, DeclineBookingOptions, CancelBookingOptions, UpdateNumberOfParticipantsOptions, } from './bookings-v2-booking.universal';