@wix/auto_sdk_atlas_location 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/atlas-v2-search-result-location.http.ts","../../src/atlas-v2-search-result-location.types.ts","../../src/atlas-v2-search-result-location.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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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 };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_atlas_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n","export interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n","import * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport * as ambassadorWixAtlasV2SearchResultTypes from './atlas-v2-search-result-location.types.js';\nimport * as ambassadorWixAtlasV2SearchResultUniversalTypes from './atlas-v2-search-result-location.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 search(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixAtlasV2SearchResultUniversalTypes.SearchRequest,\n ambassadorWixAtlasV2SearchResultTypes.SearchRequest,\n ambassadorWixAtlasV2SearchResultUniversalTypes.SearchResponse,\n ambassadorWixAtlasV2SearchResultTypes.SearchResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixAtlasV2SearchResult.search(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/search',\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 SearchResult as SearchResultOriginal,\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 Proximity as ProximityOriginal,\n ProximityWithLiterals as ProximityWithLiteralsOriginal,\n SearchRequest as SearchRequestOriginal,\n FilterBy as FilterByOriginal,\n FilterType as FilterTypeOriginal,\n FilterTypeWithLiterals as FilterTypeWithLiteralsOriginal,\n SearchResponse as SearchResponseOriginal,\n ReverseGeocodingRequest as ReverseGeocodingRequestOriginal,\n ReverseGeocodingResponse as ReverseGeocodingResponseOriginal,\n} from './atlas-v2-search-result-location.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,uDACP,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,QACT,UAAU;AAAA,MACZ;AAAA,MACA;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,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AA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,QAAQ;AAAA,UACR,KAAK,uDAAuD;AAAA,YAC1D,WAAW;AAAA,YACX,MAAM;AAAA,YACN;AAAA,UACF,CAAC;AAAA,UACD,QAAQ,kBAAkB,OAAO;AAAA,QACnC;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AC/GO,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,8BAA2B;AAE3B,EAAAA,iBAAA,iCAA8B;AAE9B,EAAAA,iBAAA,iCAA8B;AAE9B,EAAAA,iBAAA,iCAA8B;AAE9B,EAAAA,iBAAA,iCAA8B;AAE9B,EAAAA,iBAAA,iCAA8B;AAE9B,EAAAA,iBAAA,aAAU;AAbA,SAAAA;AAAA,GAAA;AA2BL,IAAK,YAAL,kBAAKC,eAAL;AACL,EAAAA,WAAA,uBAAoB;AAEpB,EAAAA,WAAA,cAAW;AAEX,EAAAA,WAAA,iBAAc;AAEd,EAAAA,WAAA,kBAAe;AAPL,SAAAA;AAAA,GAAA;AAwCL,IAAK,aAAL,kBAAKC,gBAAL;AAEL,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;;;ACtGL,SAASC,UAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAAqD,OAAO,OAAO;AAEzE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","SubdivisionType","Proximity","FilterType","search"]}
1
+ {"version":3,"sources":["../../src/atlas-v2-search-result-location.http.ts","../../src/atlas-v2-search-result-location.types.ts","../../src/atlas-v2-search-result-location.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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n","export interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n","import * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport * as ambassadorWixAtlasV2SearchResultTypes from './atlas-v2-search-result-location.types.js';\nimport * as ambassadorWixAtlasV2SearchResultUniversalTypes from './atlas-v2-search-result-location.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 search(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixAtlasV2SearchResultUniversalTypes.SearchRequest,\n ambassadorWixAtlasV2SearchResultTypes.SearchRequest,\n ambassadorWixAtlasV2SearchResultUniversalTypes.SearchResponse,\n ambassadorWixAtlasV2SearchResultTypes.SearchResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixAtlasV2SearchResult.search(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/search',\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 SearchResult as SearchResultOriginal,\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 Proximity as ProximityOriginal,\n ProximityWithLiterals as ProximityWithLiteralsOriginal,\n SearchRequest as SearchRequestOriginal,\n FilterBy as FilterByOriginal,\n FilterType as FilterTypeOriginal,\n FilterTypeWithLiterals as FilterTypeWithLiteralsOriginal,\n SearchResponse as SearchResponseOriginal,\n ReverseGeocodingRequest as ReverseGeocodingRequestOriginal,\n ReverseGeocodingResponse as ReverseGeocodingResponseOriginal,\n} from './atlas-v2-search-result-location.types.js';\n"],"mappings":";AAAA,SAAS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A,YACN;AAAA,UACF,CAAC;AAAA,UACD,QAAQ,kBAAkB,OAAO;AAAA,QACnC;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACrHO,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,8BAA2B;AAE3B,EAAAA,iBAAA,iCAA8B;AAE9B,EAAAA,iBAAA,iCAA8B;AAE9B,EAAAA,iBAAA,iCAA8B;AAE9B,EAAAA,iBAAA,iCAA8B;AAE9B,EAAAA,iBAAA,iCAA8B;AAE9B,EAAAA,iBAAA,aAAU;AAbA,SAAAA;AAAA,GAAA;AA2BL,IAAK,YAAL,kBAAKC,eAAL;AACL,EAAAA,WAAA,uBAAoB;AAEpB,EAAAA,WAAA,cAAW;AAEX,EAAAA,WAAA,iBAAc;AAEd,EAAAA,WAAA,kBAAe;AAPL,SAAAA;AAAA,GAAA;AAwCL,IAAK,aAAL,kBAAKC,gBAAL;AAEL,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;;;ACtGL,SAASC,UAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAAqD,OAAO,OAAO;AAEzE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","SubdivisionType","Proximity","FilterType","search"]}
@@ -143,6 +143,12 @@ function resolveComWixpressViAtlasServiceV2LocationServiceV2Url(opts) {
143
143
  srcPath: "/wix-atlas-service-web",
144
144
  destPath: ""
145
145
  }
