@aws-amplify/geo 1.2.4 → 1.2.5-geo.11

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 (39) hide show
  1. package/dist/aws-amplify-geo.js +2020 -137
  2. package/dist/aws-amplify-geo.js.map +1 -1
  3. package/dist/aws-amplify-geo.min.js +6 -6
  4. package/dist/aws-amplify-geo.min.js.map +1 -1
  5. package/lib/Geo.d.ts +36 -10
  6. package/lib/Geo.js +140 -20
  7. package/lib/Geo.js.map +1 -1
  8. package/lib/Providers/AmazonLocationServiceProvider.d.ts +37 -8
  9. package/lib/Providers/AmazonLocationServiceProvider.js +405 -53
  10. package/lib/Providers/AmazonLocationServiceProvider.js.map +1 -1
  11. package/lib/types/AmazonLocationServiceProvider.d.ts +21 -1
  12. package/lib/types/Geo.d.ts +48 -2
  13. package/lib/types/Provider.d.ts +5 -2
  14. package/lib/types/Provider.js +0 -12
  15. package/lib/types/Provider.js.map +1 -1
  16. package/lib/util.d.ts +6 -0
  17. package/lib/util.js +144 -0
  18. package/lib/util.js.map +1 -0
  19. package/lib-esm/Geo.d.ts +36 -10
  20. package/lib-esm/Geo.js +140 -20
  21. package/lib-esm/Geo.js.map +1 -1
  22. package/lib-esm/Providers/AmazonLocationServiceProvider.d.ts +37 -8
  23. package/lib-esm/Providers/AmazonLocationServiceProvider.js +406 -54
  24. package/lib-esm/Providers/AmazonLocationServiceProvider.js.map +1 -1
  25. package/lib-esm/types/AmazonLocationServiceProvider.d.ts +21 -1
  26. package/lib-esm/types/Geo.d.ts +48 -2
  27. package/lib-esm/types/Provider.d.ts +5 -2
  28. package/lib-esm/types/Provider.js +0 -12
  29. package/lib-esm/types/Provider.js.map +1 -1
  30. package/lib-esm/util.d.ts +6 -0
  31. package/lib-esm/util.js +134 -0
  32. package/lib-esm/util.js.map +1 -0
  33. package/package.json +6 -4
  34. package/src/Geo.ts +118 -20
  35. package/src/Providers/AmazonLocationServiceProvider.ts +422 -75
  36. package/src/types/AmazonLocationServiceProvider.ts +56 -1
  37. package/src/types/Geo.ts +71 -4
  38. package/src/types/Provider.ts +29 -6
  39. package/src/util.ts +173 -0
@@ -34,6 +34,26 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
34
34
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
35
  }
36
36
  };
37
+ var __read = (this && this.__read) || function (o, n) {
38
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
39
+ if (!m) return o;
40
+ var i = m.call(o), r, ar = [], e;
41
+ try {
42
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
43
+ }
44
+ catch (error) { e = { error: error }; }
45
+ finally {
46
+ try {
47
+ if (r && !r.done && (m = i["return"])) m.call(i);
48
+ }
49
+ finally { if (e) throw e.error; }
50
+ }
51
+ return ar;
52
+ };
53
+ var __spread = (this && this.__spread) || function () {
54
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
55
+ return ar;
56
+ };
37
57
  /*
38
58
  * Copyright 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
39
59
  *
@@ -48,7 +68,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
48
68
  */
49
69
  import camelcaseKeys from 'camelcase-keys';
50
70
  import { ConsoleLogger as Logger, Credentials, getAmplifyUserAgent, } from '@aws-amplify/core';
51
- import { LocationClient, SearchPlaceIndexForTextCommand, SearchPlaceIndexForSuggestionsCommand, SearchPlaceIndexForPositionCommand, } from '@aws-sdk/client-location';
71
+ import { LocationClient, SearchPlaceIndexForTextCommand, SearchPlaceIndexForPositionCommand, BatchPutGeofenceCommand, GetGeofenceCommand, ListGeofencesCommand, BatchDeleteGeofenceCommand, } from '@aws-sdk/client-location';
72
+ import { validateGeofenceId, validateGeofencesInput } from '../util';
52
73
  var logger = new Logger('AmazonLocationServiceProvider');
