@wix/auto_sdk_atlas_location 1.0.1 → 1.0.2
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/{es/src/atlas-v2-search-result-location.types.d.ts → cjs/atlas-v2-search-result-location.universal-Cqf6ToQM.d.ts} +36 -17
- package/build/cjs/index.d.ts +15 -1
- package/build/cjs/index.js +256 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +98 -1
- package/build/cjs/meta.js +187 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/{cjs/src/atlas-v2-search-result-location.types.d.ts → es/atlas-v2-search-result-location.universal-Cqf6ToQM.d.mts} +36 -17
- package/build/es/index.d.mts +15 -0
- package/build/es/index.mjs +232 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/meta.d.mts +98 -0
- package/build/es/meta.mjs +163 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/{src/atlas-v2-search-result-location.types.d.ts → atlas-v2-search-result-location.universal-Cqf6ToQM.d.ts} +36 -17
- package/build/internal/cjs/index.d.ts +15 -1
- package/build/internal/cjs/index.js +256 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +98 -1
- package/build/internal/cjs/meta.js +187 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/{src/atlas-v2-search-result-location.types.d.ts → atlas-v2-search-result-location.universal-Cqf6ToQM.d.mts} +36 -17
- package/build/internal/es/index.d.mts +15 -0
- package/build/internal/es/index.mjs +232 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +98 -0
- package/build/internal/es/meta.mjs +163 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +10 -9
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/atlas-v2-search-result-location.context.d.ts +0 -5
- package/build/cjs/src/atlas-v2-search-result-location.context.js +0 -11
- package/build/cjs/src/atlas-v2-search-result-location.context.js.map +0 -1
- package/build/cjs/src/atlas-v2-search-result-location.http.d.ts +0 -3
- package/build/cjs/src/atlas-v2-search-result-location.http.js +0 -144
- package/build/cjs/src/atlas-v2-search-result-location.http.js.map +0 -1
- package/build/cjs/src/atlas-v2-search-result-location.meta.d.ts +0 -13
- package/build/cjs/src/atlas-v2-search-result-location.meta.js +0 -47
- package/build/cjs/src/atlas-v2-search-result-location.meta.js.map +0 -1
- package/build/cjs/src/atlas-v2-search-result-location.public.d.ts +0 -13
- package/build/cjs/src/atlas-v2-search-result-location.public.js +0 -16
- package/build/cjs/src/atlas-v2-search-result-location.public.js.map +0 -1
- package/build/cjs/src/atlas-v2-search-result-location.types.js +0 -37
- package/build/cjs/src/atlas-v2-search-result-location.types.js.map +0 -1
- package/build/cjs/src/atlas-v2-search-result-location.universal.d.ts +0 -156
- package/build/cjs/src/atlas-v2-search-result-location.universal.js +0 -127
- package/build/cjs/src/atlas-v2-search-result-location.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/atlas-v2-search-result-location.context.d.ts +0 -5
- package/build/es/src/atlas-v2-search-result-location.context.js +0 -5
- package/build/es/src/atlas-v2-search-result-location.context.js.map +0 -1
- package/build/es/src/atlas-v2-search-result-location.http.d.ts +0 -3
- package/build/es/src/atlas-v2-search-result-location.http.js +0 -140
- package/build/es/src/atlas-v2-search-result-location.http.js.map +0 -1
- package/build/es/src/atlas-v2-search-result-location.meta.d.ts +0 -13
- package/build/es/src/atlas-v2-search-result-location.meta.js +0 -20
- package/build/es/src/atlas-v2-search-result-location.meta.js.map +0 -1
- package/build/es/src/atlas-v2-search-result-location.public.d.ts +0 -13
- package/build/es/src/atlas-v2-search-result-location.public.js +0 -9
- package/build/es/src/atlas-v2-search-result-location.public.js.map +0 -1
- package/build/es/src/atlas-v2-search-result-location.types.js +0 -34
- package/build/es/src/atlas-v2-search-result-location.types.js.map +0 -1
- package/build/es/src/atlas-v2-search-result-location.universal.d.ts +0 -156
- package/build/es/src/atlas-v2-search-result-location.universal.js +0 -100
- package/build/es/src/atlas-v2-search-result-location.universal.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/src/atlas-v2-search-result-location.context.d.ts +0 -5
- package/build/internal/cjs/src/atlas-v2-search-result-location.context.js +0 -11
- package/build/internal/cjs/src/atlas-v2-search-result-location.context.js.map +0 -1
- package/build/internal/cjs/src/atlas-v2-search-result-location.http.d.ts +0 -3
- package/build/internal/cjs/src/atlas-v2-search-result-location.http.js +0 -144
- package/build/internal/cjs/src/atlas-v2-search-result-location.http.js.map +0 -1
- package/build/internal/cjs/src/atlas-v2-search-result-location.meta.d.ts +0 -13
- package/build/internal/cjs/src/atlas-v2-search-result-location.meta.js +0 -47
- package/build/internal/cjs/src/atlas-v2-search-result-location.meta.js.map +0 -1
- package/build/internal/cjs/src/atlas-v2-search-result-location.public.d.ts +0 -13
- package/build/internal/cjs/src/atlas-v2-search-result-location.public.js +0 -16
- package/build/internal/cjs/src/atlas-v2-search-result-location.public.js.map +0 -1
- package/build/internal/cjs/src/atlas-v2-search-result-location.types.js +0 -37
- package/build/internal/cjs/src/atlas-v2-search-result-location.types.js.map +0 -1
- package/build/internal/cjs/src/atlas-v2-search-result-location.universal.d.ts +0 -156
- package/build/internal/cjs/src/atlas-v2-search-result-location.universal.js +0 -127
- package/build/internal/cjs/src/atlas-v2-search-result-location.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/atlas-v2-search-result-location.context.d.ts +0 -5
- package/build/internal/es/src/atlas-v2-search-result-location.context.js +0 -5
- package/build/internal/es/src/atlas-v2-search-result-location.context.js.map +0 -1
- package/build/internal/es/src/atlas-v2-search-result-location.http.d.ts +0 -3
- package/build/internal/es/src/atlas-v2-search-result-location.http.js +0 -140
- package/build/internal/es/src/atlas-v2-search-result-location.http.js.map +0 -1
- package/build/internal/es/src/atlas-v2-search-result-location.meta.d.ts +0 -13
- package/build/internal/es/src/atlas-v2-search-result-location.meta.js +0 -20
- package/build/internal/es/src/atlas-v2-search-result-location.meta.js.map +0 -1
- package/build/internal/es/src/atlas-v2-search-result-location.public.d.ts +0 -13
- package/build/internal/es/src/atlas-v2-search-result-location.public.js +0 -9
- package/build/internal/es/src/atlas-v2-search-result-location.public.js.map +0 -1
- package/build/internal/es/src/atlas-v2-search-result-location.types.js +0 -34
- package/build/internal/es/src/atlas-v2-search-result-location.types.js.map +0 -1
- package/build/internal/es/src/atlas-v2-search-result-location.universal.d.ts +0 -156
- package/build/internal/es/src/atlas-v2-search-result-location.universal.js +0 -100
- package/build/internal/es/src/atlas-v2-search-result-location.universal.js.map +0 -1
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
|
|
2
|
-
import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
|
|
3
|
-
import * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';
|
|
4
|
-
import { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';
|
|
5
|
-
import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
|
|
6
|
-
export var SubdivisionType;
|
|
7
|
-
(function (SubdivisionType) {
|
|
8
|
-
SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
|
|
9
|
-
/** State */
|
|
10
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
|
|
11
|
-
/** County */
|
|
12
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
|
|
13
|
-
/** City/town */
|
|
14
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
|
|
15
|
-
/** Neighborhood/quarter */
|
|
16
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
|
|
17
|
-
/** Street/block */
|
|
18
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
|
|
19
|
-
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
20
|
-
SubdivisionType["COUNTRY"] = "COUNTRY";
|
|
21
|
-
})(SubdivisionType || (SubdivisionType = {}));
|
|
22
|
-
export var Proximity;
|
|
23
|
-
(function (Proximity) {
|
|
24
|
-
Proximity["UNKNOWN_PROXIMITY"] = "UNKNOWN_PROXIMITY";
|
|
25
|
-
/** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */
|
|
26
|
-
Proximity["PINPOINT"] = "PINPOINT";
|
|
27
|
-
/** indicates that the returned result is the geometric center of a result */
|
|
28
|
-
Proximity["APPROXIMATE"] = "APPROXIMATE";
|
|
29
|
-
/** indicates that the returned result is around an area */
|
|
30
|
-
Proximity["GENERAL_AREA"] = "GENERAL_AREA";
|
|
31
|
-
})(Proximity || (Proximity = {}));
|
|
32
|
-
export var FilterType;
|
|
33
|
-
(function (FilterType) {
|
|
34
|
-
/** Filter by zip code */
|
|
35
|
-
FilterType["zip_code"] = "zip_code";
|
|
36
|
-
/** Filter by 2-letters or 3-letters country code */
|
|
37
|
-
FilterType["country_code"] = "country_code";
|
|
38
|
-
})(FilterType || (FilterType = {}));
|
|
39
|
-
/**
|
|
40
|
-
* A Search request takes a free text as an input and returns a list of 'Address' objects.
|
|
41
|
-
* @public
|
|
42
|
-
* @documentationMaturity preview
|
|
43
|
-
* @permissionId WIX_ATLAS.SEARCH
|
|
44
|
-
* @permissionScope Manage Stores
|
|
45
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
46
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
47
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
48
|
-
* @permissionScope Manage Events
|
|
49
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
50
|
-
* @permissionScope Manage Challenges
|
|
51
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
52
|
-
* @permissionScope Manage Portfolio
|
|
53
|
-
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
54
|
-
* @permissionScope Access Verticals by Automations
|
|
55
|
-
* @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
|
|
56
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
57
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
58
|
-
* @permissionScope Set Up Automations
|
|
59
|
-
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
60
|
-
* @applicableIdentity APP
|
|
61
|
-
* @applicableIdentity VISITOR
|
|
62
|
-
* @fqn com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search
|
|
63
|
-
*/
|
|
64
|
-
export async function search(options) {
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
67
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
68
|
-
query: options?.query,
|
|
69
|
-
filterBy: options?.filterBy,
|
|
70
|
-
zipCode: options?.zipCode,
|
|
71
|
-
countryCodes: options?.countryCodes,
|
|
72
|
-
});
|
|
73
|
-
const reqOpts = ambassadorWixAtlasV2SearchResult.search(payload);
|
|
74
|
-
sideEffects?.onSiteCall?.();
|
|
75
|
-
try {
|
|
76
|
-
const result = await httpClient.request(reqOpts);
|
|
77
|
-
sideEffects?.onSuccess?.(result);
|
|
78
|
-
return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
|
|
79
|
-
{
|
|
80
|
-
transformFn: transformRESTAddressToSDKAddress,
|
|
81
|
-
paths: [{ path: 'searchResults.address' }],
|
|
82
|
-
},
|
|
83
|
-
]));
|
|
84
|
-
}
|
|
85
|
-
catch (err) {
|
|
86
|
-
const transformedError = sdkTransformError(err, {
|
|
87
|
-
spreadPathsToArguments: {},
|
|
88
|
-
explicitPathsToArguments: {
|
|
89
|
-
query: '$[0].query',
|
|
90
|
-
filterBy: '$[0].filterBy',
|
|
91
|
-
zipCode: '$[0].zipCode',
|
|
92
|
-
countryCodes: '$[0].countryCodes',
|
|
93
|
-
},
|
|
94
|
-
singleArgumentUnchanged: false,
|
|
95
|
-
}, ['options']);
|
|
96
|
-
sideEffects?.onError?.(err);
|
|
97
|
-
throw transformedError;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
//# sourceMappingURL=atlas-v2-search-result-location.universal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atlas-v2-search-result-location.universal.js","sourceRoot":"","sources":["../../../../src/atlas-v2-search-result-location.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,C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