// src/bookings-v2-booking-bookings.universal.ts
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
import {
  renameKeysFromSDKRequestToRESTRequest,
  renameKeysFromRESTResponseToSDKResponse
} from "@wix/sdk-runtime/rename-all-nested-keys";

// src/bookings-v2-booking-bookings.http.ts
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
function resolveComWixpressBookingsBookingsV2BookingsUrl(opts) {
  const domainToMappings = {
    _: [
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bulk/multi_service_bookings",
        destPath: "/v2/bulk/multi_service_bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
        destPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking"
      },
      {
        srcPath: "/bookings/bookings/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/bulk/multi_service_bookings/get_allowed_actions",
        destPath: "/v2/bulk/multi_service_bookings/get_allowed_actions"
      }
    ],
    "manage._base_domain_": [
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bulk/multi_service_bookings",
        destPath: "/v2/bulk/multi_service_bookings"
      }
    ],
    "www.wixapis.com": [
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      },
      {
        srcPath: "/bookings/v2/bookings",
        destPath: "/v2/bookings"
      },
      {
        srcPath: "/bookings/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
        destPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking"
      },
      {
        srcPath: "/bookings/bookings/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/bulk/multi_service_bookings/get_allowed_actions",
        destPath: "/v2/bulk/multi_service_bookings/get_allowed_actions"
      }
    ],
    "www._base_domain_": [
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      }
    ],
    "bo._base_domain_": [
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      }
    ],
    "wixbo.ai": [
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      }
    ],
    "wix-bo.com": [
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      }
    ],
    "*.dev.wix-code.com": [
      {
        srcPath: "/_api/bookings-service",
        destPath: "/v2/bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
        destPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking"
      },
      {
        srcPath: "/bookings/bookings/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/bulk/multi_service_bookings/get_allowed_actions",
        destPath: "/v2/bulk/multi_service_bookings/get_allowed_actions"
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
function resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl(opts) {
  const domainToMappings = {
    _: [
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bulk/multi_service_bookings",
        destPath: "/v2/bulk/multi_service_bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
        destPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking"
      },
      {
        srcPath: "/bookings/bookings/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/bulk/multi_service_bookings/get_allowed_actions",
        destPath: "/v2/bulk/multi_service_bookings/get_allowed_actions"
      }
    ],
    "manage._base_domain_": [
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bulk/multi_service_bookings",
        destPath: "/v2/bulk/multi_service_bookings"
      }
    ],
    "www.wixapis.com": [
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      },
      {
        srcPath: "/bookings/v2/bookings",
        destPath: "/v2/bookings"
      },
      {
        srcPath: "/bookings/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
        destPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking"
      },
      {
        srcPath: "/bookings/bookings/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/bulk/multi_service_bookings/get_allowed_actions",
        destPath: "/v2/bulk/multi_service_bookings/get_allowed_actions"
      }
    ],
    "www._base_domain_": [
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      }
    ],
    "bo._base_domain_": [
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      }
    ],
    "wixbo.ai": [
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      }
    ],
    "wix-bo.com": [
      {
        srcPath: "/_api/bookings-service/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/_api/bookings-service/v2/bookings",
        destPath: "/v2/bookings"
      }
    ],
    "*.dev.wix-code.com": [
      {
        srcPath: "/_api/bookings-service",
        destPath: "/v2/bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings",
        destPath: "/v2/multi_service_bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
        destPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking"
      },
      {
        srcPath: "/bookings/bookings/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      },
      {
        srcPath: "/bookings/multiServiceBookings/v2/bulk/multi_service_bookings/get_allowed_actions",
        destPath: "/v2/bulk/multi_service_bookings/get_allowed_actions"
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
function resolveWixBookingsAnonymousActionsV1AnonymousBookingActionsServiceUrl(opts) {
  const domainToMappings = {
    "www.wixapis.com": [
      {
        srcPath: "/v1/anonymous-bookings",
        destPath: "/v1/anonymous-bookings"
      },
      {
        srcPath: "/_api/v1/anonymous-bookings",
        destPath: "/v1/anonymous-bookings"
      }
    ],
    _: [
      {
        srcPath: "/v1/anonymous-bookings",
        destPath: "/v1/anonymous-bookings"
      },
      {
        srcPath: "/_api/anonymous-booking-actions",
        destPath: "/v1/anonymous-bookings"
      }
    ],
    "*.dev.wix-code.com": [
      {
        srcPath: "/_api/anonymous-booking-actions",
        destPath: "/v1/anonymous-bookings"
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
function resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl(opts) {
  const domainToMappings = {
    "www.wixapis.com": [
      {
        srcPath: "/_api/bookings-confirmator/v2/bookings/confirmation",
        destPath: "/v2/bookings/confirmation"
      },
      {
        srcPath: "/bookings/v2/confirmation",
        destPath: "/v2/confirmation"
      },
      {
        srcPath: "/bookings/v2/bulk/confirmation",
        destPath: "/v2/bulk/confirmation"
      },
      {
        srcPath: "/bookings/v2/bulk/bookings/confirmOrDecline",
        destPath: "/v2/bulk/bookings/confirmOrDecline"
      },
      {
        srcPath: "/_api/bookings-confirmator/v2/bulk/confirmation",
        destPath: "/v2/bulk/confirmation"
      },
      {
        srcPath: "/_api/bookings-confirmator/v2/bulk/bookings/confirmOrDecline",
        destPath: "/v2/bulk/bookings/confirmOrDecline"
      }
    ],
    "*.dev.wix-code.com": [
      {
        srcPath: "/bookings/v2/confirmation",
        destPath: "/v2/confirmation"
      },
      {
        srcPath: "/bookings/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      }
    ],
    _: [
      {
        srcPath: "/bookings/v2/confirmation",
        destPath: "/v2/confirmation"
      },
      {
        srcPath: "/bookings/v2/bulk/bookings",
        destPath: "/v2/bulk/bookings"
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
var PACKAGE_NAME = "@wix/auto_sdk_bookings_bookings";
function confirmOrDeclineBooking(payload) {
  function __confirmOrDeclineBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.ConfirmOrDeclineBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
        protoPath: "/v2/confirmation/{bookingId}:confirmOrDecline",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __confirmOrDeclineBooking;
}
function bulkConfirmOrDeclineBooking(payload) {
  function __bulkConfirmOrDeclineBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.confirmator.v2.Confirmator.BulkConfirmOrDeclineBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsConfirmatorV2ConfirmatorUrl({
        protoPath: "/v2/bulk/bookings/confirmOrDecline",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "results.item.createdDate" },
            { path: "results.item.startDate" },
            { path: "results.item.endDate" },
            { path: "results.item.updatedDate" },
            { path: "results.item.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "results.item.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "results.item.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __bulkConfirmOrDeclineBooking;
}
function bookingsCancelBookingAnonymously(payload) {
  function __bookingsCancelBookingAnonymously({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "wix.bookings.anonymous.actions.v1.AnonymousBookingActionsService.CancelBookingAnonymously",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixBookingsAnonymousActionsV1AnonymousBookingActionsServiceUrl(
        {
          protoPath: "/v1/anonymous-bookings/{token}/cancel",
          data: payload,
          host
        }
      ),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __bookingsCancelBookingAnonymously;
}
function bookingsRescheduleBookingAnonymously(payload) {
  function __bookingsRescheduleBookingAnonymously({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "wix.bookings.anonymous.actions.v1.AnonymousBookingActionsService.RescheduleBookingAnonymously",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixBookingsAnonymousActionsV1AnonymousBookingActionsServiceUrl(
        {
          protoPath: "/v1/anonymous-bookings/{token}/reschedule",
          data: payload,
          host
        }
      ),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __bookingsRescheduleBookingAnonymously;
}
function bookingsGetBookingAnonymously(payload) {
  function __bookingsGetBookingAnonymously({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "GET",
      methodFqn: "wix.bookings.anonymous.actions.v1.AnonymousBookingActionsService.GetBookingAnonymously",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixBookingsAnonymousActionsV1AnonymousBookingActionsServiceUrl(
        { protoPath: "/v1/anonymous-bookings/{token}", data: payload, host }
      ),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __bookingsGetBookingAnonymously;
}
function getServiceAnonymously(payload) {
  function __getServiceAnonymously({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "GET",
      methodFqn: "wix.bookings.anonymous.actions.v1.AnonymousBookingActionsService.GetServiceAnonymously",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixBookingsAnonymousActionsV1AnonymousBookingActionsServiceUrl(
        {
          protoPath: "/v1/anonymous-bookings/{token}/service",
          data: payload,
          host
        }
      ),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "service.createdDate" },
            { path: "service.updatedDate" },
            { path: "service.media.items.image.urlExpirationDate" },
            { path: "service.media.mainMedia.image.urlExpirationDate" },
            { path: "service.media.coverMedia.image.urlExpirationDate" },
            { path: "service.payment.subscription.recurringStartDate" },
            { path: "service.bookingPolicy.createdDate" },
            { path: "service.bookingPolicy.updatedDate" },
            { path: "service.schedule.firstSessionStart" },
            { path: "service.schedule.lastSessionEnd" },
            {
              path: "service.staffMembers.mainMedia.image.urlExpirationDate"
            },
            {
              path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
            },
            { path: "service.supportedSlugs.createdDate" },
            { path: "service.mainSlug.createdDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "service.locations.business.address.geocode.latitude" },
            { path: "service.locations.business.address.geocode.longitude" },
            { path: "service.locations.custom.address.geocode.latitude" },
            { path: "service.locations.custom.address.geocode.longitude" },
            { path: "service.locations.calculatedAddress.geocode.latitude" },
            { path: "service.locations.calculatedAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __getServiceAnonymously;
}
function getAnonymousActionToken(payload) {
  function __getAnonymousActionToken({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "GET",
      methodFqn: "wix.bookings.anonymous.actions.v1.AnonymousBookingActionsService.GetAnonymousActionToken",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixBookingsAnonymousActionsV1AnonymousBookingActionsServiceUrl(
        {
          protoPath: "/v1/anonymous-bookings/{bookingId}/token",
          data: payload,
          host
        }
      ),
      params: toURLSearchParams(payload)
    };
    return metadata;
  }
  return __getAnonymousActionToken;
}
function createMultiServiceBooking(payload) {
  function __createMultiServiceBooking({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "bookings.createdDate" },
          { path: "bookings.startDate" },
          { path: "bookings.endDate" },
          { path: "bookings.updatedDate" },
          { path: "bookings.canceledDate" }
        ]
      },
      {
        transformFn: transformSDKFloatToRESTFloat,
        paths: [
          { path: "bookings.contactDetails.fullAddress.geocode.latitude" },
          { path: "bookings.contactDetails.fullAddress.geocode.longitude" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.CreateMultiServiceBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/multi_service_bookings",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "multiServiceBooking.bookings.booking.createdDate" },
            { path: "multiServiceBooking.bookings.booking.startDate" },
            { path: "multiServiceBooking.bookings.booking.endDate" },
            { path: "multiServiceBooking.bookings.booking.updatedDate" },
            { path: "multiServiceBooking.bookings.booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __createMultiServiceBooking;
}
function rescheduleMultiServiceBooking(payload) {
  function __rescheduleMultiServiceBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.RescheduleMultiServiceBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/reschedule",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "multiServiceBooking.bookings.booking.createdDate" },
            { path: "multiServiceBooking.bookings.booking.startDate" },
            { path: "multiServiceBooking.bookings.booking.endDate" },
            { path: "multiServiceBooking.bookings.booking.updatedDate" },
            { path: "multiServiceBooking.bookings.booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __rescheduleMultiServiceBooking;
}
function getMultiServiceBookingAvailability(payload) {
  function __getMultiServiceBookingAvailability({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.GetMultiServiceBookingAvailability",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/get_availability",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __getMultiServiceBookingAvailability;
}
function cancelMultiServiceBooking(payload) {
  function __cancelMultiServiceBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.CancelMultiServiceBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/cancel",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "multiServiceBooking.bookings.booking.createdDate" },
            { path: "multiServiceBooking.bookings.booking.startDate" },
            { path: "multiServiceBooking.bookings.booking.endDate" },
            { path: "multiServiceBooking.bookings.booking.updatedDate" },
            { path: "multiServiceBooking.bookings.booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __cancelMultiServiceBooking;
}
function markMultiServiceBookingAsPending(payload) {
  function __markMultiServiceBookingAsPending({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.MarkMultiServiceBookingAsPending",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/mark_as_pending",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "multiServiceBooking.bookings.booking.createdDate" },
            { path: "multiServiceBooking.bookings.booking.startDate" },
            { path: "multiServiceBooking.bookings.booking.endDate" },
            { path: "multiServiceBooking.bookings.booking.updatedDate" },
            { path: "multiServiceBooking.bookings.booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __markMultiServiceBookingAsPending;
}
function confirmMultiServiceBooking(payload) {
  function __confirmMultiServiceBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.ConfirmMultiServiceBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/confirm",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "multiServiceBooking.bookings.booking.createdDate" },
            { path: "multiServiceBooking.bookings.booking.startDate" },
            { path: "multiServiceBooking.bookings.booking.endDate" },
            { path: "multiServiceBooking.bookings.booking.updatedDate" },
            { path: "multiServiceBooking.bookings.booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __confirmMultiServiceBooking;
}
function declineMultiServiceBooking(payload) {
  function __declineMultiServiceBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.DeclineMultiServiceBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}/decline",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "multiServiceBooking.bookings.booking.createdDate" },
            { path: "multiServiceBooking.bookings.booking.startDate" },
            { path: "multiServiceBooking.bookings.booking.endDate" },
            { path: "multiServiceBooking.bookings.booking.updatedDate" },
            { path: "multiServiceBooking.bookings.booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __declineMultiServiceBooking;
}
function bulkGetMultiServiceBookingAllowedActions(payload) {
  function __bulkGetMultiServiceBookingAllowedActions({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.BulkGetMultiServiceBookingAllowedActions",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/bulk/multi_service_bookings/get_allowed_actions",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __bulkGetMultiServiceBookingAllowedActions;
}
function getMultiServiceBooking(payload) {
  function __getMultiServiceBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "GET",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.GetMultiServiceBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/multi_service_bookings/{multiServiceBookingId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "multiServiceBooking.bookings.booking.createdDate" },
            { path: "multiServiceBooking.bookings.booking.startDate" },
            { path: "multiServiceBooking.bookings.booking.endDate" },
            { path: "multiServiceBooking.bookings.booking.updatedDate" },
            { path: "multiServiceBooking.bookings.booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "multiServiceBooking.bookings.booking.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __getMultiServiceBooking;
}
function addBookingsToMultiServiceBooking(payload) {
  function __addBookingsToMultiServiceBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.AddBookingsToMultiServiceBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/multi_service_bookings/add_bookings_to_multi_service_booking",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "bookings.booking.createdDate" },
            { path: "bookings.booking.startDate" },
            { path: "bookings.booking.endDate" },
            { path: "bookings.booking.updatedDate" },
            { path: "bookings.booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "bookings.booking.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "bookings.booking.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __addBookingsToMultiServiceBooking;
}
function removeBookingsFromMultiServiceBooking(payload) {
  function __removeBookingsFromMultiServiceBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.MultiServiceBookings.RemoveBookingsFromMultiServiceBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2MultiServiceBookingsUrl({
        protoPath: "/v2/multi_service_bookings/remove_bookings_from_multi_service_booking",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "bookings.booking.createdDate" },
            { path: "bookings.booking.startDate" },
            { path: "bookings.booking.endDate" },
            { path: "bookings.booking.updatedDate" },
            { path: "bookings.booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "bookings.booking.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "bookings.booking.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __removeBookingsFromMultiServiceBooking;
}
function createBooking(payload) {
  function __createBooking({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "booking.createdDate" },
          { path: "booking.startDate" },
          { path: "booking.endDate" },
          { path: "booking.updatedDate" },
          { path: "booking.canceledDate" }
        ]
      },
      {
        transformFn: transformSDKFloatToRESTFloat,
        paths: [
          { path: "booking.contactDetails.fullAddress.geocode.latitude" },
          { path: "booking.contactDetails.fullAddress.geocode.longitude" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.CreateBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bookings",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __createBooking;
}
function bulkCreateBooking(payload) {
  function __bulkCreateBooking({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "createBookingsInfo.booking.createdDate" },
          { path: "createBookingsInfo.booking.startDate" },
          { path: "createBookingsInfo.booking.endDate" },
          { path: "createBookingsInfo.booking.updatedDate" },
          { path: "createBookingsInfo.booking.canceledDate" }
        ]
      },
      {
        transformFn: transformSDKFloatToRESTFloat,
        paths: [
          {
            path: "createBookingsInfo.booking.contactDetails.fullAddress.geocode.latitude"
          },
          {
            path: "createBookingsInfo.booking.contactDetails.fullAddress.geocode.longitude"
          }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.BulkCreateBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bulk/bookings/create",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "results.item.createdDate" },
            { path: "results.item.startDate" },
            { path: "results.item.endDate" },
            { path: "results.item.updatedDate" },
            { path: "results.item.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            {
              path: "results.item.contactDetails.fullAddress.geocode.latitude"
            },
            {
              path: "results.item.contactDetails.fullAddress.geocode.longitude"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __bulkCreateBooking;
}
function rescheduleBooking(payload) {
  function __rescheduleBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.RescheduleBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bookings/{bookingId}/reschedule",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __rescheduleBooking;
}
function bookingsConfirmBooking(payload) {
  function __bookingsConfirmBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.ConfirmBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bookings/{bookingId}/confirm",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __bookingsConfirmBooking;
}
function setBookingSubmissionId(payload) {
  function __setBookingSubmissionId({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.SetBookingSubmissionId",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bookings/{bookingId}/set-booking-submission-id",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __setBookingSubmissionId;
}
function updateExtendedFields(payload) {
  function __updateExtendedFields({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.UpdateExtendedFields",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bookings/{id}/update_extended_fields",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __updateExtendedFields;
}
function bookingsDeclineBooking(payload) {
  function __bookingsDeclineBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.DeclineBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bookings/{bookingId}/decline",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __bookingsDeclineBooking;
}
function bookingsCancelBooking(payload) {
  function __bookingsCancelBooking({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.CancelBooking",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bookings/{bookingId}/cancel",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __bookingsCancelBooking;
}
function bookingsUpdateNumberOfParticipants(payload) {
  function __bookingsUpdateNumberOfParticipants({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.UpdateNumberOfParticipants",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bookings/{bookingId}/update_number_of_participants",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __bookingsUpdateNumberOfParticipants;
}
function bulkCalculateAllowedActions(payload) {
  function __bulkCalculateAllowedActions({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.BulkCalculateAllowedActions",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bulk/bookings/calculate_allowed_actions",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __bulkCalculateAllowedActions;
}
function markBookingAsPending(payload) {
  function __markBookingAsPending({ host }) {
    const metadata = {
      entityFqdn: "wix.bookings.v2.booking",
      method: "POST",
      methodFqn: "com.wixpress.bookings.bookings.v2.Bookings.MarkBookingAsPending",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveComWixpressBookingsBookingsV2BookingsUrl({
        protoPath: "/v2/bookings/{bookingId}/mark_booking_as_pending",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "booking.createdDate" },
            { path: "booking.startDate" },
            { path: "booking.endDate" },
            { path: "booking.updatedDate" },
            { path: "booking.canceledDate" }
          ]
        },
        {
          transformFn: transformRESTFloatToSDKFloat,
          paths: [
            { path: "booking.contactDetails.fullAddress.geocode.latitude" },
            { path: "booking.contactDetails.fullAddress.geocode.longitude" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __markBookingAsPending;
}

// src/bookings-v2-booking-bookings.universal.ts
import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
import { transformRESTPageURLV2ToSDKPageURLV2 } from "@wix/sdk-runtime/transformations/page-url-v2";
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
var MultiServiceBookingType = /* @__PURE__ */ ((MultiServiceBookingType2) => {
  MultiServiceBookingType2["SEQUENTIAL_BOOKINGS"] = "SEQUENTIAL_BOOKINGS";
  MultiServiceBookingType2["SEPARATE_BOOKINGS"] = "SEPARATE_BOOKINGS";
  MultiServiceBookingType2["PARALLEL_BOOKINGS"] = "PARALLEL_BOOKINGS";
  return MultiServiceBookingType2;
})(MultiServiceBookingType || {});
var ResourceTransparency = /* @__PURE__ */ ((ResourceTransparency2) => {
  ResourceTransparency2["OPAQUE"] = "OPAQUE";
  ResourceTransparency2["TRANSPARENT"] = "TRANSPARENT";
  return ResourceTransparency2;
})(ResourceTransparency || {});
var LocationType = /* @__PURE__ */ ((LocationType2) => {
  LocationType2["UNDEFINED"] = "UNDEFINED";
  LocationType2["OWNER_BUSINESS"] = "OWNER_BUSINESS";
  LocationType2["OWNER_CUSTOM"] = "OWNER_CUSTOM";
  LocationType2["CUSTOM"] = "CUSTOM";
  return LocationType2;
})(LocationType || {});
var SelectionMethod = /* @__PURE__ */ ((SelectionMethod2) => {
  SelectionMethod2["SPECIFIC_RESOURCE"] = "SPECIFIC_RESOURCE";
  SelectionMethod2["ANY_RESOURCE"] = "ANY_RESOURCE";
  SelectionMethod2["NO_SELECTION"] = "NO_SELECTION";
  return SelectionMethod2;
})(SelectionMethod || {});
var ValueType = /* @__PURE__ */ ((ValueType2) => {
  ValueType2["SHORT_TEXT"] = "SHORT_TEXT";
  ValueType2["LONG_TEXT"] = "LONG_TEXT";
  ValueType2["CHECK_BOX"] = "CHECK_BOX";
  return ValueType2;
})(ValueType || {});
var BookingStatus = /* @__PURE__ */ ((BookingStatus2) => {
  BookingStatus2["CREATED"] = "CREATED";
  BookingStatus2["CONFIRMED"] = "CONFIRMED";
  BookingStatus2["CANCELED"] = "CANCELED";
  BookingStatus2["PENDING"] = "PENDING";
  BookingStatus2["DECLINED"] = "DECLINED";
  BookingStatus2["WAITING_LIST"] = "WAITING_LIST";
  return BookingStatus2;
})(BookingStatus || {});
var PaymentStatus = /* @__PURE__ */ ((PaymentStatus2) => {
  PaymentStatus2["UNDEFINED"] = "UNDEFINED";
  PaymentStatus2["NOT_PAID"] = "NOT_PAID";
  PaymentStatus2["PAID"] = "PAID";
  PaymentStatus2["PARTIALLY_PAID"] = "PARTIALLY_PAID";
  PaymentStatus2["REFUNDED"] = "REFUNDED";
  PaymentStatus2["EXEMPT"] = "EXEMPT";
  PaymentStatus2["FAILED"] = "FAILED";
  return PaymentStatus2;
})(PaymentStatus || {});
var SelectedPaymentOption = /* @__PURE__ */ ((SelectedPaymentOption2) => {
  SelectedPaymentOption2["UNDEFINED"] = "UNDEFINED";
  SelectedPaymentOption2["OFFLINE"] = "OFFLINE";
  SelectedPaymentOption2["ONLINE"] = "ONLINE";
  SelectedPaymentOption2["MEMBERSHIP"] = "MEMBERSHIP";
  SelectedPaymentOption2["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
  return SelectedPaymentOption2;
})(SelectedPaymentOption || {});
var Platform = /* @__PURE__ */ ((Platform2) => {
  Platform2["UNDEFINED_PLATFORM"] = "UNDEFINED_PLATFORM";
  Platform2["WEB"] = "WEB";
  Platform2["MOBILE_APP"] = "MOBILE_APP";
  return Platform2;
})(Platform || {});
var Actor = /* @__PURE__ */ ((Actor2) => {
  Actor2["UNDEFINED_ACTOR"] = "UNDEFINED_ACTOR";
  Actor2["BUSINESS"] = "BUSINESS";
  Actor2["CUSTOMER"] = "CUSTOMER";
  return Actor2;
})(Actor || {});
var IdentificationDataIdentityType = /* @__PURE__ */ ((IdentificationDataIdentityType2) => {
  IdentificationDataIdentityType2["UNKNOWN"] = "UNKNOWN";
  IdentificationDataIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
  IdentificationDataIdentityType2["MEMBER"] = "MEMBER";
  IdentificationDataIdentityType2["WIX_USER"] = "WIX_USER";
  IdentificationDataIdentityType2["APP"] = "APP";
  return IdentificationDataIdentityType2;
})(IdentificationDataIdentityType || {});
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
  WebhookIdentityType2["MEMBER"] = "MEMBER";
  WebhookIdentityType2["WIX_USER"] = "WIX_USER";
  WebhookIdentityType2["APP"] = "APP";
  return WebhookIdentityType2;
})(WebhookIdentityType || {});
var LocationLocationType = /* @__PURE__ */ ((LocationLocationType2) => {
  LocationLocationType2["UNDEFINED"] = "UNDEFINED";
  LocationLocationType2["OWNER_BUSINESS"] = "OWNER_BUSINESS";
  LocationLocationType2["OWNER_CUSTOM"] = "OWNER_CUSTOM";
  LocationLocationType2["CUSTOM"] = "CUSTOM";
  return LocationLocationType2;
})(LocationLocationType || {});
var V1RequestedFields = /* @__PURE__ */ ((V1RequestedFields2) => {
  V1RequestedFields2["BOOKING_FEES"] = "BOOKING_FEES";
  return V1RequestedFields2;
})(V1RequestedFields || {});
var BookingFeeStatus = /* @__PURE__ */ ((BookingFeeStatus2) => {
  BookingFeeStatus2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
  BookingFeeStatus2["PREVIEW"] = "PREVIEW";
  BookingFeeStatus2["NOT_YET_APPLIED_TO_ORDER"] = "NOT_YET_APPLIED_TO_ORDER";
  BookingFeeStatus2["APPLIED_TO_ORDER"] = "APPLIED_TO_ORDER";
  return BookingFeeStatus2;
})(BookingFeeStatus || {});
var Trigger = /* @__PURE__ */ ((Trigger2) => {
  Trigger2["UNKNOWN_TRIGGER"] = "UNKNOWN_TRIGGER";
  Trigger2["NOT_ATTENDED"] = "NOT_ATTENDED";
  Trigger2["BOOKING_CANCELED"] = "BOOKING_CANCELED";
  return Trigger2;
})(Trigger || {});
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
  RequestedFields2["STAFF_MEMBER_DETAILS"] = "STAFF_MEMBER_DETAILS";
  RequestedFields2["RESOURCE_TYPE_DETAILS"] = "RESOURCE_TYPE_DETAILS";
  RequestedFields2["DISCOUNT_INFO_DETAILS"] = "DISCOUNT_INFO_DETAILS";
  return RequestedFields2;
})(RequestedFields || {});
var ServiceType = /* @__PURE__ */ ((ServiceType2) => {
  ServiceType2["APPOINTMENT"] = "APPOINTMENT";
  ServiceType2["CLASS"] = "CLASS";
  ServiceType2["COURSE"] = "COURSE";
  return ServiceType2;
})(ServiceType || {});
var RateType = /* @__PURE__ */ ((RateType2) => {
  RateType2["FIXED"] = "FIXED";
  RateType2["CUSTOM"] = "CUSTOM";
  RateType2["VARIED"] = "VARIED";
  RateType2["NO_FEE"] = "NO_FEE";
  RateType2["SUBSCRIPTION"] = "SUBSCRIPTION";
  return RateType2;
})(RateType || {});
var FrequencyType = /* @__PURE__ */ ((FrequencyType2) => {
  FrequencyType2["MONTHLY"] = "MONTHLY";
  return FrequencyType2;
})(FrequencyType || {});
var FirstChargeDateType = /* @__PURE__ */ ((FirstChargeDateType2) => {
  FirstChargeDateType2["CHECKOUT"] = "CHECKOUT";
  FirstChargeDateType2["SCHEDULED"] = "SCHEDULED";
  return FirstChargeDateType2;
})(FirstChargeDateType || {});
var AddOnPaymentOptions = /* @__PURE__ */ ((AddOnPaymentOptions2) => {
  AddOnPaymentOptions2["ONLINE"] = "ONLINE";
  AddOnPaymentOptions2["IN_PERSON"] = "IN_PERSON";
  return AddOnPaymentOptions2;
})(AddOnPaymentOptions || {});
var LocationTypeEnumLocationType = /* @__PURE__ */ ((LocationTypeEnumLocationType2) => {
  LocationTypeEnumLocationType2["CUSTOM"] = "CUSTOM";
  LocationTypeEnumLocationType2["BUSINESS"] = "BUSINESS";
  LocationTypeEnumLocationType2["CUSTOMER"] = "CUSTOMER";
  return LocationTypeEnumLocationType2;
})(LocationTypeEnumLocationType || {});
var RankingOrder = /* @__PURE__ */ ((RankingOrder2) => {
  RankingOrder2["LOWEST_TO_HIGHEST"] = "LOWEST_TO_HIGHEST";
  RankingOrder2["HIGHEST_TO_LOWEST"] = "HIGHEST_TO_LOWEST";
  return RankingOrder2;
})(RankingOrder || {});
var SortingMethodType = /* @__PURE__ */ ((SortingMethodType2) => {
  SortingMethodType2["RANDOM"] = "RANDOM";
  SortingMethodType2["RANKING"] = "RANKING";
  SortingMethodType2["CUSTOM"] = "CUSTOM";
  return SortingMethodType2;
})(SortingMethodType || {});
var Timing = /* @__PURE__ */ ((Timing2) => {
  Timing2["AFTER_BOOKING"] = "AFTER_BOOKING";
  Timing2["BEFORE_BOOKING"] = "BEFORE_BOOKING";
  return Timing2;
})(Timing || {});
var CompletionRequirement = /* @__PURE__ */ ((CompletionRequirement2) => {
  CompletionRequirement2["OPTIONAL"] = "OPTIONAL";
  CompletionRequirement2["REQUIRED_BEFORE_BOOKING"] = "REQUIRED_BEFORE_BOOKING";
  return CompletionRequirement2;
})(CompletionRequirement || {});
var UnitType = /* @__PURE__ */ ((UnitType2) => {
  UnitType2["HOUR"] = "HOUR";
  UnitType2["DAY"] = "DAY";
  return UnitType2;
})(UnitType || {});
var TaxableAddressType = /* @__PURE__ */ ((TaxableAddressType2) => {
  TaxableAddressType2["BUSINESS"] = "BUSINESS";
  TaxableAddressType2["BILLING"] = "BILLING";
  return TaxableAddressType2;
})(TaxableAddressType || {});
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
  IdentityType2["UNKNOWN"] = "UNKNOWN";
  IdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
  IdentityType2["MEMBER"] = "MEMBER";
  IdentityType2["WIX_USER"] = "WIX_USER";
  IdentityType2["APP"] = "APP";
  return IdentityType2;
})(IdentityType || {});
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
  SortOrder2["ASC"] = "ASC";
  SortOrder2["DESC"] = "DESC";
  return SortOrder2;
})(SortOrder || {});
var SortType = /* @__PURE__ */ ((SortType2) => {
  SortType2["COUNT"] = "COUNT";
  SortType2["VALUE"] = "VALUE";
  return SortType2;
})(SortType || {});
var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
  SortDirection2["DESC"] = "DESC";
  SortDirection2["ASC"] = "ASC";
  return SortDirection2;
})(SortDirection || {});
var MissingValues = /* @__PURE__ */ ((MissingValues2) => {
  MissingValues2["EXCLUDE"] = "EXCLUDE";
  MissingValues2["INCLUDE"] = "INCLUDE";
  return MissingValues2;
})(MissingValues || {});
var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
  ScalarType2["UNKNOWN_SCALAR_TYPE"] = "UNKNOWN_SCALAR_TYPE";
  ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
  ScalarType2["MIN"] = "MIN";
  ScalarType2["MAX"] = "MAX";
  return ScalarType2;
})(ScalarType || {});
var Interval = /* @__PURE__ */ ((Interval2) => {
  Interval2["UNKNOWN_INTERVAL"] = "UNKNOWN_INTERVAL";
  Interval2["YEAR"] = "YEAR";
  Interval2["MONTH"] = "MONTH";
  Interval2["WEEK"] = "WEEK";
  Interval2["DAY"] = "DAY";
  Interval2["HOUR"] = "HOUR";
  Interval2["MINUTE"] = "MINUTE";
  Interval2["SECOND"] = "SECOND";
  return Interval2;
})(Interval || {});
var NestedAggregationType = /* @__PURE__ */ ((NestedAggregationType2) => {
  NestedAggregationType2["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
  NestedAggregationType2["VALUE"] = "VALUE";
  NestedAggregationType2["RANGE"] = "RANGE";
  NestedAggregationType2["SCALAR"] = "SCALAR";
  NestedAggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
  return NestedAggregationType2;
})(NestedAggregationType || {});
var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
  AggregationType2["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
  AggregationType2["VALUE"] = "VALUE";
  AggregationType2["RANGE"] = "RANGE";
  AggregationType2["SCALAR"] = "SCALAR";
  AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
  AggregationType2["NESTED"] = "NESTED";
  return AggregationType2;
})(AggregationType || {});
var Mode = /* @__PURE__ */ ((Mode2) => {
  Mode2["OR"] = "OR";
  Mode2["AND"] = "AND";
  return Mode2;
})(Mode || {});
async function confirmOrDeclineBooking2(bookingId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookingId,
    paymentStatus: options?.paymentStatus
  });
  const reqOpts = confirmOrDeclineBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          bookingId: "$[0]",
          paymentStatus: "$[1].paymentStatus"
        },
        singleArgumentUnchanged: false
      },
      ["bookingId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bulkConfirmOrDeclineBooking2(details, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    details,
    returnEntity: options?.returnEntity
  });
  const reqOpts = bulkConfirmOrDeclineBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          details: "$[0]",
          returnEntity: "$[1].returnEntity"
        },
        singleArgumentUnchanged: false
      },
      ["details", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bookingsCancelBookingAnonymously2(token, revision) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    token,
    revision
  });
  const reqOpts = bookingsCancelBookingAnonymously(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { token: "$[0]", revision: "$[1]" },
        singleArgumentUnchanged: false
      },
      ["token", "revision"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bookingsRescheduleBookingAnonymously2(token, slot, options) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    token,
    slot,
    revision: options?.revision
  });
  const reqOpts = bookingsRescheduleBookingAnonymously(
    payload
  );
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          token: "$[0]",
          slot: "$[1]",
          revision: "$[2].revision"
        },
        singleArgumentUnchanged: false
      },
      ["token", "slot", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bookingsGetBookingAnonymously2(token, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    token,
    fields: options?.fields
  });
  const reqOpts = bookingsGetBookingAnonymously(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { token: "$[0]", fields: "$[1].fields" },
        singleArgumentUnchanged: false
      },
      ["token", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getServiceAnonymously2(token, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    token,
    fields: options?.fields
  });
  const reqOpts = getServiceAnonymously(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(
      transformPaths2(result.data, [
        {
          transformFn: transformRESTImageToSDKImage,
          paths: [
            { path: "service.media.items.image" },
            { path: "service.media.mainMedia.image" },
            { path: "service.media.coverMedia.image" },
            { path: "service.staffMembers.mainMedia.image" },
            { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
          ]
        },
        {
          transformFn: transformRESTAddressToSDKAddress,
          paths: [
            { path: "service.locations.calculatedAddress" },
            { path: "service.locations.business.address" },
            { path: "service.locations.custom.address" }
          ]
        },
        {
          transformFn: transformRESTPageURLV2ToSDKPageURLV2,
          paths: [
            { path: "service.urls.servicePage" },
            { path: "service.urls.bookingPage" },
            { path: "service.urls.calendarPage" }
          ]
        }
      ])
    );
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { token: "$[0]", fields: "$[1].fields" },
        singleArgumentUnchanged: false
      },
      ["token", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getAnonymousActionToken2(bookingId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookingId
  });
  const reqOpts = getAnonymousActionToken(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { bookingId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["bookingId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function createMultiServiceBooking2(bookings, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookings,
    participantNotification: options?.participantNotification,
    sendSmsReminder: options?.sendSmsReminder,
    flowControlSettings: options?.flowControlSettings,
    returnFullEntity: options?.returnFullEntity,
    multiServiceBookingType: options?.multiServiceBookingType
  });
  const reqOpts = createMultiServiceBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          bookings: "$[0]",
          participantNotification: "$[1].participantNotification",
          sendSmsReminder: "$[1].sendSmsReminder",
          flowControlSettings: "$[1].flowControlSettings",
          returnFullEntity: "$[1].returnFullEntity",
          multiServiceBookingType: "$[1].multiServiceBookingType"
        },
        singleArgumentUnchanged: false
      },
      ["bookings", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function rescheduleMultiServiceBooking2(multiServiceBookingId, rescheduleBookingsInfo, options) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    multiServiceBookingId,
    rescheduleBookingsInfo,
    participantNotification: options?.participantNotification,
    flowControlSettings: options?.flowControlSettings,
    returnFullEntity: options?.returnFullEntity
  });
  const reqOpts = rescheduleMultiServiceBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          multiServiceBookingId: "$[0]",
          rescheduleBookingsInfo: "$[1]",
          participantNotification: "$[2].participantNotification",
          flowControlSettings: "$[2].flowControlSettings",
          returnFullEntity: "$[2].returnFullEntity"
        },
        singleArgumentUnchanged: false
      },
      ["multiServiceBookingId", "rescheduleBookingsInfo", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getMultiServiceBookingAvailability2(multiServiceBookingId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    multiServiceBookingId
  });
  const reqOpts = getMultiServiceBookingAvailability(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { multiServiceBookingId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["multiServiceBookingId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function cancelMultiServiceBooking2(multiServiceBookingId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    multiServiceBookingId,
    participantNotification: options?.participantNotification,
    flowControlSettings: options?.flowControlSettings,
    returnFullEntity: options?.returnFullEntity,
    waiveCharges: options?.waiveCharges
  });
  const reqOpts = cancelMultiServiceBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          multiServiceBookingId: "$[0]",
          participantNotification: "$[1].participantNotification",
          flowControlSettings: "$[1].flowControlSettings",
          returnFullEntity: "$[1].returnFullEntity",
          waiveCharges: "$[1].waiveCharges"
        },
        singleArgumentUnchanged: false
      },
      ["multiServiceBookingId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function markMultiServiceBookingAsPending2(multiServiceBookingId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    multiServiceBookingId,
    markAsPendingBookingsInfo: options?.markAsPendingBookingsInfo,
    participantNotification: options?.participantNotification,
    sendSmsReminder: options?.sendSmsReminder,
    doubleBooked: options?.doubleBooked,
    returnFullEntity: options?.returnFullEntity,
    flowControlSettings: options?.flowControlSettings
  });
  const reqOpts = markMultiServiceBookingAsPending(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          multiServiceBookingId: "$[0]",
          markAsPendingBookingsInfo: "$[1].markAsPendingBookingsInfo",
          participantNotification: "$[1].participantNotification",
          sendSmsReminder: "$[1].sendSmsReminder",
          doubleBooked: "$[1].doubleBooked",
          returnFullEntity: "$[1].returnFullEntity",
          flowControlSettings: "$[1].flowControlSettings"
        },
        singleArgumentUnchanged: false
      },
      ["multiServiceBookingId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function confirmMultiServiceBooking2(multiServiceBookingId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    multiServiceBookingId,
    confirmBookingsInfo: options?.confirmBookingsInfo,
    participantNotification: options?.participantNotification,
    sendSmsReminder: options?.sendSmsReminder,
    doubleBooked: options?.doubleBooked,
    returnFullEntity: options?.returnFullEntity,
    flowControlSettings: options?.flowControlSettings
  });
  const reqOpts = confirmMultiServiceBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          multiServiceBookingId: "$[0]",
          confirmBookingsInfo: "$[1].confirmBookingsInfo",
          participantNotification: "$[1].participantNotification",
          sendSmsReminder: "$[1].sendSmsReminder",
          doubleBooked: "$[1].doubleBooked",
          returnFullEntity: "$[1].returnFullEntity",
          flowControlSettings: "$[1].flowControlSettings"
        },
        singleArgumentUnchanged: false
      },
      ["multiServiceBookingId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function declineMultiServiceBooking2(multiServiceBookingId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    multiServiceBookingId,
    declineBookingsInfo: options?.declineBookingsInfo,
    participantNotification: options?.participantNotification,
    doubleBooked: options?.doubleBooked,
    returnFullEntity: options?.returnFullEntity,
    flowControlSettings: options?.flowControlSettings
  });
  const reqOpts = declineMultiServiceBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          multiServiceBookingId: "$[0]",
          declineBookingsInfo: "$[1].declineBookingsInfo",
          participantNotification: "$[1].participantNotification",
          doubleBooked: "$[1].doubleBooked",
          returnFullEntity: "$[1].returnFullEntity",
          flowControlSettings: "$[1].flowControlSettings"
        },
        singleArgumentUnchanged: false
      },
      ["multiServiceBookingId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bulkGetMultiServiceBookingAllowedActions2(multiServiceBookingIds) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    multiServiceBookingIds
  });
  const reqOpts = bulkGetMultiServiceBookingAllowedActions(
    payload
  );
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { multiServiceBookingIds: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["multiServiceBookingIds"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getMultiServiceBooking2(multiServiceBookingId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    multiServiceBookingId
  });
  const reqOpts = getMultiServiceBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data)?.multiServiceBooking;
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { multiServiceBookingId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["multiServiceBookingId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function addBookingsToMultiServiceBooking2(multiServiceBookingId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    multiServiceBookingId,
    bookings: options?.bookings,
    returnFullEntity: options?.returnFullEntity
  });
  const reqOpts = addBookingsToMultiServiceBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          multiServiceBookingId: "$[0]",
          bookings: "$[1].bookings",
          returnFullEntity: "$[1].returnFullEntity"
        },
        singleArgumentUnchanged: false
      },
      ["multiServiceBookingId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function removeBookingsFromMultiServiceBooking2(multiServiceBookingId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    multiServiceBookingId,
    bookings: options?.bookings,
    returnFullEntity: options?.returnFullEntity
  });
  const reqOpts = removeBookingsFromMultiServiceBooking(
    payload
  );
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          multiServiceBookingId: "$[0]",
          bookings: "$[1].bookings",
          returnFullEntity: "$[1].returnFullEntity"
        },
        singleArgumentUnchanged: false
      },
      ["multiServiceBookingId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function createBooking2(booking, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    booking,
    participantNotification: options?.participantNotification,
    sendSmsReminder: options?.sendSmsReminder,
    flowControlSettings: options?.flowControlSettings,
    formSubmission: options?.formSubmission
  });
  const reqOpts = createBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          booking: "$[0]",
          participantNotification: "$[1].participantNotification",
          sendSmsReminder: "$[1].sendSmsReminder",
          flowControlSettings: "$[1].flowControlSettings",
          formSubmission: "$[1].formSubmission"
        },
        singleArgumentUnchanged: false
      },
      ["booking", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bulkCreateBooking2(createBookingsInfo, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    createBookingsInfo,
    returnFullEntity: options?.returnFullEntity
  });
  const reqOpts = bulkCreateBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          createBookingsInfo: "$[0]",
          returnFullEntity: "$[1].returnFullEntity"
        },
        singleArgumentUnchanged: false
      },
      ["createBookingsInfo", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function rescheduleBooking2(bookingId, slot, options) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookingId,
    slot,
    revision: options?.revision,
    participantNotification: options?.participantNotification,
    flowControlSettings: options?.flowControlSettings,
    totalParticipants: options?.totalParticipants,
    participantsChoices: options?.participantsChoices,
    bookedAddOns: options?.bookedAddOns
  });
  const reqOpts = rescheduleBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          bookingId: "$[0]",
          slot: "$[1]",
          revision: "$[2].revision",
          participantNotification: "$[2].participantNotification",
          flowControlSettings: "$[2].flowControlSettings",
          totalParticipants: "$[2].totalParticipants",
          participantsChoices: "$[2].participantsChoices",
          bookedAddOns: "$[2].bookedAddOns"
        },
        singleArgumentUnchanged: false
      },
      ["bookingId", "slot", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function confirmBooking(bookingId, revision, options) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookingId,
    revision,
    participantNotification: options?.participantNotification,
    sendSmsReminder: options?.sendSmsReminder,
    paymentStatus: options?.paymentStatus,
    doubleBooked: options?.doubleBooked,
    flowControlSettings: options?.flowControlSettings
  });
  const reqOpts = bookingsConfirmBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          bookingId: "$[0]",
          revision: "$[1]",
          participantNotification: "$[2].participantNotification",
          sendSmsReminder: "$[2].sendSmsReminder",
          paymentStatus: "$[2].paymentStatus",
          doubleBooked: "$[2].doubleBooked",
          flowControlSettings: "$[2].flowControlSettings"
        },
        singleArgumentUnchanged: false
      },
      ["bookingId", "revision", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function setBookingSubmissionId2(bookingId, submissionId) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookingId,
    submissionId
  });
  const reqOpts = setBookingSubmissionId(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { bookingId: "$[0]", submissionId: "$[1]" },
        singleArgumentUnchanged: false
      },
      ["bookingId", "submissionId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function updateExtendedFields2(_id, namespace, options) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    id: _id,
    namespace,
    namespaceData: options?.namespaceData
  });
  const reqOpts = updateExtendedFields(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          id: "$[0]",
          namespace: "$[1]",
          namespaceData: "$[2].namespaceData"
        },
        singleArgumentUnchanged: false
      },
      ["_id", "namespace", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function declineBooking(bookingId, revision, options) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookingId,
    revision,
    participantNotification: options?.participantNotification,
    paymentStatus: options?.paymentStatus,
    doubleBooked: options?.doubleBooked,
    flowControlSettings: options?.flowControlSettings
  });
  const reqOpts = bookingsDeclineBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          bookingId: "$[0]",
          revision: "$[1]",
          participantNotification: "$[2].participantNotification",
          paymentStatus: "$[2].paymentStatus",
          doubleBooked: "$[2].doubleBooked",
          flowControlSettings: "$[2].flowControlSettings"
        },
        singleArgumentUnchanged: false
      },
      ["bookingId", "revision", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function cancelBooking(bookingId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookingId,
    participantNotification: options?.participantNotification,
    flowControlSettings: options?.flowControlSettings,
    revision: options?.revision,
    waiveCharges: options?.waiveCharges
  });
  const reqOpts = bookingsCancelBooking(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          bookingId: "$[0]",
          participantNotification: "$[1].participantNotification",
          flowControlSettings: "$[1].flowControlSettings",
          revision: "$[1].revision",
          waiveCharges: "$[1].waiveCharges"
        },
        singleArgumentUnchanged: false
      },
      ["bookingId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function updateNumberOfParticipants(bookingId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookingId,
    revision: options?.revision,
    totalParticipants: options?.totalParticipants,
    participantsChoices: options?.participantsChoices
  });
  const reqOpts = bookingsUpdateNumberOfParticipants(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          bookingId: "$[0]",
          revision: "$[1].revision",
          totalParticipants: "$[1].totalParticipants",
          participantsChoices: "$[1].participantsChoices"
        },
        singleArgumentUnchanged: false
      },
      ["bookingId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bulkCalculateAllowedActions2(bookingIds) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookingIds
  });
  const reqOpts = bulkCalculateAllowedActions(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { bookingIds: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["bookingIds"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function markBookingAsPending2(bookingId, revision, options) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    bookingId,
    revision,
    participantNotification: options?.participantNotification,
    sendSmsReminder: options?.sendSmsReminder,
    paymentStatus: options?.paymentStatus,
    doubleBooked: options?.doubleBooked,
    flowControlSettings: options?.flowControlSettings
  });
  const reqOpts = markBookingAsPending(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          bookingId: "$[0]",
          revision: "$[1]",
          participantNotification: "$[2].participantNotification",
          sendSmsReminder: "$[2].sendSmsReminder",
          paymentStatus: "$[2].paymentStatus",
          doubleBooked: "$[2].doubleBooked",
          flowControlSettings: "$[2].flowControlSettings"
        },
        singleArgumentUnchanged: false
      },
      ["bookingId", "revision", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
export {
  Actor,
  AddOnPaymentOptions,
  AggregationType,
  BookingFeeStatus,
  BookingStatus,
  CompletionRequirement,
  FirstChargeDateType,
  FrequencyType,
  IdentificationDataIdentityType,
  IdentityType,
  Interval,
  LocationLocationType,
  LocationType,
  LocationTypeEnumLocationType,
  MissingValues,
  Mode,
  MultiServiceBookingType,
  NestedAggregationType,
  PaymentStatus,
  Platform,
  RankingOrder,
  RateType,
  RequestedFields,
  ResourceTransparency,
  ScalarType,
  SelectedPaymentOption,
  SelectionMethod,
  ServiceType,
  SortDirection,
  SortOrder,
  SortType,
  SortingMethodType,
  TaxableAddressType,
  Timing,
  Trigger,
  UnitType,
  V1RequestedFields,
  ValueType,
  WebhookIdentityType,
  addBookingsToMultiServiceBooking2 as addBookingsToMultiServiceBooking,
  bookingsCancelBookingAnonymously2 as bookingsCancelBookingAnonymously,
  bookingsGetBookingAnonymously2 as bookingsGetBookingAnonymously,
  bookingsRescheduleBookingAnonymously2 as bookingsRescheduleBookingAnonymously,
  bulkCalculateAllowedActions2 as bulkCalculateAllowedActions,
  bulkConfirmOrDeclineBooking2 as bulkConfirmOrDeclineBooking,
  bulkCreateBooking2 as bulkCreateBooking,
  bulkGetMultiServiceBookingAllowedActions2 as bulkGetMultiServiceBookingAllowedActions,
  cancelBooking,
  cancelMultiServiceBooking2 as cancelMultiServiceBooking,
  confirmBooking,
  confirmMultiServiceBooking2 as confirmMultiServiceBooking,
  confirmOrDeclineBooking2 as confirmOrDeclineBooking,
  createBooking2 as createBooking,
  createMultiServiceBooking2 as createMultiServiceBooking,
  declineBooking,
  declineMultiServiceBooking2 as declineMultiServiceBooking,
  getAnonymousActionToken2 as getAnonymousActionToken,
  getMultiServiceBooking2 as getMultiServiceBooking,
  getMultiServiceBookingAvailability2 as getMultiServiceBookingAvailability,
  getServiceAnonymously2 as getServiceAnonymously,
  markBookingAsPending2 as markBookingAsPending,
  markMultiServiceBookingAsPending2 as markMultiServiceBookingAsPending,
  removeBookingsFromMultiServiceBooking2 as removeBookingsFromMultiServiceBooking,
  rescheduleBooking2 as rescheduleBooking,
  rescheduleMultiServiceBooking2 as rescheduleMultiServiceBooking,
  setBookingSubmissionId2 as setBookingSubmissionId,
  updateExtendedFields2 as updateExtendedFields,
  updateNumberOfParticipants
};
//# sourceMappingURL=index.typings.mjs.map