146
+ ],
147
+ "www.wixapis.com": [
148
+ {
149
+ srcPath: "/api/wix-atlas-service-web",
150
+ destPath: ""
151
+ }
146
152
  ]
147
153
  };
148
154
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../index.ts","../../../src/atlas-v2-search-result-location.universal.ts","../../../src/atlas-v2-search-result-location.http.ts","../../../src/atlas-v2-search-result-location.public.ts","../../../src/atlas-v2-search-result-location.context.ts"],"sourcesContent":["export * from './src/atlas-v2-search-result-location.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 addressLine1?: 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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n\n/**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_ATLAS.SEARCH\n * @applicableIdentity APP\n * @fqn com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search\n */\nexport async function search(\n options?: SearchOptions\n): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\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 query: options?.query,\n filterBy: options?.filterBy,\n zipCode: options?.zipCode,\n countryCodes: options?.countryCodes,\n });\n\n const reqOpts = ambassadorWixAtlasV2SearchResult.search(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: 'searchResults.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n query: '$[0].query',\n filterBy: '$[0].filterBy',\n zipCode: '$[0].zipCode',\n countryCodes: '$[0].countryCodes',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchOptions {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n","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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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 };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_atlas_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SearchOptions,\n SearchResponse,\n search as universalSearch,\n} from './atlas-v2-search-result-location.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/atlas' };\n\nexport function search(httpClient: HttpClient): SearchSignature {\n return (options?: SearchOptions) =>\n universalSearch(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchSignature {\n /**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n */\n (options?: SearchOptions): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\n 6\n >\n >;\n}\n\nexport {\n Address,\n AddressLocation,\n AddressStreetOneOf,\n FilterBy,\n FilterType,\n Proximity,\n ReverseGeocodingRequest,\n ReverseGeocodingResponse,\n SearchOptions,\n SearchRequest,\n SearchResponse,\n SearchResult,\n StreetAddress,\n Subdivision,\n SubdivisionType,\n} from './atlas-v2-search-result-location.universal.js';\n","import { search as publicSearch } from './atlas-v2-search-result-location.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const search: MaybeContext<\n BuildRESTFunction<typeof publicSearch> & typeof publicSearch\n> = /*#__PURE__*/ createRESTModule(publicSearch);\n\nexport {\n SubdivisionType,\n Proximity,\n FilterType,\n} from './atlas-v2-search-result-location.universal.js';\nexport {\n SearchResult,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n SearchRequest,\n FilterBy,\n SearchResponse,\n ReverseGeocodingRequest,\n ReverseGeocodingResponse,\n SearchOptions,\n} from './atlas-v2-search-result-location.universal.js';\nexport {\n SubdivisionTypeWithLiterals,\n ProximityWithLiterals,\n FilterTypeWithLiterals,\n} from './atlas-v2-search-result-location.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,uDACP,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,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,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,IACnB,SAAS,SAAS;AAAA,IAClB,cAAc,SAAS;AAAA,EACzB,CAAC;AAED,QAAM,UAA2C,OAAO,OAAO;AAE/D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO;AAAA,UACL,wCAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAAA,QAC3C;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,SAAS;AAAA,UACT,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AExNO,SAASC,QAAO,YAAyC;AAC9D,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,IAAAC,uBAAiC;AAG1B,IAAMC,UAEK,2DAAiBA,OAAY;","names":["search","import_rest_modules","payload","import_transform_paths","SubdivisionType","Proximity","FilterType","search","sdkTransformError","search","import_rest_modules","search"]}
1
+ {"version":3,"sources":["../../../index.ts","../../../src/atlas-v2-search-result-location.universal.ts","../../../src/atlas-v2-search-result-location.http.ts","../../../src/atlas-v2-search-result-location.public.ts","../../../src/atlas-v2-search-result-location.context.ts"],"sourcesContent":["export * from './src/atlas-v2-search-result-location.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 addressLine1?: 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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n\n/**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_ATLAS.SEARCH\n * @applicableIdentity APP\n * @fqn com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search\n */\nexport async function search(\n options?: SearchOptions\n): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\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 query: options?.query,\n filterBy: options?.filterBy,\n zipCode: options?.zipCode,\n countryCodes: options?.countryCodes,\n });\n\n const reqOpts = ambassadorWixAtlasV2SearchResult.search(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: 'searchResults.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n query: '$[0].query',\n filterBy: '$[0].filterBy',\n zipCode: '$[0].zipCode',\n countryCodes: '$[0].countryCodes',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchOptions {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n","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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SearchOptions,\n SearchResponse,\n search as universalSearch,\n} from './atlas-v2-search-result-location.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/atlas' };\n\nexport function search(httpClient: HttpClient): SearchSignature {\n return (options?: SearchOptions) =>\n universalSearch(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchSignature {\n /**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n */\n (options?: SearchOptions): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\n 6\n >\n >;\n}\n\nexport {\n Address,\n AddressLocation,\n AddressStreetOneOf,\n FilterBy,\n FilterType,\n Proximity,\n ReverseGeocodingRequest,\n ReverseGeocodingResponse,\n SearchOptions,\n SearchRequest,\n SearchResponse,\n SearchResult,\n StreetAddress,\n Subdivision,\n SubdivisionType,\n} from './atlas-v2-search-result-location.universal.js';\n","import { search as publicSearch } from './atlas-v2-search-result-location.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const search: MaybeContext<\n BuildRESTFunction<typeof publicSearch> & typeof publicSearch\n> = /*#__PURE__*/ createRESTModule(publicSearch);\n\nexport {\n SubdivisionType,\n Proximity,\n FilterType,\n} from './atlas-v2-search-result-location.universal.js';\nexport {\n SearchResult,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n SearchRequest,\n FilterBy,\n SearchResponse,\n ReverseGeocodingRequest,\n ReverseGeocodingResponse,\n SearchOptions,\n} from './atlas-v2-search-result-location.universal.js';\nexport {\n SubdivisionTypeWithLiterals,\n ProximityWithLiterals,\n FilterTypeWithLiterals,\n} from './atlas-v2-search-result-location.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;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AAA,UACb,OAAO,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAAA,QAC3C;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,SAAS;AAAA,UACT,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AExNO,SAASC,QAAO,YAAyC;AAC9D,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,IAAAC,uBAAiC;AAG1B,IAAMC,UAEK,2DAAiBA,OAAY;","names":["search","import_rest_modules","payload","import_transform_paths","SubdivisionType","Proximity","FilterType","search","sdkTransformError","search","import_rest_modules","search"]}
@@ -143,6 +143,12 @@ function resolveComWixpressViAtlasServiceV2LocationServiceV2Url(opts) {
143
143
  srcPath: "/wix-atlas-service-web",
144
144
  destPath: ""
145
145
  }
146
+ ],
147
+ "www.wixapis.com": [
148
+ {
149
+ srcPath: "/api/wix-atlas-service-web",
150
+ destPath: ""
151
+ }
146
152
  ]
147
153
  };
148
154
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../index.typings.ts","../../../src/atlas-v2-search-result-location.universal.ts","../../../src/atlas-v2-search-result-location.http.ts"],"sourcesContent":["export * from './src/atlas-v2-search-result-location.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 addressLine1?: 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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n\n/**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_ATLAS.SEARCH\n * @applicableIdentity APP\n * @fqn com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search\n */\nexport async function search(\n options?: SearchOptions\n): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\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 query: options?.query,\n filterBy: options?.filterBy,\n zipCode: options?.zipCode,\n countryCodes: options?.countryCodes,\n });\n\n const reqOpts = ambassadorWixAtlasV2SearchResult.search(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: 'searchResults.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n query: '$[0].query',\n filterBy: '$[0].filterBy',\n zipCode: '$[0].zipCode',\n countryCodes: '$[0].countryCodes',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchOptions {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n","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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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 };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_atlas_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAA;AAAA;AA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MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,SAAS;AAAA,UACT,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["search","import_rest_modules","payload","import_transform_paths","SubdivisionType","Proximity","FilterType","search","sdkTransformError"]}
1
+ {"version":3,"sources":["../../../index.typings.ts","../../../src/atlas-v2-search-result-location.universal.ts","../../../src/atlas-v2-search-result-location.http.ts"],"sourcesContent":["export * from './src/atlas-v2-search-result-location.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 addressLine1?: 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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n\n/**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_ATLAS.SEARCH\n * @applicableIdentity APP\n * @fqn com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search\n */\nexport async function search(\n options?: SearchOptions\n): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\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 query: options?.query,\n filterBy: options?.filterBy,\n zipCode: options?.zipCode,\n countryCodes: options?.countryCodes,\n });\n\n const reqOpts = ambassadorWixAtlasV2SearchResult.search(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: 'searchResults.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n query: '$[0].query',\n filterBy: '$[0].filterBy',\n zipCode: '$[0].zipCode',\n countryCodes: '$[0].countryCodes',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchOptions {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n","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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,uDACP,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,UA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,cAAW;AAEX,EAAAA,WAAA,iBAAc;AAEd,EAAAA,WAAA,kBAAe;AAPL,SAAAA;AAAA,GAAA;AAwCL,IAAK,aAAL,kBAAKC,gBAAL;AAEL,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;AAgCZ,eAAsBC,QACpB,SAUA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,OAAO,SAAS;AAAA,IAChB,UAAU,SAAS;AAAA,IACnB,SAAS,SAAS;AAAA,IAClB,cAAc,SAAS;AAAA,EACzB,CAAC;AAED,QAAM,UAA2C,OAAO,OAAO;AAE/D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO;AAAA,UACL,wCAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAAA,QAC3C;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,SAAS;AAAA,UACT,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["search","import_rest_modules","payload","import_transform_paths","SubdivisionType","Proximity","FilterType","search","sdkTransformError"]}
@@ -139,6 +139,12 @@ function resolveComWixpressViAtlasServiceV2LocationServiceV2Url(opts) {
139
139
  srcPath: "/wix-atlas-service-web",
140
140
  destPath: ""
141
141
  }
142
+ ],
143
+ "www.wixapis.com": [
144
+ {
145
+ srcPath: "/api/wix-atlas-service-web",
146
+ destPath: ""
147
+ }
142
148
  ]
143
149
  };
