@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.
- package/build/cjs/index.js +6 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +6 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +6 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +6 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +6 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +6 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +6 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +6 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js +6 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +6 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +6 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs +6 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -110,6 +110,12 @@ function resolveComWixpressViAtlasServiceV2LocationServiceV2Url(opts) {
|
|
|
110
110
|
srcPath: "/wix-atlas-service-web",
|
|
111
111
|
destPath: ""
|
|
112
112
|
}
|
|
113
|
+
],
|
|
114
|
+
"www.wixapis.com": [
|
|
115
|
+
{
|
|
116
|
+
srcPath: "/api/wix-atlas-service-web",
|
|
117
|
+
destPath: ""
|
|
118
|
+
}
|
|
113
119
|
]
|
|
114
120
|
};
|
|
115
121
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
@@ -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,kBAA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KC,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,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,oBA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AA8B;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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_atlas_location",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"service-plugins"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@wix/sdk-runtime": "^0.5
|
|
33
|
-
"@wix/sdk-types": "^1.
|
|
32
|
+
"@wix/sdk-runtime": "^1.0.5",
|
|
33
|
+
"@wix/sdk-types": "^1.15.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"tsup": "^8.4.0",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"fqdn": "wix.atlas.v2.search_result"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "0dd428cf2851b3bd6967eb1d91fefb72c92f10820b7c1bf68111ba76"
|
|
54
54
|
}
|