@wix/atlas 1.0.10 → 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 +23 -11
- 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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.location = exports.autocomplete = exports.places = void 0;
|
|
27
|
+
exports.places = __importStar(require("@wix/atlas_places/context"));
|
|
28
|
+
exports.autocomplete = __importStar(require("@wix/atlas_autocomplete/context"));
|
|
29
|
+
exports.location = __importStar(require("@wix/atlas_location/context"));
|
|
30
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oEAAoD;AACpD,gFAAgE;AAChE,wEAAwD"}
|
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * as places from '
|
|
2
|
-
export * as autocomplete from '
|
|
3
|
-
export * as location from '
|
|
1
|
+
export * as places from '@wix/atlas_places';
|
|
2
|
+
export * as autocomplete from '@wix/atlas_autocomplete';
|
|
3
|
+
export * as location from '@wix/atlas_location';
|
package/build/cjs/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -20,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
24
|
};
|
|
21
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
26
|
exports.location = exports.autocomplete = exports.places = void 0;
|
|
23
|
-
exports.places = __importStar(require("
|
|
24
|
-
exports.autocomplete = __importStar(require("
|
|
25
|
-
exports.location = __importStar(require("
|
|
27
|
+
exports.places = __importStar(require("@wix/atlas_places"));
|
|
28
|
+
exports.autocomplete = __importStar(require("@wix/atlas_autocomplete"));
|
|
29
|
+
exports.location = __importStar(require("@wix/atlas_location"));
|
|
26
30
|
//# sourceMappingURL=index.js.map
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA4C;AAC5C,wEAAwD;AACxD,gEAAgD"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -20,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
24
|
};
|
|
21
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
26
|
exports.location = exports.autocomplete = exports.places = void 0;
|
|
23
|
-
exports.places = __importStar(require("
|
|
24
|
-
exports.autocomplete = __importStar(require("
|
|
25
|
-
exports.location = __importStar(require("
|
|
26
|
-
//# sourceMappingURL=
|
|
27
|
+
exports.places = __importStar(require("@wix/atlas_places/meta"));
|
|
28
|
+
exports.autocomplete = __importStar(require("@wix/atlas_autocomplete/meta"));
|
|
29
|
+
exports.location = __importStar(require("@wix/atlas_location/meta"));
|
|
30
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAiD;AACjD,6EAA6D;AAC7D,qEAAqD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAC"}
|
package/build/es/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * as places from '
|
|
2
|
-
export * as autocomplete from '
|
|
3
|
-
export * as location from '
|
|
1
|
+
export * as places from '@wix/atlas_places';
|
|
2
|
+
export * as autocomplete from '@wix/atlas_autocomplete';
|
|
3
|
+
export * as location from '@wix/atlas_location';
|
package/build/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * as places from '
|
|
2
|
-
export * as autocomplete from '
|
|
3
|
-
export * as location from '
|
|
1
|
+
export * as places from '@wix/atlas_places';
|
|
2
|
+
export * as autocomplete from '@wix/atlas_autocomplete';
|
|
3
|
+
export * as location from '@wix/atlas_location';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/build/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
|
package/build/es/meta.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,YAAY,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/atlas",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -9,29 +9,41 @@
|
|
|
9
9
|
"module": "build/es/index.js",
|
|
10
10
|
"main": "build/cjs/index.js",
|
|
11
11
|
"typings": "./build/cjs/index.d.ts",
|
|
12
|
+
"typesBundle": "./type-bundles/index.bundle.d.ts",
|
|
12
13
|
"files": [
|
|
13
14
|
"build",
|
|
14
|
-
"frontend/package.json"
|
|
15
|
+
"frontend/package.json",
|
|
16
|
+
"meta",
|
|
17
|
+
"context",
|
|
18
|
+
"type-bundles"
|
|
15
19
|
],
|
|
16
20
|
"dependencies": {
|
|
17
|
-
"@wix/
|
|
18
|
-
"@wix/
|
|
19
|
-
"@wix/
|
|
21
|
+
"@wix/atlas_autocomplete": "1.0.0",
|
|
22
|
+
"@wix/atlas_location": "1.0.0",
|
|
23
|
+
"@wix/atlas_places": "1.0.0"
|
|
20
24
|
},
|
|
21
25
|
"devDependencies": {
|
|
22
|
-
"@wix/
|
|
26
|
+
"@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
|
|
27
|
+
"glob": "^10.4.1",
|
|
28
|
+
"rollup": "^4.18.0",
|
|
29
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
30
|
+
"typescript": "^5.3.2"
|
|
23
31
|
},
|
|
24
32
|
"scripts": {
|
|
25
|
-
"build": "tsc -b tsconfig.json tsconfig.esm.json",
|
|
26
|
-
"
|
|
27
|
-
"posttest": "npm run autodocs",
|
|
33
|
+
"build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
|
|
34
|
+
"build:dts-bundles": "test -f config/rollup-config.js && rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
|
|
28
35
|
"test": ":"
|
|
29
36
|
},
|
|
30
37
|
"wix": {
|
|
31
38
|
"artifact": {
|
|
39
|
+
"groupId": "com.wixpress.public-sdk-autogen",
|
|
32
40
|
"artifactId": "atlas-public-sdk-autogen",
|
|
33
|
-
"
|
|
41
|
+
"isRootPublicSdk": true
|
|
42
|
+
},
|
|
43
|
+
"sdkDependency": {
|
|
44
|
+
"fqdnNamespace": "",
|
|
45
|
+
"fqdn": ""
|
|
34
46
|
}
|
|
35
47
|
},
|
|
36
|
-
"falconPackageHash": "
|
|
48
|
+
"falconPackageHash": "11a89732c925c67db175650890d2dbe1f49de5c65b212a1ed376b933"
|
|
37
49
|
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
interface Place {
|
|
2
|
+
/** The given place id */
|
|
3
|
+
placeId?: string;
|
|
4
|
+
/** The Address object */
|
|
5
|
+
address?: Address$1;
|
|
6
|
+
/** The Place type. For example: airport, library etc... */
|
|
7
|
+
types?: string[];
|
|
8
|
+
}
|
|
9
|
+
/** Physical address */
|
|
10
|
+
interface Address$1 extends AddressStreetOneOf$1 {
|
|
11
|
+
/** Street name and number. */
|
|
12
|
+
streetAddress?: StreetAddress$1;
|
|
13
|
+
/** Main address line, usually street and number as free text. */
|
|
14
|
+
addressLine1?: 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
|
+
interface AddressStreetOneOf$1 {
|
|
28
|
+
/** Street name and number. */
|
|
29
|
+
streetAddress?: StreetAddress$1;
|
|
30
|
+
/** Main address line, usually street and number as free text. */
|
|
31
|
+
addressLine?: string | null;
|
|
32
|
+
}
|
|
33
|
+
interface StreetAddress$1 {
|
|
34
|
+
/** Street number. */
|
|
35
|
+
number?: string;
|
|
36
|
+
/** Street name. */
|
|
37
|
+
name?: string;
|
|
38
|
+
}
|
|
39
|
+
interface GetPlaceResponse {
|
|
40
|
+
place?: Place;
|
|
41
|
+
}
|
|
42
|
+
interface GetPlaceResponseNonNullableFields {
|
|
43
|
+
place?: {
|
|
44
|
+
placeId: string;
|
|
45
|
+
types: string[];
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
interface GetPlaceOptions {
|
|
49
|
+
/** 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. */
|
|
50
|
+
sessionToken?: string | null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
54
|
+
interface HttpClient {
|
|
55
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
56
|
+
}
|
|
57
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
58
|
+
type HttpResponse<T = any> = {
|
|
59
|
+
data: T;
|
|
60
|
+
status: number;
|
|
61
|
+
statusText: string;
|
|
62
|
+
headers: any;
|
|
63
|
+
request?: any;
|
|
64
|
+
};
|
|
65
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
66
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
67
|
+
url: string;
|
|
68
|
+
data?: Data;
|
|
69
|
+
params?: URLSearchParams;
|
|
70
|
+
} & APIMetadata;
|
|
71
|
+
type APIMetadata = {
|
|
72
|
+
methodFqn?: string;
|
|
73
|
+
entityFqdn?: string;
|
|
74
|
+
packageName?: string;
|
|
75
|
+
};
|
|
76
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
77
|
+
|
|
78
|
+
declare function getPlace$1(httpClient: HttpClient): (searchId: string, options?: GetPlaceOptions) => Promise<GetPlaceResponse & GetPlaceResponseNonNullableFields>;
|
|
79
|
+
|
|
80
|
+
declare const getPlace: BuildRESTFunction<typeof getPlace$1>;
|
|
81
|
+
|
|
82
|
+
declare const context$2_getPlace: typeof getPlace;
|
|
83
|
+
declare namespace context$2 {
|
|
84
|
+
export { context$2_getPlace as getPlace };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface Prediction {
|
|
88
|
+
/** The human-readable name of the prediction */
|
|
89
|
+
description?: string;
|
|
90
|
+
/** The id of the prediction that can be use in place api. Available for short time. */
|
|
91
|
+
searchId?: string;
|
|
92
|
+
/** 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 */
|
|
93
|
+
matchedSubstrings?: MatchedSubstrings[];
|
|
94
|
+
/** Provides pre-formatted text that can be shown in your autocomplete results */
|
|
95
|
+
textStructure?: TextStructure;
|
|
96
|
+
/** Contains an integer indicating the straight-line distance between the predicted place, and the specified origin point, in meters. */
|
|
97
|
+
distanceInMeters?: number | null;
|
|
98
|
+
}
|
|
99
|
+
interface MatchedSubstrings {
|
|
100
|
+
length?: number;
|
|
101
|
+
offset?: number;
|
|
102
|
+
}
|
|
103
|
+
interface TextStructure {
|
|
104
|
+
/** Contains the main text of a prediction, usually the name of the place */
|
|
105
|
+
mainText?: string;
|
|
106
|
+
/** Contains the secondary text of a prediction, usually the location of the place */
|
|
107
|
+
secondaryText?: string;
|
|
108
|
+
/** 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 */
|
|
109
|
+
mainTextMatchedSubstrings?: MatchedSubstrings[];
|
|
110
|
+
}
|
|
111
|
+
interface AddressLocation {
|
|
112
|
+
/** Address latitude. */
|
|
113
|
+
latitude?: number | null;
|
|
114
|
+
/** Address longitude. */
|
|
115
|
+
longitude?: number | null;
|
|
116
|
+
}
|
|
117
|
+
interface PredictResponse {
|
|
118
|
+
predictions?: Prediction[];
|
|
119
|
+
}
|
|
120
|
+
interface PredictResponseNonNullableFields {
|
|
121
|
+
predictions: {
|
|
122
|
+
description: string;
|
|
123
|
+
searchId: string;
|
|
124
|
+
matchedSubstrings: {
|
|
125
|
+
length: number;
|
|
126
|
+
offset: number;
|
|
127
|
+
}[];
|
|
128
|
+
textStructure?: {
|
|
129
|
+
mainText: string;
|
|
130
|
+
secondaryText: string;
|
|
131
|
+
mainTextMatchedSubstrings: {
|
|
132
|
+
length: number;
|
|
133
|
+
offset: number;
|
|
134
|
+
}[];
|
|
135
|
+
};
|
|
136
|
+
}[];
|
|
137
|
+
}
|
|
138
|
+
interface PredictOptions {
|
|
139
|
+
/** The origin point from which to calculate straight-line distance to the destination */
|
|
140
|
+
origin?: AddressLocation;
|
|
141
|
+
/** The point around which you wish to retrieve place information */
|
|
142
|
+
location?: AddressLocation;
|
|
143
|
+
/** The acceptable distance from that location (in meters) */
|
|
144
|
+
radius?: string | null;
|
|
145
|
+
/** alpha-2 or alpha-3 ISO-3166 country codes to filter by */
|
|
146
|
+
countryCodes?: string[];
|
|
147
|
+
/** 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. */
|
|
148
|
+
sessionToken?: string | null;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
declare function predict$1(httpClient: HttpClient): (input: string, options?: PredictOptions) => Promise<PredictResponse & PredictResponseNonNullableFields>;
|
|
152
|
+
|
|
153
|
+
declare const predict: BuildRESTFunction<typeof predict$1>;
|
|
154
|
+
|
|
155
|
+
declare const context$1_predict: typeof predict;
|
|
156
|
+
declare namespace context$1 {
|
|
157
|
+
export { context$1_predict as predict };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
interface SearchResult {
|
|
161
|
+
/** The Address object */
|
|
162
|
+
address?: Address;
|
|
163
|
+
/** stores additional data about the proximity to the specified location */
|
|
164
|
+
proximity?: Proximity;
|
|
165
|
+
}
|
|
166
|
+
/** Physical address */
|
|
167
|
+
interface Address extends AddressStreetOneOf {
|
|
168
|
+
/** Street name and number. */
|
|
169
|
+
streetAddress?: StreetAddress;
|
|
170
|
+
/** Main address line, usually street and number as free text. */
|
|
171
|
+
addressLine1?: string | null;
|
|
172
|
+
/** Country code. */
|
|
173
|
+
country?: string | null;
|
|
174
|
+
/** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
175
|
+
subdivision?: string | null;
|
|
176
|
+
/** City name. */
|
|
177
|
+
city?: string | null;
|
|
178
|
+
/** Zip/postal code. */
|
|
179
|
+
postalCode?: string | null;
|
|
180
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
181
|
+
addressLine2?: string | null;
|
|
182
|
+
}
|
|
183
|
+
/** @oneof */
|
|
184
|
+
interface AddressStreetOneOf {
|
|
185
|
+
/** Street name and number. */
|
|
186
|
+
streetAddress?: StreetAddress;
|
|
187
|
+
/** Main address line, usually street and number as free text. */
|
|
188
|
+
addressLine?: string | null;
|
|
189
|
+
}
|
|
190
|
+
interface StreetAddress {
|
|
191
|
+
/** Street number. */
|
|
192
|
+
number?: string;
|
|
193
|
+
/** Street name. */
|
|
194
|
+
name?: string;
|
|
195
|
+
}
|
|
196
|
+
declare enum Proximity {
|
|
197
|
+
UNKNOWN_PROXIMITY = "UNKNOWN_PROXIMITY",
|
|
198
|
+
/** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */
|
|
199
|
+
PINPOINT = "PINPOINT",
|
|
200
|
+
/** indicates that the returned result is the geometric center of a result */
|
|
201
|
+
APPROXIMATE = "APPROXIMATE",
|
|
202
|
+
/** indicates that the returned result is around an area */
|
|
203
|
+
GENERAL_AREA = "GENERAL_AREA"
|
|
204
|
+
}
|
|
205
|
+
interface FilterBy {
|
|
206
|
+
/** One of the filter types enum */
|
|
207
|
+
filterType?: FilterType;
|
|
208
|
+
/** Free text like "us" */
|
|
209
|
+
filterValue?: string;
|
|
210
|
+
}
|
|
211
|
+
declare enum FilterType {
|
|
212
|
+
/** Filter by zip code */
|
|
213
|
+
zip_code = "zip_code",
|
|
214
|
+
/** Filter by 2-letters or 3-letters country code */
|
|
215
|
+
country_code = "country_code"
|
|
216
|
+
}
|
|
217
|
+
interface SearchResponse {
|
|
218
|
+
/** List of 'Address' objects */
|
|
219
|
+
searchResults?: SearchResult[];
|
|
220
|
+
}
|
|
221
|
+
interface SearchResponseNonNullableFields {
|
|
222
|
+
searchResults: {
|
|
223
|
+
proximity: Proximity;
|
|
224
|
+
}[];
|
|
225
|
+
}
|
|
226
|
+
interface SearchOptions {
|
|
227
|
+
/** Free text */
|
|
228
|
+
query?: string | null;
|
|
229
|
+
/**
|
|
230
|
+
* Deprecate! - Please use 'zipCode' and 'countryCodes' fields
|
|
231
|
+
* @deprecated
|
|
232
|
+
*/
|
|
233
|
+
filterBy?: FilterBy[];
|
|
234
|
+
/** Zip code filter the user can add in order to get more accurate results */
|
|
235
|
+
zipCode?: string | null;
|
|
236
|
+
/** Country codes filter the user can add in order to get more accurate results */
|
|
237
|
+
countryCodes?: string[];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
declare function search$1(httpClient: HttpClient): (options?: SearchOptions) => Promise<SearchResponse & SearchResponseNonNullableFields>;
|
|
241
|
+
|
|
242
|
+
declare const search: BuildRESTFunction<typeof search$1>;
|
|
243
|
+
|
|
244
|
+
declare const context_search: typeof search;
|
|
245
|
+
declare namespace context {
|
|
246
|
+
export { context_search as search };
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export { context$1 as autocomplete, context as location, context$2 as places };
|