53
74
  var AmazonLocationServiceProvider = /** @class */ (function () {
54
75
  /**
@@ -180,14 +201,14 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
180
201
  });
181
202
  };
182
203
  /**
183
- * Search for suggestions based on the input text
184
- * @param {string} text - The text string that is to be searched for
185
- * @param {SearchByTextOptions} options? - Optional parameters to the search
186
- * @returns {Promise<SearchForSuggestionsResults>} - Resolves to an array of search suggestion strings
204
+ * Reverse geocoding search via a coordinate point on the map
205
+ * @param coordinates - Coordinates array for the search input
206
+ * @param options - Options parameters for the search
207
+ * @returns {Promise<Place>} - Promise that resolves to a place matching search coordinates
187
208
  */
188
- AmazonLocationServiceProvider.prototype.searchForSuggestions = function (text, options) {
209
+ AmazonLocationServiceProvider.prototype.searchByCoordinates = function (coordinates, options) {
189
210
  return __awaiter(this, void 0, void 0, function () {
190
- var credentialsOK, locationServiceInput, client, command, response, error_2, results;
211
+ var credentialsOK, locationServiceInput, client, command, response, error_2, PascalResults, results;
191
212
  return __generator(this, function (_a) {
192
213
  switch (_a.label) {
193
214
  case 0: return [4 /*yield*/, this._ensureCredentials()];
@@ -198,34 +219,21 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
198
219
  }
199
220
  this._verifySearchIndex(options === null || options === void 0 ? void 0 : options.searchIndexName);
200
221
  locationServiceInput = {
201
- Text: text,
222
+ Position: coordinates,
202
223
  IndexName: this._config.search_indices.default,
203
224
  };
204
- /**
205
- * Map search options to Amazon Location Service input object
206
- */
207
225
  if (options) {
208
- locationServiceInput.FilterCountries = options.countries;
209
- locationServiceInput.MaxResults = options.maxResults;
210
226
  if (options.searchIndexName) {
211
227
  locationServiceInput.IndexName = options.searchIndexName;
212
228
  }
213
- if (options['biasPosition'] && options['searchAreaConstraints']) {
214
- throw new Error('BiasPosition and SearchAreaConstraints are mutually exclusive, please remove one or the other from the options object');
215
- }
216
- if (options['biasPosition']) {
217
- locationServiceInput.BiasPosition = options['biasPosition'];
218
- }
219
- if (options['searchAreaConstraints']) {
220
- locationServiceInput.FilterBBox = options['searchAreaConstraints'];
221
- }
229
+ locationServiceInput.MaxResults = options.maxResults;
222
230
  }
223
231
  client = new LocationClient({
224
232
  credentials: this._config.credentials,
225
233
  region: this._config.region,
226
234
  customUserAgent: getAmplifyUserAgent(),
227
235
  });
228
- command = new SearchPlaceIndexForSuggestionsCommand(locationServiceInput);
236
+ command = new SearchPlaceIndexForPositionCommand(locationServiceInput);
229
237
  _a.label = 2;
230
238
  case 2:
231
239
  _a.trys.push([2, 4, , 5]);
@@ -238,21 +246,130 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
238
246
  logger.debug(error_2);
239
247
  throw error_2;
240
248
  case 5:
241
- results = response.Results.map(function (result) { return result.Text; });
249
+ PascalResults = response.Results.map(function (result) { return result.Place; });
250
+ results = camelcaseKeys(PascalResults[0], {
251
+ deep: true,
252
+ });
242
253
  return [2 /*return*/, results];
243
254
  }
244
255
  });
245
256
  });
246
257
  };
247
258
  /**
248
- * Reverse geocoding search via a coordinate point on the map
249
- * @param coordinates - Coordinates array for the search input
250
- * @param options - Options parameters for the search
251
- * @returns {Promise<Place>} - Promise that resolves to a place matching search coordinates
259
+ * Create geofences inside of a geofence collection
260
+ * @param geofences - Array of geofence objects to create
261
+ * @param options? - Optional parameters for creating geofences
262
+ * @returns {Promise<AmazonLocationServiceSaveGeofencesResults>} - Promise that resolves to an object with:
263
+ * successes: list of geofences successfully created
264
+ * errors: list of geofences that failed to create
252
265
  */
253
- AmazonLocationServiceProvider.prototype.searchByCoordinates = function (coordinates, options) {
266
+ AmazonLocationServiceProvider.prototype.saveGeofences = function (geofences, options) {
267
+ return __awaiter(this, void 0, void 0, function () {
268
+ var credentialsOK, PascalGeofences, results, batches, apiLimit;
269
+ var _this = this;
270
+ return __generator(this, function (_a) {
271
+ switch (_a.label) {
272
+ case 0:
273
+ if (geofences.length < 1) {
274
+ throw new Error('Geofence input array is empty');
275
+ }
276
+ return [4 /*yield*/, this._ensureCredentials()];
277
+ case 1:
278
+ credentialsOK = _a.sent();
279
+ if (!credentialsOK) {
280
+ throw new Error('No credentials');
281
+ }
282
+ // Verify geofence collection exists in aws-config.js
283
+ try {
284
+ this._verifyGeofenceCollections(options === null || options === void 0 ? void 0 : options.collectionName);
285
+ }
286
+ catch (error) {
287
+ logger.debug(error);
288
+ throw error;
289
+ }
290
+ validateGeofencesInput(geofences);
291
+ PascalGeofences = geofences.map(function (_a) {
292
+ var geofenceId = _a.geofenceId, polygon = _a.geometry.polygon;
293
+ return {
294
+ GeofenceId: geofenceId,
295
+ Geometry: {
296
+ Polygon: polygon,
297
+ },
298
+ };
299
+ });
300
+ results = {
301
+ successes: [],
302
+ errors: [],
303
+ };
304
+ batches = [];
305
+ while (PascalGeofences.length > 0) {
306
+ apiLimit = 10;
307
+ batches.push(PascalGeofences.splice(0, apiLimit));
308
+ }
309
+ return [4 /*yield*/, Promise.all(batches.map(function (batch) { return __awaiter(_this, void 0, void 0, function () {
310
+ var response, error_3;
311
+ return __generator(this, function (_a) {
312
+ switch (_a.label) {
313
+ case 0:
314
+ _a.trys.push([0, 2, , 3]);
315
+ return [4 /*yield*/, this._AmazonLocationServiceBatchPutGeofenceCall(batch, (options === null || options === void 0 ? void 0 : options.collectionName) || this._config.geofenceCollections.default)];
316
+ case 1:
317
+ response = _a.sent();
318
+ return [3 /*break*/, 3];
319
+ case 2:
320
+ error_3 = _a.sent();
321
+ // If the API call fails, add the geofences to the errors array and move to next batch
322
+ batch.forEach(function (geofence) {
323
+ results.errors.push({
324
+ geofenceId: geofence.GeofenceId,
325
+ error: {
326
+ code: 'APIConnectionError',
327
+ message: error_3.message,
328
+ },
329
+ });
330
+ });
331
+ return [2 /*return*/];
332
+ case 3:
333
+ // Push all successes to results
334
+ response.Successes.forEach(function (success) {
335
+ var GeofenceId = success.GeofenceId, CreateTime = success.CreateTime, UpdateTime = success.UpdateTime;
336
+ results.successes.push({
337
+ geofenceId: GeofenceId,
338
+ createTime: CreateTime,
339
+ updateTime: UpdateTime,
340
+ });
341
+ });
342
+ // Push all errors to results
343
+ response.Errors.forEach(function (error) {
344
+ var _a = error.Error, Code = _a.Code, Message = _a.Message, GeofenceId = error.GeofenceId;
345
+ results.errors.push({
346
+ error: {
347
+ code: Code,
348
+ message: Message,
349
+ },
350
+ geofenceId: GeofenceId,
351
+ });
352
+ });
353
+ return [2 /*return*/];
354
+ }
355
+ });
356
+ }); }))];
357
+ case 2:
358
+ _a.sent();
359
+ return [2 /*return*/, results];
360
+ }
361
+ });
362
+ });
363
+ };
364
+ /**
365
+ * Get geofence from a geofence collection
366
+ * @param geofenceId:string
367
+ * @param options?: Optional parameters for getGeofence
368
+ * @returns {Promise<AmazonLocationServiceGeofence>} - Promise that resolves to a geofence object
369
+ */
370
+ AmazonLocationServiceProvider.prototype.getGeofence = function (geofenceId, options) {
254
371
  return __awaiter(this, void 0, void 0, function () {
255
- var credentialsOK, locationServiceInput, client, command, response, error_3, PascalResults, results;
372
+ var credentialsOK, client, commandInput, command, response, error_4, GeofenceId, CreateTime, UpdateTime, Status, Geometry, geofence;
256
373
  return __generator(this, function (_a) {
257
374
  switch (_a.label) {
258
375
  case 0: return [4 /*yield*/, this._ensureCredentials()];
@@ -261,23 +378,88 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
261
378
  if (!credentialsOK) {
262
379
  throw new Error('No credentials');
263
380
  }
264
- this._verifySearchIndex(options === null || options === void 0 ? void 0 : options.searchIndexName);
265
- locationServiceInput = {
266
- Position: coordinates,
267
- IndexName: this._config.search_indices.default,
381
+ // Verify geofence collection exists in aws-config.js
382
+ try {
383
+ this._verifyGeofenceCollections(options === null || options === void 0 ? void 0 : options.collectionName);
384
+ }
385
+ catch (error) {
386
+ logger.debug(error);
387
+ throw error;
388
+ }
389
+ validateGeofenceId(geofenceId);
390
+ client = new LocationClient({
391
+ credentials: this._config.credentials,
392
+ region: this._config.region,
393
+ customUserAgent: getAmplifyUserAgent(),
394
+ });
395
+ commandInput = {
396
+ GeofenceId: geofenceId,
397
+ CollectionName: (options === null || options === void 0 ? void 0 : options.collectionName) || this._config.geofenceCollections.default,
268
398
  };
269
- if (options) {
270
- if (options.searchIndexName) {
271
- locationServiceInput.IndexName = options.searchIndexName;
272
- }
273
- locationServiceInput.MaxResults = options.maxResults;
399
+ command = new GetGeofenceCommand(commandInput);
400
+ _a.label = 2;
401
+ case 2:
402
+ _a.trys.push([2, 4, , 5]);
403
+ return [4 /*yield*/, client.send(command)];
404
+ case 3:
405
+ response = _a.sent();
406
+ return [3 /*break*/, 5];
407
+ case 4:
408
+ error_4 = _a.sent();
409
+ logger.debug(error_4);
410
+ throw error_4;
411
+ case 5:
412
+ GeofenceId = response.GeofenceId, CreateTime = response.CreateTime, UpdateTime = response.UpdateTime, Status = response.Status, Geometry = response.Geometry;
413
+ geofence = {
414
+ createTime: CreateTime,
415
+ geofenceId: GeofenceId,
416
+ geometry: {
417
+ polygon: Geometry.Polygon,
418
+ },
419
+ status: Status,
420
+ updateTime: UpdateTime,
421
+ };
422
+ return [2 /*return*/, geofence];
423
+ }
424
+ });
425
+ });
426
+ };
427
+ /**
428
+ * List geofences from a geofence collection
429
+ * @param options?: ListGeofenceOptions
430
+ * @returns {Promise<ListGeofencesResults>} - Promise that resolves to an object with:
431
+ * entries: list of geofences - 100 geofences are listed per page
432
+ * nextToken: token for next page of geofences
433
+ */
434
+ AmazonLocationServiceProvider.prototype.listGeofences = function (options) {
435
+ return __awaiter(this, void 0, void 0, function () {
436
+ var credentialsOK, client, listGeofencesInput, command, response, error_5, NextToken, Entries, results;
437
+ return __generator(this, function (_a) {
438
+ switch (_a.label) {
439
+ case 0: return [4 /*yield*/, this._ensureCredentials()];
440
+ case 1:
441
+ credentialsOK = _a.sent();
442
+ if (!credentialsOK) {
443
+ throw new Error('No credentials');
444
+ }
445
+ // Verify geofence collection exists in aws-config.js
446
+ try {
447
+ this._verifyGeofenceCollections(options === null || options === void 0 ? void 0 : options.collectionName);
448
+ }
449
+ catch (error) {
450
+ logger.debug(error);
451
+ throw error;
274
452
  }
275
453
  client = new LocationClient({
276
454
  credentials: this._config.credentials,
277
455
  region: this._config.region,
278
456
  customUserAgent: getAmplifyUserAgent(),
279
457
  });
280
- command = new SearchPlaceIndexForPositionCommand(locationServiceInput);
458
+ listGeofencesInput = {
459
+ NextToken: options === null || options === void 0 ? void 0 : options.nextToken,
460
+ CollectionName: (options === null || options === void 0 ? void 0 : options.collectionName) || this._config.geofenceCollections.default,
461
+ };
462
+ command = new ListGeofencesCommand(listGeofencesInput);
281
463
  _a.label = 2;
282
464
  case 2:
283
465
  _a.trys.push([2, 4, , 5]);
@@ -286,14 +468,113 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
286
468
  response = _a.sent();
287
469
  return [3 /*break*/, 5];
288
470
  case 4:
289
- error_3 = _a.sent();
290
- logger.debug(error_3);
291
- throw error_3;
471
+ error_5 = _a.sent();
472
+ logger.debug(error_5);
473
+ throw error_5;
292
474
  case 5:
293
- PascalResults = response.Results.map(function (result) { return result.Place; });
294
- results = camelcaseKeys(PascalResults[0], {
295
- deep: true,
475
+ NextToken = response.NextToken, Entries = response.Entries;
476
+ results = {
477
+ entries: Entries.map(function (_a) {
478
+ var GeofenceId = _a.GeofenceId, CreateTime = _a.CreateTime, UpdateTime = _a.UpdateTime, Status = _a.Status, Polygon = _a.Geometry.Polygon;
479
+ return {
480
+ geofenceId: GeofenceId,
481
+ createTime: CreateTime,
482
+ updateTime: UpdateTime,
483
+ status: Status,
484
+ geometry: {
485
+ polygon: Polygon,
486
+ },
487
+ };
488
+ }),
489
+ nextToken: NextToken,
490
+ };
491
+ return [2 /*return*/, results];
492
+ }
493
+ });
494
+ });
495
+ };
496
+ /**
497
+ * Delete geofences from a geofence collection
498
+ * @param geofenceIds: string|string[]
499
+ * @param options?: GeofenceOptions
500
+ * @returns {Promise<DeleteGeofencesResults>} - Promise that resolves to an object with:
501
+ * successes: list of geofences successfully deleted
502
+ * errors: list of geofences that failed to delete
503
+ */
504
+ AmazonLocationServiceProvider.prototype.deleteGeofences = function (geofenceIds, options) {
505
+ return __awaiter(this, void 0, void 0, function () {
506
+ var credentialsOK, badGeofenceIds, results, batches, count;
507
+ var _this = this;
508
+ return __generator(this, function (_a) {
509
+ switch (_a.label) {
510
+ case 0:
511
+ if (geofenceIds.length < 1) {
512
+ throw new Error('GeofenceId input array is empty');
513
+ }
514
+ return [4 /*yield*/, this._ensureCredentials()];
515
+ case 1:
516
+ credentialsOK = _a.sent();
517
+ if (!credentialsOK) {
518
+ throw new Error('No credentials');
519
+ }
520
+ this._verifyGeofenceCollections(options === null || options === void 0 ? void 0 : options.collectionName);
521
+ badGeofenceIds = geofenceIds.filter(function (geofenceId) {
522
+ try {
523
+ validateGeofenceId(geofenceId);
524
+ }
525
+ catch (error) {
526
+ return true;
527
+ }
296
528
  });
529
+ if (badGeofenceIds.length > 0) {
530
+ throw new Error("Invalid geofence ids: " + badGeofenceIds.join(', '));
531
+ }
532
+ results = {
533
+ successes: [],
534
+ errors: [],
535
+ };
536
+ batches = [];
537
+ count = 0;
538
+ while (count < geofenceIds.length) {
539
+ batches.push(geofenceIds.slice(count, (count += 10)));
540
+ }
541
+ return [4 /*yield*/, Promise.all(batches.map(function (batch) { return __awaiter(_this, void 0, void 0, function () {
542
+ var response, error_6, badGeofenceIds;
543
+ var _a;
544
+ return __generator(this, function (_b) {
545
+ switch (_b.label) {
546
+ case 0:
547
+ _b.trys.push([0, 2, , 3]);
548
+ return [4 /*yield*/, this._AmazonLocationServiceBatchDeleteGeofenceCall(batch, (options === null || options === void 0 ? void 0 : options.collectionName) || this._config.geofenceCollections.default)];
549
+ case 1:
550
+ response = _b.sent();
551
+ return [3 /*break*/, 3];
552
+ case 2:
553
+ error_6 = _b.sent();
554
+ // If the API call fails, add the geofences to the errors array and move to next batch
555
+ batch.forEach(function (geofenceId) {
556
+ var errorObject = {
557
+ geofenceId: geofenceId,
558
+ error: {
559
+ code: error_6.message,
560
+ message: error_6.message,
561
+ },
562
+ };
563
+ results.errors.push(errorObject);
564
+ });
565
+ return [2 /*return*/];
566
+ case 3:
567
+ badGeofenceIds = response.Errors.map(function (_a) {
568
+ var geofenceId = _a.geofenceId;
569
+ return geofenceId;
570
+ });
571
+ (_a = results.successes).push.apply(_a, __spread(batch.filter(function (Id) { return !badGeofenceIds.includes(Id); })));
572
+ return [2 /*return*/];
573
+ }
574
+ });
575
+ }); }))];
576
+ case 2:
577
+ _a.sent();
297
578
  return [2 /*return*/, results];
298
579
  }
299
580
  });
@@ -304,7 +585,7 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
304
585
  */
305
586
  AmazonLocationServiceProvider.prototype._ensureCredentials = function () {
306
587
  return __awaiter(this, void 0, void 0, function () {
307
- var credentials, cred, error_4;
588
+ var credentials, cred, error_7;
308
589
  return __generator(this, function (_a) {
309
590
  switch (_a.label) {
310
591
  case 0:
@@ -319,8 +600,8 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
319
600
  this._config.credentials = cred;
320
601
  return [2 /*return*/, true];
321
602
  case 2:
322
- error_4 = _a.sent();
323
- logger.warn('Ensure credentials error. Credentials are:', error_4);
603
+ error_7 = _a.sent();
604
+ logger.debug('Ensure credentials error. Credentials are:', error_7);
324
605
  return [2 /*return*/, false];
325
606
  case 3: return [2 /*return*/];
326
607
  }
@@ -329,24 +610,95 @@ var AmazonLocationServiceProvider = /** @class */ (function () {
329
610
  };
330
611
  AmazonLocationServiceProvider.prototype._verifyMapResources = function () {
331
612
  if (!this._config.maps) {
332
- var errorString = "No map resources found in amplify config, run 'amplify add geo' to create them and run `amplify push` after";
333
- logger.warn(errorString);
613
+ var errorString = "No map resources found in amplify config, run 'amplify add geo' to create one and run `amplify push` after";
614
+ logger.debug(errorString);
334
615
  throw new Error(errorString);
335
616
  }
336
617
  if (!this._config.maps.default) {
337
618
  var errorString = "No default map resource found in amplify config, run 'amplify add geo' to create one and run `amplify push` after";
338
- logger.warn(errorString);
619
+ logger.debug(errorString);
339
620
  throw new Error(errorString);
340
621
  }
341
622
  };
342
623
  AmazonLocationServiceProvider.prototype._verifySearchIndex = function (optionalSearchIndex) {
343
624
  if ((!this._config.search_indices || !this._config.search_indices.default) &&
344
625
  !optionalSearchIndex) {
345
- var errorString = 'No Search Index found, please run `amplify add geo` to add one and run `amplify push` after.';
346
- logger.warn(errorString);
626
+ var errorString = 'No Search Index found in amplify config, please run `amplify add geo` to create one and run `amplify push` after.';
627
+ logger.debug(errorString);
628
+ throw new Error(errorString);
629
+ }
630
+ };
631
+ AmazonLocationServiceProvider.prototype._verifyGeofenceCollections = function (optionalGeofenceCollectionName) {
632
+ if ((!this._config.geofenceCollections ||
633
+ !this._config.geofenceCollections.default) &&
634
+ !optionalGeofenceCollectionName) {
635
+ var errorString = 'No Geofence Collections found, please run `amplify add geo` to create one and run `amplify push` after.';
636
+ logger.debug(errorString);
347
637
  throw new Error(errorString);
348
638
  }
349
639
  };
640
+ AmazonLocationServiceProvider.prototype._AmazonLocationServiceBatchPutGeofenceCall = function (PascalGeofences, collectionName) {
641
+ return __awaiter(this, void 0, void 0, function () {
642
+ var geofenceInput, client, command, response, error_8;
643
+ return __generator(this, function (_a) {
644
+ switch (_a.label) {
645
+ case 0:
646
+ geofenceInput = {
647
+ Entries: PascalGeofences,
648
+ CollectionName: collectionName || this._config.geofenceCollections.default,
649
+ };
650
+ client = new LocationClient({
651
+ credentials: this._config.credentials,
652
+ region: this._config.region,
653
+ customUserAgent: getAmplifyUserAgent(),
654
+ });
655
+ command = new BatchPutGeofenceCommand(geofenceInput);
656
+ _a.label = 1;
657
+ case 1:
658
+ _a.trys.push([1, 3, , 4]);
659
+ return [4 /*yield*/, client.send(command)];
660
+ case 2:
661
+ response = _a.sent();
662
+ return [3 /*break*/, 4];
663
+ case 3:
664
+ error_8 = _a.sent();
665
+ throw error_8;
666
+ case 4: return [2 /*return*/, response];
667
+ }
668
+ });
669
+ });
670
+ };
671
+ AmazonLocationServiceProvider.prototype._AmazonLocationServiceBatchDeleteGeofenceCall = function (geofenceIds, collectionName) {
672
+ return __awaiter(this, void 0, void 0, function () {
673
+ var deleteGeofencesInput, client, command, response, error_9;
674
+ return __generator(this, function (_a) {
675
+ switch (_a.label) {
676
+ case 0:
677
+ deleteGeofencesInput = {
678
+ GeofenceIds: geofenceIds,
679
+ CollectionName: collectionName || this._config.geofenceCollections.default,
680
+ };
681
+ client = new LocationClient({
682
+ credentials: this._config.credentials,
683
+ region: this._config.region,
684
+ customUserAgent: getAmplifyUserAgent(),
685
+ });
686
+ command = new BatchDeleteGeofenceCommand(deleteGeofencesInput);
687
+ _a.label = 1;
688
+ case 1:
689
+ _a.trys.push([1, 3, , 4]);
690
+ return [4 /*yield*/, client.send(command)];
691
+ case 2:
692
+ response = _a.sent();
693
+ return [3 /*break*/, 4];
694
+ case 3:
695
+ error_9 = _a.sent();
696
+ throw error_9;
697
+ case 4: return [2 /*return*/, response];
698
+ }
699
+ });
700
+ });
701
+ };
350
702
  AmazonLocationServiceProvider.CATEGORY = 'Geo';
351
703
  AmazonLocationServiceProvider.PROVIDER_NAME = 'AmazonLocationService';
352
704
  return AmazonLocationServiceProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"AmazonLocationServiceProvider.js","sourceRoot":"","sources":["../../src/Providers/AmazonLocationServiceProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;GAWG;AACH,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACN,aAAa,IAAI,MAAM,EACvB,WAAW,EACX,mBAAmB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEN,cAAc,EACd,8BAA8B,EAE9B,qCAAqC,EAErC,kCAAkC,GAElC,MAAM,0BAA0B,CAAC;AAalC,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAE3D;IASC;;;OAGG;IACH,uCAAY,MAAkB;QAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,KAAK,C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,CAAC,CAAC;SAC7B;IACF,CAAC;IA9UM,sCAAQ,GAAG,KAAK,CAAC;IACjB,2CAAa,GAAG,uBAAuB,CAAC;IA8UhD,oCAAC;CAAA,AAhVD,IAgVC;SAhVY,6BAA6B"}
1
+ {"version":3,"file":"AmazonLocationServiceProvider.js","sourceRoot":"","sources":["../../src/Providers/AmazonLocationServiceProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;GAWG;AACH,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EACN,aAAa,IAAI,MAAM,EACvB,WAAW,EACX,mBAAmB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAGN,cAAc,EACd,8BAA8B,EAC9B,kCAAkC,EAElC,uBAAuB,EAIvB,kBAAkB,EAGlB,oBAAoB,EAGpB,0BAA0B,GAG1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAqBrE,IAAM,MAAM,GAAG,IAAI,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAE3D;IASC;;;OAGG;IACH,uCAAY,MAAkB;QAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACI,mDAAW,GAAlB;QACC,OAAO,6BAA6B,CAAC,QAAQ,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACI,uDAAe,GAAtB;QACC,OAAO,6BAA6B,CAAC,aAAa,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACI,iDAAS,GAAhB,UAAiB,MAAO;QACvB,MAAM,CAAC,KAAK,CAAC,4CAA4C,EAAE,MAAM,CAAC,CAAC;QAC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  export interface AmazonLocationServiceMapStyle extends MapStyle {
3
3
  region: string;
4
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
+ };