@aws-amplify/geo 1.3.25-unstable.2 → 1.3.25
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/CHANGELOG.md +16 -0
- package/build.js +5 -0
- package/dist/aws-amplify-geo.js +29284 -0
- package/dist/aws-amplify-geo.js.map +1 -0
- package/dist/aws-amplify-geo.min.js +56 -0
- package/dist/aws-amplify-geo.min.js.map +1 -0
- package/index.js +7 -0
- package/lib/Geo.js +82 -21
- package/lib/Geo.js.map +1 -1
- package/lib/Providers/AmazonLocationServiceProvider.js +112 -33
- package/lib/Providers/AmazonLocationServiceProvider.js.map +1 -1
- package/lib/util.js +47 -8
- package/lib/util.js.map +1 -1
- package/lib-esm/Geo.js +66 -5
- package/lib-esm/Geo.js.map +1 -1
- package/lib-esm/Providers/AmazonLocationServiceProvider.js +79 -3
- package/lib-esm/Providers/AmazonLocationServiceProvider.js.map +1 -1
- package/lib-esm/util.js +39 -3
- package/lib-esm/util.js.map +1 -1
- package/package.json +9 -13
- package/src/Geo.ts +14 -4
- package/src/Providers/AmazonLocationServiceProvider.ts +12 -2
- package/src/types/Geo.ts +12 -2
- package/src/types/Provider.ts +12 -2
- package/src/util.ts +12 -2
- package/webpack.config.dev.js +6 -0
- package/lib/Geo.d.ts +0 -110
- package/lib/Providers/AmazonLocationServiceProvider.d.ts +0 -105
- package/lib/index.d.ts +0 -2
- package/lib/types/AmazonLocationServiceProvider.d.ts +0 -24
- package/lib/types/Geo.d.ts +0 -114
- package/lib/types/Provider.d.ts +0 -16
- package/lib/types/index.d.ts +0 -3
- package/lib/util.d.ts +0 -7
package/lib/Geo.d.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { Place, GeoConfig, Coordinates, SearchByTextOptions, SearchByCoordinatesOptions, GeoProvider, MapStyle, GeofenceId, GeofenceInput, GeofenceOptions, SaveGeofencesResults, Geofence, ListGeofenceOptions, ListGeofenceResults, DeleteGeofencesResults, searchByPlaceIdOptions } from './types';
|
|
2
|
-
export declare class GeoClass {
|
|
3
|
-
static MODULE: string;
|
|
4
|
-
/**
|
|
5
|
-
* @private
|
|
6
|
-
*/
|
|
7
|
-
private _config;
|
|
8
|
-
private _pluggables;
|
|
9
|
-
constructor();
|
|
10
|
-
/**
|
|
11
|
-
* get the name of the module category
|
|
12
|
-
* @returns {string} name of the module category
|
|
13
|
-
*/
|
|
14
|
-
getModuleName(): string;
|
|
15
|
-
/**
|
|
16
|
-
* add plugin into Geo category
|
|
17
|
-
* @param {Object} pluggable - an instance of the plugin
|
|
18
|
-
*/
|
|
19
|
-
addPluggable(pluggable: GeoProvider): object;
|
|
20
|
-
/**
|
|
21
|
-
* Get the plugin object
|
|
22
|
-
* @param providerName - the name of the plugin
|
|
23
|
-
*/
|
|
24
|
-
getPluggable(providerName: string): GeoProvider;
|
|
25
|
-
/**
|
|
26
|
-
* Remove the plugin object
|
|
27
|
-
* @param providerName - the name of the plugin
|
|
28
|
-
*/
|
|
29
|
-
removePluggable(providerName: string): void;
|
|
30
|
-
/**
|
|
31
|
-
* Configure Geo
|
|
32
|
-
* @param {Object} config - Configuration object for Geo
|
|
33
|
-
* @return {Object} - Current configuration
|
|
34
|
-
*/
|
|
35
|
-
configure(config?: any): GeoConfig;
|
|
36
|
-
/**
|
|
37
|
-
* Get the map resources that are currently available through the provider
|
|
38
|
-
* @param {string} provider
|
|
39
|
-
* @returns - Array of available map resources
|
|
40
|
-
*/
|
|
41
|
-
getAvailableMaps(provider?: string): MapStyle[];
|
|
42
|
-
/**
|
|
43
|
-
* Get the map resource set as default in amplify config
|
|
44
|
-
* @param {string} provider
|
|
45
|
-
* @returns - Map resource set as the default in amplify config
|
|
46
|
-
*/
|
|
47
|
-
getDefaultMap(provider?: string): MapStyle;
|
|
48
|
-
/**
|
|
49
|
-
* Search by text input with optional parameters
|
|
50
|
-
* @param {string} text - The text string that is to be searched for
|
|
51
|
-
* @param {SearchByTextOptions} options? - Optional parameters to the search
|
|
52
|
-
* @returns {Promise<Place[]>} - Promise resolves to a list of Places that match search parameters
|
|
53
|
-
*/
|
|
54
|
-
searchByText(text: string, options?: SearchByTextOptions): Promise<Place[]>;
|
|
55
|
-
/**
|
|
56
|
-
* Search for search term suggestions based on input text
|
|
57
|
-
* @param {string} text - The text string that is to be search for
|
|
58
|
-
* @param {SearchByTextOptions} options? - Optional parameters to the search
|
|
59
|
-
* @returns {Promise<SearchForSuggestionsResults>} - Resolves to an array of search suggestion strings
|
|
60
|
-
*/
|
|
61
|
-
searchForSuggestions(text: string, options?: SearchByTextOptions): Promise<import("./types").SearchForSuggestionsResults>;
|
|
62
|
-
/**
|
|
63
|
-
* Search for location by unique ID
|
|
64
|
-
* @param {string} placeId - Unique ID of the location that is to be searched for
|
|
65
|
-
* @param {searchByPlaceIdOptions} options? - Optional parameters to the search
|
|
66
|
-
* @returns {Promise<Place>} - Resolves to a place with the given placeId
|
|
67
|
-
*/
|
|
68
|
-
searchByPlaceId(placeId: string, options?: searchByPlaceIdOptions): Promise<Place>;
|
|
69
|
-
/**
|
|
70
|
-
* Reverse geocoding search via a coordinate point on the map
|
|
71
|
-
* @param coordinates - Coordinates array for the search input
|
|
72
|
-
* @param options - Options parameters for the search
|
|
73
|
-
* @returns {Promise<Place>} - Promise that resolves to a place matching search coordinates
|
|
74
|
-
*/
|
|
75
|
-
searchByCoordinates(coordinates: Coordinates, options?: SearchByCoordinatesOptions): Promise<Place>;
|
|
76
|
-
/**
|
|
77
|
-
* Create geofences
|
|
78
|
-
* @param geofences - Single or array of geofence objects to create
|
|
79
|
-
* @param options? - Optional parameters for creating geofences
|
|
80
|
-
* @returns {Promise<SaveGeofencesResults>} - Promise that resolves to an object with:
|
|
81
|
-
* successes: list of geofences successfully created
|
|
82
|
-
* errors: list of geofences that failed to create
|
|
83
|
-
*/
|
|
84
|
-
saveGeofences(geofences: GeofenceInput | GeofenceInput[], options?: GeofenceOptions): Promise<SaveGeofencesResults>;
|
|
85
|
-
/**
|
|
86
|
-
* Get a single geofence by geofenceId
|
|
87
|
-
* @param geofenceId: GeofenceId - The string id of the geofence to get
|
|
88
|
-
* @param options?: GeofenceOptions - Optional parameters for getting a geofence
|
|
89
|
-
* @returns Promise<Geofence> - Promise that resolves to a geofence object
|
|
90
|
-
*/
|
|
91
|
-
getGeofence(geofenceId: GeofenceId, options?: GeofenceOptions): Promise<Geofence>;
|
|
92
|
-
/**
|
|
93
|
-
* List geofences
|
|
94
|
-
* @param options?: ListGeofenceOptions
|
|
95
|
-
* @returns {Promise<ListGeofencesResults>} - Promise that resolves to an object with:
|
|
96
|
-
* entries: list of geofences - 100 geofences are listed per page
|
|
97
|
-
* nextToken: token for next page of geofences
|
|
98
|
-
*/
|
|
99
|
-
listGeofences(options?: ListGeofenceOptions): Promise<ListGeofenceResults>;
|
|
100
|
-
/**
|
|
101
|
-
* Delete geofences
|
|
102
|
-
* @param geofenceIds: string|string[]
|
|
103
|
-
* @param options?: GeofenceOptions
|
|
104
|
-
* @returns {Promise<DeleteGeofencesResults>} - Promise that resolves to an object with:
|
|
105
|
-
* successes: list of geofences successfully deleted
|
|
106
|
-
* errors: list of geofences that failed to delete
|
|
107
|
-
*/
|
|
108
|
-
deleteGeofences(geofenceIds: string | string[], options?: GeofenceOptions): Promise<DeleteGeofencesResults>;
|
|
109
|
-
}
|
|
110
|
-
export declare const Geo: GeoClass;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { GeoConfig, SearchByTextOptions, SearchByCoordinatesOptions, GeoProvider, Place, AmazonLocationServiceMapStyle, Coordinates, SearchForSuggestionsResults, GeofenceId, GeofenceInput, AmazonLocationServiceGeofenceOptions, AmazonLocationServiceListGeofenceOptions, ListGeofenceResults, SaveGeofencesResults, AmazonLocationServiceGeofence, AmazonLocationServiceDeleteGeofencesResults, searchByPlaceIdOptions } from '../types';
|
|
2
|
-
export declare class AmazonLocationServiceProvider implements GeoProvider {
|
|
3
|
-
static CATEGORY: string;
|
|
4
|
-
static PROVIDER_NAME: string;
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
*/
|
|
8
|
-
private _config;
|
|
9
|
-
/**
|
|
10
|
-
* Initialize Geo with AWS configurations
|
|
11
|
-
* @param {Object} config - Configuration object for Geo
|
|
12
|
-
*/
|
|
13
|
-
constructor(config?: GeoConfig);
|
|
14
|
-
/**
|
|
15
|
-
* get the category of the plugin
|
|
16
|
-
* @returns {string} name of the category
|
|
17
|
-
*/
|
|
18
|
-
getCategory(): string;
|
|
19
|
-
/**
|
|
20
|
-
* get provider name of the plugin
|
|
21
|
-
* @returns {string} name of the provider
|
|
22
|
-
*/
|
|
23
|
-
getProviderName(): string;
|
|
24
|
-
/**
|
|
25
|
-
* Configure Geo part with aws configuration
|
|
26
|
-
* @param {Object} config - Configuration of the Geo
|
|
27
|
-
* @return {Object} - Current configuration
|
|
28
|
-
*/
|
|
29
|
-
configure(config?: any): object;
|
|
30
|
-
/**
|
|
31
|
-
* Get the map resources that are currently available through the provider
|
|
32
|
-
* @returns {AmazonLocationServiceMapStyle[]}- Array of available map resources
|
|
33
|
-
*/
|
|
34
|
-
getAvailableMaps(): AmazonLocationServiceMapStyle[];
|
|
35
|
-
/**
|
|
36
|
-
* Get the map resource set as default in amplify config
|
|
37
|
-
* @returns {AmazonLocationServiceMapStyle} - Map resource set as the default in amplify config
|
|
38
|
-
*/
|
|
39
|
-
getDefaultMap(): AmazonLocationServiceMapStyle;
|
|
40
|
-
/**
|
|
41
|
-
* Search by text input with optional parameters
|
|
42
|
-
* @param {string} text - The text string that is to be searched for
|
|
43
|
-
* @param {SearchByTextOptions} options? - Optional parameters to the search
|
|
44
|
-
* @returns {Promise<Place[]>} - Promise resolves to a list of Places that match search parameters
|
|
45
|
-
*/
|
|
46
|
-
searchByText(text: string, options?: SearchByTextOptions): Promise<Place[]>;
|
|
47
|
-
/**
|
|
48
|
-
* Search for suggestions based on the input text
|
|
49
|
-
* @param {string} text - The text string that is to be searched for
|
|
50
|
-
* @param {SearchByTextOptions} options? - Optional parameters to the search
|
|
51
|
-
* @returns {Promise<SearchForSuggestionsResults>} - Resolves to an array of search suggestion strings
|
|
52
|
-
*/
|
|
53
|
-
searchForSuggestions(text: string, options?: SearchByTextOptions): Promise<SearchForSuggestionsResults>;
|
|
54
|
-
private _verifyPlaceId;
|
|
55
|
-
searchByPlaceId(placeId: string, options?: searchByPlaceIdOptions): Promise<Place | undefined>;
|
|
56
|
-
/**
|
|
57
|
-
* Reverse geocoding search via a coordinate point on the map
|
|
58
|
-
* @param coordinates - Coordinates array for the search input
|
|
59
|
-
* @param options - Options parameters for the search
|
|
60
|
-
* @returns {Promise<Place>} - Promise that resolves to a place matching search coordinates
|
|
61
|
-
*/
|
|
62
|
-
searchByCoordinates(coordinates: Coordinates, options?: SearchByCoordinatesOptions): Promise<Place>;
|
|
63
|
-
/**
|
|
64
|
-
* Create geofences inside of a geofence collection
|
|
65
|
-
* @param geofences - Array of geofence objects to create
|
|
66
|
-
* @param options? - Optional parameters for creating geofences
|
|
67
|
-
* @returns {Promise<AmazonLocationServiceSaveGeofencesResults>} - Promise that resolves to an object with:
|
|
68
|
-
* successes: list of geofences successfully created
|
|
69
|
-
* errors: list of geofences that failed to create
|
|
70
|
-
*/
|
|
71
|
-
saveGeofences(geofences: GeofenceInput[], options?: AmazonLocationServiceGeofenceOptions): Promise<SaveGeofencesResults>;
|
|
72
|
-
/**
|
|
73
|
-
* Get geofence from a geofence collection
|
|
74
|
-
* @param geofenceId:string
|
|
75
|
-
* @param options?: Optional parameters for getGeofence
|
|
76
|
-
* @returns {Promise<AmazonLocationServiceGeofence>} - Promise that resolves to a geofence object
|
|
77
|
-
*/
|
|
78
|
-
getGeofence(geofenceId: GeofenceId, options?: AmazonLocationServiceGeofenceOptions): Promise<AmazonLocationServiceGeofence>;
|
|
79
|
-
/**
|
|
80
|
-
* List geofences from a geofence collection
|
|
81
|
-
* @param options?: ListGeofenceOptions
|
|
82
|
-
* @returns {Promise<ListGeofencesResults>} - Promise that resolves to an object with:
|
|
83
|
-
* entries: list of geofences - 100 geofences are listed per page
|
|
84
|
-
* nextToken: token for next page of geofences
|
|
85
|
-
*/
|
|
86
|
-
listGeofences(options?: AmazonLocationServiceListGeofenceOptions): Promise<ListGeofenceResults>;
|
|
87
|
-
/**
|
|
88
|
-
* Delete geofences from a geofence collection
|
|
89
|
-
* @param geofenceIds: string|string[]
|
|
90
|
-
* @param options?: GeofenceOptions
|
|
91
|
-
* @returns {Promise<DeleteGeofencesResults>} - Promise that resolves to an object with:
|
|
92
|
-
* successes: list of geofences successfully deleted
|
|
93
|
-
* errors: list of geofences that failed to delete
|
|
94
|
-
*/
|
|
95
|
-
deleteGeofences(geofenceIds: string[], options?: AmazonLocationServiceGeofenceOptions): Promise<AmazonLocationServiceDeleteGeofencesResults>;
|
|
96
|
-
/**
|
|
97
|
-
* @private
|
|
98
|
-
*/
|
|
99
|
-
private _ensureCredentials;
|
|
100
|
-
private _verifyMapResources;
|
|
101
|
-
private _verifySearchIndex;
|
|
102
|
-
private _verifyGeofenceCollections;
|
|
103
|
-
private _AmazonLocationServiceBatchPutGeofenceCall;
|
|
104
|
-
private _AmazonLocationServiceBatchDeleteGeofenceCall;
|
|
105
|
-
}
|
package/lib/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { MapStyle, GeofenceOptions, ListGeofenceOptions, Geofence, DeleteGeofencesResults, GeofenceError } from './Geo';
|
|
2
|
-
export interface AmazonLocationServiceMapStyle extends MapStyle {
|
|
3
|
-
region: string;
|
|
4
|
-
}
|
|
5
|
-
export declare type AmazonLocationServiceGeofenceOptions = GeofenceOptions & {
|
|
6
|
-
collectionName?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare type AmazonLocationServiceGeofenceStatus = 'ACTIVE' | 'PENDING' | 'FAILED' | 'DELETED' | 'DELETING';
|
|
9
|
-
export declare type AmazonLocationServiceGeofence = Omit<Geofence, 'status'> & {
|
|
10
|
-
status: AmazonLocationServiceGeofenceStatus;
|
|
11
|
-
};
|
|
12
|
-
export declare type AmazonLocationServiceListGeofenceOptions = ListGeofenceOptions & {
|
|
13
|
-
collectionName?: string;
|
|
14
|
-
};
|
|
15
|
-
export declare type AmazonLocationServiceBatchGeofenceErrorMessages = 'AccessDeniedException' | 'InternalServerException' | 'ResourceNotFoundException' | 'ThrottlingException' | 'ValidationException';
|
|
16
|
-
export declare type AmazonLocationServiceBatchGeofenceError = Omit<GeofenceError, 'error'> & {
|
|
17
|
-
error: {
|
|
18
|
-
code: string;
|
|
19
|
-
message: AmazonLocationServiceBatchGeofenceErrorMessages;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export declare type AmazonLocationServiceDeleteGeofencesResults = Omit<DeleteGeofencesResults, 'errors'> & {
|
|
23
|
-
errors: AmazonLocationServiceBatchGeofenceError[];
|
|
24
|
-
};
|
package/lib/types/Geo.d.ts
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
export interface GeoConfig {
|
|
2
|
-
region?: string;
|
|
3
|
-
AmazonLocationService?: {
|
|
4
|
-
maps?: {
|
|
5
|
-
items: {};
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
search_indices?: {
|
|
9
|
-
items: string[];
|
|
10
|
-
default: string;
|
|
11
|
-
};
|
|
12
|
-
geofenceCollections?: {
|
|
13
|
-
items: string[];
|
|
14
|
-
default: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export interface MapStyle {
|
|
19
|
-
mapName: string;
|
|
20
|
-
style: string;
|
|
21
|
-
}
|
|
22
|
-
export declare type Longitude = number;
|
|
23
|
-
export declare type Latitude = number;
|
|
24
|
-
export declare type Coordinates = [Longitude, Latitude];
|
|
25
|
-
export declare type SWLongitude = Longitude;
|
|
26
|
-
export declare type SWLatitude = Latitude;
|
|
27
|
-
export declare type NELongitude = Longitude;
|
|
28
|
-
export declare type NELatitude = Latitude;
|
|
29
|
-
export declare type BoundingBox = [SWLongitude, SWLatitude, NELongitude, NELatitude];
|
|
30
|
-
export interface SearchByTextOptionsBase {
|
|
31
|
-
countries?: string[];
|
|
32
|
-
maxResults?: number;
|
|
33
|
-
searchIndexName?: string;
|
|
34
|
-
providerName?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface SearchByTextOptionsWithBiasPosition extends SearchByTextOptionsBase {
|
|
37
|
-
biasPosition?: Coordinates;
|
|
38
|
-
}
|
|
39
|
-
export interface SearchByTextOptionsWithSearchAreaConstraints extends SearchByTextOptionsBase {
|
|
40
|
-
searchAreaConstraints?: BoundingBox;
|
|
41
|
-
}
|
|
42
|
-
export declare type SearchByTextOptions = SearchByTextOptionsWithBiasPosition | SearchByTextOptionsWithSearchAreaConstraints;
|
|
43
|
-
export declare type SearchByCoordinatesOptions = {
|
|
44
|
-
maxResults?: number;
|
|
45
|
-
searchIndexName?: string;
|
|
46
|
-
providerName?: string;
|
|
47
|
-
};
|
|
48
|
-
export declare type searchByPlaceIdOptions = {
|
|
49
|
-
searchIndexName?: string;
|
|
50
|
-
};
|
|
51
|
-
export declare type PlaceGeometry = {
|
|
52
|
-
point: Coordinates;
|
|
53
|
-
};
|
|
54
|
-
export interface Place {
|
|
55
|
-
addressNumber?: string;
|
|
56
|
-
country?: string;
|
|
57
|
-
geometry: PlaceGeometry | undefined;
|
|
58
|
-
label?: string;
|
|
59
|
-
municipality?: string;
|
|
60
|
-
neighborhood?: string;
|
|
61
|
-
postalCode?: string;
|
|
62
|
-
region?: string;
|
|
63
|
-
street?: string;
|
|
64
|
-
subRegion?: string;
|
|
65
|
-
}
|
|
66
|
-
export declare type LinearRing = Coordinates[];
|
|
67
|
-
export declare type GeofencePolygon = LinearRing[];
|
|
68
|
-
export declare type PolygonGeometry = {
|
|
69
|
-
polygon: GeofencePolygon;
|
|
70
|
-
};
|
|
71
|
-
export declare type GeofenceId = string;
|
|
72
|
-
export declare type GeofenceInput = {
|
|
73
|
-
geofenceId: GeofenceId;
|
|
74
|
-
geometry: PolygonGeometry;
|
|
75
|
-
};
|
|
76
|
-
export declare type GeofenceOptions = {
|
|
77
|
-
providerName?: string;
|
|
78
|
-
};
|
|
79
|
-
export declare type GeofenceError = {
|
|
80
|
-
error: {
|
|
81
|
-
code: string;
|
|
82
|
-
message: string;
|
|
83
|
-
};
|
|
84
|
-
geofenceId: GeofenceId;
|
|
85
|
-
};
|
|
86
|
-
declare type GeofenceBase = {
|
|
87
|
-
geofenceId: GeofenceId;
|
|
88
|
-
createTime?: Date;
|
|
89
|
-
updateTime?: Date;
|
|
90
|
-
};
|
|
91
|
-
export declare type Geofence = GeofenceBase & {
|
|
92
|
-
geometry: PolygonGeometry;
|
|
93
|
-
};
|
|
94
|
-
export declare type SaveGeofencesResults = {
|
|
95
|
-
successes: GeofenceBase[];
|
|
96
|
-
errors: GeofenceError[];
|
|
97
|
-
};
|
|
98
|
-
export declare type ListGeofenceOptions = GeofenceOptions & {
|
|
99
|
-
nextToken?: string;
|
|
100
|
-
};
|
|
101
|
-
export declare type ListGeofenceResults = {
|
|
102
|
-
entries: Geofence[];
|
|
103
|
-
nextToken: string | undefined;
|
|
104
|
-
};
|
|
105
|
-
export declare type DeleteGeofencesResults = {
|
|
106
|
-
successes: GeofenceId[];
|
|
107
|
-
errors: GeofenceError[];
|
|
108
|
-
};
|
|
109
|
-
export declare type SearchForSuggestionsResults = SearchForSuggestionsResult[];
|
|
110
|
-
export declare type SearchForSuggestionsResult = {
|
|
111
|
-
text: string;
|
|
112
|
-
placeId?: string;
|
|
113
|
-
};
|
|
114
|
-
export {};
|
package/lib/types/Provider.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SearchByTextOptions, SearchByCoordinatesOptions, SearchForSuggestionsResults, Coordinates, Place, MapStyle, Geofence, GeofenceId, GeofenceInput, GeofenceOptions, ListGeofenceOptions, ListGeofenceResults, SaveGeofencesResults, DeleteGeofencesResults, searchByPlaceIdOptions } from './Geo';
|
|
2
|
-
export interface GeoProvider {
|
|
3
|
-
getCategory(): string;
|
|
4
|
-
getProviderName(): string;
|
|
5
|
-
configure(config: object): object;
|
|
6
|
-
getAvailableMaps(): MapStyle[];
|
|
7
|
-
getDefaultMap(): MapStyle;
|
|
8
|
-
searchByText(text: string, options?: SearchByTextOptions): Promise<Place[]>;
|
|
9
|
-
searchByCoordinates(coordinates: Coordinates, options?: SearchByCoordinatesOptions): Promise<Place>;
|
|
10
|
-
searchForSuggestions(text: string, options?: SearchByTextOptions): Promise<SearchForSuggestionsResults>;
|
|
11
|
-
searchByPlaceId(placeId: string, options?: searchByPlaceIdOptions): Promise<Place | undefined>;
|
|
12
|
-
saveGeofences(geofences: GeofenceInput[], options?: GeofenceOptions): Promise<SaveGeofencesResults>;
|
|
13
|
-
getGeofence(geofenceId: GeofenceId, options?: ListGeofenceOptions): Promise<Geofence>;
|
|
14
|
-
listGeofences(options?: ListGeofenceOptions): Promise<ListGeofenceResults>;
|
|
15
|
-
deleteGeofences(geofenceIds: string[], options?: GeofenceOptions): Promise<DeleteGeofencesResults>;
|
|
16
|
-
}
|
package/lib/types/index.d.ts
DELETED
package/lib/util.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Longitude, Latitude, GeofenceId, GeofenceInput, GeofencePolygon, LinearRing } from './types';
|
|
2
|
-
export declare function validateCoordinates(lng: Longitude, lat: Latitude): void;
|
|
3
|
-
export declare function validateGeofenceId(geofenceId: GeofenceId): void;
|
|
4
|
-
export declare function validateLinearRing(linearRing: LinearRing, geofenceId?: GeofenceId): void;
|
|
5
|
-
export declare function validatePolygon(polygon: GeofencePolygon, geofenceId?: GeofenceId): void;
|
|
6
|
-
export declare function validateGeofencesInput(geofences: GeofenceInput[]): void;
|
|
7
|
-
export declare function mapSearchOptions(options: any, locationServiceInput: any): any;
|