{"version":3,"sources":["../../src/locations-v1-location-locations.public.ts","../../src/locations-v1-location-locations.universal.ts","../../src/locations-v1-location-locations.http.ts","../../src/locations-v1-location-locations.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  AddLocationTypeApplicationErrors,\n  AddLocationTypeResponse,\n  AddTypeToLocationApplicationErrors,\n  AddTypeToLocationResponse,\n  ArchiveLocationApplicationErrors,\n  ArchiveLocationResponse,\n  BulkCreateLocationResponse,\n  CreateLocationApplicationErrors,\n  ListLocationsOptions,\n  ListLocationsResponse,\n  Location,\n  LocationArchiveStatusEnvelope,\n  LocationCreatedEnvelope,\n  LocationQuery,\n  LocationSetDefaultLocationEnvelope,\n  LocationTypeWithLiterals,\n  LocationUpdatedEnvelope,\n  LocationsQueryBuilder,\n  QueryLocationsOptions,\n  QueryLocationsResponse,\n  RemoveLocationTypeApplicationErrors,\n  RemoveLocationTypeResponse,\n  RemoveTypeFromLocationApplicationErrors,\n  RemoveTypeFromLocationResponse,\n  SetDefaultLocationApplicationErrors,\n  SetDefaultLocationResponse,\n  UpdateLocation,\n  UpdateLocationApplicationErrors,\n  addLocationType as universalAddLocationType,\n  addTypeToLocation as universalAddTypeToLocation,\n  archiveLocation as universalArchiveLocation,\n  bulkCreateLocation as universalBulkCreateLocation,\n  createLocation as universalCreateLocation,\n  getLocation as universalGetLocation,\n  listLocations as universalListLocations,\n  queryLocations as universalQueryLocations,\n  removeLocationType as universalRemoveLocationType,\n  removeTypeFromLocation as universalRemoveTypeFromLocation,\n  setDefaultLocation as universalSetDefaultLocation,\n  typedQueryLocations as universalTypedQueryLocations,\n  updateLocation as universalUpdateLocation,\n} from './locations-v1-location-locations.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/business-tools' };\n\nexport function createLocation(\n  httpClient: HttpClient\n): CreateLocationSignature {\n  return (\n    location: NonNullablePaths<Location, `address` | `name` | `timeZone`, 2>\n  ) =>\n    universalCreateLocation(\n      location,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateLocationSignature {\n  /**\n   * Creates a location.\n   * @param - Location to create.\n   * @returns Created location.\n   */\n  (\n    location: NonNullablePaths<Location, `address` | `name` | `timeZone`, 2>\n  ): Promise<\n    NonNullablePaths<\n      Location,\n      | `name`\n      | `default`\n      | `status`\n      | `locationType`\n      | `address.streetAddress.number`\n      | `address.streetAddress.name`\n      | `address.streetAddress.apt`\n      | `businessSchedule.periods`\n      | `businessSchedule.periods.${number}.openDay`\n      | `businessSchedule.periods.${number}.openTime`\n      | `businessSchedule.periods.${number}.closeDay`\n      | `businessSchedule.periods.${number}.closeTime`\n      | `businessSchedule.specialHourPeriod`\n      | `businessSchedule.specialHourPeriod.${number}.startDate`\n      | `businessSchedule.specialHourPeriod.${number}.endDate`\n      | `businessSchedule.specialHourPeriod.${number}.isClosed`\n      | `businessSchedule.specialHourPeriod.${number}.comment`\n      | `archived`\n      | `locationTypes`,\n      5\n    > & {\n      __applicationErrorsType?: CreateLocationApplicationErrors;\n    }\n  >;\n}\n\n/** @internal */\nexport function bulkCreateLocation(\n  httpClient: HttpClient\n): BulkCreateLocationSignature {\n  return (locations: Location[]) =>\n    universalBulkCreateLocation(\n      locations,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkCreateLocationSignature {\n  /**\n   * Creates locations in bulk.\n   * @param - Locations to create.\n   */\n  (locations: Location[]): Promise<\n    NonNullablePaths<\n      BulkCreateLocationResponse,\n      | `successfulLocations`\n      | `successfulLocations.${number}.name`\n      | `successfulLocations.${number}.default`\n      | `successfulLocations.${number}.status`\n      | `successfulLocations.${number}.locationType`\n      | `successfulLocations.${number}.address.streetAddress.number`\n      | `successfulLocations.${number}.address.streetAddress.name`\n      | `successfulLocations.${number}.address.streetAddress.apt`\n      | `successfulLocations.${number}.archived`\n      | `failedLocations`\n      | `failedLocations.${number}.location.name`\n      | `failedLocations.${number}.location.default`\n      | `failedLocations.${number}.location.status`\n      | `failedLocations.${number}.location.locationType`\n      | `failedLocations.${number}.location.archived`\n      | `failedLocations.${number}.errorMessage`,\n      6\n    >\n  >;\n}\n\nexport function getLocation(httpClient: HttpClient): GetLocationSignature {\n  return (_id: string) =>\n    universalGetLocation(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetLocationSignature {\n  /**\n   * Retrieves a location.\n   * @param - ID of the location to retrieve.\n   * @returns Retrieved location.\n   */\n  (_id: string): Promise<\n    NonNullablePaths<\n      Location,\n      | `name`\n      | `default`\n      | `status`\n      | `locationType`\n      | `address.streetAddress.number`\n      | `address.streetAddress.name`\n      | `address.streetAddress.apt`\n      | `businessSchedule.periods`\n      | `businessSchedule.periods.${number}.openDay`\n      | `businessSchedule.periods.${number}.openTime`\n      | `businessSchedule.periods.${number}.closeDay`\n      | `businessSchedule.periods.${number}.closeTime`\n      | `businessSchedule.specialHourPeriod`\n      | `businessSchedule.specialHourPeriod.${number}.startDate`\n      | `businessSchedule.specialHourPeriod.${number}.endDate`\n      | `businessSchedule.specialHourPeriod.${number}.isClosed`\n      | `businessSchedule.specialHourPeriod.${number}.comment`\n      | `archived`\n      | `locationTypes`,\n      5\n    >\n  >;\n}\n\nexport function listLocations(httpClient: HttpClient): ListLocationsSignature {\n  return (options?: ListLocationsOptions) =>\n    universalListLocations(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ListLocationsSignature {\n  /**\n   * Retrieves locations, given the specified filters, sorting, and paging.\n   * @param - Options to use when retrieving a list of locations.\n   */\n  (options?: ListLocationsOptions): Promise<\n    NonNullablePaths<\n      ListLocationsResponse,\n      | `locations`\n      | `locations.${number}.name`\n      | `locations.${number}.default`\n      | `locations.${number}.status`\n      | `locations.${number}.locationType`\n      | `locations.${number}.address.streetAddress.number`\n      | `locations.${number}.address.streetAddress.name`\n      | `locations.${number}.address.streetAddress.apt`\n      | `locations.${number}.archived`\n      | `authorizedLocationEntities`,\n      6\n    >\n  >;\n}\n\nexport function updateLocation(\n  httpClient: HttpClient\n): UpdateLocationSignature {\n  return (\n    _id: string,\n    location: NonNullablePaths<\n      UpdateLocation,\n      `address` | `name` | `timeZone`,\n      2\n    >\n  ) =>\n    universalUpdateLocation(\n      _id,\n      location,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateLocationSignature {\n  /**\n   * Overrides an existing location.\n   *\n   *\n   * > **Note:** Currently, it isn't possible to partially update a location. Therefore, you'll need to pass the full location object in the body of the call.\n   * @param - Location ID.\n   * @param - Updated location details.\n   * @returns Updated location.\n   */\n  (\n    _id: string,\n    location: NonNullablePaths<\n      UpdateLocation,\n      `address` | `name` | `timeZone`,\n      2\n    >\n  ): Promise<\n    NonNullablePaths<\n      Location,\n      | `name`\n      | `default`\n      | `status`\n      | `locationType`\n      | `address.streetAddress.number`\n      | `address.streetAddress.name`\n      | `address.streetAddress.apt`\n      | `businessSchedule.periods`\n      | `businessSchedule.periods.${number}.openDay`\n      | `businessSchedule.periods.${number}.openTime`\n      | `businessSchedule.periods.${number}.closeDay`\n      | `businessSchedule.periods.${number}.closeTime`\n      | `businessSchedule.specialHourPeriod`\n      | `businessSchedule.specialHourPeriod.${number}.startDate`\n      | `businessSchedule.specialHourPeriod.${number}.endDate`\n      | `businessSchedule.specialHourPeriod.${number}.isClosed`\n      | `businessSchedule.specialHourPeriod.${number}.comment`\n      | `archived`\n      | `locationTypes`,\n      5\n    > & {\n      __applicationErrorsType?: UpdateLocationApplicationErrors;\n    }\n  >;\n}\n\nexport function queryLocations(\n  httpClient: HttpClient\n): QueryLocationsSignature {\n  return (options?: QueryLocationsOptions) =>\n    universalQueryLocations(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryLocationsSignature {\n  /**\n   * Creates a query to retrieve a list of locations.\n   *\n   *\n   * The `queryLocations()` function builds a query to retrieve a list of up to 1,000 locations and returns a `LocationsQueryBuilder` object.\n   *\n   * The returned object contains the query definition which is typically used to run the query using the `find()` function.\n   *\n   * You can refine the query by chaining `LocationsQueryBuilder` functions onto the query. `LocationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryLocations()` returns. The functions that are chained to `queryLocations()` are applied in the order they are called.\n   *\n   * `queryLocations()` runs with the following `LocationsQueryBuilder` defaults that you can override:\n   * - `skip`: `0`\n   * - `limit`: `50`\n   *\n   * The following `QueryLocationsBuilder` functions are supported for the `queryLocations()` function. For a full description of the Locations object, see the object returned for the `items` property in `LocationsQueryResult`.\n   * @param - Options to use when querying locations.\n   */\n  (options?: QueryLocationsOptions): LocationsQueryBuilder;\n}\n\nexport function typedQueryLocations(\n  httpClient: HttpClient\n): TypedQueryLocationsSignature {\n  return (query: LocationQuery, options?: QueryLocationsOptions) =>\n    universalTypedQueryLocations(\n      query,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface TypedQueryLocationsSignature {\n  /** */\n  (query: LocationQuery, options?: QueryLocationsOptions): Promise<\n    NonNullablePaths<\n      QueryLocationsResponse,\n      | `locations`\n      | `locations.${number}.name`\n      | `locations.${number}.default`\n      | `locations.${number}.status`\n      | `locations.${number}.locationType`\n      | `locations.${number}.address.streetAddress.number`\n      | `locations.${number}.address.streetAddress.name`\n      | `locations.${number}.address.streetAddress.apt`\n      | `locations.${number}.archived`\n      | `authorizedLocationEntities`,\n      6\n    >\n  >;\n}\n\nexport function setDefaultLocation(\n  httpClient: HttpClient\n): SetDefaultLocationSignature {\n  return (_id: string) =>\n    universalSetDefaultLocation(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface SetDefaultLocationSignature {\n  /**\n   * Sets a new default location.\n   *\n   *\n   * > **Notes:**\n   * > + There can only be one default location per site.\n   * > + The default location can't be archived.\n   * @param - ID of the location to set as the default location.\n   */\n  (_id: string): Promise<\n    NonNullablePaths<\n      SetDefaultLocationResponse,\n      | `location.name`\n      | `location.default`\n      | `location.status`\n      | `location.locationType`\n      | `location.address.streetAddress.number`\n      | `location.address.streetAddress.name`\n      | `location.address.streetAddress.apt`\n      | `location.businessSchedule.periods`\n      | `location.businessSchedule.periods.${number}.openDay`\n      | `location.businessSchedule.periods.${number}.openTime`\n      | `location.businessSchedule.periods.${number}.closeDay`\n      | `location.businessSchedule.periods.${number}.closeTime`\n      | `location.businessSchedule.specialHourPeriod`\n      | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n      | `location.businessSchedule.specialHourPeriod.${number}.comment`\n      | `location.archived`\n      | `location.locationTypes`,\n      6\n    > & {\n      __applicationErrorsType?: SetDefaultLocationApplicationErrors;\n    }\n  >;\n}\n\nexport function archiveLocation(\n  httpClient: HttpClient\n): ArchiveLocationSignature {\n  return (_id: string) =>\n    universalArchiveLocation(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ArchiveLocationSignature {\n  /**\n   * Archives a location.\n   *\n   *\n   * > **Notes:**\n   * > + Changes the `archived` boolean of a location to `true`.\n   * > + You can't change a location's `status` using this endpoint.\n   * > + Archived locations can't be updated.\n   * > + The `default` location can't be archived.\n   * @param - ID of the location to archive.\n   */\n  (_id: string): Promise<\n    NonNullablePaths<\n      ArchiveLocationResponse,\n      | `location.name`\n      | `location.default`\n      | `location.status`\n      | `location.locationType`\n      | `location.address.streetAddress.number`\n      | `location.address.streetAddress.name`\n      | `location.address.streetAddress.apt`\n      | `location.businessSchedule.periods`\n      | `location.businessSchedule.periods.${number}.openDay`\n      | `location.businessSchedule.periods.${number}.openTime`\n      | `location.businessSchedule.periods.${number}.closeDay`\n      | `location.businessSchedule.periods.${number}.closeTime`\n      | `location.businessSchedule.specialHourPeriod`\n      | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n      | `location.businessSchedule.specialHourPeriod.${number}.comment`\n      | `location.archived`\n      | `location.locationTypes`,\n      6\n    > & {\n      __applicationErrorsType?: ArchiveLocationApplicationErrors;\n    }\n  >;\n}\n\nexport function addTypeToLocation(\n  httpClient: HttpClient\n): AddTypeToLocationSignature {\n  return (_id: string, locationType: LocationTypeWithLiterals) =>\n    universalAddTypeToLocation(\n      _id,\n      locationType,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface AddTypeToLocationSignature {\n  /**\n   * Adds a location type to the specified location.\n   * @param - ID of the location where the type will be added.\n   * @param - Location type to add.\n   */\n  (_id: string, locationType: LocationTypeWithLiterals): Promise<\n    NonNullablePaths<\n      AddTypeToLocationResponse,\n      | `location.name`\n      | `location.default`\n      | `location.status`\n      | `location.locationType`\n      | `location.address.streetAddress.number`\n      | `location.address.streetAddress.name`\n      | `location.address.streetAddress.apt`\n      | `location.businessSchedule.periods`\n      | `location.businessSchedule.periods.${number}.openDay`\n      | `location.businessSchedule.periods.${number}.openTime`\n      | `location.businessSchedule.periods.${number}.closeDay`\n      | `location.businessSchedule.periods.${number}.closeTime`\n      | `location.businessSchedule.specialHourPeriod`\n      | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n      | `location.businessSchedule.specialHourPeriod.${number}.comment`\n      | `location.archived`\n      | `location.locationTypes`,\n      6\n    > & {\n      __applicationErrorsType?: AddTypeToLocationApplicationErrors;\n    }\n  >;\n}\n\nexport function removeTypeFromLocation(\n  httpClient: HttpClient\n): RemoveTypeFromLocationSignature {\n  return (_id: string, locationType: LocationTypeWithLiterals) =>\n    universalRemoveTypeFromLocation(\n      _id,\n      locationType,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface RemoveTypeFromLocationSignature {\n  /**\n   * Removes a location type from the specified location.\n   * @param - ID of the location where the type will be removed.\n   * @param - Location type to remove.\n   */\n  (_id: string, locationType: LocationTypeWithLiterals): Promise<\n    NonNullablePaths<\n      RemoveTypeFromLocationResponse,\n      | `location.name`\n      | `location.default`\n      | `location.status`\n      | `location.locationType`\n      | `location.address.streetAddress.number`\n      | `location.address.streetAddress.name`\n      | `location.address.streetAddress.apt`\n      | `location.businessSchedule.periods`\n      | `location.businessSchedule.periods.${number}.openDay`\n      | `location.businessSchedule.periods.${number}.openTime`\n      | `location.businessSchedule.periods.${number}.closeDay`\n      | `location.businessSchedule.periods.${number}.closeTime`\n      | `location.businessSchedule.specialHourPeriod`\n      | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n      | `location.businessSchedule.specialHourPeriod.${number}.comment`\n      | `location.archived`\n      | `location.locationTypes`,\n      6\n    > & {\n      __applicationErrorsType?: RemoveTypeFromLocationApplicationErrors;\n    }\n  >;\n}\n\nexport function addLocationType(\n  httpClient: HttpClient\n): AddLocationTypeSignature {\n  return (_id: string, locationType: LocationTypeWithLiterals) =>\n    universalAddLocationType(\n      _id,\n      locationType,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface AddLocationTypeSignature {\n  /**\n   * Add location type to a specific location.\n   *\n   * > **Notes:**\n   * > + Add one the location type (UNKNOWN, BRANCH, OFFICES, RECEPTION, HEADQUARTERS, INVENTORY) to a specific location by id.\n   * > + This EP is deprecated - Please use AddTypeFromLocation instead.\n   * @param - Location id to add type\n   * @deprecated\n   */\n  (_id: string, locationType: LocationTypeWithLiterals): Promise<\n    NonNullablePaths<\n      AddLocationTypeResponse,\n      | `location.name`\n      | `location.default`\n      | `location.status`\n      | `location.locationType`\n      | `location.address.streetAddress.number`\n      | `location.address.streetAddress.name`\n      | `location.address.streetAddress.apt`\n      | `location.businessSchedule.periods`\n      | `location.businessSchedule.periods.${number}.openDay`\n      | `location.businessSchedule.periods.${number}.openTime`\n      | `location.businessSchedule.periods.${number}.closeDay`\n      | `location.businessSchedule.periods.${number}.closeTime`\n      | `location.businessSchedule.specialHourPeriod`\n      | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n      | `location.businessSchedule.specialHourPeriod.${number}.comment`\n      | `location.archived`\n      | `location.locationTypes`,\n      6\n    > & {\n      __applicationErrorsType?: AddLocationTypeApplicationErrors;\n    }\n  >;\n}\n\nexport function removeLocationType(\n  httpClient: HttpClient\n): RemoveLocationTypeSignature {\n  return (_id: string, locationType: LocationTypeWithLiterals) =>\n    universalRemoveLocationType(\n      _id,\n      locationType,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface RemoveLocationTypeSignature {\n  /**\n   * Remove location type from a specific location.\n   *\n   * > **Notes:**\n   * > + Remove location type (UNKNOWN, BRANCH, OFFICES, RECEPTION, HEADQUARTERS, INVENTORY) from a specific location by id.\n   * > + This EP is deprecated - Please use RemoveTypeFromLocation instead.\n   * @param - Location id to add type\n   * @deprecated\n   */\n  (_id: string, locationType: LocationTypeWithLiterals): Promise<\n    NonNullablePaths<\n      RemoveLocationTypeResponse,\n      | `location.name`\n      | `location.default`\n      | `location.status`\n      | `location.locationType`\n      | `location.address.streetAddress.number`\n      | `location.address.streetAddress.name`\n      | `location.address.streetAddress.apt`\n      | `location.businessSchedule.periods`\n      | `location.businessSchedule.periods.${number}.openDay`\n      | `location.businessSchedule.periods.${number}.openTime`\n      | `location.businessSchedule.periods.${number}.closeDay`\n      | `location.businessSchedule.periods.${number}.closeTime`\n      | `location.businessSchedule.specialHourPeriod`\n      | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n      | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n      | `location.businessSchedule.specialHourPeriod.${number}.comment`\n      | `location.archived`\n      | `location.locationTypes`,\n      6\n    > & {\n      __applicationErrorsType?: RemoveLocationTypeApplicationErrors;\n    }\n  >;\n}\n\nexport const onLocationArchiveStatus = EventDefinition(\n  'wix.locations.v1.location_archive_status',\n  true,\n  (event: LocationArchiveStatusEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [{ path: 'metadata.eventTime' }],\n        },\n      ])\n    )\n)<LocationArchiveStatusEnvelope>();\nexport const onLocationCreated = EventDefinition(\n  'wix.locations.v1.location_created',\n  true,\n  (event: LocationCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'entity.address' }],\n        },\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [{ path: 'metadata.eventTime' }],\n        },\n      ])\n    )\n)<LocationCreatedEnvelope>();\nexport const onLocationSetDefaultLocation = EventDefinition(\n  'wix.locations.v1.location_set_default_location',\n  true,\n  (event: LocationSetDefaultLocationEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [{ path: 'metadata.eventTime' }],\n        },\n      ])\n    )\n)<LocationSetDefaultLocationEnvelope>();\nexport const onLocationUpdated = EventDefinition(\n  'wix.locations.v1.location_updated',\n  true,\n  (event: LocationUpdatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'entity.address' },\n            { path: 'modifiedFields.address' },\n          ],\n        },\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [{ path: 'metadata.eventTime' }],\n        },\n      ])\n    )\n)<LocationUpdatedEnvelope>();\n\nexport {\n  AccountInfo,\n  AccountInfoMetadata,\n  ActionEvent,\n  AddLocationTypeRequest,\n  AddLocationTypeResponse,\n  AddTypeToLocationRequest,\n  AddTypeToLocationResponse,\n  Address,\n  AddressLocation,\n  ArchiveLocation,\n  ArchiveLocationRequest,\n  ArchiveLocationResponse,\n  BaseEventMetadata,\n  BulkCreateLocationRequest,\n  BulkCreateLocationResponse,\n  BulkUpdateLocationRequest,\n  BulkUpdateLocationResponse,\n  BusinessSchedule,\n  CreateLocationRequest,\n  CreateLocationResponse,\n  DayOfWeek,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  ExtendedFields,\n  FailedCreateLocation,\n  FailedUpdateLocation,\n  GetLocationRequest,\n  GetLocationResponse,\n  GetOrCreateDefaultLocationRequest,\n  GetOrCreateDefaultLocationResponse,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  ListLocationsOptions,\n  ListLocationsRequest,\n  ListLocationsResponse,\n  Location,\n  LocationArchiveStatusEnvelope,\n  LocationCreatedEnvelope,\n  LocationQuerySpec,\n  LocationSetDefaultLocationEnvelope,\n  LocationStatus,\n  LocationType,\n  LocationUpdatedEnvelope,\n  LocationsQueryBuilder,\n  LocationsQueryResult,\n  MessageEnvelope,\n  MetasiteLocationsRequest,\n  MetasiteLocationsResponse,\n  Paging,\n  PagingMetadata,\n  Query,\n  QueryLocationsOptions,\n  QueryLocationsRequest,\n  QueryLocationsResponse,\n  RemoveLocationTypeRequest,\n  RemoveLocationTypeResponse,\n  RemoveTypeFromLocationRequest,\n  RemoveTypeFromLocationResponse,\n  RestoreInfo,\n  SetDefaultLocation,\n  SetDefaultLocationRequest,\n  SetDefaultLocationResponse,\n  SortOrder,\n  Sorting,\n  SpecialHourPeriod,\n  StreetAddress,\n  TimePeriod,\n  UnarchiveLocationRequest,\n  UnarchiveLocationResponse,\n  UpdateLocation,\n  UpdateLocationRequest,\n  UpdateLocationResponse,\n  WebhookIdentityType,\n  utils,\n} from './locations-v1-location-locations.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n  HttpClient,\n  HttpResponse,\n  NonNullablePaths,\n  QuerySpec,\n  Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixLocationsV1Location from './locations-v1-location-locations.http.js';\n// @ts-ignore\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\nexport interface Location {\n  /**\n   * Location ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Location name.\n   * @maxLength 150\n   */\n  name?: string;\n  /**\n   * Location description.\n   * @maxLength 500\n   */\n  description?: string | null;\n  /**\n   * Whether this is the default location. There can only be one default location per site. The default location can't be archived.\n   * @readonly\n   */\n  default?: boolean;\n  /**\n   * Location status. Defaults to `ACTIVE`.\n   * __Notes:__\n   * - [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\n   * doesn't affect the location's status.\n   * - `INACTIVE` status is currently not supported.\n   */\n  status?: LocationStatusWithLiterals;\n  /**\n   * Location type.\n   *\n   * **Note:** Currently not supported.\n   * @deprecated\n   */\n  locationType?: LocationTypeWithLiterals;\n  /** Fax number. */\n  fax?: string | null;\n  /** Timezone in `America/New_York` format. */\n  timeZone?: string | null;\n  /** Email address. */\n  email?: string | null;\n  /** Phone number. */\n  phone?: string | null;\n  /** Address. */\n  address?: Address;\n  /**\n   * Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.\n   *\n   * __Note:__ Not supported by Wix Bookings.\n   */\n  businessSchedule?: BusinessSchedule;\n  /**\n   * Revision number, which increments by 1 each time the location is updated.\n   * To prevent conflicting changes, the existing revision must be used when updating a location.\n   */\n  revision?: string | null;\n  /**\n   * Whether the location is archived. Archived locations can't be updated.\n   * __Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\n   * doesn't affect its `status`.\n   * @readonly\n   */\n  archived?: boolean;\n  /**\n   * Location types.\n   * @maxSize 10\n   */\n  locationTypes?: LocationTypeWithLiterals[];\n  /** Extended fields for data extensions. */\n  extendedFields?: ExtendedFields;\n}\n\n/** For future use */\nexport enum LocationStatus {\n  ACTIVE = 'ACTIVE',\n  INACTIVE = 'INACTIVE',\n}\n\n/** @enumType */\nexport type LocationStatusWithLiterals = LocationStatus | 'ACTIVE' | 'INACTIVE';\n\n/** For future use */\nexport enum LocationType {\n  UNKNOWN = 'UNKNOWN',\n  BRANCH = 'BRANCH',\n  OFFICES = 'OFFICES',\n  RECEPTION = 'RECEPTION',\n  HEADQUARTERS = 'HEADQUARTERS',\n  INVENTORY = 'INVENTORY',\n}\n\n/** @enumType */\nexport type LocationTypeWithLiterals =\n  | LocationType\n  | 'UNKNOWN'\n  | 'BRANCH'\n  | 'OFFICES'\n  | 'RECEPTION'\n  | 'HEADQUARTERS'\n  | 'INVENTORY';\n\nexport interface Address {\n  /**\n   * 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\n   * @format COUNTRY\n   */\n  country?: string | null;\n  /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */\n  subdivision?: string | null;\n  /** City name. */\n  city?: string | null;\n  /**\n   * Postal or zip code.\n   * @maxLength 20\n   */\n  postalCode?: string | null;\n  /** Street address. Includes street name, number, and apartment number in separate fields. */\n  streetAddress?: StreetAddress;\n  /** Full address of the location. */\n  formatted?: string | null;\n  /**\n   * Extra information that helps finding the location.\n   * @maxLength 500\n   */\n  hint?: string | null;\n  /** Geographic coordinates of location. */\n  location?: AddressLocation;\n}\n\n/** Street address. Includes street name, number, and apartment number in separate fields. */\nexport interface StreetAddress {\n  /** Street number. */\n  number?: string;\n  /** Street name. */\n  name?: string;\n  /** Apartment number. */\n  apt?: string;\n}\n\n/** Address Geolocation */\nexport interface AddressLocation {\n  /** Latitude of the location. Must be between -90 and 90. */\n  latitude?: number | null;\n  /** Longitude of the location. Must be between -180 and 180. */\n  longitude?: number | null;\n}\n\n/** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */\nexport interface BusinessSchedule {\n  /**\n   * Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods.\n   * @maxSize 100\n   */\n  periods?: TimePeriod[];\n  /**\n   * Exceptions to the business's regular hours. The business can be open or closed during the exception.\n   * @maxSize 100\n   */\n  specialHourPeriod?: SpecialHourPeriod[];\n}\n\n/** Weekly recurring time periods when the business is regularly open or the service is available. */\nexport interface TimePeriod {\n  /** Day of the week the period starts on. */\n  openDay?: DayOfWeekWithLiterals;\n  /**\n   * Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\n   * midnight at the end of the specified day.\n   */\n  openTime?: string;\n  /** Day of the week the period ends on. */\n  closeDay?: DayOfWeekWithLiterals;\n  /**\n   * Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\n   * midnight at the end of the specified day.\n   *\n   * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.\n   */\n  closeTime?: string;\n}\n\n/** Enumerates the days of the week. */\nexport enum DayOfWeek {\n  MONDAY = 'MONDAY',\n  TUESDAY = 'TUESDAY',\n  WEDNESDAY = 'WEDNESDAY',\n  THURSDAY = 'THURSDAY',\n  FRIDAY = 'FRIDAY',\n  SATURDAY = 'SATURDAY',\n  SUNDAY = 'SUNDAY',\n}\n\n/** @enumType */\nexport type DayOfWeekWithLiterals =\n  | DayOfWeek\n  | 'MONDAY'\n  | 'TUESDAY'\n  | 'WEDNESDAY'\n  | 'THURSDAY'\n  | 'FRIDAY'\n  | 'SATURDAY'\n  | 'SUNDAY';\n\n/** Exception to the business's regular hours. The business can be open or closed during the exception. */\nexport interface SpecialHourPeriod {\n  /** Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */\n  startDate?: string;\n  /** End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */\n  endDate?: string;\n  /**\n   * Whether the business is closed (or the service is not available) during the exception.\n   *\n   * Default: `true`.\n   */\n  isClosed?: boolean;\n  /** Additional info about the exception. For example, \"We close earlier on New Year's Eve.\" */\n  comment?: string;\n}\n\nexport interface ExtendedFields {\n  /**\n   * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n   * The value of each key is structured according to the schema defined when the extended fields were configured.\n   *\n   * You can only access fields for which you have the appropriate permissions.\n   *\n   * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n   */\n  namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface CreateLocationRequest {\n  /** Location to create. */\n  location: Location;\n}\n\nexport interface CreateLocationResponse {\n  /** Created location. */\n  location?: Location;\n}\n\nexport interface BulkCreateLocationRequest {\n  /**\n   * Locations to create.\n   * @minSize 1\n   * @maxSize 10\n   */\n  locations: Location[];\n}\n\nexport interface BulkCreateLocationResponse {\n  /** Locations that were created. */\n  successfulLocations?: Location[];\n  /** Locations that failed. */\n  failedLocations?: FailedCreateLocation[];\n}\n\nexport interface FailedCreateLocation {\n  /** Location that couldn't be created. */\n  location?: Location;\n  /** Error message. */\n  errorMessage?: string;\n}\n\nexport interface GetLocationRequest {\n  /**\n   * ID of the location to retrieve.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface GetLocationResponse {\n  /** Retrieved location. */\n  location?: Location;\n  /** True if the requesting entity is permitted to manage the location */\n  locationManagementAuthorized?: boolean;\n}\n\nexport interface ListLocationsRequest {\n  /** Sort order. */\n  sort?: Sorting;\n  /**\n   * Pagination.\n   *\n   * Default values:\n   * `offset`: 0\n   * `limit`: 50 (Max: 1000)\n   */\n  paging?: Paging;\n  /**\n   * Whether to include `archived` locations in the response.\n   *\n   * Default: `false`\n   */\n  includeArchived?: boolean;\n  /** Whether to filter only authorized locations */\n  filterAuthorizedLocationEntities?: boolean;\n}\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @maxLength 512\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n  /**\n   * Number of items to load.\n   *\n   * Default: `50`\n   *\n   * Max: `1000`\n   */\n  limit?: number | null;\n  /**\n   * Number of items to skip in the current sort order.\n   *\n   * Default: `0`\n   */\n  offset?: number | null;\n}\n\nexport interface ListLocationsResponse {\n  /** Retrieved locations. */\n  locations?: Location[];\n  /** Paging info. */\n  pagingMetadata?: PagingMetadata;\n  /**\n   * Ids of the locations that the requesting entity can manage\n   * @format GUID\n   * @maxSize 100\n   */\n  authorizedLocationEntities?: string[] | null;\n}\n\nexport interface PagingMetadata {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /**\n   * Indicates if there are more results after the current page.\n   * If `true`, another page of results can be retrieved.\n   * If `false`, this is the last page.\n   */\n  hasNext?: boolean | null;\n}\n\nexport interface UpdateLocationRequest {\n  /** Location to update. */\n  location: Location;\n}\n\nexport interface UpdateLocationResponse {\n  /** Updated location. */\n  location?: Location;\n}\n\nexport interface BulkUpdateLocationRequest {\n  /**\n   * Locations to update.\n   * @minSize 1\n   * @maxSize 10\n   */\n  locations?: Location[];\n}\n\nexport interface BulkUpdateLocationResponse {\n  /** Locations that were updated. */\n  successfulLocations?: Location[];\n  /** Locations that failed. */\n  failedLocations?: FailedUpdateLocation[];\n}\n\nexport interface FailedUpdateLocation {\n  /** Location that couldn't be updated. */\n  _id?: string;\n  /** Error message. */\n  errorMessage?: string;\n}\n\nexport interface QueryLocationsRequest {\n  /** Information about the filters, sorting, and paging. */\n  query?: Query;\n  /** Whether to filter only authorized locations */\n  filterAuthorizedLocationEntities?: boolean;\n}\n\nexport interface Query {\n  /**\n   * Filter object in the following format:\n   * `\"filter\" : {\n   * \"fieldName1\": \"value1\",\n   * \"fieldName2\":{\"$operator\":\"value2\"}\n   * }`\n   * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n   */\n  filter?: any;\n  /**\n   * Sort object in the following format:\n   * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n   */\n  sort?: Sorting[];\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n  /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */\n  fields?: string[];\n  /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */\n  fieldsets?: string[];\n}\n\nexport interface QueryLocationsResponse {\n  /** Retrieved locations. */\n  locations?: Location[];\n  /** Paging info. */\n  pagingMetadata?: PagingMetadata;\n  /**\n   * Ids of the locations that the requesting entity can manage\n   * @format GUID\n   * @maxSize 100\n   */\n  authorizedLocationEntities?: string[] | null;\n}\n\nexport interface GetOrCreateDefaultLocationRequest {}\n\nexport interface GetOrCreateDefaultLocationResponse {\n  /** Default location (one that already exists or the one that was created) */\n  location?: Location;\n}\n\nexport interface SetDefaultLocationRequest {\n  /**\n   * ID of the location to set as the default location.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface SetDefaultLocationResponse {\n  /** New default location. */\n  location?: Location;\n}\n\nexport interface SetDefaultLocation {\n  /**\n   * Previous default location id.\n   * @format GUID\n   */\n  prevDefaultLocationId?: string;\n  /**\n   * Current default location id.\n   * @format GUID\n   */\n  currDefaultLocationId?: string;\n}\n\nexport interface ArchiveLocationRequest {\n  /**\n   * ID of the location to archive.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface ArchiveLocationResponse {\n  /** Archived location. */\n  location?: Location;\n}\n\nexport interface ArchiveLocation {\n  /** @format GUID */\n  _id?: string;\n}\n\nexport interface UnarchiveLocationRequest {\n  /**\n   * ID of the location to unarchive.\n   * @format GUID\n   */\n  _id?: string;\n}\n\nexport interface UnarchiveLocationResponse {\n  /** Unarchived location. */\n  location?: Location;\n}\n\nexport interface AddTypeToLocationRequest {\n  /**\n   * ID of the location where the type will be added.\n   * @format GUID\n   */\n  _id: string;\n  /** Location type to add. */\n  locationType: LocationTypeWithLiterals;\n}\n\nexport interface AddTypeToLocationResponse {\n  /** Updated location. */\n  location?: Location;\n}\n\nexport interface RemoveTypeFromLocationRequest {\n  /**\n   * ID of the location where the type will be removed.\n   * @format GUID\n   */\n  _id: string;\n  /** Location type to remove. */\n  locationType: LocationTypeWithLiterals;\n}\n\nexport interface RemoveTypeFromLocationResponse {\n  /** Updated location. */\n  location?: Location;\n}\n\nexport interface MetasiteLocationsRequest {}\n\nexport interface MetasiteLocationsResponse {}\n\nexport interface AddLocationTypeRequest {\n  /**\n   * Location id to add type\n   * @format GUID\n   */\n  _id: string;\n  locationType: LocationTypeWithLiterals;\n}\n\nexport interface AddLocationTypeResponse {\n  /** Full location with the new type */\n  location?: Location;\n}\n\nexport interface RemoveLocationTypeRequest {\n  /**\n   * Location id to add type\n   * @format GUID\n   */\n  _id: string;\n  locationType: LocationTypeWithLiterals;\n}\n\nexport interface RemoveLocationTypeResponse {\n  /** Full location with the new type */\n  location?: Location;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n   * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n   */\n  entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n  entity?: string;\n}\n\nexport interface RestoreInfo {\n  deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n  /**\n   * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n   * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n   * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n   */\n  currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n  body?: string;\n}\n\nexport interface MessageEnvelope {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport enum WebhookIdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n  | WebhookIdentityType\n  | 'UNKNOWN'\n  | 'ANONYMOUS_VISITOR'\n  | 'MEMBER'\n  | 'WIX_USER'\n  | 'APP';\n\nexport interface AccountInfo {\n  /**\n   * ID of the Wix account associated with the event.\n   * @format GUID\n   */\n  accountId?: string | null;\n  /**\n   * ID of the parent Wix account. Only included when accountId belongs to a child account.\n   * @format GUID\n   */\n  parentAccountId?: string | null;\n  /**\n   * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n   * @format GUID\n   */\n  siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreateLocationApplicationErrors = {\n  code?: 'CANNOT_PERFORM_ACTION_ON_ARCHIVED_LOCATION';\n  description?: string;\n  data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type UpdateLocationApplicationErrors =\n  | {\n      code?: 'CANNOT_PERFORM_ACTION_ON_ARCHIVED_LOCATION';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'CANNOT_ARCHIVE_DEFAULT';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'LOCATION_NOT_FOUND';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type SetDefaultLocationApplicationErrors =\n  | {\n      code?: 'CANNOT_PERFORM_ACTION_ON_ARCHIVED_LOCATION';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'DEFAULT_NOT_CHANGED';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type ArchiveLocationApplicationErrors = {\n  code?: 'CANNOT_ARCHIVE_DEFAULT';\n  description?: string;\n  data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type AddTypeToLocationApplicationErrors = {\n  code?: 'CANNOT_UPDATE_LOCATION_TYPES_FOR_LOCATION';\n  description?: string;\n  data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type RemoveTypeFromLocationApplicationErrors = {\n  code?: 'CANNOT_UPDATE_LOCATION_TYPES_FOR_LOCATION';\n  description?: string;\n  data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type AddLocationTypeApplicationErrors = {\n  code?: 'CANNOT_UPDATE_LOCATION_TYPES_FOR_LOCATION';\n  description?: string;\n  data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type RemoveLocationTypeApplicationErrors = {\n  code?: 'CANNOT_UPDATE_LOCATION_TYPES_FOR_LOCATION';\n  description?: string;\n  data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n   * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n   */\n  entityEventSequence?: string | null;\n  accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n  /** ID of the Wix account associated with the event */\n  accountId: string;\n  /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n  siteId?: string;\n  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n  parentAccountId?: string;\n}\n\nexport interface LocationArchiveStatusEnvelope {\n  data: ArchiveLocation;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a location is archived.\n * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\n * @permissionScope Manage Locations\n * @permissionScopeId SCOPE.DC-MULTILOCATION.MANAGE-LOCATIONS\n * @permissionId LOCATIONS.MANAGE\n * @webhook\n * @eventType wix.locations.v1.location_archive_status\n * @serviceIdentifier com.wixpress.locations.LocationsService\n * @slug archive_status\n */\nexport declare function onLocationArchiveStatus(\n  handler: (event: LocationArchiveStatusEnvelope) => void | Promise<void>\n): void;\n\nexport interface LocationCreatedEnvelope {\n  entity: Location;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a location is created.\n * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\n * @permissionScope Manage Locations\n * @permissionScopeId SCOPE.DC-MULTILOCATION.MANAGE-LOCATIONS\n * @permissionId LOCATIONS.MANAGE\n * @webhook\n * @eventType wix.locations.v1.location_created\n * @serviceIdentifier com.wixpress.locations.LocationsService\n * @slug created\n */\nexport declare function onLocationCreated(\n  handler: (event: LocationCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LocationSetDefaultLocationEnvelope {\n  data: SetDefaultLocation;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a location is set as default.\n * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\n * @permissionScope Manage Locations\n * @permissionScopeId SCOPE.DC-MULTILOCATION.MANAGE-LOCATIONS\n * @permissionId LOCATIONS.MANAGE\n * @webhook\n * @eventType wix.locations.v1.location_set_default_location\n * @serviceIdentifier com.wixpress.locations.LocationsService\n * @slug set_default_location\n */\nexport declare function onLocationSetDefaultLocation(\n  handler: (event: LocationSetDefaultLocationEnvelope) => void | Promise<void>\n): void;\n\nexport interface LocationUpdatedEnvelope {\n  entity: Location;\n  metadata: EventMetadata;\n  /** @hidden */\n  modifiedFields: Record<string, any>;\n}\n\n/** @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\n * @permissionScope Manage Locations\n * @permissionScopeId SCOPE.DC-MULTILOCATION.MANAGE-LOCATIONS\n * @permissionId LOCATIONS.MANAGE\n * @webhook\n * @eventType wix.locations.v1.location_updated\n * @slug updated\n */\nexport declare function onLocationUpdated(\n  handler: (event: LocationUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a location.\n * @param location - Location to create.\n * @public\n * @requiredField location\n * @requiredField location.address\n * @requiredField location.name\n * @requiredField location.timeZone\n * @permissionId LOCATIONS.MANAGE\n * @applicableIdentity APP\n * @returns Created location.\n * @fqn com.wixpress.locations.LocationsService.CreateLocation\n */\nexport async function createLocation(\n  location: NonNullablePaths<Location, `address` | `name` | `timeZone`, 2>\n): Promise<\n  NonNullablePaths<\n    Location,\n    | `name`\n    | `default`\n    | `status`\n    | `locationType`\n    | `address.streetAddress.number`\n    | `address.streetAddress.name`\n    | `address.streetAddress.apt`\n    | `businessSchedule.periods`\n    | `businessSchedule.periods.${number}.openDay`\n    | `businessSchedule.periods.${number}.openTime`\n    | `businessSchedule.periods.${number}.closeDay`\n    | `businessSchedule.periods.${number}.closeTime`\n    | `businessSchedule.specialHourPeriod`\n    | `businessSchedule.specialHourPeriod.${number}.startDate`\n    | `businessSchedule.specialHourPeriod.${number}.endDate`\n    | `businessSchedule.specialHourPeriod.${number}.isClosed`\n    | `businessSchedule.specialHourPeriod.${number}.comment`\n    | `archived`\n    | `locationTypes`,\n    5\n  > & {\n    __applicationErrorsType?: CreateLocationApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({ location: location }),\n    [\n      {\n        transformFn: transformSDKAddressToRESTAddress,\n        paths: [{ path: 'location.address' }],\n      },\n    ]\n  );\n\n  const reqOpts = ambassadorWixLocationsV1Location.createLocation(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'location.address' }],\n        },\n      ])\n    )?.location!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { location: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['location']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Creates locations in bulk.\n * @param locations - Locations to create.\n * @internal\n * @documentationMaturity preview\n * @requiredField locations\n * @permissionId LOCATIONS.MANAGE\n * @applicableIdentity APP\n * @fqn com.wixpress.locations.LocationsService.BulkCreateLocation\n */\nexport async function bulkCreateLocation(\n  locations: Location[]\n): Promise<\n  NonNullablePaths<\n    BulkCreateLocationResponse,\n    | `successfulLocations`\n    | `successfulLocations.${number}.name`\n    | `successfulLocations.${number}.default`\n    | `successfulLocations.${number}.status`\n    | `successfulLocations.${number}.locationType`\n    | `successfulLocations.${number}.address.streetAddress.number`\n    | `successfulLocations.${number}.address.streetAddress.name`\n    | `successfulLocations.${number}.address.streetAddress.apt`\n    | `successfulLocations.${number}.archived`\n    | `failedLocations`\n    | `failedLocations.${number}.location.name`\n    | `failedLocations.${number}.location.default`\n    | `failedLocations.${number}.location.status`\n    | `failedLocations.${number}.location.locationType`\n    | `failedLocations.${number}.location.archived`\n    | `failedLocations.${number}.errorMessage`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({ locations: locations }),\n    [\n      {\n        transformFn: transformSDKAddressToRESTAddress,\n        paths: [{ path: 'locations.address' }],\n      },\n    ]\n  );\n\n  const reqOpts = ambassadorWixLocationsV1Location.bulkCreateLocation(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [\n            { path: 'successfulLocations.address' },\n            { path: 'failedLocations.location.address' },\n          ],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { locations: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['locations']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a location.\n * @param _id - ID of the location to retrieve.\n * @public\n * @requiredField _id\n * @permissionId LOCATIONS.READ\n * @applicableIdentity APP\n * @returns Retrieved location.\n * @fqn com.wixpress.locations.LocationsService.GetLocation\n */\nexport async function getLocation(\n  _id: string\n): Promise<\n  NonNullablePaths<\n    Location,\n    | `name`\n    | `default`\n    | `status`\n    | `locationType`\n    | `address.streetAddress.number`\n    | `address.streetAddress.name`\n    | `address.streetAddress.apt`\n    | `businessSchedule.periods`\n    | `businessSchedule.periods.${number}.openDay`\n    | `businessSchedule.periods.${number}.openTime`\n    | `businessSchedule.periods.${number}.closeDay`\n    | `businessSchedule.periods.${number}.closeTime`\n    | `businessSchedule.specialHourPeriod`\n    | `businessSchedule.specialHourPeriod.${number}.startDate`\n    | `businessSchedule.specialHourPeriod.${number}.endDate`\n    | `businessSchedule.specialHourPeriod.${number}.isClosed`\n    | `businessSchedule.specialHourPeriod.${number}.comment`\n    | `archived`\n    | `locationTypes`,\n    5\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixLocationsV1Location.getLocation(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'location.address' }],\n        },\n      ])\n    )?.location!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves locations, given the specified filters, sorting, and paging.\n * @public\n * @param options - Options to use when retrieving a list of locations.\n * @permissionId LOCATIONS.READ\n * @applicableIdentity APP\n * @fqn com.wixpress.locations.LocationsService.ListLocations\n */\nexport async function listLocations(\n  options?: ListLocationsOptions\n): Promise<\n  NonNullablePaths<\n    ListLocationsResponse,\n    | `locations`\n    | `locations.${number}.name`\n    | `locations.${number}.default`\n    | `locations.${number}.status`\n    | `locations.${number}.locationType`\n    | `locations.${number}.address.streetAddress.number`\n    | `locations.${number}.address.streetAddress.name`\n    | `locations.${number}.address.streetAddress.apt`\n    | `locations.${number}.archived`\n    | `authorizedLocationEntities`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    sort: options?.sort,\n    paging: options?.paging,\n    includeArchived: options?.includeArchived,\n    filterAuthorizedLocationEntities: options?.filterAuthorizedLocationEntities,\n  });\n\n  const reqOpts = ambassadorWixLocationsV1Location.listLocations(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'locations.address' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          sort: '$[0].sort',\n          paging: '$[0].paging',\n          includeArchived: '$[0].includeArchived',\n          filterAuthorizedLocationEntities:\n            '$[0].filterAuthorizedLocationEntities',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ListLocationsOptions {\n  /** Sort order. */\n  sort?: Sorting;\n  /**\n   * Pagination.\n   *\n   * Default values:\n   * `offset`: 0\n   * `limit`: 50 (Max: 1000)\n   */\n  paging?: Paging;\n  /**\n   * Whether to include `archived` locations in the response.\n   *\n   * Default: `false`\n   */\n  includeArchived?: boolean;\n  /** Whether to filter only authorized locations */\n  filterAuthorizedLocationEntities?: boolean;\n}\n\n/**\n * Overrides an existing location.\n *\n *\n * > **Note:** Currently, it isn't possible to partially update a location. Therefore, you'll need to pass the full location object in the body of the call.\n * @param _id - Location ID.\n * @public\n * @requiredField _id\n * @requiredField location\n * @requiredField location.address\n * @requiredField location.name\n * @requiredField location.timeZone\n * @param location - Updated location details.\n * @permissionId LOCATIONS.MANAGE\n * @applicableIdentity APP\n * @returns Updated location.\n * @fqn com.wixpress.locations.LocationsService.UpdateLocation\n */\nexport async function updateLocation(\n  _id: string,\n  location: NonNullablePaths<UpdateLocation, `address` | `name` | `timeZone`, 2>\n): Promise<\n  NonNullablePaths<\n    Location,\n    | `name`\n    | `default`\n    | `status`\n    | `locationType`\n    | `address.streetAddress.number`\n    | `address.streetAddress.name`\n    | `address.streetAddress.apt`\n    | `businessSchedule.periods`\n    | `businessSchedule.periods.${number}.openDay`\n    | `businessSchedule.periods.${number}.openTime`\n    | `businessSchedule.periods.${number}.closeDay`\n    | `businessSchedule.periods.${number}.closeTime`\n    | `businessSchedule.specialHourPeriod`\n    | `businessSchedule.specialHourPeriod.${number}.startDate`\n    | `businessSchedule.specialHourPeriod.${number}.endDate`\n    | `businessSchedule.specialHourPeriod.${number}.isClosed`\n    | `businessSchedule.specialHourPeriod.${number}.comment`\n    | `archived`\n    | `locationTypes`,\n    5\n  > & {\n    __applicationErrorsType?: UpdateLocationApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({\n      location: { ...location, id: _id },\n    }),\n    [\n      {\n        transformFn: transformSDKAddressToRESTAddress,\n        paths: [{ path: 'location.address' }],\n      },\n    ]\n  );\n\n  const reqOpts = ambassadorWixLocationsV1Location.updateLocation(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'location.address' }],\n        },\n      ])\n    )?.location!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { location: '$[1]' },\n        explicitPathsToArguments: { 'location.id': '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'location']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateLocation {\n  /**\n   * Location ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Location name.\n   * @maxLength 150\n   */\n  name?: string;\n  /**\n   * Location description.\n   * @maxLength 500\n   */\n  description?: string | null;\n  /**\n   * Whether this is the default location. There can only be one default location per site. The default location can't be archived.\n   * @readonly\n   */\n  default?: boolean;\n  /**\n   * Location status. Defaults to `ACTIVE`.\n   * __Notes:__\n   * - [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\n   * doesn't affect the location's status.\n   * - `INACTIVE` status is currently not supported.\n   */\n  status?: LocationStatusWithLiterals;\n  /**\n   * Location type.\n   *\n   * **Note:** Currently not supported.\n   * @deprecated\n   */\n  locationType?: LocationTypeWithLiterals;\n  /** Fax number. */\n  fax?: string | null;\n  /** Timezone in `America/New_York` format. */\n  timeZone?: string | null;\n  /** Email address. */\n  email?: string | null;\n  /** Phone number. */\n  phone?: string | null;\n  /** Address. */\n  address?: Address;\n  /**\n   * Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.\n   *\n   * __Note:__ Not supported by Wix Bookings.\n   */\n  businessSchedule?: BusinessSchedule;\n  /**\n   * Revision number, which increments by 1 each time the location is updated.\n   * To prevent conflicting changes, the existing revision must be used when updating a location.\n   */\n  revision?: string | null;\n  /**\n   * Whether the location is archived. Archived locations can't be updated.\n   * __Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\n   * doesn't affect its `status`.\n   * @readonly\n   */\n  archived?: boolean;\n  /**\n   * Location types.\n   * @maxSize 10\n   */\n  locationTypes?: LocationTypeWithLiterals[];\n  /** Extended fields for data extensions. */\n  extendedFields?: ExtendedFields;\n}\n\n/**\n * Creates a query to retrieve a list of locations.\n *\n *\n * The `queryLocations()` function builds a query to retrieve a list of up to 1,000 locations and returns a `LocationsQueryBuilder` object.\n *\n * The returned object contains the query definition which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `LocationsQueryBuilder` functions onto the query. `LocationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryLocations()` returns. The functions that are chained to `queryLocations()` are applied in the order they are called.\n *\n * `queryLocations()` runs with the following `LocationsQueryBuilder` defaults that you can override:\n * - `skip`: `0`\n * - `limit`: `50`\n *\n * The following `QueryLocationsBuilder` functions are supported for the `queryLocations()` function. For a full description of the Locations object, see the object returned for the `items` property in `LocationsQueryResult`.\n * @public\n * @param options - Options to use when querying locations.\n * @permissionId LOCATIONS.READ\n * @applicableIdentity APP\n * @fqn com.wixpress.locations.LocationsService.QueryLocations\n */\nexport function queryLocations(\n  options?: QueryLocationsOptions\n): LocationsQueryBuilder {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  return queryBuilder<\n    Location,\n    'OFFSET',\n    QueryLocationsRequest,\n    QueryLocationsResponse\n  >({\n    func: async (payload: QueryLocationsRequest) => {\n      const reqOpts = ambassadorWixLocationsV1Location.queryLocations({\n        ...payload,\n        ...(options ?? {}),\n      });\n\n      sideEffects?.onSiteCall?.();\n      try {\n        const result = await httpClient.request(reqOpts);\n        sideEffects?.onSuccess?.(result);\n        return result;\n      } catch (err) {\n        sideEffects?.onError?.(err);\n        throw err;\n      }\n    },\n    requestTransformer: (query: QueryLocationsRequest['query']) => {\n      const args = [query, options] as [\n        QueryLocationsRequest['query'],\n        QueryLocationsOptions\n      ];\n      return renameKeysFromSDKRequestToRESTRequest({\n        ...args?.[1],\n        query: args?.[0],\n      });\n    },\n    responseTransformer: ({ data }: HttpResponse<QueryLocationsResponse>) => {\n      const transformedData = renameKeysFromRESTResponseToSDKResponse(\n        transformPaths(data, [\n          {\n            transformFn: transformRESTAddressToSDKAddress,\n            paths: [{ path: 'locations.address' }],\n          },\n        ])\n      );\n\n      return {\n        items: transformedData?.locations,\n        pagingMetadata: transformedData?.pagingMetadata,\n      };\n    },\n    errorTransformer: (err: unknown) => {\n      const transformedError = sdkTransformError(err, {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      });\n\n      throw transformedError;\n    },\n    pagingMethod: 'OFFSET',\n    transformationPaths: {},\n  });\n}\n\nexport interface QueryLocationsOptions {\n  /** Whether to filter only authorized locations */\n  filterAuthorizedLocationEntities?: boolean | undefined;\n}\n\ninterface QueryOffsetResult {\n  currentPage: number | undefined;\n  totalPages: number | undefined;\n  totalCount: number | undefined;\n  hasNext: () => boolean;\n  hasPrev: () => boolean;\n  length: number;\n  pageSize: number;\n}\n\nexport interface LocationsQueryResult extends QueryOffsetResult {\n  items: Location[];\n  query: LocationsQueryBuilder;\n  next: () => Promise<LocationsQueryResult>;\n  prev: () => Promise<LocationsQueryResult>;\n}\n\nexport interface LocationsQueryBuilder {\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  eq: (\n    propertyName:\n      | '_id'\n      | 'name'\n      | 'description'\n      | 'default'\n      | 'status'\n      | 'locationType'\n      | 'fax'\n      | 'timeZone'\n      | 'email'\n      | 'phone'\n      | 'address.country'\n      | 'address.subdivision'\n      | 'address.city'\n      | 'address.postalCode'\n      | 'address.streetAddress.number'\n      | 'address.streetAddress.name'\n      | 'address.streetAddress.apt'\n      | 'address.formattedAddress'\n      | 'address.hint'\n      | 'address.geocode.latitude'\n      | 'address.geocode.longitude'\n      | 'businessSchedule.periods.openDay'\n      | 'businessSchedule.periods.openTime'\n      | 'businessSchedule.periods.closeDay'\n      | 'businessSchedule.periods.closeTime'\n      | 'businessSchedule.specialHourPeriod.startDate'\n      | 'businessSchedule.specialHourPeriod.endDate'\n      | 'businessSchedule.specialHourPeriod.isClosed'\n      | 'businessSchedule.specialHourPeriod.comment'\n      | 'revision'\n      | 'archived',\n    value: any\n  ) => LocationsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  ne: (\n    propertyName:\n      | '_id'\n      | 'name'\n      | 'description'\n      | 'default'\n      | 'status'\n      | 'locationType'\n      | 'fax'\n      | 'timeZone'\n      | 'email'\n      | 'phone'\n      | 'address.country'\n      | 'address.subdivision'\n      | 'address.city'\n      | 'address.postalCode'\n      | 'address.streetAddress.number'\n      | 'address.streetAddress.name'\n      | 'address.streetAddress.apt'\n      | 'address.formattedAddress'\n      | 'address.hint'\n      | 'address.geocode.latitude'\n      | 'address.geocode.longitude'\n      | 'businessSchedule.periods.openDay'\n      | 'businessSchedule.periods.openTime'\n      | 'businessSchedule.periods.closeDay'\n      | 'businessSchedule.periods.closeTime'\n      | 'businessSchedule.specialHourPeriod.startDate'\n      | 'businessSchedule.specialHourPeriod.endDate'\n      | 'businessSchedule.specialHourPeriod.isClosed'\n      | 'businessSchedule.specialHourPeriod.comment'\n      | 'revision'\n      | 'archived',\n    value: any\n  ) => LocationsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  ge: (\n    propertyName:\n      | '_id'\n      | 'name'\n      | 'description'\n      | 'fax'\n      | 'timeZone'\n      | 'email'\n      | 'phone'\n      | 'address.country'\n      | 'address.subdivision'\n      | 'address.city'\n      | 'address.postalCode'\n      | 'address.streetAddress.number'\n      | 'address.streetAddress.name'\n      | 'address.streetAddress.apt'\n      | 'address.formattedAddress'\n      | 'address.hint'\n      | 'address.geocode.latitude'\n      | 'address.geocode.longitude'\n      | 'businessSchedule.periods.openTime'\n      | 'businessSchedule.periods.closeTime'\n      | 'businessSchedule.specialHourPeriod.startDate'\n      | 'businessSchedule.specialHourPeriod.endDate'\n      | 'businessSchedule.specialHourPeriod.comment'\n      | 'revision',\n    value: any\n  ) => LocationsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  gt: (\n    propertyName:\n      | '_id'\n      | 'name'\n      | 'description'\n      | 'fax'\n      | 'timeZone'\n      | 'email'\n      | 'phone'\n      | 'address.country'\n      | 'address.subdivision'\n      | 'address.city'\n      | 'address.postalCode'\n      | 'address.streetAddress.number'\n      | 'address.streetAddress.name'\n      | 'address.streetAddress.apt'\n      | 'address.formattedAddress'\n      | 'address.hint'\n      | 'address.geocode.latitude'\n      | 'address.geocode.longitude'\n      | 'businessSchedule.periods.openTime'\n      | 'businessSchedule.periods.closeTime'\n      | 'businessSchedule.specialHourPeriod.startDate'\n      | 'businessSchedule.specialHourPeriod.endDate'\n      | 'businessSchedule.specialHourPeriod.comment'\n      | 'revision',\n    value: any\n  ) => LocationsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  le: (\n    propertyName:\n      | '_id'\n      | 'name'\n      | 'description'\n      | 'fax'\n      | 'timeZone'\n      | 'email'\n      | 'phone'\n      | 'address.country'\n      | 'address.subdivision'\n      | 'address.city'\n      | 'address.postalCode'\n      | 'address.streetAddress.number'\n      | 'address.streetAddress.name'\n      | 'address.streetAddress.apt'\n      | 'address.formattedAddress'\n      | 'address.hint'\n      | 'address.geocode.latitude'\n      | 'address.geocode.longitude'\n      | 'businessSchedule.periods.openTime'\n      | 'businessSchedule.periods.closeTime'\n      | 'businessSchedule.specialHourPeriod.startDate'\n      | 'businessSchedule.specialHourPeriod.endDate'\n      | 'businessSchedule.specialHourPeriod.comment'\n      | 'revision',\n    value: any\n  ) => LocationsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  lt: (\n    propertyName:\n      | '_id'\n      | 'name'\n      | 'description'\n      | 'fax'\n      | 'timeZone'\n      | 'email'\n      | 'phone'\n      | 'address.country'\n      | 'address.subdivision'\n      | 'address.city'\n      | 'address.postalCode'\n      | 'address.streetAddress.number'\n      | 'address.streetAddress.name'\n      | 'address.streetAddress.apt'\n      | 'address.formattedAddress'\n      | 'address.hint'\n      | 'address.geocode.latitude'\n      | 'address.geocode.longitude'\n      | 'businessSchedule.periods.openTime'\n      | 'businessSchedule.periods.closeTime'\n      | 'businessSchedule.specialHourPeriod.startDate'\n      | 'businessSchedule.specialHourPeriod.endDate'\n      | 'businessSchedule.specialHourPeriod.comment'\n      | 'revision',\n    value: any\n  ) => LocationsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `string`.\n   * @param string - String to compare against. Case-insensitive.\n   */\n  startsWith: (\n    propertyName:\n      | '_id'\n      | 'name'\n      | 'description'\n      | 'fax'\n      | 'timeZone'\n      | 'email'\n      | 'phone'\n      | 'address.country'\n      | 'address.subdivision'\n      | 'address.city'\n      | 'address.postalCode'\n      | 'address.streetAddress.number'\n      | 'address.streetAddress.name'\n      | 'address.streetAddress.apt'\n      | 'address.formattedAddress'\n      | 'address.hint'\n      | 'businessSchedule.periods.openTime'\n      | 'businessSchedule.periods.closeTime'\n      | 'businessSchedule.specialHourPeriod.startDate'\n      | 'businessSchedule.specialHourPeriod.endDate'\n      | 'businessSchedule.specialHourPeriod.comment',\n    value: string\n  ) => LocationsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `values`.\n   * @param values - List of values to compare against.\n   */\n  hasSome: (\n    propertyName:\n      | '_id'\n      | 'name'\n      | 'description'\n      | 'default'\n      | 'status'\n      | 'locationType'\n      | 'fax'\n      | 'timeZone'\n      | 'email'\n      | 'phone'\n      | 'address.country'\n      | 'address.subdivision'\n      | 'address.city'\n      | 'address.postalCode'\n      | 'address.streetAddress.number'\n      | 'address.streetAddress.name'\n      | 'address.streetAddress.apt'\n      | 'address.formattedAddress'\n      | 'address.hint'\n      | 'address.geocode.latitude'\n      | 'address.geocode.longitude'\n      | 'businessSchedule.periods.openDay'\n      | 'businessSchedule.periods.openTime'\n      | 'businessSchedule.periods.closeDay'\n      | 'businessSchedule.periods.closeTime'\n      | 'businessSchedule.specialHourPeriod.startDate'\n      | 'businessSchedule.specialHourPeriod.endDate'\n      | 'businessSchedule.specialHourPeriod.isClosed'\n      | 'businessSchedule.specialHourPeriod.comment'\n      | 'revision'\n      | 'archived',\n    value: any[]\n  ) => LocationsQueryBuilder;\n  in: (\n    propertyName:\n      | '_id'\n      | 'name'\n      | 'description'\n      | 'default'\n      | 'status'\n      | 'locationType'\n      | 'fax'\n      | 'timeZone'\n      | 'email'\n      | 'phone'\n      | 'address.country'\n      | 'address.subdivision'\n      | 'address.city'\n      | 'address.postalCode'\n      | 'address.streetAddress.number'\n      | 'address.streetAddress.name'\n      | 'address.streetAddress.apt'\n      | 'address.formattedAddress'\n      | 'address.hint'\n      | 'address.geocode.latitude'\n      | 'address.geocode.longitude'\n      | 'businessSchedule.periods.openDay'\n      | 'businessSchedule.periods.openTime'\n      | 'businessSchedule.periods.closeDay'\n      | 'businessSchedule.periods.closeTime'\n      | 'businessSchedule.specialHourPeriod.startDate'\n      | 'businessSchedule.specialHourPeriod.endDate'\n      | 'businessSchedule.specialHourPeriod.isClosed'\n      | 'businessSchedule.specialHourPeriod.comment'\n      | 'revision'\n      | 'archived',\n    value: any\n  ) => LocationsQueryBuilder;\n  exists: (\n    propertyName:\n      | '_id'\n      | 'name'\n      | 'description'\n      | 'default'\n      | 'status'\n      | 'locationType'\n      | 'fax'\n      | 'timeZone'\n      | 'email'\n      | 'phone'\n      | 'address.country'\n      | 'address.subdivision'\n      | 'address.city'\n      | 'address.postalCode'\n      | 'address.streetAddress.number'\n      | 'address.streetAddress.name'\n      | 'address.streetAddress.apt'\n      | 'address.formattedAddress'\n      | 'address.hint'\n      | 'address.geocode.latitude'\n      | 'address.geocode.longitude'\n      | 'businessSchedule.periods.openDay'\n      | 'businessSchedule.periods.openTime'\n      | 'businessSchedule.periods.closeDay'\n      | 'businessSchedule.periods.closeTime'\n      | 'businessSchedule.specialHourPeriod.startDate'\n      | 'businessSchedule.specialHourPeriod.endDate'\n      | 'businessSchedule.specialHourPeriod.isClosed'\n      | 'businessSchedule.specialHourPeriod.comment'\n      | 'revision'\n      | 'archived',\n    value: boolean\n  ) => LocationsQueryBuilder;\n  /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n  limit: (limit: number) => LocationsQueryBuilder;\n  /** @param skip - Number of items to skip in the query results before returning the results. */\n  skip: (skip: number) => LocationsQueryBuilder;\n  find: () => Promise<LocationsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.locations.LocationsService.QueryLocations\n * @requiredField query\n */\nexport async function typedQueryLocations(\n  query: LocationQuery,\n  options?: QueryLocationsOptions\n): Promise<\n  NonNullablePaths<\n    QueryLocationsResponse,\n    | `locations`\n    | `locations.${number}.name`\n    | `locations.${number}.default`\n    | `locations.${number}.status`\n    | `locations.${number}.locationType`\n    | `locations.${number}.address.streetAddress.number`\n    | `locations.${number}.address.streetAddress.name`\n    | `locations.${number}.address.streetAddress.apt`\n    | `locations.${number}.archived`\n    | `authorizedLocationEntities`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    query: query,\n    ...options,\n  });\n\n  const reqOpts = ambassadorWixLocationsV1Location.queryLocations(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'locations.address' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['query', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface LocationQuerySpec extends QuerySpec {\n  paging: 'offset';\n  wql: [\n    {\n      fields: [\n        'businessSchedule.periods.closeDay',\n        'businessSchedule.periods.closeTime',\n        'businessSchedule.periods.openDay',\n        'businessSchedule.periods.openTime',\n        'businessSchedule.specialHourPeriod.comment',\n        'businessSchedule.specialHourPeriod.endDate',\n        'businessSchedule.specialHourPeriod.isClosed',\n        'businessSchedule.specialHourPeriod.startDate'\n      ];\n      operators: ['$hasAll', '$hasSome'];\n      sort: 'NONE';\n    },\n    {\n      fields: [\n        '_id',\n        'address.city',\n        'address.country',\n        'address.formattedAddress',\n        'address.geocode.latitude',\n        'address.geocode.longitude',\n        'address.hint',\n        'address.postalCode',\n        'address.streetAddress.apt',\n        'address.streetAddress.name',\n        'address.streetAddress.number',\n        'address.subdivision',\n        'archived',\n        'default',\n        'description',\n        'email',\n        'fax',\n        'locationType',\n        'name',\n        'phone',\n        'revision',\n        'status',\n        'timeZone'\n      ];\n      operators: '*';\n      sort: 'NONE';\n    }\n  ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n  Location,\n  LocationQuerySpec\n>;\nexport type LocationQuery = {\n  /** \n  Filter object in the following format:\n  `\"filter\" : {\n  \"fieldName1\": \"value1\",\n  \"fieldName2\":{\"$operator\":\"value2\"}\n  }`\n  Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  \n  */\n  filter?: CommonQueryWithEntityContext['filter'];\n  /** \n  Sort object in the following format:\n  `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`  \n  */\n  sort?: {\n    /** \n  Name of the field to sort by. \n  @maxLength: 512 \n  */\n    fieldName?: NonNullable<\n      CommonQueryWithEntityContext['sort']\n    >[number]['fieldName'];\n    /** \n  Sort order.  \n  */\n    order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n  }[];\n  /** \n  Paging options to limit and skip the number of items.  \n  */\n  paging?: {\n    /** \n  Number of items to load.\n\n  Default: `50`\n\n  Max: `1000`  \n  */\n    limit?: NonNullable<CommonQueryWithEntityContext['paging']>['limit'] | null;\n    /** \n  Number of items to skip in the current sort order.\n\n  Default: `0`  \n  */\n    offset?:\n      | NonNullable<CommonQueryWithEntityContext['paging']>['offset']\n      | null;\n  };\n};\n\nexport const utils = {\n  query: {\n    ...createQueryUtils<Location, LocationQuerySpec, LocationQuery>(),\n  },\n};\n\n/**\n * Sets a new default location.\n *\n *\n * > **Notes:**\n * > + There can only be one default location per site.\n * > + The default location can't be archived.\n * @param _id - ID of the location to set as the default location.\n * @public\n * @requiredField _id\n * @permissionId LOCATIONS.MANAGE\n * @applicableIdentity APP\n * @fqn com.wixpress.locations.LocationsService.SetDefaultLocation\n */\nexport async function setDefaultLocation(_id: string): Promise<\n  NonNullablePaths<\n    SetDefaultLocationResponse,\n    | `location.name`\n    | `location.default`\n    | `location.status`\n    | `location.locationType`\n    | `location.address.streetAddress.number`\n    | `location.address.streetAddress.name`\n    | `location.address.streetAddress.apt`\n    | `location.businessSchedule.periods`\n    | `location.businessSchedule.periods.${number}.openDay`\n    | `location.businessSchedule.periods.${number}.openTime`\n    | `location.businessSchedule.periods.${number}.closeDay`\n    | `location.businessSchedule.periods.${number}.closeTime`\n    | `location.businessSchedule.specialHourPeriod`\n    | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n    | `location.businessSchedule.specialHourPeriod.${number}.comment`\n    | `location.archived`\n    | `location.locationTypes`,\n    6\n  > & {\n    __applicationErrorsType?: SetDefaultLocationApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixLocationsV1Location.setDefaultLocation(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'location.address' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Archives a location.\n *\n *\n * > **Notes:**\n * > + Changes the `archived` boolean of a location to `true`.\n * > + You can't change a location's `status` using this endpoint.\n * > + Archived locations can't be updated.\n * > + The `default` location can't be archived.\n * @param _id - ID of the location to archive.\n * @public\n * @requiredField _id\n * @permissionId LOCATIONS.MANAGE\n * @applicableIdentity APP\n * @fqn com.wixpress.locations.LocationsService.ArchiveLocation\n */\nexport async function archiveLocation(_id: string): Promise<\n  NonNullablePaths<\n    ArchiveLocationResponse,\n    | `location.name`\n    | `location.default`\n    | `location.status`\n    | `location.locationType`\n    | `location.address.streetAddress.number`\n    | `location.address.streetAddress.name`\n    | `location.address.streetAddress.apt`\n    | `location.businessSchedule.periods`\n    | `location.businessSchedule.periods.${number}.openDay`\n    | `location.businessSchedule.periods.${number}.openTime`\n    | `location.businessSchedule.periods.${number}.closeDay`\n    | `location.businessSchedule.periods.${number}.closeTime`\n    | `location.businessSchedule.specialHourPeriod`\n    | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n    | `location.businessSchedule.specialHourPeriod.${number}.comment`\n    | `location.archived`\n    | `location.locationTypes`,\n    6\n  > & {\n    __applicationErrorsType?: ArchiveLocationApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixLocationsV1Location.archiveLocation(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'location.address' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Adds a location type to the specified location.\n * @param _id - ID of the location where the type will be added.\n * @param locationType - Location type to add.\n * @public\n * @requiredField _id\n * @requiredField locationType\n * @permissionId LOCATIONS.MANAGE\n * @applicableIdentity APP\n * @fqn com.wixpress.locations.LocationsService.AddTypeToLocation\n */\nexport async function addTypeToLocation(\n  _id: string,\n  locationType: LocationTypeWithLiterals\n): Promise<\n  NonNullablePaths<\n    AddTypeToLocationResponse,\n    | `location.name`\n    | `location.default`\n    | `location.status`\n    | `location.locationType`\n    | `location.address.streetAddress.number`\n    | `location.address.streetAddress.name`\n    | `location.address.streetAddress.apt`\n    | `location.businessSchedule.periods`\n    | `location.businessSchedule.periods.${number}.openDay`\n    | `location.businessSchedule.periods.${number}.openTime`\n    | `location.businessSchedule.periods.${number}.closeDay`\n    | `location.businessSchedule.periods.${number}.closeTime`\n    | `location.businessSchedule.specialHourPeriod`\n    | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n    | `location.businessSchedule.specialHourPeriod.${number}.comment`\n    | `location.archived`\n    | `location.locationTypes`,\n    6\n  > & {\n    __applicationErrorsType?: AddTypeToLocationApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    locationType: locationType,\n  });\n\n  const reqOpts = ambassadorWixLocationsV1Location.addTypeToLocation(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'location.address' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', locationType: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'locationType']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Removes a location type from the specified location.\n * @param _id - ID of the location where the type will be removed.\n * @param locationType - Location type to remove.\n * @public\n * @requiredField _id\n * @requiredField locationType\n * @permissionId LOCATIONS.MANAGE\n * @applicableIdentity APP\n * @fqn com.wixpress.locations.LocationsService.RemoveTypeFromLocation\n */\nexport async function removeTypeFromLocation(\n  _id: string,\n  locationType: LocationTypeWithLiterals\n): Promise<\n  NonNullablePaths<\n    RemoveTypeFromLocationResponse,\n    | `location.name`\n    | `location.default`\n    | `location.status`\n    | `location.locationType`\n    | `location.address.streetAddress.number`\n    | `location.address.streetAddress.name`\n    | `location.address.streetAddress.apt`\n    | `location.businessSchedule.periods`\n    | `location.businessSchedule.periods.${number}.openDay`\n    | `location.businessSchedule.periods.${number}.openTime`\n    | `location.businessSchedule.periods.${number}.closeDay`\n    | `location.businessSchedule.periods.${number}.closeTime`\n    | `location.businessSchedule.specialHourPeriod`\n    | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n    | `location.businessSchedule.specialHourPeriod.${number}.comment`\n    | `location.archived`\n    | `location.locationTypes`,\n    6\n  > & {\n    __applicationErrorsType?: RemoveTypeFromLocationApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    locationType: locationType,\n  });\n\n  const reqOpts =\n    ambassadorWixLocationsV1Location.removeTypeFromLocation(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'location.address' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', locationType: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'locationType']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Add location type to a specific location.\n *\n * > **Notes:**\n * > + Add one the location type (UNKNOWN, BRANCH, OFFICES, RECEPTION, HEADQUARTERS, INVENTORY) to a specific location by id.\n * > + This EP is deprecated - Please use AddTypeFromLocation instead.\n * @param _id - Location id to add type\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField locationType\n * @permissionId LOCATIONS.MANAGE\n * @applicableIdentity APP\n * @fqn com.wixpress.locations.LocationsService.AddLocationType\n * @deprecated\n */\nexport async function addLocationType(\n  _id: string,\n  locationType: LocationTypeWithLiterals\n): Promise<\n  NonNullablePaths<\n    AddLocationTypeResponse,\n    | `location.name`\n    | `location.default`\n    | `location.status`\n    | `location.locationType`\n    | `location.address.streetAddress.number`\n    | `location.address.streetAddress.name`\n    | `location.address.streetAddress.apt`\n    | `location.businessSchedule.periods`\n    | `location.businessSchedule.periods.${number}.openDay`\n    | `location.businessSchedule.periods.${number}.openTime`\n    | `location.businessSchedule.periods.${number}.closeDay`\n    | `location.businessSchedule.periods.${number}.closeTime`\n    | `location.businessSchedule.specialHourPeriod`\n    | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n    | `location.businessSchedule.specialHourPeriod.${number}.comment`\n    | `location.archived`\n    | `location.locationTypes`,\n    6\n  > & {\n    __applicationErrorsType?: AddLocationTypeApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    locationType: locationType,\n  });\n\n  const reqOpts = ambassadorWixLocationsV1Location.addLocationType(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'location.address' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', locationType: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'locationType']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Remove location type from a specific location.\n *\n * > **Notes:**\n * > + Remove location type (UNKNOWN, BRANCH, OFFICES, RECEPTION, HEADQUARTERS, INVENTORY) from a specific location by id.\n * > + This EP is deprecated - Please use RemoveTypeFromLocation instead.\n * @param _id - Location id to add type\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField locationType\n * @permissionId LOCATIONS.MANAGE\n * @applicableIdentity APP\n * @fqn com.wixpress.locations.LocationsService.RemoveLocationType\n * @deprecated\n */\nexport async function removeLocationType(\n  _id: string,\n  locationType: LocationTypeWithLiterals\n): Promise<\n  NonNullablePaths<\n    RemoveLocationTypeResponse,\n    | `location.name`\n    | `location.default`\n    | `location.status`\n    | `location.locationType`\n    | `location.address.streetAddress.number`\n    | `location.address.streetAddress.name`\n    | `location.address.streetAddress.apt`\n    | `location.businessSchedule.periods`\n    | `location.businessSchedule.periods.${number}.openDay`\n    | `location.businessSchedule.periods.${number}.openTime`\n    | `location.businessSchedule.periods.${number}.closeDay`\n    | `location.businessSchedule.periods.${number}.closeTime`\n    | `location.businessSchedule.specialHourPeriod`\n    | `location.businessSchedule.specialHourPeriod.${number}.startDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.endDate`\n    | `location.businessSchedule.specialHourPeriod.${number}.isClosed`\n    | `location.businessSchedule.specialHourPeriod.${number}.comment`\n    | `location.archived`\n    | `location.locationTypes`,\n    6\n  > & {\n    __applicationErrorsType?: RemoveLocationTypeApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    locationType: locationType,\n  });\n\n  const reqOpts = ambassadorWixLocationsV1Location.removeLocationType(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTAddressToSDKAddress,\n          paths: [{ path: 'location.address' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', locationType: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'locationType']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressLocationsLocationsServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/locations-web',\n        destPath: '',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/locations-web',\n        destPath: '',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/locations-web',\n        destPath: '',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/locations/v1/locations',\n        destPath: '/v1/locations',\n      },\n    ],\n    'apps._base_domain_': [\n      {\n        srcPath: '/_api/locations-web',\n        destPath: '',\n      },\n    ],\n    'editor.wixapps.net': [\n      {\n        srcPath: '/_api/locations-web',\n        destPath: '',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/locations/v1/locations',\n        destPath: '/v1/locations',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_business-tools_locations';\n\n/** Creates a location. */\nexport function createLocation(payload: object): RequestOptionsFactory<any> {\n  function __createLocation({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'location.address.geocode.latitude' },\n          { path: 'location.address.geocode.longitude' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'POST' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.CreateLocation',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'location.address.geocode.latitude' },\n              { path: 'location.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createLocation;\n}\n\n/** Creates locations in bulk. */\nexport function bulkCreateLocation(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __bulkCreateLocation({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'locations.address.geocode.latitude' },\n          { path: 'locations.address.geocode.longitude' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'POST' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.BulkCreateLocation',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations/bulk-create',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'successfulLocations.address.geocode.latitude' },\n              { path: 'successfulLocations.address.geocode.longitude' },\n              { path: 'failedLocations.location.address.geocode.latitude' },\n              { path: 'failedLocations.location.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __bulkCreateLocation;\n}\n\n/** Retrieves a location. */\nexport function getLocation(payload: object): RequestOptionsFactory<any> {\n  function __getLocation({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'GET' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.GetLocation',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations/{id}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'location.address.geocode.latitude' },\n              { path: 'location.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getLocation;\n}\n\n/** Retrieves locations, given the specified filters, sorting, and paging. */\nexport function listLocations(payload: object): RequestOptionsFactory<any> {\n  function __listLocations({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'GET' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.ListLocations',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload, true),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'locations.address.geocode.latitude' },\n              { path: 'locations.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __listLocations;\n}\n\n/**\n * Overrides an existing location.\n *\n *\n * > **Note:** Currently, it isn't possible to partially update a location. Therefore, you'll need to pass the full location object in the body of the call.\n */\nexport function updateLocation(payload: object): RequestOptionsFactory<any> {\n  function __updateLocation({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'location.address.geocode.latitude' },\n          { path: 'location.address.geocode.longitude' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'PUT' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.UpdateLocation',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations/{location.id}',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'location.address.geocode.latitude' },\n              { path: 'location.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateLocation;\n}\n\n/**\n * Creates a query to retrieve a list of locations.\n *\n *\n * The `queryLocations()` function builds a query to retrieve a list of up to 1,000 locations and returns a `LocationsQueryBuilder` object.\n *\n * The returned object contains the query definition which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `LocationsQueryBuilder` functions onto the query. `LocationsQueryBuilder` functions enable you to sort, filter, and control the results that `queryLocations()` returns. The functions that are chained to `queryLocations()` are applied in the order they are called.\n *\n * `queryLocations()` runs with the following `LocationsQueryBuilder` defaults that you can override:\n * - `skip`: `0`\n * - `limit`: `50`\n *\n * The following `QueryLocationsBuilder` functions are supported for the `queryLocations()` function. For a full description of the Locations object, see the object returned for the `items` property in `LocationsQueryResult`.\n */\nexport function queryLocations(payload: object): RequestOptionsFactory<any> {\n  function __queryLocations({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'POST' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.QueryLocations',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations/query',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'locations.address.geocode.latitude' },\n              { path: 'locations.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __queryLocations;\n}\n\n/**\n * Sets a new default location.\n *\n *\n * > **Notes:**\n * > + There can only be one default location per site.\n * > + The default location can't be archived.\n */\nexport function setDefaultLocation(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __setDefaultLocation({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'POST' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.SetDefaultLocation',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations/{id}/set-default',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'location.address.geocode.latitude' },\n              { path: 'location.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __setDefaultLocation;\n}\n\n/**\n * Archives a location.\n *\n *\n * > **Notes:**\n * > + Changes the `archived` boolean of a location to `true`.\n * > + You can't change a location's `status` using this endpoint.\n * > + Archived locations can't be updated.\n * > + The `default` location can't be archived.\n */\nexport function archiveLocation(payload: object): RequestOptionsFactory<any> {\n  function __archiveLocation({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'POST' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.ArchiveLocation',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations/{id}/archive',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'location.address.geocode.latitude' },\n              { path: 'location.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __archiveLocation;\n}\n\n/** Adds a location type to the specified location. */\nexport function addTypeToLocation(payload: object): RequestOptionsFactory<any> {\n  function __addTypeToLocation({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'PATCH' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.AddTypeToLocation',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations/{id}/add-type',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'location.address.geocode.latitude' },\n              { path: 'location.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __addTypeToLocation;\n}\n\n/** Removes a location type from the specified location. */\nexport function removeTypeFromLocation(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __removeTypeFromLocation({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'PATCH' as any,\n      methodFqn:\n        'com.wixpress.locations.LocationsService.RemoveTypeFromLocation',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations/{id}/remove-type',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'location.address.geocode.latitude' },\n              { path: 'location.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __removeTypeFromLocation;\n}\n\n/**\n * Add location type to a specific location.\n *\n * > **Notes:**\n * > + Add one the location type (UNKNOWN, BRANCH, OFFICES, RECEPTION, HEADQUARTERS, INVENTORY) to a specific location by id.\n * > + This EP is deprecated - Please use AddTypeFromLocation instead.\n * @deprecated\n */\nexport function addLocationType(payload: object): RequestOptionsFactory<any> {\n  function __addLocationType({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'PATCH' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.AddLocationType',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations/{id}/add-location-type',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'location.address.geocode.latitude' },\n              { path: 'location.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __addLocationType;\n}\n\n/**\n * Remove location type from a specific location.\n *\n * > **Notes:**\n * > + Remove location type (UNKNOWN, BRANCH, OFFICES, RECEPTION, HEADQUARTERS, INVENTORY) from a specific location by id.\n * > + This EP is deprecated - Please use RemoveTypeFromLocation instead.\n * @deprecated\n */\nexport function removeLocationType(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __removeLocationType({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.locations.v1.location',\n      method: 'PATCH' as any,\n      methodFqn: 'com.wixpress.locations.LocationsService.RemoveLocationType',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressLocationsLocationsServiceUrl({\n        protoPath: '/v1/locations/{id}/remove-location-type',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'location.address.geocode.latitude' },\n              { path: 'location.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __removeLocationType;\n}\n","import {\n  createLocation as publicCreateLocation,\n  bulkCreateLocation as publicBulkCreateLocation,\n  getLocation as publicGetLocation,\n  listLocations as publicListLocations,\n  updateLocation as publicUpdateLocation,\n  queryLocations as publicQueryLocations,\n  typedQueryLocations as publicTypedQueryLocations,\n  setDefaultLocation as publicSetDefaultLocation,\n  archiveLocation as publicArchiveLocation,\n  addTypeToLocation as publicAddTypeToLocation,\n  removeTypeFromLocation as publicRemoveTypeFromLocation,\n  addLocationType as publicAddLocationType,\n  removeLocationType as publicRemoveLocationType,\n} from './locations-v1-location-locations.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n  BuildRESTFunction,\n  MaybeContext,\n  BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n  LocationQuery,\n  LocationsQueryBuilder,\n  QueryLocationsOptions,\n  typedQueryLocations as universalTypedQueryLocations,\n} from './locations-v1-location-locations.universal.js';\nimport { onLocationArchiveStatus as publicOnLocationArchiveStatus } from './locations-v1-location-locations.public.js';\nimport { onLocationCreated as publicOnLocationCreated } from './locations-v1-location-locations.public.js';\nimport { onLocationSetDefaultLocation as publicOnLocationSetDefaultLocation } from './locations-v1-location-locations.public.js';\nimport { onLocationUpdated as publicOnLocationUpdated } from './locations-v1-location-locations.public.js';\n\nfunction customQueryLocations(httpClient: HttpClient) {\n  const router = createQueryOverloadRouter({\n    builderQueryFunction: (options?: QueryLocationsOptions) =>\n      publicQueryLocations(httpClient)(options),\n    typedQueryFunction: (\n      query: LocationQuery,\n      options?: QueryLocationsOptions\n    ) => publicTypedQueryLocations(httpClient)(query, options),\n    hasOptionsParameter: true,\n  });\n\n  function overloadedQuery(\n    query: LocationQuery,\n    options?: QueryLocationsOptions\n  ): ReturnType<typeof universalTypedQueryLocations>;\n  function overloadedQuery(\n    options?: QueryLocationsOptions\n  ): LocationsQueryBuilder;\n  function overloadedQuery(\n    queryOrOptions?: LocationQuery | QueryLocationsOptions,\n    options?: QueryLocationsOptions\n  ): any {\n    return router(...arguments);\n  }\n\n  return overloadedQuery;\n}\n\nexport const createLocation: MaybeContext<\n  BuildRESTFunction<typeof publicCreateLocation> & typeof publicCreateLocation\n> = /*#__PURE__*/ createRESTModule(publicCreateLocation);\n/** @internal */\nexport const bulkCreateLocation: MaybeContext<\n  BuildRESTFunction<typeof publicBulkCreateLocation> &\n    typeof publicBulkCreateLocation\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateLocation);\nexport const getLocation: MaybeContext<\n  BuildRESTFunction<typeof publicGetLocation> & typeof publicGetLocation\n> = /*#__PURE__*/ createRESTModule(publicGetLocation);\nexport const listLocations: MaybeContext<\n  BuildRESTFunction<typeof publicListLocations> & typeof publicListLocations\n> = /*#__PURE__*/ createRESTModule(publicListLocations);\nexport const updateLocation: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateLocation> & typeof publicUpdateLocation\n> = /*#__PURE__*/ createRESTModule(publicUpdateLocation);\nexport const setDefaultLocation: MaybeContext<\n  BuildRESTFunction<typeof publicSetDefaultLocation> &\n    typeof publicSetDefaultLocation\n> = /*#__PURE__*/ createRESTModule(publicSetDefaultLocation);\nexport const archiveLocation: MaybeContext<\n  BuildRESTFunction<typeof publicArchiveLocation> & typeof publicArchiveLocation\n> = /*#__PURE__*/ createRESTModule(publicArchiveLocation);\nexport const addTypeToLocation: MaybeContext<\n  BuildRESTFunction<typeof publicAddTypeToLocation> &\n    typeof publicAddTypeToLocation\n> = /*#__PURE__*/ createRESTModule(publicAddTypeToLocation);\nexport const removeTypeFromLocation: MaybeContext<\n  BuildRESTFunction<typeof publicRemoveTypeFromLocation> &\n    typeof publicRemoveTypeFromLocation\n> = /*#__PURE__*/ createRESTModule(publicRemoveTypeFromLocation);\nexport const addLocationType: MaybeContext<\n  BuildRESTFunction<typeof publicAddLocationType> & typeof publicAddLocationType\n> = /*#__PURE__*/ createRESTModule(publicAddLocationType);\nexport const removeLocationType: MaybeContext<\n  BuildRESTFunction<typeof publicRemoveLocationType> &\n    typeof publicRemoveLocationType\n> = /*#__PURE__*/ createRESTModule(publicRemoveLocationType);\nexport const queryLocations: MaybeContext<\n  BuildRESTFunction<typeof customQueryLocations> & typeof customQueryLocations\n> = /*#__PURE__*/ createRESTModule(customQueryLocations);\n/**\n * Triggered when a location is archived.\n */\nexport const onLocationArchiveStatus: BuildEventDefinition<\n  typeof publicOnLocationArchiveStatus\n> &\n  typeof publicOnLocationArchiveStatus = createEventModule(\n  publicOnLocationArchiveStatus\n);\n/**\n * Triggered when a location is created.\n */\nexport const onLocationCreated: BuildEventDefinition<\n  typeof publicOnLocationCreated\n> &\n  typeof publicOnLocationCreated = createEventModule(publicOnLocationCreated);\n/**\n * Triggered when a location is set as default.\n */\nexport const onLocationSetDefaultLocation: BuildEventDefinition<\n  typeof publicOnLocationSetDefaultLocation\n> &\n  typeof publicOnLocationSetDefaultLocation = createEventModule(\n  publicOnLocationSetDefaultLocation\n);\n/** */\nexport const onLocationUpdated: BuildEventDefinition<\n  typeof publicOnLocationUpdated\n> &\n  typeof publicOnLocationUpdated = createEventModule(publicOnLocationUpdated);\n\nexport {\n  LocationStatus,\n  LocationType,\n  DayOfWeek,\n  SortOrder,\n  WebhookIdentityType,\n} from './locations-v1-location-locations.universal.js';\nexport {\n  Location,\n  Address,\n  StreetAddress,\n  AddressLocation,\n  BusinessSchedule,\n  TimePeriod,\n  SpecialHourPeriod,\n  ExtendedFields,\n  CreateLocationRequest,\n  CreateLocationResponse,\n  BulkCreateLocationRequest,\n  BulkCreateLocationResponse,\n  FailedCreateLocation,\n  GetLocationRequest,\n  GetLocationResponse,\n  ListLocationsRequest,\n  Sorting,\n  Paging,\n  ListLocationsResponse,\n  PagingMetadata,\n  UpdateLocationRequest,\n  UpdateLocationResponse,\n  BulkUpdateLocationRequest,\n  BulkUpdateLocationResponse,\n  FailedUpdateLocation,\n  QueryLocationsRequest,\n  Query,\n  QueryLocationsResponse,\n  GetOrCreateDefaultLocationRequest,\n  GetOrCreateDefaultLocationResponse,\n  SetDefaultLocationRequest,\n  SetDefaultLocationResponse,\n  SetDefaultLocation,\n  ArchiveLocationRequest,\n  ArchiveLocationResponse,\n  ArchiveLocation,\n  UnarchiveLocationRequest,\n  UnarchiveLocationResponse,\n  AddTypeToLocationRequest,\n  AddTypeToLocationResponse,\n  RemoveTypeFromLocationRequest,\n  RemoveTypeFromLocationResponse,\n  MetasiteLocationsRequest,\n  MetasiteLocationsResponse,\n  AddLocationTypeRequest,\n  AddLocationTypeResponse,\n  RemoveLocationTypeRequest,\n  RemoveLocationTypeResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  AccountInfo,\n  BaseEventMetadata,\n  EventMetadata,\n  AccountInfoMetadata,\n  LocationArchiveStatusEnvelope,\n  LocationCreatedEnvelope,\n  LocationSetDefaultLocationEnvelope,\n  LocationUpdatedEnvelope,\n  ListLocationsOptions,\n  UpdateLocation,\n  QueryLocationsOptions,\n  LocationsQueryResult,\n  LocationsQueryBuilder,\n  LocationQuerySpec,\n} from './locations-v1-location-locations.universal.js';\nexport { utils } from './locations-v1-location-locations.universal.js';\nexport {\n  LocationStatusWithLiterals,\n  LocationTypeWithLiterals,\n  DayOfWeekWithLiterals,\n  SortOrderWithLiterals,\n  WebhookIdentityTypeWithLiterals,\n  CreateLocationApplicationErrors,\n  UpdateLocationApplicationErrors,\n  SetDefaultLocationApplicationErrors,\n  ArchiveLocationApplicationErrors,\n  AddTypeToLocationApplicationErrors,\n  RemoveTypeFromLocationApplicationErrors,\n  AddLocationTypeApplicationErrors,\n  RemoveLocationTypeApplicationErrors,\n  CommonQueryWithEntityContext,\n  LocationQuery,\n} from './locations-v1-location-locations.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,oCAAAC,yCAAwC;AACjD,SAAS,4CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAqD;;;ACJ9D,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,+CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;A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BAG4B;AAAA,EACvC;AACF;AAIO,IAAMC,qBAGsB,kBAAkB,iBAAuB;AAIrE,IAAMC,gCAGiC;AAAA,EAC5C;AACF;AAEO,IAAMC,qBAGsB,kBAAkB,iBAAuB;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTAddressToSDKAddress","transformPaths","payload","transformPaths","LocationStatus","LocationType","DayOfWeek","SortOrder","WebhookIdentityType","createLocation","bulkCreateLocation","getLocation","listLocations","updateLocation","queryLocations","setDefaultLocation","archiveLocation","addTypeToLocation","removeTypeFromLocation","addLocationType","removeLocationType","createLocation","bulkCreateLocation","getLocation","listLocations","updateLocation","queryLocations","typedQueryLocations","setDefaultLocation","archiveLocation","addTypeToLocation","removeTypeFromLocation","addLocationType","removeLocationType","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTAddressToSDKAddress","queryLocations","typedQueryLocations","createLocation","bulkCreateLocation","getLocation","listLocations","updateLocation","setDefaultLocation","archiveLocation","addTypeToLocation","removeTypeFromLocation","addLocationType","removeLocationType","onLocationArchiveStatus","onLocationCreated","onLocationSetDefaultLocation","onLocationUpdated"]}