@aws-amplify/geo 2.1.5-v5-user-agent-for-ui.f058eee.7 → 2.2.0

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.
Files changed (40) hide show
  1. package/lib/Geo.d.ts +41 -3
  2. package/lib/Geo.js +230 -20
  3. package/lib/Geo.js.map +1 -1
  4. package/lib/Providers/AmazonLocationServiceProvider.d.ts +8 -9
  5. package/lib/Providers/AmazonLocationServiceProvider.js +20 -20
  6. package/lib/Providers/AmazonLocationServiceProvider.js.map +1 -1
  7. package/lib/types/Provider.d.ts +8 -9
  8. package/lib-esm/Geo.d.ts +41 -3
  9. package/lib-esm/Geo.js +232 -22
  10. package/lib-esm/Geo.js.map +1 -1
  11. package/lib-esm/Providers/AmazonLocationServiceProvider.d.ts +8 -9
  12. package/lib-esm/Providers/AmazonLocationServiceProvider.js +20 -20
  13. package/lib-esm/Providers/AmazonLocationServiceProvider.js.map +1 -1
  14. package/lib-esm/types/Provider.d.ts +8 -9
  15. package/package.json +5 -6
  16. package/src/Geo.ts +203 -11
  17. package/src/Providers/AmazonLocationServiceProvider.ts +20 -33
  18. package/src/types/Provider.ts +8 -22
  19. package/internals/package.json +0 -8
  20. package/lib/internals/InternalGeo.d.ts +0 -119
  21. package/lib/internals/InternalGeo.js +0 -354
  22. package/lib/internals/InternalGeo.js.map +0 -1
  23. package/lib/internals/index.d.ts +0 -1
  24. package/lib/internals/index.js +0 -7
  25. package/lib/internals/index.js.map +0 -1
  26. package/lib/internals/utils.d.ts +0 -2
  27. package/lib/internals/utils.js +0 -10
  28. package/lib/internals/utils.js.map +0 -1
  29. package/lib-esm/internals/InternalGeo.d.ts +0 -119
  30. package/lib-esm/internals/InternalGeo.js +0 -352
  31. package/lib-esm/internals/InternalGeo.js.map +0 -1
  32. package/lib-esm/internals/index.d.ts +0 -1
  33. package/lib-esm/internals/index.js +0 -4
  34. package/lib-esm/internals/index.js.map +0 -1
  35. package/lib-esm/internals/utils.d.ts +0 -2
  36. package/lib-esm/internals/utils.js +0 -8
  37. package/lib-esm/internals/utils.js.map +0 -1
  38. package/src/internals/InternalGeo.ts +0 -393
  39. package/src/internals/index.ts +0 -3
  40. package/src/internals/utils.ts +0 -15