144
150
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../meta.ts","../../../src/atlas-v2-search-result-location.http.ts","../../../src/atlas-v2-search-result-location.types.ts","../../../src/atlas-v2-search-result-location.meta.ts"],"sourcesContent":["export * from './src/atlas-v2-search-result-location.meta.js';\n","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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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 };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_atlas_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n","export interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n","import * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport * as ambassadorWixAtlasV2SearchResultTypes from './atlas-v2-search-result-location.types.js';\nimport * as ambassadorWixAtlasV2SearchResultUniversalTypes from './atlas-v2-search-result-location.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 search(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixAtlasV2SearchResultUniversalTypes.SearchRequest,\n ambassadorWixAtlasV2SearchResultTypes.SearchRequest,\n ambassadorWixAtlasV2SearchResultUniversalTypes.SearchResponse,\n ambassadorWixAtlasV2SearchResultTypes.SearchResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixAtlasV2SearchResult.search(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/search',\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 SearchResult as SearchResultOriginal,\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 Proximity as ProximityOriginal,\n ProximityWithLiterals as ProximityWithLiteralsOriginal,\n SearchRequest as SearchRequestOriginal,\n FilterBy as FilterByOriginal,\n FilterType as FilterTypeOriginal,\n FilterTypeWithLiterals as FilterTypeWithLiteralsOriginal,\n SearchResponse as SearchResponseOriginal,\n ReverseGeocodingRequest as ReverseGeocodingRequestOriginal,\n ReverseGeocodingResponse as ReverseGeocodingResponseOriginal,\n} from './atlas-v2-search-result-location.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAA;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,uDACP,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,QACT,UAAU;AAAA,MACZ;AAAA,MACA;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,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;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AACF;","names":["search","import_rest_modules","payload","SubdivisionType","Proximity","FilterType","search"]}
1
+ {"version":3,"sources":["../../../meta.ts","../../../src/atlas-v2-search-result-location.http.ts","../../../src/atlas-v2-search-result-location.types.ts","../../../src/atlas-v2-search-result-location.meta.ts"],"sourcesContent":["export * from './src/atlas-v2-search-result-location.meta.js';\n","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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n","export interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n","import * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport * as ambassadorWixAtlasV2SearchResultTypes from './atlas-v2-search-result-location.types.js';\nimport * as ambassadorWixAtlasV2SearchResultUniversalTypes from './atlas-v2-search-result-location.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 search(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixAtlasV2SearchResultUniversalTypes.SearchRequest,\n ambassadorWixAtlasV2SearchResultTypes.SearchRequest,\n ambassadorWixAtlasV2SearchResultUniversalTypes.SearchResponse,\n ambassadorWixAtlasV2SearchResultTypes.SearchResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixAtlasV2SearchResult.search(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/search',\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 SearchResult as SearchResultOriginal,\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 Proximity as ProximityOriginal,\n ProximityWithLiterals as ProximityWithLiteralsOriginal,\n SearchRequest as SearchRequestOriginal,\n FilterBy as FilterByOriginal,\n FilterType as FilterTypeOriginal,\n FilterTypeWithLiterals as FilterTypeWithLiteralsOriginal,\n SearchResponse as SearchResponseOriginal,\n ReverseGeocodingRequest as ReverseGeocodingRequestOriginal,\n ReverseGeocodingResponse as ReverseGeocodingResponseOriginal,\n} from './atlas-v2-search-result-location.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAA;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,uDACP,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,QACT,UAAU;AAAA,MACZ;AAAA,MACA;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,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA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AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["search","import_rest_modules","payload","SubdivisionType","Proximity","FilterType","search"]}
@@ -117,6 +117,12 @@ function resolveComWixpressViAtlasServiceV2LocationServiceV2Url(opts) {
117
117
  srcPath: "/wix-atlas-service-web",
118
118
  destPath: ""
119
119
  }
120
+ ],
121
+ "www.wixapis.com": [
122
+ {
123
+ srcPath: "/api/wix-atlas-service-web",
124
+ destPath: ""
125
+ }
120
126
  ]
121
127
  };
