@aws-amplify/geo 1.1.5-unstable.4 → 1.1.5-unstable.8

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.
@@ -25846,25 +25846,23 @@ function () {
25846
25846
 
25847
25847
 
25848
25848
  AmazonLocationServiceProvider.prototype.searchByText = function (text, options) {
25849
- var _a;
25850
-
25851
25849
  return __awaiter(this, void 0, void 0, function () {
25852
25850
  var credentialsOK, locationServiceInput, client, command, response, error_1, PascalResults, results;
25853
- return __generator(this, function (_b) {
25854
- switch (_b.label) {
25851
+ return __generator(this, function (_a) {
25852
+ switch (_a.label) {
25855
25853
  case 0:
25856
25854
  return [4
25857
25855
  /*yield*/
25858
25856
  , this._ensureCredentials()];
25859
25857
 
25860
25858
  case 1:
25861
- credentialsOK = _b.sent();
25859
+ credentialsOK = _a.sent();
25862
25860
 
25863
25861
  if (!credentialsOK) {
25864
25862
  throw new Error('No credentials');
25865
25863
  }
25866
25864
 
25867
- this._verifySearchIndex((_a = options) === null || _a === void 0 ? void 0 : _a.searchIndexName);
25865
+ this._verifySearchIndex(options === null || options === void 0 ? void 0 : options.searchIndexName);
25868
25866
 
25869
25867
  locationServiceInput = {
25870
25868
  Text: text,
@@ -25895,23 +25893,23 @@ function () {
25895
25893
  customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])()
25896
25894
  });
25897
25895
  command = new _aws_sdk_client_location__WEBPACK_IMPORTED_MODULE_2__["SearchPlaceIndexForTextCommand"](locationServiceInput);
25898
- _b.label = 2;
25896
+ _a.label = 2;
25899
25897
 
25900
25898
  case 2:
25901
- _b.trys.push([2, 4,, 5]);
25899
+ _a.trys.push([2, 4,, 5]);
25902
25900
 
25903
25901
  return [4
25904
25902
  /*yield*/
25905
25903
  , client.send(command)];
25906
25904
 
25907
25905
  case 3:
25908
- response = _b.sent();
25906
+ response = _a.sent();
25909
25907
  return [3
25910
25908
  /*break*/
25911
25909
  , 5];
25912
25910
 
25913
25911
  case 4:
25914
- error_1 = _b.sent();
25912
+ error_1 = _a.sent();
25915
25913
  logger.debug(error_1);
25916
25914
  throw error_1;
25917
25915
 
@@ -25938,25 +25936,23 @@ function () {
25938
25936
 
25939
25937
 
25940
25938
  AmazonLocationServiceProvider.prototype.searchByCoordinates = function (coordinates, options) {
25941
- var _a;
25942
-
25943
25939
  return __awaiter(this, void 0, void 0, function () {
25944
25940
  var credentialsOK, locationServiceInput, client, command, response, error_2, PascalResults, results;
25945
- return __generator(this, function (_b) {
25946
- switch (_b.label) {
25941
+ return __generator(this, function (_a) {
25942
+ switch (_a.label) {
25947
25943
  case 0:
25948
25944
  return [4
25949
25945
  /*yield*/
25950
25946
  , this._ensureCredentials()];
25951
25947
 
25952
25948
  case 1:
25953
- credentialsOK = _b.sent();
25949
+ credentialsOK = _a.sent();
25954
25950
 
25955
25951
  if (!credentialsOK) {
25956
25952
  throw new Error('No credentials');
25957
25953
  }
25958
25954
 
25959
- this._verifySearchIndex((_a = options) === null || _a === void 0 ? void 0 : _a.searchIndexName);
25955
+ this._verifySearchIndex(options === null || options === void 0 ? void 0 : options.searchIndexName);
25960
25956
 
25961
25957
  locationServiceInput = {
25962
25958
  Position: coordinates,
@@ -25977,23 +25973,23 @@ function () {
25977
25973
  customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])()
25978
25974
  });
25979
25975
  command = new _aws_sdk_client_location__WEBPACK_IMPORTED_MODULE_2__["SearchPlaceIndexForPositionCommand"](locationServiceInput);
25980
- _b.label = 2;
25976
+ _a.label = 2;
25981
25977
 
25982
25978
  case 2:
25983
- _b.trys.push([2, 4,, 5]);
25979
+ _a.trys.push([2, 4,, 5]);
25984
25980
 
25985
25981
  return [4
25986
25982
  /*yield*/
25987
25983
  , client.send(command)];
25988
25984
 
25989
25985
  case 3:
25990
- response = _b.sent();
25986
+ response = _a.sent();
25991
25987
  return [3
25992
25988
  /*break*/
25993
25989
  , 5];
25994
25990
 
25995
25991
  case 4:
25996
- error_2 = _b.sent();
25992
+ error_2 = _a.sent();
25997
25993
  logger.debug(error_2);
25998
25994
  throw error_2;
25999
25995