package/lib/Geo.d.ts CHANGED
@@ -1,12 +1,50 @@
1
- import { Place, Coordinates, SearchByTextOptions, SearchByCoordinatesOptions, GeofenceId, GeofenceInput, GeofenceOptions, SaveGeofencesResults, Geofence, ListGeofenceOptions, ListGeofenceResults, DeleteGeofencesResults, searchByPlaceIdOptions } from './types';
2
- import { InternalGeoClass } from './internals/InternalGeo';
3
- export declare class GeoClass extends InternalGeoClass {
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 {
4
3
  static MODULE: string;
4
+ /**
5
+ * @private
6
+ */
7
+ private _config;
8
+ private _pluggables;
9
+ constructor();
5
10
  /**
6
11
  * get the name of the module category
7
12
  * @returns {string} name of the module category
8
13
  */
9
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;
10
48
  /**
11
49
  * Search by text input with optional parameters
12
50
  * @param {string} text - The text string that is to be searched for
package/lib/Geo.js CHANGED
@@ -4,11 +4,15 @@ var tslib_1 = require("tslib");
4
4
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
5
  // SPDX-License-Identifier: Apache-2.0
6
6
  var core_1 = require("@aws-amplify/core");
7
- var InternalGeo_1 = require("./internals/InternalGeo");
8
- var GeoClass = /** @class */ (function (_super) {
9
- tslib_1.__extends(GeoClass, _super);
7
+ var AmazonLocationServiceProvider_1 = require("./Providers/AmazonLocationServiceProvider");
8
+ var util_1 = require("./util");
9
+ var logger = new core_1.ConsoleLogger('Geo');
10
+ var DEFAULT_PROVIDER = 'AmazonLocationService';
11
+ var GeoClass = /** @class */ (function () {
10
12
  function GeoClass() {
11
- return _super !== null && _super.apply(this, arguments) || this;
13
+ this._config = {};
14
+ this._pluggables = [];
15
+ logger.debug('Geo Options', this._config);
12
16
  }
13
17
  /**
14
18
  * get the name of the module category
@@ -17,6 +21,78 @@ var GeoClass = /** @class */ (function (_super) {
17
21
  GeoClass.prototype.getModuleName = function () {
18
22
  return GeoClass.MODULE;
19
23
  };
24
+ /**
25
+ * add plugin into Geo category
26
+ * @param {Object} pluggable - an instance of the plugin
27
+ */
28
+ GeoClass.prototype.addPluggable = function (pluggable) {
29
+ if (pluggable && pluggable.getCategory() === 'Geo') {
30
+ this._pluggables.push(pluggable);
31
+ var config = pluggable.configure(this._config[pluggable.getProviderName()]);
32
+ return config;
33
+ }
34
+ };
35
+ /**
36
+ * Get the plugin object
37
+ * @param providerName - the name of the plugin
38
+ */
39
+ GeoClass.prototype.getPluggable = function (providerName) {
40
+ var pluggable = this._pluggables.find(function (pluggable) { return pluggable.getProviderName() === providerName; });
41
+ if (pluggable === undefined) {
42
+ logger.debug('No plugin found with providerName', providerName);
43
+ throw new Error('No plugin found in Geo for the provider');
44
+ }
45
+ else
46
+ return pluggable;
47
+ };
48
+ /**
49
+ * Remove the plugin object
50
+ * @param providerName - the name of the plugin
51
+ */
52
+ GeoClass.prototype.removePluggable = function (providerName) {
53
+ this._pluggables = this._pluggables.filter(function (pluggable) { return pluggable.getProviderName() !== providerName; });
54
+ return;
55
+ };
56
+ /**
57
+ * Configure Geo
58
+ * @param {Object} config - Configuration object for Geo
59
+ * @return {Object} - Current configuration
60
+ */
61
+ GeoClass.prototype.configure = function (config) {
62
+ var _this = this;
63
+ logger.debug('configure Geo');
64
+ if (!config)
65
+ return this._config;
66
+ var amplifyConfig = core_1.parseAWSExports(config);
67
+ this._config = Object.assign({}, this._config, amplifyConfig.Geo, config);
68
+ this._pluggables.forEach(function (pluggable) {
69
+ pluggable.configure(_this._config[pluggable.getProviderName()]);
70
+ });
71
+ if (this._pluggables.length === 0) {
72
+ this.addPluggable(new AmazonLocationServiceProvider_1.AmazonLocationServiceProvider());
73
+ }
74
+ return this._config;
75
+ };
76
+ /**
77
+ * Get the map resources that are currently available through the provider
78
+ * @param {string} provider
79
+ * @returns - Array of available map resources
80
+ */
81
+ GeoClass.prototype.getAvailableMaps = function (provider) {
82
+ if (provider === void 0) { provider = DEFAULT_PROVIDER; }
83
+ var prov = this.getPluggable(provider);
84
+ return prov.getAvailableMaps();
85
+ };
86
+ /**
87
+ * Get the map resource set as default in amplify config
88
+ * @param {string} provider
89
+ * @returns - Map resource set as the default in amplify config
90
+ */
91
+ GeoClass.prototype.getDefaultMap = function (provider) {
92
+ if (provider === void 0) { provider = DEFAULT_PROVIDER; }
93
+ var prov = this.getPluggable(provider);
94
+ return prov.getDefaultMap();
95
+ };
20
96
  /**
21
97
  * Search by text input with optional parameters
22
98
  * @param {string} text - The text string that is to be searched for
@@ -25,8 +101,23 @@ var GeoClass = /** @class */ (function (_super) {
25
101
  */
26
102
  GeoClass.prototype.searchByText = function (text, options) {
27
103
  return tslib_1.__awaiter(this, void 0, void 0, function () {
28
- return tslib_1.__generator(this, function (_a) {
29
- return [2 /*return*/, _super.prototype.searchByText.call(this, text, options)];
104
+ var _a, providerName, prov, error_1;
105
+ return tslib_1.__generator(this, function (_b) {
106
+ switch (_b.label) {
107
+ case 0:
108
+ _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
109
+ prov = this.getPluggable(providerName);
110
+ _b.label = 1;
111
+ case 1:
112
+ _b.trys.push([1, 3, , 4]);
113
+ return [4 /*yield*/, prov.searchByText(text, options)];
114
+ case 2: return [2 /*return*/, _b.sent()];
115
+ case 3:
116
+ error_1 = _b.sent();
117
+ logger.debug(error_1);
118
+ throw error_1;
119
+ case 4: return [2 /*return*/];
120
+ }
30
121
  });
31
122
  });
32
123
  };
@@ -38,8 +129,23 @@ var GeoClass = /** @class */ (function (_super) {
38
129
  */
39
130
  GeoClass.prototype.searchForSuggestions = function (text, options) {
40
131
  return tslib_1.__awaiter(this, void 0, void 0, function () {
41
- return tslib_1.__generator(this, function (_a) {
42
- return [2 /*return*/, _super.prototype.searchForSuggestions.call(this, text, options)];
132
+ var _a, providerName, prov, error_2;
133
+ return tslib_1.__generator(this, function (_b) {
134
+ switch (_b.label) {
135
+ case 0:
136
+ _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
137
+ prov = this.getPluggable(providerName);
138
+ _b.label = 1;
139
+ case 1:
140
+ _b.trys.push([1, 3, , 4]);
141
+ return [4 /*yield*/, prov.searchForSuggestions(text, options)];
142
+ case 2: return [2 /*return*/, _b.sent()];
143
+ case 3:
144
+ error_2 = _b.sent();
145
+ logger.debug(error_2);
146
+ throw error_2;
147
+ case 4: return [2 /*return*/];
148
+ }
43
149
  });
44
150
  });
45
151
  };
@@ -51,8 +157,23 @@ var GeoClass = /** @class */ (function (_super) {
51
157
  */
52
158
  GeoClass.prototype.searchByPlaceId = function (placeId, options) {
53
159
  return tslib_1.__awaiter(this, void 0, void 0, function () {
160
+ var providerName, prov, error_3;
54
161
  return tslib_1.__generator(this, function (_a) {
55
- return [2 /*return*/, _super.prototype.searchByPlaceId.call(this, placeId, options)];
162
+ switch (_a.label) {
163
+ case 0:
164
+ providerName = DEFAULT_PROVIDER;
165
+ prov = this.getPluggable(providerName);
166
+ _a.label = 1;
167
+ case 1:
168
+ _a.trys.push([1, 3, , 4]);
169
+ return [4 /*yield*/, prov.searchByPlaceId(placeId, options)];
170
+ case 2: return [2 /*return*/, _a.sent()];
171
+ case 3:
172
+ error_3 = _a.sent();
173
+ logger.debug(error_3);
174
+ throw error_3;
175
+ case 4: return [2 /*return*/];
176
+ }
56
177
  });
57
178
  });
58
179
  };
@@ -64,8 +185,25 @@ var GeoClass = /** @class */ (function (_super) {
64
185
  */
65
186
  GeoClass.prototype.searchByCoordinates = function (coordinates, options) {
66
187
  return tslib_1.__awaiter(this, void 0, void 0, function () {
67
- return tslib_1.__generator(this, function (_a) {
68
- return [2 /*return*/, _super.prototype.searchByCoordinates.call(this, coordinates, options)];
188
+ var _a, providerName, prov, _b, lng, lat, error_4;
189
+ return tslib_1.__generator(this, function (_c) {
190
+ switch (_c.label) {
191
+ case 0:
192
+ _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
193
+ prov = this.getPluggable(providerName);
194
+ _b = tslib_1.__read(coordinates, 2), lng = _b[0], lat = _b[1];
195
+ _c.label = 1;
196
+ case 1:
197
+ _c.trys.push([1, 3, , 4]);
198
+ util_1.validateCoordinates(lng, lat);
199
+ return [4 /*yield*/, prov.searchByCoordinates(coordinates, options)];
200
+ case 2: return [2 /*return*/, _c.sent()];
201
+ case 3:
202
+ error_4 = _c.sent();
203
+ logger.debug(error_4);
204
+ throw error_4;
205
+ case 4: return [2 /*return*/];
206
+ }
69
207
  });
70
208
  });
71
209
  };
@@ -79,8 +217,29 @@ var GeoClass = /** @class */ (function (_super) {
79
217
  */
80
218
  GeoClass.prototype.saveGeofences = function (geofences, options) {
81
219
  return tslib_1.__awaiter(this, void 0, void 0, function () {
82
- return tslib_1.__generator(this, function (_a) {
83
- return [2 /*return*/, _super.prototype.saveGeofences.call(this, geofences, options)];
220
+ var _a, providerName, prov, geofenceInputArray, error_5;
221
+ return tslib_1.__generator(this, function (_b) {
222
+ switch (_b.label) {
223
+ case 0:
224
+ _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
225
+ prov = this.getPluggable(providerName);
226
+ if (!Array.isArray(geofences)) {
227
+ geofenceInputArray = [geofences];
228
+ }
229
+ else {
230
+ geofenceInputArray = geofences;
231
+ }
232
+ _b.label = 1;
233
+ case 1:
234
+ _b.trys.push([1, 3, , 4]);
235
+ return [4 /*yield*/, prov.saveGeofences(geofenceInputArray, options)];
236
+ case 2: return [2 /*return*/, _b.sent()];
237
+ case 3:
238
+ error_5 = _b.sent();
239
+ logger.debug(error_5);
240
+ throw error_5;
241
+ case 4: return [2 /*return*/];
242
+ }
84
243
  });
85
244
  });
86
245
  };
@@ -92,8 +251,23 @@ var GeoClass = /** @class */ (function (_super) {
92
251
  */
93
252
  GeoClass.prototype.getGeofence = function (geofenceId, options) {
94
253
  return tslib_1.__awaiter(this, void 0, void 0, function () {
95
- return tslib_1.__generator(this, function (_a) {
96
- return [2 /*return*/, _super.prototype.getGeofence.call(this, geofenceId, options)];
254
+ var _a, providerName, prov, error_6;
255
+ return tslib_1.__generator(this, function (_b) {
256
+ switch (_b.label) {
257
+ case 0:
258
+ _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
259
+ prov = this.getPluggable(providerName);
260
+ _b.label = 1;
261
+ case 1:
262
+ _b.trys.push([1, 3, , 4]);
263
+ return [4 /*yield*/, prov.getGeofence(geofenceId, options)];
264
+ case 2: return [2 /*return*/, _b.sent()];
265
+ case 3:
266
+ error_6 = _b.sent();
267
+ logger.debug(error_6);
268
+ throw error_6;
269
+ case 4: return [2 /*return*/];
270
+ }
97
271
  });
98
272
  });
99
273
  };
@@ -106,8 +280,23 @@ var GeoClass = /** @class */ (function (_super) {
106
280
  */
107
281
  GeoClass.prototype.listGeofences = function (options) {
108
282
  return tslib_1.__awaiter(this, void 0, void 0, function () {
109
- return tslib_1.__generator(this, function (_a) {
110
- return [2 /*return*/, _super.prototype.listGeofences.call(this, options)];
283
+ var _a, providerName, prov, error_7;
284
+ return tslib_1.__generator(this, function (_b) {
285
+ switch (_b.label) {
286
+ case 0:
287
+ _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
288
+ prov = this.getPluggable(providerName);
289
+ _b.label = 1;
290
+ case 1:
291
+ _b.trys.push([1, 3, , 4]);
292
+ return [4 /*yield*/, prov.listGeofences(options)];
293
+ case 2: return [2 /*return*/, _b.sent()];
294
+ case 3:
295
+ error_7 = _b.sent();
296
+ logger.debug(error_7);
297
+ throw error_7;
298
+ case 4: return [2 /*return*/];
299
+ }
111
300
  });
112
301
  });
113
302
  };
@@ -121,14 +310,35 @@ var GeoClass = /** @class */ (function (_super) {
121
310
  */
122
311
  GeoClass.prototype.deleteGeofences = function (geofenceIds, options) {
123
312
  return tslib_1.__awaiter(this, void 0, void 0, function () {
124
- return tslib_1.__generator(this, function (_a) {
125
- return [2 /*return*/, _super.prototype.deleteGeofences.call(this, geofenceIds, options)];
313
+ var _a, providerName, prov, geofenceIdsInputArray, error_8;
314
+ return tslib_1.__generator(this, function (_b) {
315
+ switch (_b.label) {
316
+ case 0:
317
+ _a = (options || {}).providerName, providerName = _a === void 0 ? DEFAULT_PROVIDER : _a;
318
+ prov = this.getPluggable(providerName);
319
+ if (!Array.isArray(geofenceIds)) {
320
+ geofenceIdsInputArray = [geofenceIds];
321
+ }
322
+ else {
323
+ geofenceIdsInputArray = geofenceIds;
324
+ }
325
+ _b.label = 1;
326
+ case 1:
327
+ _b.trys.push([1, 3, , 4]);
328
+ return [4 /*yield*/, prov.deleteGeofences(geofenceIdsInputArray, options)];
329
+ case 2: return [2 /*return*/, _b.sent()];
330
+ case 3:
331
+ error_8 = _b.sent();
332
+ logger.debug(error_8);
333
+ throw error_8;
334
+ case 4: return [2 /*return*/];
335
+ }
126
336
  });
127
337
  });
128
338
  };
129
339
  GeoClass.MODULE = 'Geo';
130
340
  return GeoClass;
131
- }(InternalGeo_1.InternalGeoClass));
341
+ }());
132
342
  exports.GeoClass = GeoClass;
133
343
  exports.Geo = new GeoClass();
134
344
  core_1.Amplify.register(exports.Geo);
package/lib/Geo.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Geo.js","sourceRoot":"","sources":["../src/Geo.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,0CAAqE;AAgBrE,uDAA2D;AAE3D;IAA8B,oCAAgB;IAA9C;;IAsHA,CAAC;IAnHA;;;OAGG;IACI,gCAAa,GAApB;QACC,OAAO,QAAQ,CAAC,MAAM,CAAC;IACxB,CAAC;IAED;;;;;OAKG;IACU,+BAAY,GAAzB,UACC,IAAY,EACZ,OAA6B;;;gBAE7B,sBAAO,iBAAM,YAAY,YAAC,IAAI,EAAE,OAAO,CAAC,EAAC;;;KACzC;IAED;;;;;OAKG;IACU,uCAAoB,GAAjC,UACC,IAAY,EACZ,OAA6B;;;gBAE7B,sBAAO,iBAAM,oBAAoB,YAAC,IAAI,EAAE,OAAO,CAAC,EAAC;;;KACjD;IAED;;;;;OAKG;IACU,kCAAe,GAA5B,UACC,OAAe,EACf,OAAgC;;;gBAEhC,sBAAO,iBAAM,eAAe,YAAC,OAAO,EAAE,OAAO,CAAC,EAAC;;;KAC/C;IAED;;;;;OAKG;IACU,sCAAmB,GAAhC,UACC,WAAwB,EACxB,OAAoC;;;gBAEpC,sBAAO,iBAAM,mBAAmB,YAAC,WAAW,EAAE,OAAO,CAAC,EAAC;;;KACvD;IAED;;;;;;;OAOG;IACU,gCAAa,GAA1B,UACC,SAA0C,EAC1C,OAAyB;;;gBAEzB,sBAAO,iBAAM,aAAa,YAAC,SAAS,EAAE,OA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EAAA;4BAAxC,sBAAO,SAAiC,EAAC;;;wBAEzC,MAAM,CAAC,KAAK,CAAC,OAAK,CAAC,CAAC;wBACpB,MAAM,OAAK,CAAC;;;;;KAEb;IAED;;;;;;;OAOG;IACU,kCAAe,GAA5B,UACC,WAA8B,EAC9B,OAAyB;;;;;;wBAEjB,KAAoC,CAAA,OAAO,IAAI,EAAE,CAAA,aAAlB,EAA/B,YAAY,mBAAG,gBAAgB,KAAA,CAAmB;wBACpD,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;wBAI7C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;4BAChC,qBAAqB,GAAG,CAAC,WAAW,CAAC,CAAC;yBACtC;6BAAM;4BACN,qBAAqB,GAAG,WAAW,CAAC;yBACpC;;;;wBAIO,qBAAM,IAAI,CAAC,eAAe,CAAC,qBAAqB,EAAE,OAAO,CAAC,EAAA;4BAAjE,sBAAO,SAA0D,EAAC;;;wBAElE,MAAM,CAAC,KAAK,CAAC,OAAK,CAAC,CAAC;wBACpB,MAAM,OAAK,CAAC;;;;;KAEb;IAvSM,eAAM,GAAG,KAAK,CAAC;IAwSvB,eAAC;CAAA,AAzSD,IAySC;AAzSY,4BAAQ;AA2SR,QAAA,GAAG,GAAG,IAAI,QAAQ,EAAE,CAAC;AAClC,cAAO,CAAC,QAAQ,CAAC,WAAG,CAAC,CAAC"}
@@ -1,4 +1,3 @@
1
- import { CustomUserAgentDetails } from '@aws-amplify/core';
2
1
  import { GeoConfig, SearchByTextOptions, SearchByCoordinatesOptions, GeoProvider, Place, AmazonLocationServiceMapStyle, Coordinates, SearchForSuggestionsResults, GeofenceId, GeofenceInput, AmazonLocationServiceGeofenceOptions, AmazonLocationServiceListGeofenceOptions, ListGeofenceResults, SaveGeofencesResults, AmazonLocationServiceGeofence, AmazonLocationServiceDeleteGeofencesResults, searchByPlaceIdOptions } from '../types';
3
2
  export declare class AmazonLocationServiceProvider implements GeoProvider {
4
3
  static CATEGORY: string;
@@ -44,23 +43,23 @@ export declare class AmazonLocationServiceProvider implements GeoProvider {
44
43
  * @param {SearchByTextOptions} options? - Optional parameters to the search
45
44
  * @returns {Promise<Place[]>} - Promise resolves to a list of Places that match search parameters
46
45
  */
47
- searchByText(text: string, options?: SearchByTextOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<Place[]>;
46
+ searchByText(text: string, options?: SearchByTextOptions): Promise<Place[]>;
48
47
  /**
49
48
  * Search for suggestions based on the input text
50
49
  * @param {string} text - The text string that is to be searched for
51
50
  * @param {SearchByTextOptions} options? - Optional parameters to the search
52
51
  * @returns {Promise<SearchForSuggestionsResults>} - Resolves to an array of search suggestion strings
53
52
  */
54
- searchForSuggestions(text: string, options?: SearchByTextOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<SearchForSuggestionsResults>;
53
+ searchForSuggestions(text: string, options?: SearchByTextOptions): Promise<SearchForSuggestionsResults>;
55
54
  private _verifyPlaceId;
56
- searchByPlaceId(placeId: string, options?: searchByPlaceIdOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<Place | undefined>;
55
+ searchByPlaceId(placeId: string, options?: searchByPlaceIdOptions): Promise<Place | undefined>;
57
56
  /**
58
57
  * Reverse geocoding search via a coordinate point on the map
59
58
  * @param coordinates - Coordinates array for the search input
60
59
  * @param options - Options parameters for the search
61
60
  * @returns {Promise<Place>} - Promise that resolves to a place matching search coordinates
62
61
  */
63
- searchByCoordinates(coordinates: Coordinates, options?: SearchByCoordinatesOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<Place>;
62
+ searchByCoordinates(coordinates: Coordinates, options?: SearchByCoordinatesOptions): Promise<Place>;
64
63
  /**
65
64
  * Create geofences inside of a geofence collection
66
65
  * @param geofences - Array of geofence objects to create
@@ -69,14 +68,14 @@ export declare class AmazonLocationServiceProvider implements GeoProvider {
69
68
  * successes: list of geofences successfully created
70
69
  * errors: list of geofences that failed to create
71
70
  */
72
- saveGeofences(geofences: GeofenceInput[], options?: AmazonLocationServiceGeofenceOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<SaveGeofencesResults>;
71
+ saveGeofences(geofences: GeofenceInput[], options?: AmazonLocationServiceGeofenceOptions): Promise<SaveGeofencesResults>;
73
72
  /**
74
73
  * Get geofence from a geofence collection
75
74
  * @param geofenceId:string
76
75
  * @param options?: Optional parameters for getGeofence
77
76
  * @returns {Promise<AmazonLocationServiceGeofence>} - Promise that resolves to a geofence object
78
77
  */
79
- getGeofence(geofenceId: GeofenceId, options?: AmazonLocationServiceGeofenceOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<AmazonLocationServiceGeofence>;
78
+ getGeofence(geofenceId: GeofenceId, options?: AmazonLocationServiceGeofenceOptions): Promise<AmazonLocationServiceGeofence>;
80
79
  /**
81
80
  * List geofences from a geofence collection
82
81
  * @param options?: ListGeofenceOptions
@@ -84,7 +83,7 @@ export declare class AmazonLocationServiceProvider implements GeoProvider {
84
83
  * entries: list of geofences - 100 geofences are listed per page
85
84
  * nextToken: token for next page of geofences
86
85
  */
87
- listGeofences(options?: AmazonLocationServiceListGeofenceOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<ListGeofenceResults>;
86
+ listGeofences(options?: AmazonLocationServiceListGeofenceOptions): Promise<ListGeofenceResults>;
88
87
  /**
89
88
  * Delete geofences from a geofence collection
90
89
  * @param geofenceIds: string|string[]
@@ -93,7 +92,7 @@ export declare class AmazonLocationServiceProvider implements GeoProvider {
93
92
  * successes: list of geofences successfully deleted
94
93
  * errors: list of geofences that failed to delete
95
94
  */
96
- deleteGeofences(geofenceIds: string[], options?: AmazonLocationServiceGeofenceOptions, customUserAgentDetails?: CustomUserAgentDetails): Promise<AmazonLocationServiceDeleteGeofencesResults>;
95
+ deleteGeofences(geofenceIds: string[], options?: AmazonLocationServiceGeofenceOptions): Promise<AmazonLocationServiceDeleteGeofencesResults>;
97
96
  /**
98
97
  * @private
99
98
  */
@@ -75,7 +75,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
75
75
  * @param {SearchByTextOptions} options? - Optional parameters to the search
76
76
  * @returns {Promise<Place[]>} - Promise resolves to a list of Places that match search parameters
77
77
  */
78
- AmazonLocationServiceProvider.prototype.searchByText = function (text, options, customUserAgentDetails) {
78
+ AmazonLocationServiceProvider.prototype.searchByText = function (text, options) {
79
79
  return tslib_1.__awaiter(this, void 0, void 0, function () {
80
80
  var credentialsOK, locationServiceInput, client, command, response, error_1, PascalResults, results;
81
81
  return tslib_1.__generator(this, function (_a) {
@@ -100,7 +100,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
100
100
  client = new client_location_1.LocationClient({
101
101
  credentials: this._config.credentials,
102
102
  region: this._config.region,
103
- customUserAgent: core_1.getAmplifyUserAgentObject(customUserAgentDetails),
103
+ customUserAgent: core_1.getAmplifyUserAgentObject(),
104
104
  });
105
105
  command = new client_location_1.SearchPlaceIndexForTextCommand(locationServiceInput);
106
106
  _a.label = 2;
@@ -130,7 +130,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
130
130
  * @param {SearchByTextOptions} options? - Optional parameters to the search
131
131
  * @returns {Promise<SearchForSuggestionsResults>} - Resolves to an array of search suggestion strings
132
132
  */
133
- AmazonLocationServiceProvider.prototype.searchForSuggestions = function (text, options, customUserAgentDetails) {
133
+ AmazonLocationServiceProvider.prototype.searchForSuggestions = function (text, options) {
134
134
  return tslib_1.__awaiter(this, void 0, void 0, function () {
135
135
  var credentialsOK, locationServiceInput, client, command, response, error_2, results;
136
136
  return tslib_1.__generator(this, function (_a) {
@@ -155,7 +155,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
155
155
  client = new client_location_1.LocationClient({
156
156
  credentials: this._config.credentials,
157
157
  region: this._config.region,
158
- customUserAgent: core_1.getAmplifyUserAgentObject(customUserAgentDetails),
158
+ customUserAgent: core_1.getAmplifyUserAgentObject(),
159
159
  });
160
160
  command = new client_location_1.SearchPlaceIndexForSuggestionsCommand(locationServiceInput);
161
161
  _a.label = 2;
@@ -186,7 +186,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
186
186
  throw new Error(errorString);
187
187
  }
188
188
  };
189
- AmazonLocationServiceProvider.prototype.searchByPlaceId = function (placeId, options, customUserAgentDetails) {
189
+ AmazonLocationServiceProvider.prototype.searchByPlaceId = function (placeId, options) {
190
190
  return tslib_1.__awaiter(this, void 0, void 0, function () {
191
191
  var credentialsOK, client, searchByPlaceIdInput, command, response, error_3, place;
192
192
  return tslib_1.__generator(this, function (_a) {
@@ -202,7 +202,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
202
202
  client = new client_location_1.LocationClient({
203
203
  credentials: this._config.credentials,
204
204
  region: this._config.region,
205
- customUserAgent: core_1.getAmplifyUserAgentObject(customUserAgentDetails),
205
+ customUserAgent: core_1.getAmplifyUserAgentObject(),
206
206
  });
207
207
  searchByPlaceIdInput = {
208
208
  PlaceId: placeId,
@@ -236,7 +236,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
236
236
  * @param options - Options parameters for the search
237
237
  * @returns {Promise<Place>} - Promise that resolves to a place matching search coordinates
238
238
  */
239
- AmazonLocationServiceProvider.prototype.searchByCoordinates = function (coordinates, options, customUserAgentDetails) {
239
+ AmazonLocationServiceProvider.prototype.searchByCoordinates = function (coordinates, options) {
240
240
  return tslib_1.__awaiter(this, void 0, void 0, function () {
241
241
  var credentialsOK, locationServiceInput, client, command, response, error_4, PascalResults, results;
242
242
  return tslib_1.__generator(this, function (_a) {
@@ -261,7 +261,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
261
261
  client = new client_location_1.LocationClient({
262
262
  credentials: this._config.credentials,
263
263
  region: this._config.region,
264
- customUserAgent: core_1.getAmplifyUserAgentObject(customUserAgentDetails),
264
+ customUserAgent: core_1.getAmplifyUserAgentObject(),
265
265
  });
266
266
  command = new client_location_1.SearchPlaceIndexForPositionCommand(locationServiceInput);
267
267
  _a.label = 2;
@@ -293,7 +293,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
293
293
  * successes: list of geofences successfully created
294
294
  * errors: list of geofences that failed to create
295
295
  */
296
- AmazonLocationServiceProvider.prototype.saveGeofences = function (geofences, options, customUserAgentDetails) {
296
+ AmazonLocationServiceProvider.prototype.saveGeofences = function (geofences, options) {
297
297
  return tslib_1.__awaiter(this, void 0, void 0, function () {
298
298
  var credentialsOK, PascalGeofences, results, geofenceBatches, apiLimit;
299
299
  var _this = this;
@@ -342,7 +342,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
342
342
  switch (_a.label) {
343
343
  case 0:
344
344
  _a.trys.push([0, 2, , 3]);
345
- return [4 /*yield*/, this._AmazonLocationServiceBatchPutGeofenceCall(batch, (options === null || options === void 0 ? void 0 : options.collectionName) || this._config.geofenceCollections.default, customUserAgentDetails)];
345
+ return [4 /*yield*/, this._AmazonLocationServiceBatchPutGeofenceCall(batch, (options === null || options === void 0 ? void 0 : options.collectionName) || this._config.geofenceCollections.default)];
346
346
  case 1:
347
347
  response = _a.sent();
348
348
  return [3 /*break*/, 3];
@@ -397,7 +397,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
397
397
  * @param options?: Optional parameters for getGeofence
398
398
  * @returns {Promise<AmazonLocationServiceGeofence>} - Promise that resolves to a geofence object
399
399
  */
400
- AmazonLocationServiceProvider.prototype.getGeofence = function (geofenceId, options, customUserAgentDetails) {
400
+ AmazonLocationServiceProvider.prototype.getGeofence = function (geofenceId, options) {
401
401
  return tslib_1.__awaiter(this, void 0, void 0, function () {
402
402
  var credentialsOK, client, commandInput, command, response, error_6, GeofenceId, CreateTime, UpdateTime, Status, Geometry, geofence;
403
403
  return tslib_1.__generator(this, function (_a) {
@@ -420,7 +420,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
420
420
  client = new client_location_1.LocationClient({
421
421
  credentials: this._config.credentials,
422
422
  region: this._config.region,
423
- customUserAgent: core_1.getAmplifyUserAgentObject(customUserAgentDetails),
423
+ customUserAgent: core_1.getAmplifyUserAgentObject(),
424
424
  });
425
425
  commandInput = {
426
426
  GeofenceId: geofenceId,
@@ -461,7 +461,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
461
461
  * entries: list of geofences - 100 geofences are listed per page
462
462
  * nextToken: token for next page of geofences
463
463
  */
464
- AmazonLocationServiceProvider.prototype.listGeofences = function (options, customUserAgentDetails) {
464
+ AmazonLocationServiceProvider.prototype.listGeofences = function (options) {
465
465
  return tslib_1.__awaiter(this, void 0, void 0, function () {
466
466
  var credentialsOK, client, listGeofencesInput, command, response, error_7, NextToken, Entries, results;
467
467
  return tslib_1.__generator(this, function (_a) {
@@ -483,7 +483,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
483
483
  client = new client_location_1.LocationClient({
484
484
  credentials: this._config.credentials,
485
485
  region: this._config.region,
486
- customUserAgent: core_1.getAmplifyUserAgentObject(customUserAgentDetails),
486
+ customUserAgent: core_1.getAmplifyUserAgentObject(),
487
487
  });
488
488
  listGeofencesInput = {
489
489
  NextToken: options === null || options === void 0 ? void 0 : options.nextToken,
@@ -531,7 +531,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
531
531
  * successes: list of geofences successfully deleted
532
532
  * errors: list of geofences that failed to delete
533
533
  */
534
- AmazonLocationServiceProvider.prototype.deleteGeofences = function (geofenceIds, options, customUserAgentDetails) {
534
+ AmazonLocationServiceProvider.prototype.deleteGeofences = function (geofenceIds, options) {
535
535
  return tslib_1.__awaiter(this, void 0, void 0, function () {
536
536
  var credentialsOK, badGeofenceIds, results, geofenceIdBatches, count;
537
537
  var _this = this;
@@ -575,7 +575,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
575
575
  switch (_b.label) {
576
576
  case 0:
577
577
  _b.trys.push([0, 2, , 3]);
578
- return [4 /*yield*/, this._AmazonLocationServiceBatchDeleteGeofenceCall(batch, (options === null || options === void 0 ? void 0 : options.collectionName) || this._config.geofenceCollections.default, customUserAgentDetails)];
578
+ return [4 /*yield*/, this._AmazonLocationServiceBatchDeleteGeofenceCall(batch, (options === null || options === void 0 ? void 0 : options.collectionName) || this._config.geofenceCollections.default)];
579
579
  case 1:
580
580
  response = _b.sent();
581
581
  return [3 /*break*/, 3];
@@ -667,7 +667,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
667
667
  throw new Error(errorString);
668
668
  }
669
669
  };
670
- AmazonLocationServiceProvider.prototype._AmazonLocationServiceBatchPutGeofenceCall = function (PascalGeofences, collectionName, customUserAgentDetails) {
670
+ AmazonLocationServiceProvider.prototype._AmazonLocationServiceBatchPutGeofenceCall = function (PascalGeofences, collectionName) {
671
671
  return tslib_1.__awaiter(this, void 0, void 0, function () {
672
672
  var geofenceInput, client, command, response, error_10;
673
673
  return tslib_1.__generator(this, function (_a) {
@@ -680,7 +680,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
680
680
  client = new client_location_1.LocationClient({
681
681
  credentials: this._config.credentials,
682
682
  region: this._config.region,
683
- customUserAgent: core_1.getAmplifyUserAgentObject(customUserAgentDetails),
683
+ customUserAgent: core_1.getAmplifyUserAgentObject(),
684
684
  });
685
685
  command = new client_location_1.BatchPutGeofenceCommand(geofenceInput);
686
686
  _a.label = 1;
@@ -698,7 +698,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
698
698
  });
699
699
  });
700
700
  };
701
- AmazonLocationServiceProvider.prototype._AmazonLocationServiceBatchDeleteGeofenceCall = function (geofenceIds, collectionName, customUserAgentDetails) {
701
+ AmazonLocationServiceProvider.prototype._AmazonLocationServiceBatchDeleteGeofenceCall = function (geofenceIds, collectionName) {
702
702
  return tslib_1.__awaiter(this, void 0, void 0, function () {
703
703
  var deleteGeofencesInput, client, command, response, error_11;
704
704
  return tslib_1.__generator(this, function (_a) {
@@ -711,7 +711,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
711
711
  client = new client_location_1.LocationClient({
712
712
  credentials: this._config.credentials,
713
713
  region: this._config.region,
714
- customUserAgent: core_1.getAmplifyUserAgentObject(customUserAgentDetails),
714
+ customUserAgent: core_1.getAmplifyUserAgentObject(),
715
715
  });
716
716
  command = new client_location_1.BatchDeleteGeofenceCommand(deleteGeofencesInput);
717
717
  _a.label = 1;