122
128
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/atlas-v2-search-result-location.universal.ts","../../../src/atlas-v2-search-result-location.http.ts","../../../src/atlas-v2-search-result-location.public.ts","../../../src/atlas-v2-search-result-location.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 addressLine1?: 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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n\n/**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_ATLAS.SEARCH\n * @applicableIdentity APP\n * @fqn com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search\n */\nexport async function search(\n options?: SearchOptions\n): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\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 query: options?.query,\n filterBy: options?.filterBy,\n zipCode: options?.zipCode,\n countryCodes: options?.countryCodes,\n });\n\n const reqOpts = ambassadorWixAtlasV2SearchResult.search(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: 'searchResults.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n query: '$[0].query',\n filterBy: '$[0].filterBy',\n zipCode: '$[0].zipCode',\n countryCodes: '$[0].countryCodes',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchOptions {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n","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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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 };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_atlas_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SearchOptions,\n SearchResponse,\n search as universalSearch,\n} from './atlas-v2-search-result-location.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/atlas' };\n\nexport function search(httpClient: HttpClient): SearchSignature {\n return (options?: SearchOptions) =>\n universalSearch(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchSignature {\n /**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n */\n (options?: SearchOptions): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\n 6\n >\n >;\n}\n\nexport {\n Address,\n AddressLocation,\n AddressStreetOneOf,\n FilterBy,\n FilterType,\n Proximity,\n ReverseGeocodingRequest,\n ReverseGeocodingResponse,\n SearchOptions,\n SearchRequest,\n SearchResponse,\n SearchResult,\n StreetAddress,\n Subdivision,\n SubdivisionType,\n} from './atlas-v2-search-result-location.universal.js';\n","import { search as publicSearch } from './atlas-v2-search-result-location.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const search: MaybeContext<\n BuildRESTFunction<typeof publicSearch> & typeof publicSearch\n> = /*#__PURE__*/ createRESTModule(publicSearch);\n\nexport {\n SubdivisionType,\n Proximity,\n FilterType,\n} from './atlas-v2-search-result-location.universal.js';\nexport {\n SearchResult,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n SearchRequest,\n FilterBy,\n SearchResponse,\n ReverseGeocodingRequest,\n ReverseGeocodingResponse,\n SearchOptions,\n} from './atlas-v2-search-result-location.universal.js';\nexport {\n SubdivisionTypeWithLiterals,\n ProximityWithLiterals,\n FilterTypeWithLiterals,\n} from './atlas-v2-search-result-location.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,uDACP,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;AAA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AAA,YAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;AAgCZ,eAAsBC,QACpB,SAUA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD,OAAO,SAAS;AAAA,IAChB,UAAU,SAAS;AAAA,IACnB,SAAS,SAAS;AAAA,IAClB,cAAc,SAAS;AAAA,EACzB,CAAC;AAED,QAAM,UAA2C,OAAO,OAAO;AAE/D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO;AAAA,MACLJ,gBAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAAA,QAC3C;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,SAAS;AAAA,UACT,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AExNO,SAASK,QAAO,YAAyC;AAC9D,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,SAAS,wBAAwB;AAG1B,IAAMC,UAEK,iCAAiBA,OAAY;","names":["payload","transformPaths","SubdivisionType","Proximity","FilterType","search","search","search"]}
1
+ {"version":3,"sources":["../../../src/atlas-v2-search-result-location.universal.ts","../../../src/atlas-v2-search-result-location.http.ts","../../../src/atlas-v2-search-result-location.public.ts","../../../src/atlas-v2-search-result-location.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 addressLine1?: 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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n\n/**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_ATLAS.SEARCH\n * @applicableIdentity APP\n * @fqn com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search\n */\nexport async function search(\n options?: SearchOptions\n): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\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 query: options?.query,\n filterBy: options?.filterBy,\n zipCode: options?.zipCode,\n countryCodes: options?.countryCodes,\n });\n\n const reqOpts = ambassadorWixAtlasV2SearchResult.search(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: 'searchResults.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n query: '$[0].query',\n filterBy: '$[0].filterBy',\n zipCode: '$[0].zipCode',\n countryCodes: '$[0].countryCodes',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchOptions {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n","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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SearchOptions,\n SearchResponse,\n search as universalSearch,\n} from './atlas-v2-search-result-location.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/atlas' };\n\nexport function search(httpClient: HttpClient): SearchSignature {\n return (options?: SearchOptions) =>\n universalSearch(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchSignature {\n /**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n */\n (options?: SearchOptions): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\n 6\n >\n >;\n}\n\nexport {\n Address,\n AddressLocation,\n AddressStreetOneOf,\n FilterBy,\n FilterType,\n Proximity,\n ReverseGeocodingRequest,\n ReverseGeocodingResponse,\n SearchOptions,\n SearchRequest,\n SearchResponse,\n SearchResult,\n StreetAddress,\n Subdivision,\n SubdivisionType,\n} from './atlas-v2-search-result-location.universal.js';\n","import { search as publicSearch } from './atlas-v2-search-result-location.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const search: MaybeContext<\n BuildRESTFunction<typeof publicSearch> & typeof publicSearch\n> = /*#__PURE__*/ createRESTModule(publicSearch);\n\nexport {\n SubdivisionType,\n Proximity,\n FilterType,\n} from './atlas-v2-search-result-location.universal.js';\nexport {\n SearchResult,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n SearchRequest,\n FilterBy,\n SearchResponse,\n ReverseGeocodingRequest,\n ReverseGeocodingResponse,\n SearchOptions,\n} from './atlas-v2-search-result-location.universal.js';\nexport {\n SubdivisionTypeWithLiterals,\n ProximityWithLiterals,\n FilterTypeWithLiterals,\n} from './atlas-v2-search-result-location.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,uDACP,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,QACT,UAAU;AAAA,MACZ;AAAA,MACA;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,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,w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O;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO;AAAA,MACLJ,gBAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAAA,QAC3C;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,SAAS;AAAA,UACT,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AExNO,SAASK,QAAO,YAAyC;AAC9D,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,SAAS,wBAAwB;AAG1B,IAAMC,UAEK,iCAAiBA,OAAY;","names":["payload","transformPaths","SubdivisionType","Proximity","FilterType","search","search","search"]}
@@ -117,6 +117,12 @@ function resolveComWixpressViAtlasServiceV2LocationServiceV2Url(opts) {
117
117
  srcPath: "/wix-atlas-service-web",
118
118
  destPath: ""
119
119
  }
120
+ ],
121
+ "www.wixapis.com": [
122
+ {
123
+ srcPath: "/api/wix-atlas-service-web",
124
+ destPath: ""
125
+ }
120
126
  ]
121
127
  };
