@wix/atlas 1.0.11 → 1.0.12
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/context.d.ts +3 -0
- package/build/cjs/context.js +30 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +3 -3
- package/build/cjs/index.js +8 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +3 -0
- package/build/cjs/{index.typings.js → meta.js} +9 -5
- package/build/cjs/meta.js.map +1 -0
- package/build/es/context.d.ts +3 -0
- package/build/es/context.js +4 -0
- package/build/es/context.js.map +1 -0
- package/build/es/index.d.ts +3 -3
- package/build/es/index.js +3 -3
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +3 -0
- package/build/es/meta.js +4 -0
- package/build/es/meta.js.map +1 -0
- package/context/package.json +7 -0
- package/meta/package.json +7 -0
- package/package.json +25 -8
- package/type-bundles/context.bundle.d.ts +249 -0
- package/type-bundles/index.bundle.d.ts +405 -0
- package/type-bundles/meta.bundle.d.ts +507 -0
- package/build/cjs/index.typings.d.ts +0 -3
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/atlas-v2-place.http.d.ts +0 -4
- package/build/cjs/src/atlas-v2-place.http.js +0 -126
- package/build/cjs/src/atlas-v2-place.http.js.map +0 -1
- package/build/cjs/src/atlas-v2-place.public.d.ts +0 -8
- package/build/cjs/src/atlas-v2-place.public.js +0 -14
- package/build/cjs/src/atlas-v2-place.public.js.map +0 -1
- package/build/cjs/src/atlas-v2-place.types.d.ts +0 -73
- package/build/cjs/src/atlas-v2-place.types.js +0 -20
- package/build/cjs/src/atlas-v2-place.types.js.map +0 -1
- package/build/cjs/src/atlas-v2-place.universal.d.ts +0 -93
- package/build/cjs/src/atlas-v2-place.universal.js +0 -125
- package/build/cjs/src/atlas-v2-place.universal.js.map +0 -1
- package/build/cjs/src/atlas-v2-prediction.http.d.ts +0 -4
- package/build/cjs/src/atlas-v2-prediction.http.js +0 -124
- package/build/cjs/src/atlas-v2-prediction.http.js.map +0 -1
- package/build/cjs/src/atlas-v2-prediction.public.d.ts +0 -8
- package/build/cjs/src/atlas-v2-prediction.public.js +0 -14
- package/build/cjs/src/atlas-v2-prediction.public.js.map +0 -1
- package/build/cjs/src/atlas-v2-prediction.types.d.ts +0 -74
- package/build/cjs/src/atlas-v2-prediction.types.js +0 -11
- package/build/cjs/src/atlas-v2-prediction.types.js.map +0 -1
- package/build/cjs/src/atlas-v2-prediction.universal.d.ts +0 -103
- package/build/cjs/src/atlas-v2-prediction.universal.js +0 -120
- package/build/cjs/src/atlas-v2-prediction.universal.js.map +0 -1
- package/build/cjs/src/atlas-v2-search-result.http.d.ts +0 -4
- package/build/cjs/src/atlas-v2-search-result.http.js +0 -137
- package/build/cjs/src/atlas-v2-search-result.http.js.map +0 -1
- package/build/cjs/src/atlas-v2-search-result.public.d.ts +0 -8
- package/build/cjs/src/atlas-v2-search-result.public.js +0 -16
- package/build/cjs/src/atlas-v2-search-result.public.js.map +0 -1
- package/build/cjs/src/atlas-v2-search-result.types.d.ts +0 -106
- package/build/cjs/src/atlas-v2-search-result.types.js +0 -37
- package/build/cjs/src/atlas-v2-search-result.types.js.map +0 -1
- package/build/cjs/src/atlas-v2-search-result.universal.d.ts +0 -131
- package/build/cjs/src/atlas-v2-search-result.universal.js +0 -142
- package/build/cjs/src/atlas-v2-search-result.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -3
- package/build/es/index.typings.js +0 -4
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/atlas-v2-place.http.d.ts +0 -4
- package/build/es/src/atlas-v2-place.http.js +0 -122
- package/build/es/src/atlas-v2-place.http.js.map +0 -1
- package/build/es/src/atlas-v2-place.public.d.ts +0 -8
- package/build/es/src/atlas-v2-place.public.js +0 -9
- package/build/es/src/atlas-v2-place.public.js.map +0 -1
- package/build/es/src/atlas-v2-place.types.d.ts +0 -73
- package/build/es/src/atlas-v2-place.types.js +0 -17
- package/build/es/src/atlas-v2-place.types.js.map +0 -1
- package/build/es/src/atlas-v2-place.universal.d.ts +0 -93
- package/build/es/src/atlas-v2-place.universal.js +0 -102
- package/build/es/src/atlas-v2-place.universal.js.map +0 -1
- package/build/es/src/atlas-v2-prediction.http.d.ts +0 -4
- package/build/es/src/atlas-v2-prediction.http.js +0 -120
- package/build/es/src/atlas-v2-prediction.http.js.map +0 -1
- package/build/es/src/atlas-v2-prediction.public.d.ts +0 -8
- package/build/es/src/atlas-v2-prediction.public.js +0 -9
- package/build/es/src/atlas-v2-prediction.public.js.map +0 -1
- package/build/es/src/atlas-v2-prediction.types.d.ts +0 -74
- package/build/es/src/atlas-v2-prediction.types.js +0 -8
- package/build/es/src/atlas-v2-prediction.types.js.map +0 -1
- package/build/es/src/atlas-v2-prediction.universal.d.ts +0 -103
- package/build/es/src/atlas-v2-prediction.universal.js +0 -97
- package/build/es/src/atlas-v2-prediction.universal.js.map +0 -1
- package/build/es/src/atlas-v2-search-result.http.d.ts +0 -4
- package/build/es/src/atlas-v2-search-result.http.js +0 -133
- package/build/es/src/atlas-v2-search-result.http.js.map +0 -1
- package/build/es/src/atlas-v2-search-result.public.d.ts +0 -8
- package/build/es/src/atlas-v2-search-result.public.js +0 -9
- package/build/es/src/atlas-v2-search-result.public.js.map +0 -1
- package/build/es/src/atlas-v2-search-result.types.d.ts +0 -106
- package/build/es/src/atlas-v2-search-result.types.js +0 -34
- package/build/es/src/atlas-v2-search-result.types.js.map +0 -1
- package/build/es/src/atlas-v2-search-result.universal.d.ts +0 -131
- package/build/es/src/atlas-v2-search-result.universal.js +0 -119
- package/build/es/src/atlas-v2-search-result.universal.js.map +0 -1
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
export interface Place {
|
|
2
|
-
/** The given place id */
|
|
3
|
-
placeId?: string;
|
|
4
|
-
/** The Address object */
|
|
5
|
-
address?: Address;
|
|
6
|
-
/** The Place type. For example: airport, library etc... */
|
|
7
|
-
types?: string[];
|
|
8
|
-
}
|
|
9
|
-
/** Physical address */
|
|
10
|
-
export interface Address extends AddressStreetOneOf {
|
|
11
|
-
/** Street name and number. */
|
|
12
|
-
streetAddress?: StreetAddress;
|
|
13
|
-
/** Main address line, usually street and number as free text. */
|
|
14
|
-
addressLine?: string | null;
|
|
15
|
-
/** Country code. */
|
|
16
|
-
country?: string | null;
|
|
17
|
-
/** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
18
|
-
subdivision?: string | null;
|
|
19
|
-
/** City name. */
|
|
20
|
-
city?: string | null;
|
|
21
|
-
/** Zip/postal code. */
|
|
22
|
-
postalCode?: string | null;
|
|
23
|
-
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
24
|
-
addressLine2?: string | null;
|
|
25
|
-
}
|
|
26
|
-
/** @oneof */
|
|
27
|
-
export interface AddressStreetOneOf {
|
|
28
|
-
/** Street name and number. */
|
|
29
|
-
streetAddress?: StreetAddress;
|
|
30
|
-
/** Main address line, usually street and number as free text. */
|
|
31
|
-
addressLine?: string | null;
|
|
32
|
-
}
|
|
33
|
-
export interface StreetAddress {
|
|
34
|
-
/** Street number. */
|
|
35
|
-
number?: string;
|
|
36
|
-
/** Street name. */
|
|
37
|
-
name?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface AddressLocation {
|
|
40
|
-
/** Address latitude. */
|
|
41
|
-
latitude?: number | null;
|
|
42
|
-
/** Address longitude. */
|
|
43
|
-
longitude?: number | null;
|
|
44
|
-
}
|
|
45
|
-
export interface Subdivision {
|
|
46
|
-
/** Short subdivision code. */
|
|
47
|
-
code?: string;
|
|
48
|
-
/** Subdivision full name. */
|
|
49
|
-
name?: string;
|
|
50
|
-
}
|
|
51
|
-
export declare enum SubdivisionType {
|
|
52
|
-
UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
|
|
53
|
-
/** State */
|
|
54
|
-
ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
|
|
55
|
-
/** County */
|
|
56
|
-
ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
|
|
57
|
-
/** City/town */
|
|
58
|
-
ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
|
|
59
|
-
/** Neighborhood/quarter */
|
|
60
|
-
ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
|
|
61
|
-
/** Street/block */
|
|
62
|
-
ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
|
|
63
|
-
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
64
|
-
COUNTRY = "COUNTRY"
|
|
65
|
-
}
|
|
66
|
-
export interface GetPlaceRequest {
|
|
67
|
-
searchId: string;
|
|
68
|
-
/** A random string which identifies an autocomplete session for billing purposes. The session begins when the user starts typing a query, and concludes when they select a place and a call to Get Place is made. Once a session has concluded, the token is no longer valid. your app must generate a fresh token for each session. */
|
|
69
|
-
sessionToken?: string | null;
|
|
70
|
-
}
|
|
71
|
-
export interface GetPlaceResponse {
|
|
72
|
-
place?: Place;
|
|
73
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubdivisionType = void 0;
|
|
4
|
-
var SubdivisionType;
|
|
5
|
-
(function (SubdivisionType) {
|
|
6
|
-
SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
|
|
7
|
-
/** State */
|
|
8
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
|
|
9
|
-
/** County */
|
|
10
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
|
|
11
|
-
/** City/town */
|
|
12
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
|
|
13
|
-
/** Neighborhood/quarter */
|
|
14
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
|
|
15
|
-
/** Street/block */
|
|
16
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
|
|
17
|
-
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
18
|
-
SubdivisionType["COUNTRY"] = "COUNTRY";
|
|
19
|
-
})(SubdivisionType = exports.SubdivisionType || (exports.SubdivisionType = {}));
|
|
20
|
-
//# sourceMappingURL=atlas-v2-place.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atlas-v2-place.types.js","sourceRoot":"","sources":["../../../src/atlas-v2-place.types.ts"],"names":[],"mappings":";;;AAwDA,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB,wEAAqD,CAAA;IACrD,YAAY;IACZ,8EAA2D,CAAA;IAC3D,aAAa;IACb,8EAA2D,CAAA;IAC3D,gBAAgB;IAChB,8EAA2D,CAAA;IAC3D,2BAA2B;IAC3B,8EAA2D,CAAA;IAC3D,mBAAmB;IACnB,8EAA2D,CAAA;IAC3D,8IAA8I;IAC9I,sCAAmB,CAAA;AACrB,CAAC,EAdW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAc1B"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
export declare const __debug: {
|
|
2
|
-
verboseLogging: {
|
|
3
|
-
on: () => boolean;
|
|
4
|
-
off: () => boolean;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
export interface Place {
|
|
8
|
-
/** The given place id */
|
|
9
|
-
placeId?: string;
|
|
10
|
-
/** The Address object */
|
|
11
|
-
address?: Address;
|
|
12
|
-
/** The Place type. For example: airport, library etc... */
|
|
13
|
-
types?: string[];
|
|
14
|
-
}
|
|
15
|
-
/** Physical address */
|
|
16
|
-
export interface Address extends AddressStreetOneOf {
|
|
17
|
-
/** Street name and number. */
|
|
18
|
-
streetAddress?: StreetAddress;
|
|
19
|
-
/** Main address line, usually street and number as free text. */
|
|
20
|
-
addressLine1?: string | null;
|
|
21
|
-
/** Country code. */
|
|
22
|
-
country?: string | null;
|
|
23
|
-
/** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
24
|
-
subdivision?: string | null;
|
|
25
|
-
/** City name. */
|
|
26
|
-
city?: string | null;
|
|
27
|
-
/** Zip/postal code. */
|
|
28
|
-
postalCode?: string | null;
|
|
29
|
-
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
30
|
-
addressLine2?: string | null;
|
|
31
|
-
}
|
|
32
|
-
/** @oneof */
|
|
33
|
-
export interface AddressStreetOneOf {
|
|
34
|
-
/** Street name and number. */
|
|
35
|
-
streetAddress?: StreetAddress;
|
|
36
|
-
/** Main address line, usually street and number as free text. */
|
|
37
|
-
addressLine?: string | null;
|
|
38
|
-
}
|
|
39
|
-
export interface StreetAddress {
|
|
40
|
-
/** Street number. */
|
|
41
|
-
number?: string;
|
|
42
|
-
/** Street name. */
|
|
43
|
-
name?: string;
|
|
44
|
-
}
|
|
45
|
-
export interface AddressLocation {
|
|
46
|
-
/** Address latitude. */
|
|
47
|
-
latitude?: number | null;
|
|
48
|
-
/** Address longitude. */
|
|
49
|
-
longitude?: number | null;
|
|
50
|
-
}
|
|
51
|
-
export interface Subdivision {
|
|
52
|
-
/** Short subdivision code. */
|
|
53
|
-
code?: string;
|
|
54
|
-
/** Subdivision full name. */
|
|
55
|
-
name?: string;
|
|
56
|
-
}
|
|
57
|
-
export declare enum SubdivisionType {
|
|
58
|
-
UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
|
|
59
|
-
/** State */
|
|
60
|
-
ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
|
|
61
|
-
/** County */
|
|
62
|
-
ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
|
|
63
|
-
/** City/town */
|
|
64
|
-
ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
|
|
65
|
-
/** Neighborhood/quarter */
|
|
66
|
-
ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
|
|
67
|
-
/** Street/block */
|
|
68
|
-
ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
|
|
69
|
-
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
70
|
-
COUNTRY = "COUNTRY"
|
|
71
|
-
}
|
|
72
|
-
export interface GetPlaceRequest {
|
|
73
|
-
searchId: string;
|
|
74
|
-
/** A random string which identifies an autocomplete session for billing purposes. The session begins when the user starts typing a query, and concludes when they select a place and a call to Get Place is made. Once a session has concluded, the token is no longer valid. your app must generate a fresh token for each session. */
|
|
75
|
-
sessionToken?: string | null;
|
|
76
|
-
}
|
|
77
|
-
export interface GetPlaceResponse {
|
|
78
|
-
place?: Place;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Once you have a search_id from a autocomplete Search, you can request more details about a particular establishment or point of interest by initiating a get place request.
|
|
82
|
-
* @public
|
|
83
|
-
* @documentationMaturity preview
|
|
84
|
-
* @requiredField searchId
|
|
85
|
-
* @applicableIdentity APP
|
|
86
|
-
* @applicableIdentity MEMBER
|
|
87
|
-
* @applicableIdentity VISITOR
|
|
88
|
-
*/
|
|
89
|
-
export declare function getPlace(searchId: string, options?: GetPlaceOptions): Promise<GetPlaceResponse>;
|
|
90
|
-
export interface GetPlaceOptions {
|
|
91
|
-
/** A random string which identifies an autocomplete session for billing purposes. The session begins when the user starts typing a query, and concludes when they select a place and a call to Get Place is made. Once a session has concluded, the token is no longer valid. your app must generate a fresh token for each session. */
|
|
92
|
-
sessionToken?: string | null;
|
|
93
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.getPlace = exports.SubdivisionType = exports.__debug = void 0;
|
|
32
|
-
const velo_1 = require("@wix/metro-runtime/velo");
|
|
33
|
-
const ambassadorWixAtlasV2Place = __importStar(require("./atlas-v2-place.http"));
|
|
34
|
-
let __verbose = false;
|
|
35
|
-
function __log(...args) {
|
|
36
|
-
__verbose && console.log(...args);
|
|
37
|
-
}
|
|
38
|
-
function __inspect(obj) {
|
|
39
|
-
return obj;
|
|
40
|
-
}
|
|
41
|
-
exports.__debug = {
|
|
42
|
-
verboseLogging: {
|
|
43
|
-
on: () => (__verbose = true),
|
|
44
|
-
off: () => (__verbose = false),
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
const _toVeloEntity = '$';
|
|
48
|
-
const _fromVeloEntity = '$';
|
|
49
|
-
var SubdivisionType;
|
|
50
|
-
(function (SubdivisionType) {
|
|
51
|
-
SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
|
|
52
|
-
/** State */
|
|
53
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
|
|
54
|
-
/** County */
|
|
55
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
|
|
56
|
-
/** City/town */
|
|
57
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
|
|
58
|
-
/** Neighborhood/quarter */
|
|
59
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
|
|
60
|
-
/** Street/block */
|
|
61
|
-
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
|
|
62
|
-
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
63
|
-
SubdivisionType["COUNTRY"] = "COUNTRY";
|
|
64
|
-
})(SubdivisionType = exports.SubdivisionType || (exports.SubdivisionType = {}));
|
|
65
|
-
const _getPlaceRequest = {};
|
|
66
|
-
const _getPlaceResponse = { place: '_place' };
|
|
67
|
-
const _place = { address: 'wix.common.Address' };
|
|
68
|
-
/**
|
|
69
|
-
* Once you have a search_id from a autocomplete Search, you can request more details about a particular establishment or point of interest by initiating a get place request.
|
|
70
|
-
* @public
|
|
71
|
-
* @documentationMaturity preview
|
|
72
|
-
* @requiredField searchId
|
|
73
|
-
* @applicableIdentity APP
|
|
74
|
-
* @applicableIdentity MEMBER
|
|
75
|
-
* @applicableIdentity VISITOR
|
|
76
|
-
*/
|
|
77
|
-
function getPlace(searchId, options) {
|
|
78
|
-
var _a, _b, _c;
|
|
79
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
80
|
-
const requestTransformation = {
|
|
81
|
-
searchId: '$[0]',
|
|
82
|
-
sessionToken: '$[1].sessionToken',
|
|
83
|
-
};
|
|
84
|
-
const responseTransformation = '$';
|
|
85
|
-
// @ts-ignore
|
|
86
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
87
|
-
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
88
|
-
rootSchema: _getPlaceRequest,
|
|
89
|
-
depSchemas: {},
|
|
90
|
-
fqdnTransformation: {
|
|
91
|
-
paths: [],
|
|
92
|
-
transformation: _fromVeloEntity,
|
|
93
|
-
},
|
|
94
|
-
customTransformation: requestTransformation,
|
|
95
|
-
});
|
|
96
|
-
const { fromJSON } = (0, velo_1.serializer)({
|
|
97
|
-
rootSchema: _getPlaceResponse,
|
|
98
|
-
depSchemas: { _place },
|
|
99
|
-
fqdnTransformation: {
|
|
100
|
-
paths: [...['place']],
|
|
101
|
-
transformation: _toVeloEntity,
|
|
102
|
-
},
|
|
103
|
-
customTransformation: responseTransformation,
|
|
104
|
-
});
|
|
105
|
-
const payload = toAmbassadorRequest([searchId, options]);
|
|
106
|
-
const reqOpts = ambassadorWixAtlasV2Place.getPlace(payload);
|
|
107
|
-
__log(`"GetPlace" sending request with: ${__inspect(reqOpts)}`);
|
|
108
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
109
|
-
try {
|
|
110
|
-
const result = yield httpClient.request(reqOpts);
|
|
111
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
112
|
-
return fromJSON(result.data);
|
|
113
|
-
}
|
|
114
|
-
catch (err) {
|
|
115
|
-
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
116
|
-
'searchId',
|
|
117
|
-
'options',
|
|
118
|
-
]);
|
|
119
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
120
|
-
throw transformedError;
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
exports.getPlace = getPlace;
|
|
125
|
-
//# sourceMappingURL=atlas-v2-place.universal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atlas-v2-place.universal.js","sourceRoot":"","sources":["../../../src/atlas-v2-place.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,iFAAmE;AAEnE,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAA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D,4BAyDC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
import { PredictRequest, PredictResponse } from './atlas-v2-prediction.types';
|
|
3
|
-
/** A Predict end-point take an input and returns an list of Prediction object. */
|
|
4
|
-
export declare function predict(payload: PredictRequest): RequestOptionsFactory<PredictResponse>;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.predict = void 0;
|
|
4
|
-
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
|
5
|
-
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
6
|
-
const _addressLocation = {
|
|
7
|
-
latitude: 'google.protobuf.DoubleValue',
|
|
8
|
-
longitude: 'google.protobuf.DoubleValue',
|
|
9
|
-
};
|
|
10
|
-
const _predictRequest = {
|
|
11
|
-
origin: '_addressLocation',
|
|
12
|
-
location: '_addressLocation',
|
|
13
|
-
};
|
|
14
|
-
const _predictResponse = {};
|
|
15
|
-
function resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url(opts) {
|
|
16
|
-
const domainToMappings = {
|
|
17
|
-
'api._api_base_domain_': [
|
|
18
|
-
{
|
|
19
|
-
srcPath: '/wix-atlas-service-web',
|
|
20
|
-
destPath: '',
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
'bo._base_domain_': [
|
|
24
|
-
{
|
|
25
|
-
srcPath: '/wix-atlas-service-web',
|
|
26
|
-
destPath: '',
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
_: [
|
|
30
|
-
{
|
|
31
|
-
srcPath: '/api/wix-atlas-service-web',
|
|
32
|
-
destPath: '',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
srcPath: '/_api/wix-atlas-service-web',
|
|
36
|
-
destPath: '',
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
'www._base_domain_': [
|
|
40
|
-
{
|
|
41
|
-
srcPath: '/wix-atlas-service-web',
|
|
42
|
-
destPath: '',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
srcPath: '/_api/wix-atlas-service-web',
|
|
46
|
-
destPath: '',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
srcPath: '/api/wix-atlas-service-web',
|
|
50
|
-
destPath: '',
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
'manage._base_domain_': [
|
|
54
|
-
{
|
|
55
|
-
srcPath: '/wix-atlas-service-web',
|
|
56
|
-
destPath: '',
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
'editor._base_domain_': [
|
|
60
|
-
{
|
|
61
|
-
srcPath: '/wix-atlas-service-web',
|
|
62
|
-
destPath: '',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
srcPath: '/api/wix-atlas-service-web',
|
|
66
|
-
destPath: '',
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
'blocks._base_domain_': [
|
|
70
|
-
{
|
|
71
|
-
srcPath: '/wix-atlas-service-web',
|
|
72
|
-
destPath: '',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
srcPath: '/api/wix-atlas-service-web',
|
|
76
|
-
destPath: '',
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
'create.editorx': [
|
|
80
|
-
{
|
|
81
|
-
srcPath: '/wix-atlas-service-web',
|
|
82
|
-
destPath: '',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
srcPath: '/api/wix-atlas-service-web',
|
|
86
|
-
destPath: '',
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
'editor.wixapps.net': [
|
|
90
|
-
{
|
|
91
|
-
srcPath: '/api/wix-atlas-service-web',
|
|
92
|
-
destPath: '',
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
};
|
|
96
|
-
return (0, metro_runtime_1.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
97
|
-
}
|
|
98
|
-
/** A Predict end-point take an input and returns an list of Prediction object. */
|
|
99
|
-
function predict(payload) {
|
|
100
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_predictRequest, {
|
|
101
|
-
_addressLocation,
|
|
102
|
-
});
|
|
103
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_predictResponse, {});
|
|
104
|
-
function __predict({ host }) {
|
|
105
|
-
const serializedData = toReq(payload);
|
|
106
|
-
const metadata = {
|
|
107
|
-
entityFqdn: 'wix.atlas.v2.prediction',
|
|
108
|
-
method: 'POST',
|
|
109
|
-
methodFqn: 'com.wixpress.vi.atlas.service.v2.AutocompleteServiceV2.Predict',
|
|
110
|
-
url: resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url({
|
|
111
|
-
protoPath: '/v2/predict',
|
|
112
|
-
data: serializedData,
|
|
113
|
-
host,
|
|
114
|
-
}),
|
|
115
|
-
data: serializedData,
|
|
116
|
-
transformResponse: fromRes,
|
|
117
|
-
};
|
|
118
|
-
return metadata;
|
|
119
|
-
}
|
|
120
|
-
__predict.fromReq = fromReq;
|
|
121
|
-
return __predict;
|
|
122
|
-
}
|
|
123
|
-
exports.predict = predict;
|
|
124
|
-
//# sourceMappingURL=atlas-v2-prediction.http.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atlas-v2-prediction.http.js","sourceRoot":"","sources":["../../../src/atlas-v2-prediction.http.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAC3D,sDAAgD;AAKhD,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,6BAA6B;CACzC,CAAC;AACF,MAAM,eAAe,GAAG;IACtB,MAAM,EAAE,kBAAkB;IAC1B,QAAQ,EAAE,kBAAkB;CAC7B,CAAC;AACF,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B,SAAS,0DAA0D,CACjE,IAA8C;IAE9C,MAAM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,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,kFAAkF;AAClF,SAAgB,OAAO,CACrB,OAAuB;IAEvB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EAAC,eAAe,EAAE;QACvE,gBAAgB;KACjB,CAAC,CAAC;IACH,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;IAE/D,SAAS,SAAS,CAAC,EAAE,IAAI,EAAO;QAC9B,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,yBAAyB;YACrC,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,gEAAgE;YAClE,GAAG,EAAE,0DAA0D,CAAC;gBAC9D,SAAS,EAAE,aAAa;gBACxB,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;IAE5B,OAAO,SAAS,CAAC;AACnB,CAAC;AA9BD,0BA8BC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { PredictOptions } from './atlas-v2-prediction.universal';
|
|
3
|
-
export declare const __metadata: {
|
|
4
|
-
PACKAGE_NAME: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function predict(httpClient: HttpClient): (input: string, options?: PredictOptions | undefined) => Promise<import("./atlas-v2-prediction.universal").PredictResponse>;
|
|
7
|
-
export { FilterType } from './atlas-v2-prediction.universal';
|
|
8
|
-
export { Prediction, MatchedSubstrings, TextStructure, ListPredictionsRequest, AddressLocation, FilterBy, ListPredictionsResponse, PredictRequest, PredictResponse, PredictOptions, } from './atlas-v2-prediction.universal';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilterType = exports.predict = exports.__metadata = void 0;
|
|
4
|
-
const atlas_v2_prediction_universal_1 = require("./atlas-v2-prediction.universal");
|
|
5
|
-
exports.__metadata = { PACKAGE_NAME: '@wix/atlas' };
|
|
6
|
-
function predict(httpClient) {
|
|
7
|
-
return (input, options) => (0, atlas_v2_prediction_universal_1.predict)(input, options,
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
{ httpClient });
|
|
10
|
-
}
|
|
11
|
-
exports.predict = predict;
|
|
12
|
-
var atlas_v2_prediction_universal_2 = require("./atlas-v2-prediction.universal");
|
|
13
|
-
Object.defineProperty(exports, "FilterType", { enumerable: true, get: function () { return atlas_v2_prediction_universal_2.FilterType; } });
|
|
14
|
-
//# sourceMappingURL=atlas-v2-prediction.public.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atlas-v2-prediction.public.js","sourceRoot":"","sources":["../../../src/atlas-v2-prediction.public.ts"],"names":[],"mappings":";;;AACA,mFAGyC;AAE5B,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AAEzD,SAAgB,OAAO,CAAC,UAAsB;IAC5C,OAAO,CAAC,KAAa,EAAE,OAAwB,EAAE,EAAE,CACjD,IAAA,uCAAgB,EACd,KAAK,EACL,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,0BAQC;AAED,iFAA6D;AAApD,2HAAA,UAAU,OAAA"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export interface Prediction {
|
|
2
|
-
/** The human-readable name of the prediction */
|
|
3
|
-
description?: string;
|
|
4
|
-
/** The id of the prediction that can be use in place api. Available for short time. */
|
|
5
|
-
searchId?: string;
|
|
6
|
-
/** Contains an array with offset value and length. These describe the location of the entered term in the prediction result text, so that the term can be highlighted if desired */
|
|
7
|
-
matchedSubstrings?: MatchedSubstrings[];
|
|
8
|
-
/** Provides pre-formatted text that can be shown in your autocomplete results */
|
|
9
|
-
textStructure?: TextStructure;
|
|
10
|
-
/** Contains an integer indicating the straight-line distance between the predicted place, and the specified origin point, in meters. */
|
|
11
|
-
distanceInMeters?: number | null;
|
|
12
|
-
}
|
|
13
|
-
export interface MatchedSubstrings {
|
|
14
|
-
length?: number;
|
|
15
|
-
offset?: number;
|
|
16
|
-
}
|
|
17
|
-
export interface TextStructure {
|
|
18
|
-
/** Contains the main text of a prediction, usually the name of the place */
|
|
19
|
-
mainText?: string;
|
|
20
|
-
/** Contains the secondary text of a prediction, usually the location of the place */
|
|
21
|
-
secondaryText?: string;
|
|
22
|
-
/** Contains an array with offset value and length. These describe the location of the entered term in the prediction result text, so that the term can be highlighted if desired */
|
|
23
|
-
mainTextMatchedSubstrings?: MatchedSubstrings[];
|
|
24
|
-
}
|
|
25
|
-
export interface ListPredictionsRequest {
|
|
26
|
-
/** The text the predictions will be based on. */
|
|
27
|
-
input?: string;
|
|
28
|
-
/** The origin point from which to calculate straight-line distance to the destination */
|
|
29
|
-
origin?: AddressLocation;
|
|
30
|
-
/** The point around which you wish to retrieve place information */
|
|
31
|
-
location?: AddressLocation;
|
|
32
|
-
/** The acceptable distance from that location (in meters) */
|
|
33
|
-
radius?: string | null;
|
|
34
|
-
/** Filters the user can add in order to get more accurate results */
|
|
35
|
-
filterBy?: FilterBy[];
|
|
36
|
-
}
|
|
37
|
-
export interface AddressLocation {
|
|
38
|
-
/** Address latitude. */
|
|
39
|
-
latitude?: number | null;
|
|
40
|
-
/** Address longitude. */
|
|
41
|
-
longitude?: number | null;
|
|
42
|
-
}
|
|
43
|
-
export interface FilterBy {
|
|
44
|
-
/** One of the filter types enum */
|
|
45
|
-
filterType?: FilterType;
|
|
46
|
-
/** Free text like "us" */
|
|
47
|
-
filterValue?: string;
|
|
48
|
-
}
|
|
49
|
-
export declare enum FilterType {
|
|
50
|
-
/** Filter by zip code */
|
|
51
|
-
zip_code = "zip_code",
|
|
52
|
-
/** Filter by 2-letters or 3-letters country code */
|
|
53
|
-
country_code = "country_code"
|
|
54
|
-
}
|
|
55
|
-
export interface ListPredictionsResponse {
|
|
56
|
-
predictions?: Prediction[];
|
|
57
|
-
}
|
|
58
|
-
export interface PredictRequest {
|
|
59
|
-
/** The text the predictions will be based on. */
|
|
60
|
-
input: string;
|
|
61
|
-
/** The origin point from which to calculate straight-line distance to the destination */
|
|
62
|
-
origin?: AddressLocation;
|
|
63
|
-
/** The point around which you wish to retrieve place information */
|
|
64
|
-
location?: AddressLocation;
|
|
65
|
-
/** The acceptable distance from that location (in meters) */
|
|
66
|
-
radius?: string | null;
|
|
67
|
-
/** alpha-2 or alpha-3 ISO-3166 country codes to filter by */
|
|
68
|
-
countryCodes?: string[];
|
|
69
|
-
/** A random string which identifies an autocomplete session for billing purposes. The session begins when the user starts typing a query, and concludes when they select a place and a call to Get Place is made. Once a session has concluded, the token is no longer valid. your app must generate a fresh token for each session. */
|
|
70
|
-
sessionToken?: string | null;
|
|
71
|
-
}
|
|
72
|
-
export interface PredictResponse {
|
|
73
|
-
predictions?: Prediction[];
|
|
74
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilterType = void 0;
|
|
4
|
-
var FilterType;
|
|
5
|
-
(function (FilterType) {
|
|
6
|
-
/** Filter by zip code */
|
|
7
|
-
FilterType["zip_code"] = "zip_code";
|
|
8
|
-
/** Filter by 2-letters or 3-letters country code */
|
|
9
|
-
FilterType["country_code"] = "country_code";
|
|
10
|
-
})(FilterType = exports.FilterType || (exports.FilterType = {}));
|
|
11
|
-
//# sourceMappingURL=atlas-v2-prediction.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atlas-v2-prediction.types.js","sourceRoot":"","sources":["../../../src/atlas-v2-prediction.types.ts"],"names":[],"mappings":";;;AAsDA,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yBAAyB;IACzB,mCAAqB,CAAA;IACrB,oDAAoD;IACpD,2CAA6B,CAAA;AAC/B,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB"}
|