@wix/auto_sdk_bookings_bookings 1.0.108 → 1.0.109
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 +72 -72
- package/build/cjs/index.js +211 -211
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +353 -353
- package/build/cjs/index.typings.js +193 -193
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +246 -246
- package/build/cjs/meta.js +171 -171
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +72 -72
- package/build/es/index.mjs +211 -211
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +353 -353
- package/build/es/index.typings.mjs +193 -193
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +246 -246
- package/build/es/meta.mjs +171 -171
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +72 -72
- package/build/internal/cjs/index.js +211 -211
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +353 -353
- package/build/internal/cjs/index.typings.js +193 -193
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +246 -246
- package/build/internal/cjs/meta.js +171 -171
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +72 -72
- package/build/internal/es/index.mjs +211 -211
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +353 -353
- package/build/internal/es/index.typings.mjs +193 -193
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +246 -246
- package/build/internal/es/meta.mjs +171 -171
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,76 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { Booking, CreateMultiServiceBookingOptions, CreateMultiServiceBookingResponse, CreateMultiServiceBookingApplicationErrors, RescheduleBookingInfo, RescheduleMultiServiceBookingOptions, RescheduleMultiServiceBookingResponse, RescheduleMultiServiceBookingApplicationErrors, GetMultiServiceBookingAvailabilityResponse, GetMultiServiceBookingAvailabilityApplicationErrors, CancelMultiServiceBookingOptions, CancelMultiServiceBookingResponse, CancelMultiServiceBookingApplicationErrors, MarkMultiServiceBookingAsPendingOptions, MarkMultiServiceBookingAsPendingResponse, MarkMultiServiceBookingAsPendingApplicationErrors, ConfirmMultiServiceBookingOptions, ConfirmMultiServiceBookingResponse, ConfirmMultiServiceBookingApplicationErrors, DeclineMultiServiceBookingOptions, DeclineMultiServiceBookingResponse, DeclineMultiServiceBookingApplicationErrors, BulkGetMultiServiceBookingAllowedActionsResponse, MultiServiceBooking, AddBookingsToMultiServiceBookingOptions, AddBookingsToMultiServiceBookingResponse, AddBookingsToMultiServiceBookingApplicationErrors, RemoveBookingsFromMultiServiceBookingOptions, RemoveBookingsFromMultiServiceBookingResponse, RemoveBookingsFromMultiServiceBookingApplicationErrors,
|
|
2
|
+
import { ConfirmOrDeclineBookingOptions, ConfirmOrDeclineBookingResponse, ConfirmOrDeclineBookingApplicationErrors, BulkConfirmOrDeclineBookingRequestBookingDetails, BulkConfirmOrDeclineBookingOptions, BulkConfirmOrDeclineBookingResponse, BulkConfirmOrDeclineBookingApplicationErrors, Booking, CreateMultiServiceBookingOptions, CreateMultiServiceBookingResponse, CreateMultiServiceBookingApplicationErrors, RescheduleBookingInfo, RescheduleMultiServiceBookingOptions, RescheduleMultiServiceBookingResponse, RescheduleMultiServiceBookingApplicationErrors, GetMultiServiceBookingAvailabilityResponse, GetMultiServiceBookingAvailabilityApplicationErrors, CancelMultiServiceBookingOptions, CancelMultiServiceBookingResponse, CancelMultiServiceBookingApplicationErrors, MarkMultiServiceBookingAsPendingOptions, MarkMultiServiceBookingAsPendingResponse, MarkMultiServiceBookingAsPendingApplicationErrors, ConfirmMultiServiceBookingOptions, ConfirmMultiServiceBookingResponse, ConfirmMultiServiceBookingApplicationErrors, DeclineMultiServiceBookingOptions, DeclineMultiServiceBookingResponse, DeclineMultiServiceBookingApplicationErrors, BulkGetMultiServiceBookingAllowedActionsResponse, MultiServiceBooking, AddBookingsToMultiServiceBookingOptions, AddBookingsToMultiServiceBookingResponse, AddBookingsToMultiServiceBookingApplicationErrors, RemoveBookingsFromMultiServiceBookingOptions, RemoveBookingsFromMultiServiceBookingResponse, RemoveBookingsFromMultiServiceBookingApplicationErrors, CreateBookingOptions, CreateBookingResponse, CreateBookingApplicationErrors, CreateBookingInfo, BulkCreateBookingOptions, BulkCreateBookingResponse, BulkCreateBookingApplicationErrors, V2Slot, RescheduleBookingOptions, RescheduleBookingResponse, RescheduleBookingApplicationErrors, ConfirmBookingOptions, ConfirmBookingResponse, ConfirmBookingApplicationErrors, SetBookingSubmissionIdResponse, SetBookingSubmissionIdApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateExtendedFieldsApplicationErrors, DeclineBookingOptions, DeclineBookingResponse, DeclineBookingApplicationErrors, CancelBookingOptions, CancelBookingResponse, CancelBookingApplicationErrors, UpdateNumberOfParticipantsOptions, UpdateNumberOfParticipantsResponse, UpdateNumberOfParticipantsApplicationErrors, BulkCalculateAllowedActionsResponse, MarkBookingAsPendingOptions, MarkBookingAsPendingResponse, MarkBookingAsPendingApplicationErrors, GetAnonymousActionDetailsOptions, GetAnonymousActionDetailsResponse, CancelBookingAnonymouslyOptions, CancelBookingAnonymouslyResponse, RescheduleBookingAnonymouslyOptions, RescheduleBookingAnonymouslyResponse, GetBookingAnonymouslyResponse, BookingCanceledEnvelope, BookingConfirmedEnvelope, BookingCreatedEnvelope, BookingDeclinedEnvelope, BookingRescheduledEnvelope, BookingUpdatedEnvelope, BookingMarkedAsPendingEnvelope, BookingNumberOfParticipantsUpdatedEnvelope } from './index.typings.mjs';
|
|
3
3
|
export { ActionEvent, Actor, ActorWithLiterals, AddBookingsToMultiServiceBookingRequest, Address, AddressLocation, AddressStreetOneOf, AllowedActions, AllowedActionsAnonymously, AnonymousBookingUrls, ApplicationError, AvailableResources, BaseEventMetadata, BookedAddOn, BookedEntity, BookedEntityItemOneOf, BookedResource, BookedSchedule, BookedSlot, BookingCanceled, BookingChanged, BookingConfirmed, BookingDeclined, BookingDetails, BookingFormFilled, BookingIdAndRevision, BookingInfo, BookingMarkedAsPending, BookingParticipantsInfoOneOf, BookingPolicySettings, BookingPolicyViolations, BookingRescheduled, BookingRescheduledPreviousParticipantsInfoOneOf, BookingResult, BookingSource, BookingStatus, BookingStatusWithLiterals, BulkActionMetadata, BulkBookingResult, BulkCalculateAllowedActionsRequest, BulkCalculateAllowedActionsResult, BulkConfirmOrDeclineBookingRequest, BulkCreateBookingRequest, BulkGetMultiServiceBookingAllowedActionsRequest, BulkRescheduleBookingRequest, BulkRescheduleBookingRequestBooking, BulkRescheduleBookingResponse, BulkUpdateBookedScheduleRequest, BulkUpdateBookedScheduleResponse, BulkUpdateBookingRequest, BulkUpdateBookingResponse, CancelBookingAnonymouslyRequest, CancelBookingFlowControlSettings, CancelBookingRequest, CancelBookingRequestFlowControlSettings, CancelMultiServiceBookingRequest, Clash, CommonIdentificationData, CommonIdentificationDataIdOneOf, ConfirmBookingFlowControlSettings, ConfirmBookingRequest, ConfirmMultiServiceBookingRequest, ConfirmOrDeclineBookingRequest, ConfirmRequest, ConfirmResponse, ConsistentQueryBookingsRequest, ConsistentQueryBookingsResponse, ContactDetails, CountBookingsRequest, CountBookingsResponse, CreateBookingFlowControlSettings, CreateBookingRequest, CreateBookingRequestFlowControlSettings, CreateMultiServiceBookingRequest, CursorPaging, Cursors, CustomFormField, DeclineBookingFlowControlSettings, DeclineBookingRequest, DeclineMultiServiceBookingRequest, DomainEvent, DomainEventBodyOneOf, Duration, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, FlowControlSettings, GetAnonymousActionDetailsRequest, GetBookingAnonymouslyRequest, GetMultiServiceBookingAvailabilityRequest, GetMultiServiceBookingAvailabilityResponseBookingInfo, GetMultiServiceBookingRequest, GetMultiServiceBookingResponse, GetScheduleAvailabilityRequest, GetScheduleAvailabilityResponse, GetSlotAvailabilityRequest, GetSlotAvailabilityResponse, IdentificationData, IdentificationDataIdOneOf, IdentificationDataIdentityType, IdentificationDataIdentityTypeWithLiterals, IdentityType, IdentityTypeWithLiterals, ItemMetadata, LegacyCreateBookingRequest, LegacyCreateBookingResponse, Location, LocationLocationType, LocationLocationTypeWithLiterals, LocationType, LocationTypeWithLiterals, MarkBookingAsPendingFlowControlSettings, MarkBookingAsPendingRequest, MarkMultiServiceBookingAsPendingRequest, MaskedBooking, MessageEnvelope, MigrationCheckIfClashesWithBlockedTimeRequest, MigrationCheckIfClashesWithBlockedTimeResponse, MsidAndBookingId, MultiServiceBookingInfo, MultiServiceBookingMetadata, MultiServiceBookingType, MultiServiceBookingTypeWithLiterals, NumberOfParticipantsUpdated, NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf, Paging, PagingMetadataV2, ParticipantChoices, ParticipantNotification, PaymentStatus, PaymentStatusWithLiterals, PhoneCall, Platform, PlatformWithLiterals, QueryBookingsRequest, QueryBookingsResponse, QueryV2, QueryV2PagingMethodOneOf, RemoveBookingsFromMultiServiceBookingRequest, RescheduleBookingAnonymouslyRequest, RescheduleBookingFlowControlSettings, RescheduleBookingInfoParticipantsInfoOneOf, RescheduleBookingOptionsParticipantsInfoOneOf, RescheduleBookingRequest, RescheduleBookingRequestFlowControlSettings, RescheduleBookingRequestParticipantsInfoOneOf, RescheduleMultiServiceBookingRequest, ResourceSelection, RestoreInfo, ScheduleAvailability, SelectedPaymentOption, SelectedPaymentOptionWithLiterals, SelectionMethod, SelectionMethodWithLiterals, ServiceChoice, ServiceChoiceChoiceOneOf, ServiceChoices, SetBookingSessionIdRequest, SetBookingSessionIdResponse, SetBookingSubmissionIdRequest, Slot, SlotAvailability, SlotBookings, SlotLocation, SlotResource, SlotSlotResource, SortOrder, SortOrderWithLiterals, Sorting, StreetAddress, Subdivision, UpdateBookingRequest, UpdateBookingResponse, UpdateExtendedFieldsRequest, UpdateNumberOfParticipantsOptionsParticipantsInfoOneOf, UpdateNumberOfParticipantsRequest, UpdateNumberOfParticipantsRequestParticipantsInfoOneOf, V2CancelBookingRequest, V2CancelBookingResponse, V2ConfirmBookingRequest, V2ConfirmBookingResponse, V2CreateBookingRequest, V2CreateBookingRequestBookableItemOneOf, V2CreateBookingRequestParticipantsInfoOneOf, V2CreateBookingResponse, V2DeclineBookingRequest, V2DeclineBookingResponse, V2PhoneCall, V2RescheduleBookingRequest, V2RescheduleBookingRequestParticipantsInfoOneOf, V2RescheduleBookingResponse, V2UpdateNumberOfParticipantsRequest, V2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf, V2UpdateNumberOfParticipantsResponse, ValueType, ValueTypeWithLiterals, WaitingList, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WebhooksIdentificationData, WebhooksIdentificationDataIdOneOf } from './index.typings.mjs';
|
|
4
4
|
|
|
5
|
+
declare function confirmOrDeclineBooking$1(httpClient: HttpClient): ConfirmOrDeclineBookingSignature;
|
|
6
|
+
interface ConfirmOrDeclineBookingSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based
|
|
9
|
+
* on the `paymentStatus` you provide, double booking conflicts, and whether
|
|
10
|
+
* the service requires business approval.
|
|
11
|
+
*
|
|
12
|
+
* ### eCommerce checkout restriction
|
|
13
|
+
*
|
|
14
|
+
* Call this method only when using a custom checkout page.
|
|
15
|
+
* Don't call it when using a [Wix eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
16
|
+
* In such cases, Wix Bookings automatically updates the booking status based on the `paymentStatus` of the corresponding [Wix eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction).
|
|
17
|
+
*
|
|
18
|
+
* ### When to call Confirm Booking or Decline Booking instead
|
|
19
|
+
*
|
|
20
|
+
* This method has specific limitations based on payment status and double booking conflicts.
|
|
21
|
+
* Use the alternative methods in these scenarios:
|
|
22
|
+
* + **To force confirm double-booked free bookings:** Call [Confirm Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking).
|
|
23
|
+
* Confirm Or Decline Booking can't confirm double-booked free bookings.
|
|
24
|
+
* + **To decline bookings without double booking conflicts:** Call [Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/decline-booking).
|
|
25
|
+
* Confirm Or Decline Booking only declines bookings when both a double booking conflict exists and payment status is unpaid.
|
|
26
|
+
*
|
|
27
|
+
* ### New booking status
|
|
28
|
+
*
|
|
29
|
+
* The booking `status` is set to `DECLINED` if both of the following conditions
|
|
30
|
+
* are met:
|
|
31
|
+
* + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status.
|
|
32
|
+
* + There is a double booking conflict.
|
|
33
|
+
*
|
|
34
|
+
* If only one or none of these conditions is met, `status` is set to `PENDING`
|
|
35
|
+
* or `CONFIRMED` depending on whether the service requires business approval.
|
|
36
|
+
*
|
|
37
|
+
* ### Double bookings
|
|
38
|
+
*
|
|
39
|
+
* If there is a double booking conflict, but the booking has already been at least
|
|
40
|
+
* partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`.
|
|
41
|
+
* Then, it also sets `doubleBooked` to `true`.
|
|
42
|
+
*
|
|
43
|
+
* ### Admin overwrites
|
|
44
|
+
*
|
|
45
|
+
* There are small but important differences in confirmation behavior if the
|
|
46
|
+
* booking was created with special `flowControlSettings`:
|
|
47
|
+
* + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to
|
|
48
|
+
* `true`, the booking is never declined regardless of double booking conflicts.
|
|
49
|
+
* Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the
|
|
50
|
+
* service requires business approval.
|
|
51
|
+
* + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to
|
|
52
|
+
* `true`, the booking skips `PENDING` status and is marked `CONFIRMED`
|
|
53
|
+
* immediately.
|
|
54
|
+
* @param - ID of the booking to confirm or decline.
|
|
55
|
+
*/
|
|
56
|
+
(bookingId: string, options?: ConfirmOrDeclineBookingOptions): Promise<NonNullablePaths<ConfirmOrDeclineBookingResponse, `booking.totalParticipants` | `booking.participantsChoices.serviceChoices` | `booking.bookedEntity.slot.serviceId` | `booking.bookedEntity.slot.scheduleId` | `booking.bookedEntity.slot.resource._id` | `booking.bookedEntity.slot.location.locationType` | `booking.bookedEntity.slot.resourceSelections` | `booking.bookedEntity.slot.resourceSelections.${number}.selectionMethod` | `booking.bookedEntity.schedule.scheduleId` | `booking.bookedEntity.tags` | `booking.contactDetails.fullAddress.streetAddress.number` | `booking.contactDetails.fullAddress.streetAddress.name` | `booking.contactDetails.fullAddress.streetAddress.apt` | `booking.contactDetails.fullAddress.subdivisions` | `booking.contactDetails.fullAddress.subdivisions.${number}.code` | `booking.contactDetails.fullAddress.subdivisions.${number}.name` | `booking.additionalFields` | `booking.additionalFields.${number}._id` | `booking.additionalFields.${number}.valueType` | `booking.status` | `booking.paymentStatus` | `booking.selectedPaymentOption` | `booking.createdBy.anonymousVisitorId` | `booking.createdBy.memberId` | `booking.createdBy.wixUserId` | `booking.createdBy.appId` | `booking.bookedAddOns` | `booking.bookedAddOns.${number}._id` | `booking.bookedAddOns.${number}.groupId`, 7> & {
|
|
57
|
+
__applicationErrorsType?: ConfirmOrDeclineBookingApplicationErrors;
|
|
58
|
+
}>;
|
|
59
|
+
}
|
|
60
|
+
declare function bulkConfirmOrDeclineBooking$1(httpClient: HttpClient): BulkConfirmOrDeclineBookingSignature;
|
|
61
|
+
interface BulkConfirmOrDeclineBookingSignature {
|
|
62
|
+
/**
|
|
63
|
+
* Confirms or declines up to 300 bookings.
|
|
64
|
+
*
|
|
65
|
+
*
|
|
66
|
+
* See [Confirm Or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)
|
|
67
|
+
* for details about when a booking is confirmed or declined.
|
|
68
|
+
* @param - Bookings to confirm or decline.
|
|
69
|
+
*/
|
|
70
|
+
(details: NonNullablePaths<BulkConfirmOrDeclineBookingRequestBookingDetails, `bookingId`, 2>[], options?: BulkConfirmOrDeclineBookingOptions): Promise<NonNullablePaths<BulkConfirmOrDeclineBookingResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.totalParticipants` | `results.${number}.item.status` | `results.${number}.item.paymentStatus` | `results.${number}.item.selectedPaymentOption` | `results.${number}.item.createdBy.anonymousVisitorId` | `results.${number}.item.createdBy.memberId` | `results.${number}.item.createdBy.wixUserId` | `results.${number}.item.createdBy.appId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
71
|
+
__applicationErrorsType?: BulkConfirmOrDeclineBookingApplicationErrors;
|
|
72
|
+
}>;
|
|
73
|
+
}
|
|
5
74
|
declare function createMultiServiceBooking$1(httpClient: HttpClient): CreateMultiServiceBookingSignature;
|
|
6
75
|
interface CreateMultiServiceBookingSignature {
|
|
7
76
|
/**
|
|
@@ -280,75 +349,6 @@ interface RemoveBookingsFromMultiServiceBookingSignature {
|
|
|
280
349
|
__applicationErrorsType?: RemoveBookingsFromMultiServiceBookingApplicationErrors;
|
|
281
350
|
}>;
|
|
282
351
|
}
|
|
283
|
-
declare function confirmOrDeclineBooking$1(httpClient: HttpClient): ConfirmOrDeclineBookingSignature;
|
|
284
|
-
interface ConfirmOrDeclineBookingSignature {
|
|
285
|
-
/**
|
|
286
|
-
* Updates the booking `status` to `CONFIRMED`, `PENDING`, or `DECLINED` based
|
|
287
|
-
* on the `paymentStatus` you provide, double booking conflicts, and whether
|
|
288
|
-
* the service requires business approval.
|
|
289
|
-
*
|
|
290
|
-
* ### eCommerce checkout restriction
|
|
291
|
-
*
|
|
292
|
-
* Call this method only when using a custom checkout page.
|
|
293
|
-
* Don't call it when using a [Wix eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction).
|
|
294
|
-
* In such cases, Wix Bookings automatically updates the booking status based on the `paymentStatus` of the corresponding [Wix eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction).
|
|
295
|
-
*
|
|
296
|
-
* ### When to call Confirm Booking or Decline Booking instead
|
|
297
|
-
*
|
|
298
|
-
* This method has specific limitations based on payment status and double booking conflicts.
|
|
299
|
-
* Use the alternative methods in these scenarios:
|
|
300
|
-
* + **To force confirm double-booked free bookings:** Call [Confirm Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking).
|
|
301
|
-
* Confirm Or Decline Booking can't confirm double-booked free bookings.
|
|
302
|
-
* + **To decline bookings without double booking conflicts:** Call [Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/decline-booking).
|
|
303
|
-
* Confirm Or Decline Booking only declines bookings when both a double booking conflict exists and payment status is unpaid.
|
|
304
|
-
*
|
|
305
|
-
* ### New booking status
|
|
306
|
-
*
|
|
307
|
-
* The booking `status` is set to `DECLINED` if both of the following conditions
|
|
308
|
-
* are met:
|
|
309
|
-
* + You provide `UNDEFINED`, `NOT_PAID`, `REFUNDED`, or `EXEMPT` as payment status.
|
|
310
|
-
* + There is a double booking conflict.
|
|
311
|
-
*
|
|
312
|
-
* If only one or none of these conditions is met, `status` is set to `PENDING`
|
|
313
|
-
* or `CONFIRMED` depending on whether the service requires business approval.
|
|
314
|
-
*
|
|
315
|
-
* ### Double bookings
|
|
316
|
-
*
|
|
317
|
-
* If there is a double booking conflict, but the booking has already been at least
|
|
318
|
-
* partially paid, the method still marks the booking as `PENDING` or `CONFIRMED`.
|
|
319
|
-
* Then, it also sets `doubleBooked` to `true`.
|
|
320
|
-
*
|
|
321
|
-
* ### Admin overwrites
|
|
322
|
-
*
|
|
323
|
-
* There are small but important differences in confirmation behavior if the
|
|
324
|
-
* booking was created with special `flowControlSettings`:
|
|
325
|
-
* + If the booking's `flowControlSettings.skipAvailabilityValidation` was set to
|
|
326
|
-
* `true`, the booking is never declined regardless of double booking conflicts.
|
|
327
|
-
* Instead, it's marked `CONFIRMED` or `PENDING`, depending on whether the
|
|
328
|
-
* service requires business approval.
|
|
329
|
-
* + If the booking's `flowControlSettings.skipBusinessConfirmation` was set to
|
|
330
|
-
* `true`, the booking skips `PENDING` status and is marked `CONFIRMED`
|
|
331
|
-
* immediately.
|
|
332
|
-
* @param - ID of the booking to confirm or decline.
|
|
333
|
-
*/
|
|
334
|
-
(bookingId: string, options?: ConfirmOrDeclineBookingOptions): Promise<NonNullablePaths<ConfirmOrDeclineBookingResponse, `booking.totalParticipants` | `booking.participantsChoices.serviceChoices` | `booking.bookedEntity.slot.serviceId` | `booking.bookedEntity.slot.scheduleId` | `booking.bookedEntity.slot.resource._id` | `booking.bookedEntity.slot.location.locationType` | `booking.bookedEntity.slot.resourceSelections` | `booking.bookedEntity.slot.resourceSelections.${number}.selectionMethod` | `booking.bookedEntity.schedule.scheduleId` | `booking.bookedEntity.tags` | `booking.contactDetails.fullAddress.streetAddress.number` | `booking.contactDetails.fullAddress.streetAddress.name` | `booking.contactDetails.fullAddress.streetAddress.apt` | `booking.contactDetails.fullAddress.subdivisions` | `booking.contactDetails.fullAddress.subdivisions.${number}.code` | `booking.contactDetails.fullAddress.subdivisions.${number}.name` | `booking.additionalFields` | `booking.additionalFields.${number}._id` | `booking.additionalFields.${number}.valueType` | `booking.status` | `booking.paymentStatus` | `booking.selectedPaymentOption` | `booking.createdBy.anonymousVisitorId` | `booking.createdBy.memberId` | `booking.createdBy.wixUserId` | `booking.createdBy.appId` | `booking.bookedAddOns` | `booking.bookedAddOns.${number}._id` | `booking.bookedAddOns.${number}.groupId`, 7> & {
|
|
335
|
-
__applicationErrorsType?: ConfirmOrDeclineBookingApplicationErrors;
|
|
336
|
-
}>;
|
|
337
|
-
}
|
|
338
|
-
declare function bulkConfirmOrDeclineBooking$1(httpClient: HttpClient): BulkConfirmOrDeclineBookingSignature;
|
|
339
|
-
interface BulkConfirmOrDeclineBookingSignature {
|
|
340
|
-
/**
|
|
341
|
-
* Confirms or declines up to 300 bookings.
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
* See [Confirm Or Decline Booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/bookings-writer-v2/confirm-or-decline-booking)
|
|
345
|
-
* for details about when a booking is confirmed or declined.
|
|
346
|
-
* @param - Bookings to confirm or decline.
|
|
347
|
-
*/
|
|
348
|
-
(details: NonNullablePaths<BulkConfirmOrDeclineBookingRequestBookingDetails, `bookingId`, 2>[], options?: BulkConfirmOrDeclineBookingOptions): Promise<NonNullablePaths<BulkConfirmOrDeclineBookingResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.totalParticipants` | `results.${number}.item.status` | `results.${number}.item.paymentStatus` | `results.${number}.item.selectedPaymentOption` | `results.${number}.item.createdBy.anonymousVisitorId` | `results.${number}.item.createdBy.memberId` | `results.${number}.item.createdBy.wixUserId` | `results.${number}.item.createdBy.appId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
349
|
-
__applicationErrorsType?: BulkConfirmOrDeclineBookingApplicationErrors;
|
|
350
|
-
}>;
|
|
351
|
-
}
|
|
352
352
|
declare function createBooking$1(httpClient: HttpClient): CreateBookingSignature;
|
|
353
353
|
interface CreateBookingSignature {
|
|
354
354
|
/**
|
|
@@ -919,6 +919,8 @@ declare const onBookingUpdated$1: EventDefinition<BookingUpdatedEnvelope, "wix.b
|
|
|
919
919
|
declare const onBookingMarkedAsPending$1: EventDefinition<BookingMarkedAsPendingEnvelope, "wix.bookings.v2.booking_markedAsPending">;
|
|
920
920
|
declare const onBookingNumberOfParticipantsUpdated$1: EventDefinition<BookingNumberOfParticipantsUpdatedEnvelope, "wix.bookings.v2.booking_number_of_participants_updated">;
|
|
921
921
|
|
|
922
|
+
declare const confirmOrDeclineBooking: MaybeContext<BuildRESTFunction<typeof confirmOrDeclineBooking$1> & typeof confirmOrDeclineBooking$1>;
|
|
923
|
+
declare const bulkConfirmOrDeclineBooking: MaybeContext<BuildRESTFunction<typeof bulkConfirmOrDeclineBooking$1> & typeof bulkConfirmOrDeclineBooking$1>;
|
|
922
924
|
declare const createMultiServiceBooking: MaybeContext<BuildRESTFunction<typeof createMultiServiceBooking$1> & typeof createMultiServiceBooking$1>;
|
|
923
925
|
declare const rescheduleMultiServiceBooking: MaybeContext<BuildRESTFunction<typeof rescheduleMultiServiceBooking$1> & typeof rescheduleMultiServiceBooking$1>;
|
|
924
926
|
declare const getMultiServiceBookingAvailability: MaybeContext<BuildRESTFunction<typeof getMultiServiceBookingAvailability$1> & typeof getMultiServiceBookingAvailability$1>;
|
|
@@ -930,8 +932,6 @@ declare const bulkGetMultiServiceBookingAllowedActions: MaybeContext<BuildRESTFu
|
|
|
930
932
|
declare const getMultiServiceBooking: MaybeContext<BuildRESTFunction<typeof getMultiServiceBooking$1> & typeof getMultiServiceBooking$1>;
|
|
931
933
|
declare const addBookingsToMultiServiceBooking: MaybeContext<BuildRESTFunction<typeof addBookingsToMultiServiceBooking$1> & typeof addBookingsToMultiServiceBooking$1>;
|
|
932
934
|
declare const removeBookingsFromMultiServiceBooking: MaybeContext<BuildRESTFunction<typeof removeBookingsFromMultiServiceBooking$1> & typeof removeBookingsFromMultiServiceBooking$1>;
|
|
933
|
-
declare const confirmOrDeclineBooking: MaybeContext<BuildRESTFunction<typeof confirmOrDeclineBooking$1> & typeof confirmOrDeclineBooking$1>;
|
|
934
|
-
declare const bulkConfirmOrDeclineBooking: MaybeContext<BuildRESTFunction<typeof bulkConfirmOrDeclineBooking$1> & typeof bulkConfirmOrDeclineBooking$1>;
|
|
935
935
|
declare const createBooking: MaybeContext<BuildRESTFunction<typeof createBooking$1> & typeof createBooking$1>;
|
|
936
936
|
declare const bulkCreateBooking: MaybeContext<BuildRESTFunction<typeof bulkCreateBooking$1> & typeof bulkCreateBooking$1>;
|
|
937
937
|
declare const rescheduleBooking: MaybeContext<BuildRESTFunction<typeof rescheduleBooking$1> & typeof rescheduleBooking$1>;
|
|
@@ -326,57 +326,6 @@ function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
|
|
|
326
326
|
};
|
|
327
327
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
328
328
|
}
|
|
329
|
-
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
330
|
-
const domainToMappings = {
|
|
331
|
-
"www.wixapis.com": [
|
|
332
|
-
{
|
|
333
|
-
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
334
|
-
destPath: "/v2/bookings/confirmation"
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
srcPath: "/bookings/v2/confirmation",
|
|
338
|
-
destPath: "/v2/confirmation"
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
srcPath: "/bookings/v2/bulk/confirmation",
|
|
342
|
-
destPath: "/v2/bulk/confirmation"
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
346
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
350
|
-
destPath: "/v2/bulk/confirmation"
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
354
|
-
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
355
|
-
}
|
|
356
|
-
],
|
|
357
|
-
"*.dev.wix-code.com": [
|
|
358
|
-
{
|
|
359
|
-
srcPath: "/bookings/v2/confirmation",
|
|
360
|
-
destPath: "/v2/confirmation"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
364
|
-
destPath: "/v2/bulk/bookings"
|
|
365
|
-
}
|
|
366
|
-
],
|
|
367
|
-
_: [
|
|
368
|
-
{
|
|
369
|
-
srcPath: "/bookings/v2/confirmation",
|
|
370
|
-
destPath: "/v2/confirmation"
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
srcPath: "/bookings/v2/bulk/bookings",
|
|
374
|
-
destPath: "/v2/bulk/bookings"
|
|
375
|
-
}
|
|
376
|
-
]
|
|
377
|
-
};
|
|
378
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
379
|
-
}
|
|
380
329
|
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
381
330
|
const domainToMappings = {
|
|
382
331
|
_: [
|
|
@@ -530,7 +479,142 @@ function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
|
|
|
530
479
|
};
|
|
531
480
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
532
481
|
}
|
|
482
|
+
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
|
|
483
|
+
const domainToMappings = {
|
|
484
|
+
"www.wixapis.com": [
|
|
485
|
+
{
|
|
486
|
+
srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
|
|
487
|
+
destPath: "/v2/bookings/confirmation"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
srcPath: "/bookings/v2/confirmation",
|
|
491
|
+
destPath: "/v2/confirmation"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
srcPath: "/bookings/v2/bulk/confirmation",
|
|
495
|
+
destPath: "/v2/bulk/confirmation"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
|
|
499
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
|
|
503
|
+
destPath: "/v2/bulk/confirmation"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
|
|
507
|
+
destPath: "/v2/bulk/bookings/confirmOrDecline"
|
|
508
|
+
}
|
|
509
|
+
],
|
|
510
|
+
"*.dev.wix-code.com": [
|
|
511
|
+
{
|
|
512
|
+
srcPath: "/bookings/v2/confirmation",
|
|
513
|
+
destPath: "/v2/confirmation"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
517
|
+
destPath: "/v2/bulk/bookings"
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
_: [
|
|
521
|
+
{
|
|
522
|
+
srcPath: "/bookings/v2/confirmation",
|
|
523
|
+
destPath: "/v2/confirmation"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
srcPath: "/bookings/v2/bulk/bookings",
|
|
527
|
+
destPath: "/v2/bulk/bookings"
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
};
|
|
531
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
532
|
+
}
|
|
533
533
|
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
|
|
534
|
+
function confirmOrDeclineBooking(payload) {
|
|
535
|
+
function __confirmOrDeclineBooking({ host }) {
|
|
536
|
+
const metadata = {
|
|
537
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
538
|
+
method: "POST",
|
|
539
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
540
|
+
packageName: PACKAGE_NAME,
|
|
541
|
+
migrationOptions: {
|
|
542
|
+
optInTransformResponse: true
|
|
543
|
+
},
|
|
544
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
545
|
+
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
546
|
+
data: payload,
|
|
547
|
+
host
|
|
548
|
+
}),
|
|
549
|
+
data: payload,
|
|
550
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
551
|
+
{
|
|
552
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
553
|
+
paths: [
|
|
554
|
+
{ path: "booking.createdDate" },
|
|
555
|
+
{ path: "booking.startDate" },
|
|
556
|
+
{ path: "booking.endDate" },
|
|
557
|
+
{ path: "booking.updatedDate" },
|
|
558
|
+
{ path: "booking.canceledDate" }
|
|
559
|
+
]
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
563
|
+
paths: [
|
|
564
|
+
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
565
|
+
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
566
|
+
]
|
|
567
|
+
}
|
|
568
|
+
])
|
|
569
|
+
};
|
|
570
|
+
return metadata;
|
|
571
|
+
}
|
|
572
|
+
return __confirmOrDeclineBooking;
|
|
573
|
+
}
|
|
574
|
+
function bulkConfirmOrDeclineBooking(payload) {
|
|
575
|
+
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
576
|
+
const metadata = {
|
|
577
|
+
entityFqdn: "wix.bookings.v2.booking",
|
|
578
|
+
method: "POST",
|
|
579
|
+
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
580
|
+
packageName: PACKAGE_NAME,
|
|
581
|
+
migrationOptions: {
|
|
582
|
+
optInTransformResponse: true
|
|
583
|
+
},
|
|
584
|
+
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
585
|
+
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
586
|
+
data: payload,
|
|
587
|
+
host
|
|
588
|
+
}),
|
|
589
|
+
data: payload,
|
|
590
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
591
|
+
{
|
|
592
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
593
|
+
paths: [
|
|
594
|
+
{ path: "results.item.createdDate" },
|
|
595
|
+
{ path: "results.item.startDate" },
|
|
596
|
+
{ path: "results.item.endDate" },
|
|
597
|
+
{ path: "results.item.updatedDate" },
|
|
598
|
+
{ path: "results.item.canceledDate" }
|
|
599
|
+
]
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
603
|
+
paths: [
|
|
604
|
+
{
|
|
605
|
+
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
609
|
+
}
|
|
610
|
+
]
|
|
611
|
+
}
|
|
612
|
+
])
|
|
613
|
+
};
|
|
614
|
+
return metadata;
|
|
615
|
+
}
|
|
616
|
+
return __bulkConfirmOrDeclineBooking;
|
|
617
|
+
}
|
|
534
618
|
function createMultiServiceBooking(payload) {
|
|
535
619
|
function __createMultiServiceBooking({ host }) {
|
|
536
620
|
const serializedData = transformPaths(payload, [
|
|
@@ -988,90 +1072,6 @@ function removeBookingsFromMultiServiceBooking(payload) {
|
|
|
988
1072
|
}
|
|
989
1073
|
return __removeBookingsFromMultiServiceBooking;
|
|
990
1074
|
}
|
|
991
|
-
function confirmOrDeclineBooking(payload) {
|
|
992
|
-
function __confirmOrDeclineBooking({ host }) {
|
|
993
|
-
const metadata = {
|
|
994
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
995
|
-
method: "POST",
|
|
996
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
|
|
997
|
-
packageName: PACKAGE_NAME,
|
|
998
|
-
migrationOptions: {
|
|
999
|
-
optInTransformResponse: true
|
|
1000
|
-
},
|
|
1001
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1002
|
-
protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
|
|
1003
|
-
data: payload,
|
|
1004
|
-
host
|
|
1005
|
-
}),
|
|
1006
|
-
data: payload,
|
|
1007
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1008
|
-
{
|
|
1009
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1010
|
-
paths: [
|
|
1011
|
-
{ path: "booking.createdDate" },
|
|
1012
|
-
{ path: "booking.startDate" },
|
|
1013
|
-
{ path: "booking.endDate" },
|
|
1014
|
-
{ path: "booking.updatedDate" },
|
|
1015
|
-
{ path: "booking.canceledDate" }
|
|
1016
|
-
]
|
|
1017
|
-
},
|
|
1018
|
-
{
|
|
1019
|
-
transformFn: transformRESTFloatToSDKFloat,
|
|
1020
|
-
paths: [
|
|
1021
|
-
{ path: "booking.contactDetails.fullAddress.geocode.latitude" },
|
|
1022
|
-
{ path: "booking.contactDetails.fullAddress.geocode.longitude" }
|
|
1023
|
-
]
|
|
1024
|
-
}
|
|
1025
|
-
])
|
|
1026
|
-
};
|
|
1027
|
-
return metadata;
|
|
1028
|
-
}
|
|
1029
|
-
return __confirmOrDeclineBooking;
|
|
1030
|
-
}
|
|
1031
|
-
function bulkConfirmOrDeclineBooking(payload) {
|
|
1032
|
-
function __bulkConfirmOrDeclineBooking({ host }) {
|
|
1033
|
-
const metadata = {
|
|
1034
|
-
entityFqdn: "wix.bookings.v2.booking",
|
|
1035
|
-
method: "POST",
|
|
1036
|
-
methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
|
|
1037
|
-
packageName: PACKAGE_NAME,
|
|
1038
|
-
migrationOptions: {
|
|
1039
|
-
optInTransformResponse: true
|
|
1040
|
-
},
|
|
1041
|
-
url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
|
|
1042
|
-
protoPath: "/v2/bulk/bookings/confirmOrDecline",
|
|
1043
|
-
data: payload,
|
|
1044
|
-
host
|
|
1045
|
-
}),
|
|
1046
|
-
data: payload,
|
|
1047
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1048
|
-
{
|
|
1049
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1050
|
-
paths: [
|
|
1051
|
-
{ path: "results.item.createdDate" },
|
|
1052
|
-
{ path: "results.item.startDate" },
|
|
1053
|
-
{ path: "results.item.endDate" },
|
|
1054
|
-
{ path: "results.item.updatedDate" },
|
|
1055
|
-
{ path: "results.item.canceledDate" }
|
|
1056
|
-
]
|
|
1057
|
-
},
|
|
1058
|
-
{
|
|
1059
|
-
transformFn: transformRESTFloatToSDKFloat,
|
|
1060
|
-
paths: [
|
|
1061
|
-
{
|
|
1062
|
-
path: "results.item.contactDetails.fullAddress.geocode.latitude"
|
|
1063
|
-
},
|
|
1064
|
-
{
|
|
1065
|
-
path: "results.item.contactDetails.fullAddress.geocode.longitude"
|
|
1066
|
-
}
|
|
1067
|
-
]
|
|
1068
|
-
}
|
|
1069
|
-
])
|
|
1070
|
-
};
|
|
1071
|
-
return metadata;
|
|
1072
|
-
}
|
|
1073
|
-
return __bulkConfirmOrDeclineBooking;
|
|
1074
|
-
}
|
|
1075
1075
|
function createBooking(payload) {
|
|
1076
1076
|
function __createBooking({ host }) {
|
|
1077
1077
|
const serializedData = transformPaths(payload, [
|
|
@@ -1763,6 +1763,64 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1763
1763
|
SortOrder2["DESC"] = "DESC";
|
|
1764
1764
|
return SortOrder2;
|
|
1765
1765
|
})(SortOrder || {});
|
|
1766
|
+
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
1767
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1768
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1769
|
+
bookingId,
|
|
1770
|
+
paymentStatus: options?.paymentStatus
|
|
1771
|
+
});
|
|
1772
|
+
const reqOpts = confirmOrDeclineBooking(payload);
|
|
1773
|
+
sideEffects?.onSiteCall?.();
|
|
1774
|
+
try {
|
|
1775
|
+
const result = await httpClient.request(reqOpts);
|
|
1776
|
+
sideEffects?.onSuccess?.(result);
|
|
1777
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1778
|
+
} catch (err) {
|
|
1779
|
+
const transformedError = sdkTransformError(
|
|
1780
|
+
err,
|
|
1781
|
+
{
|
|
1782
|
+
spreadPathsToArguments: {},
|
|
1783
|
+
explicitPathsToArguments: {
|
|
1784
|
+
bookingId: "$[0]",
|
|
1785
|
+
paymentStatus: "$[1].paymentStatus"
|
|
1786
|
+
},
|
|
1787
|
+
singleArgumentUnchanged: false
|
|
1788
|
+
},
|
|
1789
|
+
["bookingId", "options"]
|
|
1790
|
+
);
|
|
1791
|
+
sideEffects?.onError?.(err);
|
|
1792
|
+
throw transformedError;
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
1796
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1797
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1798
|
+
details,
|
|
1799
|
+
returnEntity: options?.returnEntity
|
|
1800
|
+
});
|
|
1801
|
+
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
1802
|
+
sideEffects?.onSiteCall?.();
|
|
1803
|
+
try {
|
|
1804
|
+
const result = await httpClient.request(reqOpts);
|
|
1805
|
+
sideEffects?.onSuccess?.(result);
|
|
1806
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1807
|
+
} catch (err) {
|
|
1808
|
+
const transformedError = sdkTransformError(
|
|
1809
|
+
err,
|
|
1810
|
+
{
|
|
1811
|
+
spreadPathsToArguments: {},
|
|
1812
|
+
explicitPathsToArguments: {
|
|
1813
|
+
details: "$[0]",
|
|
1814
|
+
returnEntity: "$[1].returnEntity"
|
|
1815
|
+
},
|
|
1816
|
+
singleArgumentUnchanged: false
|
|
1817
|
+
},
|
|
1818
|
+
["details", "options"]
|
|
1819
|
+
);
|
|
1820
|
+
sideEffects?.onError?.(err);
|
|
1821
|
+
throw transformedError;
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1766
1824
|
async function createMultiServiceBooking2(bookings, options) {
|
|
1767
1825
|
const { httpClient, sideEffects } = arguments[2];
|
|
1768
1826
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -2124,64 +2182,6 @@ async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, opt
|
|
|
2124
2182
|
throw transformedError;
|
|
2125
2183
|
}
|
|
2126
2184
|
}
|
|
2127
|
-
async function confirmOrDeclineBooking2(bookingId, options) {
|
|
2128
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2129
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2130
|
-
bookingId,
|
|
2131
|
-
paymentStatus: options?.paymentStatus
|
|
2132
|
-
});
|
|
2133
|
-
const reqOpts = confirmOrDeclineBooking(payload);
|
|
2134
|
-
sideEffects?.onSiteCall?.();
|
|
2135
|
-
try {
|
|
2136
|
-
const result = await httpClient.request(reqOpts);
|
|
2137
|
-
sideEffects?.onSuccess?.(result);
|
|
2138
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2139
|
-
} catch (err) {
|
|
2140
|
-
const transformedError = sdkTransformError(
|
|
2141
|
-
err,
|
|
2142
|
-
{
|
|
2143
|
-
spreadPathsToArguments: {},
|
|
2144
|
-
explicitPathsToArguments: {
|
|
2145
|
-
bookingId: "$[0]",
|
|
2146
|
-
paymentStatus: "$[1].paymentStatus"
|
|
2147
|
-
},
|
|
2148
|
-
singleArgumentUnchanged: false
|
|
2149
|
-
},
|
|
2150
|
-
["bookingId", "options"]
|
|
2151
|
-
);
|
|
2152
|
-
sideEffects?.onError?.(err);
|
|
2153
|
-
throw transformedError;
|
|
2154
|
-
}
|
|
2155
|
-
}
|
|
2156
|
-
async function bulkConfirmOrDeclineBooking2(details, options) {
|
|
2157
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2158
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2159
|
-
details,
|
|
2160
|
-
returnEntity: options?.returnEntity
|
|
2161
|
-
});
|
|
2162
|
-
const reqOpts = bulkConfirmOrDeclineBooking(payload);
|
|
2163
|
-
sideEffects?.onSiteCall?.();
|
|
2164
|
-
try {
|
|
2165
|
-
const result = await httpClient.request(reqOpts);
|
|
2166
|
-
sideEffects?.onSuccess?.(result);
|
|
2167
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2168
|
-
} catch (err) {
|
|
2169
|
-
const transformedError = sdkTransformError(
|
|
2170
|
-
err,
|
|
2171
|
-
{
|
|
2172
|
-
spreadPathsToArguments: {},
|
|
2173
|
-
explicitPathsToArguments: {
|
|
2174
|
-
details: "$[0]",
|
|
2175
|
-
returnEntity: "$[1].returnEntity"
|
|
2176
|
-
},
|
|
2177
|
-
singleArgumentUnchanged: false
|
|
2178
|
-
},
|
|
2179
|
-
["details", "options"]
|
|
2180
|
-
);
|
|
2181
|
-
sideEffects?.onError?.(err);
|
|
2182
|
-
throw transformedError;
|
|
2183
|
-
}
|
|
2184
|
-
}
|
|
2185
2185
|
async function createBooking2(booking, options) {
|
|
2186
2186
|
const { httpClient, sideEffects } = arguments[2];
|
|
2187
2187
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -2657,6 +2657,22 @@ async function getBookingAnonymously2(token) {
|
|
|
2657
2657
|
}
|
|
2658
2658
|
|
|
2659
2659
|
// src/bookings-v2-booking-bookings.public.ts
|
|
2660
|
+
function confirmOrDeclineBooking3(httpClient) {
|
|
2661
|
+
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2662
|
+
bookingId,
|
|
2663
|
+
options,
|
|
2664
|
+
// @ts-ignore
|
|
2665
|
+
{ httpClient }
|
|
2666
|
+
);
|
|
2667
|
+
}
|
|
2668
|
+
function bulkConfirmOrDeclineBooking3(httpClient) {
|
|
2669
|
+
return (details, options) => bulkConfirmOrDeclineBooking2(
|
|
2670
|
+
details,
|
|
2671
|
+
options,
|
|
2672
|
+
// @ts-ignore
|
|
2673
|
+
{ httpClient }
|
|
2674
|
+
);
|
|
2675
|
+
}
|
|
2660
2676
|
function createMultiServiceBooking3(httpClient) {
|
|
2661
2677
|
return (bookings, options) => createMultiServiceBooking2(
|
|
2662
2678
|
bookings,
|
|
@@ -2743,22 +2759,6 @@ function removeBookingsFromMultiServiceBooking3(httpClient) {
|
|
|
2743
2759
|
{ httpClient }
|
|
2744
2760
|
);
|
|
2745
2761
|
}
|
|
2746
|
-
function confirmOrDeclineBooking3(httpClient) {
|
|
2747
|
-
return (bookingId, options) => confirmOrDeclineBooking2(
|
|
2748
|
-
bookingId,
|
|
2749
|
-
options,
|
|
2750
|
-
// @ts-ignore
|
|
2751
|
-
{ httpClient }
|
|
2752
|
-
);
|
|
2753
|
-
}
|
|
2754
|
-
function bulkConfirmOrDeclineBooking3(httpClient) {
|
|
2755
|
-
return (details, options) => bulkConfirmOrDeclineBooking2(
|
|
2756
|
-
details,
|
|
2757
|
-
options,
|
|
2758
|
-
// @ts-ignore
|
|
2759
|
-
{ httpClient }
|
|
2760
|
-
);
|
|
2761
|
-
}
|
|
2762
2762
|
function createBooking3(httpClient) {
|
|
2763
2763
|
return (booking, options) => createBooking2(
|
|
2764
2764
|
booking,
|
|
@@ -3131,6 +3131,8 @@ var onBookingNumberOfParticipantsUpdated = EventDefinition(
|
|
|
3131
3131
|
// src/bookings-v2-booking-bookings.context.ts
|
|
3132
3132
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
3133
3133
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
3134
|
+
var confirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(confirmOrDeclineBooking3);
|
|
3135
|
+
var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(bulkConfirmOrDeclineBooking3);
|
|
3134
3136
|
var createMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(createMultiServiceBooking3);
|
|
3135
3137
|
var rescheduleMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(rescheduleMultiServiceBooking3);
|
|
3136
3138
|
var getMultiServiceBookingAvailability4 = /* @__PURE__ */ createRESTModule(getMultiServiceBookingAvailability3);
|
|
@@ -3144,8 +3146,6 @@ var bulkGetMultiServiceBookingAllowedActions4 = /* @__PURE__ */ createRESTModule
|
|
|
3144
3146
|
var getMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(getMultiServiceBooking3);
|
|
3145
3147
|
var addBookingsToMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(addBookingsToMultiServiceBooking3);
|
|
3146
3148
|
var removeBookingsFromMultiServiceBooking4 = /* @__PURE__ */ createRESTModule(removeBookingsFromMultiServiceBooking3);
|
|
3147
|
-
var confirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(confirmOrDeclineBooking3);
|
|
3148
|
-
var bulkConfirmOrDeclineBooking4 = /* @__PURE__ */ createRESTModule(bulkConfirmOrDeclineBooking3);
|
|
3149
3149
|
var createBooking4 = /* @__PURE__ */ createRESTModule(createBooking3);
|
|
3150
3150
|
var bulkCreateBooking4 = /* @__PURE__ */ createRESTModule(bulkCreateBooking3);
|
|
3151
3151
|
var rescheduleBooking4 = /* @__PURE__ */ createRESTModule(rescheduleBooking3);
|