122
128
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/atlas-v2-search-result-location.universal.ts","../../../src/atlas-v2-search-result-location.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 addressLine1?: 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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n\n/**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_ATLAS.SEARCH\n * @applicableIdentity APP\n * @fqn com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search\n */\nexport async function search(\n options?: SearchOptions\n): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\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 query: options?.query,\n filterBy: options?.filterBy,\n zipCode: options?.zipCode,\n countryCodes: options?.countryCodes,\n });\n\n const reqOpts = ambassadorWixAtlasV2SearchResult.search(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: 'searchResults.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n query: '$[0].query',\n filterBy: '$[0].filterBy',\n zipCode: '$[0].zipCode',\n countryCodes: '$[0].countryCodes',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchOptions {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n","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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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 };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_atlas_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP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A,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,UAAU;AAAA,UACV,SAAS;AAAA,UACT,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","transformPaths","SubdivisionType","Proximity","FilterType","search"]}
1
+ {"version":3,"sources":["../../../src/atlas-v2-search-result-location.universal.ts","../../../src/atlas-v2-search-result-location.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SearchResult {\n /** The Address object */\n address?: Address;\n /** stores additional data about the proximity to the specified location */\n proximity?: ProximityWithLiterals;\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 addressLine1?: 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 enum Proximity {\n UNKNOWN_PROXIMITY = 'UNKNOWN_PROXIMITY',\n /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */\n PINPOINT = 'PINPOINT',\n /** indicates that the returned result is the geometric center of a result */\n APPROXIMATE = 'APPROXIMATE',\n /** indicates that the returned result is around an area */\n GENERAL_AREA = 'GENERAL_AREA',\n}\n\n/** @enumType */\nexport type ProximityWithLiterals =\n | Proximity\n | 'UNKNOWN_PROXIMITY'\n | 'PINPOINT'\n | 'APPROXIMATE'\n | 'GENERAL_AREA';\n\n/** User must provide query or filter by parameters */\nexport interface SearchRequest {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface SearchResponse {\n /** List of 'Address' objects */\n searchResults?: SearchResult[];\n}\n\nexport interface ReverseGeocodingRequest {\n /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */\n addressLocation?: AddressLocation;\n}\n\nexport interface ReverseGeocodingResponse {\n searchResults?: SearchResult[];\n}\n\n/**\n * A Search request takes a free text as an input and returns a list of 'Address' objects.\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_ATLAS.SEARCH\n * @applicableIdentity APP\n * @fqn com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search\n */\nexport async function search(\n options?: SearchOptions\n): Promise<\n NonNullablePaths<\n SearchResponse,\n | `searchResults`\n | `searchResults.${number}.address.streetAddress.number`\n | `searchResults.${number}.address.streetAddress.name`\n | `searchResults.${number}.proximity`,\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 query: options?.query,\n filterBy: options?.filterBy,\n zipCode: options?.zipCode,\n countryCodes: options?.countryCodes,\n });\n\n const reqOpts = ambassadorWixAtlasV2SearchResult.search(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: 'searchResults.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n query: '$[0].query',\n filterBy: '$[0].filterBy',\n zipCode: '$[0].zipCode',\n countryCodes: '$[0].countryCodes',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchOptions {\n /** Free text */\n query?: string | null;\n /**\n * Deprecate! - Please use 'zipCode' and 'countryCodes' fields\n * @deprecated\n */\n filterBy?: FilterBy[];\n /** Zip code filter the user can add in order to get more accurate results */\n zipCode?: string | null;\n /** Country codes filter the user can add in order to get more accurate results */\n countryCodes?: string[];\n}\n","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 resolveComWixpressViAtlasServiceV2LocationServiceV2Url(\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_location';\n\n/** A Search request takes a free text as an input and returns a list of 'Address' objects. */\nexport function search(payload: object): RequestOptionsFactory<any> {\n function __search({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.search_result',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\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: 'searchResults.address.geocode.latitude' },\n { path: 'searchResults.address.geocode.longitude' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({\n protoPath: '/v2/search',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __search;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,uDACP,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;A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