{"version":3,"sources":["../../src/atlas-v2-place-places.http.ts","../../src/atlas-v2-place-places.types.ts","../../src/atlas-v2-place-places.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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 resolveComWixpressViAtlasServiceV2PlacesServiceV2Url(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'bo._base_domain_': [\n      {\n        srcPath: '/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'wixbo.ai': [\n      {\n        srcPath: '/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'wix-bo.com': [\n      {\n        srcPath: '/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/api/wix-atlas-service-web',\n        destPath: '',\n      },\n      {\n        srcPath: '/_api/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/wix-atlas-service-web',\n        destPath: '',\n      },\n      {\n        srcPath: '/_api/wix-atlas-service-web',\n        destPath: '',\n      },\n      {\n        srcPath: '/api/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/wix-atlas-service-web',\n        destPath: '',\n      },\n      {\n        srcPath: '/api/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/wix-atlas-service-web',\n        destPath: '',\n      },\n      {\n        srcPath: '/api/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/wix-atlas-service-web',\n        destPath: '',\n      },\n      {\n        srcPath: '/api/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'editor.wixapps.net': [\n      {\n        srcPath: '/api/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    '*.wixforms.com': [\n      {\n        srcPath: '/_api/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'platform.rise.ai': [\n      {\n        srcPath: '/_api/wix-atlas-service-web',\n        destPath: '',\n      },\n      {\n        srcPath: '/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/api/wix-atlas-service-web',\n        destPath: '',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_atlas_places';\n\n/** Once you have a search_id from a autocomplete Search, you can request more details about a particular establishment or point of interest by initiating a get place request. */\nexport function getPlace(payload: object): RequestOptionsFactory<any> {\n  function __getPlace({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.atlas.v2.place',\n      method: 'GET' as any,\n      methodFqn: 'com.wixpress.vi.atlas.service.v2.PlacesServiceV2.GetPlace',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressViAtlasServiceV2PlacesServiceV2Url({\n        protoPath: '/v2/place',\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: 'place.address.geocode.latitude' },\n              { path: 'place.address.geocode.longitude' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getPlace;\n}\n","export interface Place {\n  /** The given place id */\n  placeId?: string;\n  /** The Address object */\n  address?: Address;\n  /** The Place type. For example: airport, library etc... */\n  types?: string[];\n}\n\n/** Physical address */\nexport interface Address extends AddressStreetOneOf {\n  /** Street name and number. */\n  streetAddress?: StreetAddress;\n  /** Main address line, usually street and number as free text. */\n  addressLine?: string | null;\n  /**\n   * Country code.\n   * @format COUNTRY\n   */\n  country?: string | null;\n  /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */\n  subdivision?: string | null;\n  /** City name. */\n  city?: string | null;\n  /** Zip/postal code. */\n  postalCode?: string | null;\n  /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */\n  addressLine2?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n  /** Street name and number. */\n  streetAddress?: StreetAddress;\n  /** Main address line, usually street and number as free text. */\n  addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n  /** Street number. */\n  number?: string;\n  /** Street name. */\n  name?: string;\n}\n\nexport interface AddressLocation {\n  /** Address latitude. */\n  latitude?: number | null;\n  /** Address longitude. */\n  longitude?: number | null;\n}\n\nexport interface Subdivision {\n  /** Short subdivision code. */\n  code?: string;\n  /** Subdivision full name. */\n  name?: string;\n}\n\nexport enum SubdivisionType {\n  UNKNOWN_SUBDIVISION_TYPE = 'UNKNOWN_SUBDIVISION_TYPE',\n  /** State */\n  ADMINISTRATIVE_AREA_LEVEL_1 = 'ADMINISTRATIVE_AREA_LEVEL_1',\n  /** County */\n  ADMINISTRATIVE_AREA_LEVEL_2 = 'ADMINISTRATIVE_AREA_LEVEL_2',\n  /** City/town */\n  ADMINISTRATIVE_AREA_LEVEL_3 = 'ADMINISTRATIVE_AREA_LEVEL_3',\n  /** Neighborhood/quarter */\n  ADMINISTRATIVE_AREA_LEVEL_4 = 'ADMINISTRATIVE_AREA_LEVEL_4',\n  /** Street/block */\n  ADMINISTRATIVE_AREA_LEVEL_5 = 'ADMINISTRATIVE_AREA_LEVEL_5',\n  /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */\n  COUNTRY = 'COUNTRY',\n}\n\n/** @enumType */\nexport type SubdivisionTypeWithLiterals =\n  | SubdivisionType\n  | 'UNKNOWN_SUBDIVISION_TYPE'\n  | 'ADMINISTRATIVE_AREA_LEVEL_1'\n  | 'ADMINISTRATIVE_AREA_LEVEL_2'\n  | 'ADMINISTRATIVE_AREA_LEVEL_3'\n  | 'ADMINISTRATIVE_AREA_LEVEL_4'\n  | 'ADMINISTRATIVE_AREA_LEVEL_5'\n  | 'COUNTRY';\n\nexport interface GetPlaceRequest {\n  searchId: string;\n  /**\n   * A random string which identifies an autocomplete session for billing purposes. The session begins when the user starts typing a query, and concludes when they select a place and a call to Get Place is made. Once a session has concluded, the token is no longer valid. your app must generate a fresh token for each session.\n   * @format GUID\n   */\n  sessionToken?: string | null;\n}\n\nexport interface GetPlaceResponse {\n  place?: Place;\n}\n","import * as ambassadorWixAtlasV2Place from './atlas-v2-place-places.http.js';\nimport * as ambassadorWixAtlasV2PlaceTypes from './atlas-v2-place-places.types.js';\nimport * as ambassadorWixAtlasV2PlaceUniversalTypes from './atlas-v2-place-places.universal.js';\n\nexport type __PublicMethodMetaInfo<\n  K = string,\n  M = unknown,\n  T = unknown,\n  S = unknown,\n  Q = unknown,\n  R = unknown\n> = {\n  getUrl: (context: any) => string;\n  httpMethod: K;\n  path: string;\n  pathParams: M;\n  __requestType: T;\n  __originalRequestType: S;\n  __responseType: Q;\n  __originalResponseType: R;\n};\n\nexport function getPlace(): __PublicMethodMetaInfo<\n  'GET',\n  {},\n  ambassadorWixAtlasV2PlaceUniversalTypes.GetPlaceRequest,\n  ambassadorWixAtlasV2PlaceTypes.GetPlaceRequest,\n  ambassadorWixAtlasV2PlaceUniversalTypes.GetPlaceResponse,\n  ambassadorWixAtlasV2PlaceTypes.GetPlaceResponse\n> {\n  const payload = {} as any;\n\n  const getRequestOptions = ambassadorWixAtlasV2Place.getPlace(payload);\n\n  const getUrl = (context: any): string => {\n    const { url } = getRequestOptions(context);\n    return url!;\n  };\n\n  return {\n    getUrl,\n    httpMethod: 'GET',\n    path: '/v2/place',\n    pathParams: {},\n    __requestType: null as any,\n    __originalRequestType: null as any,\n    __responseType: null as any,\n    __originalResponseType: null as any,\n  };\n}\n\nexport {\n  Place as PlaceOriginal,\n  Address as AddressOriginal,\n  AddressStreetOneOf as AddressStreetOneOfOriginal,\n  StreetAddress as StreetAddressOriginal,\n  AddressLocation as AddressLocationOriginal,\n  Subdivision as SubdivisionOriginal,\n  SubdivisionType as SubdivisionTypeOriginal,\n  SubdivisionTypeWithLiterals as SubdivisionTypeWithLiteralsOriginal,\n  GetPlaceRequest as GetPlaceRequestOriginal,\n  GetPlaceResponse as GetPlaceResponseOriginal,\n} from './atlas-v2-place-places.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA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