@aws-amplify/geo 1.1.2-unstable.4 → 1.1.3-in-app-messaging.35
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 +22 -17
- package/dist/aws-amplify-geo.js +60 -28
- package/dist/aws-amplify-geo.js.map +1 -1
- package/dist/aws-amplify-geo.min.js +3 -3
- package/dist/aws-amplify-geo.min.js.map +1 -1
- package/lib/.tsbuildinfo +1 -1
- package/lib/Providers/AmazonLocationServiceProvider.js +16 -18
- package/lib/Providers/AmazonLocationServiceProvider.js.map +1 -1
- package/lib-esm/.tsbuildinfo +1 -1
- package/lib-esm/Providers/AmazonLocationServiceProvider.js +16 -18
- package/lib-esm/Providers/AmazonLocationServiceProvider.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,42 +3,47 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [1.1.
|
|
6
|
+
## [1.1.4](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/geo@1.1.3...@aws-amplify/geo@1.1.4) (2021-10-28)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @aws-amplify/geo
|
|
9
9
|
|
|
10
|
+
## [1.1.3](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/geo@1.1.2...@aws-amplify/geo@1.1.3) (2021-10-21)
|
|
10
11
|
|
|
12
|
+
**Note:** Version bump only for package @aws-amplify/geo
|
|
11
13
|
|
|
14
|
+
## [1.1.2](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/geo@1.1.1...@aws-amplify/geo@1.1.2) (2021-10-07)
|
|
12
15
|
|
|
16
|
+
**Note:** Version bump only for package @aws-amplify/geo
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### Features
|
|
18
|
-
|
|
19
|
-
* **geo:** add region to Amazon Location Service MapStyle ([#8736](https://github.com/aws-amplify/amplify-js/issues/8736)) ([#8745](https://github.com/aws-amplify/amplify-js/issues/8745)) ([21c95b2](https://github.com/aws-amplify/amplify-js/commit/21c95b2779c0973a6e012570b19bd40e8961e01e))
|
|
20
|
-
* **Geo:** add Geo category initial scaffolding - Geo milestone 1 - PR 1/6 ([#8615](https://github.com/aws-amplify/amplify-js/issues/8615)) ([81afbcf](https://github.com/aws-amplify/amplify-js/commit/81afbcfc3ba99807853d915032f1a97746fdd37f))
|
|
21
|
-
* **Geo:** add Geo class and amazonLocationServicesProvider - Geo milestone 1 - PR 3/6 ([#8618](https://github.com/aws-amplify/amplify-js/issues/8618)) ([4c1c1fe](https://github.com/aws-amplify/amplify-js/commit/4c1c1fe786f2a4b1d7e1260491357a248dd6d084))
|
|
22
|
-
* **Geo:** getAvailableMaps and getDefaultMap - Geo milestone 1 - PR 4 ([#8620](https://github.com/aws-amplify/amplify-js/issues/8620)) ([229f93e](https://github.com/aws-amplify/amplify-js/commit/229f93edf1bc07de26aebe28f26f3066d3e31a74))
|
|
23
|
-
* **Geo:** searchByCoordinates - Geo milestone 1 - PR 6 ([#8622](https://github.com/aws-amplify/amplify-js/issues/8622)) ([ae725c0](https://github.com/aws-amplify/amplify-js/commit/ae725c0f2d55ba95d4ecc76e46506a888e6b67c5))
|
|
24
|
-
* **Geo:** searchByText - Geo milestone 1 - PR 5 ([#8621](https://github.com/aws-amplify/amplify-js/issues/8621)) ([5346ae1](https://github.com/aws-amplify/amplify-js/commit/5346ae17dcf5672b3c25c46f483af53d5f5dfc93))
|
|
25
|
-
* **Geo:** update aws-amplify/core - Geo milestone 1 - PR 2/6 ([#8617](https://github.com/aws-amplify/amplify-js/issues/8617)) ([3a83893](https://github.com/aws-amplify/amplify-js/commit/3a8389388ebe7a521d0b78c58e24d91b53db4799))
|
|
26
|
-
* **Geo:** update types latitude <=> longitude ([5a8bebb](https://github.com/aws-amplify/amplify-js/commit/5a8bebb24945dcb3a64098407c17fa9195802191))
|
|
18
|
+
## [1.1.1](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/geo@1.1.0...@aws-amplify/geo@1.1.1) (2021-09-30)
|
|
27
19
|
|
|
20
|
+
**Note:** Version bump only for package @aws-amplify/geo
|
|
28
21
|
|
|
22
|
+
# 1.1.0 (2021-09-24)
|
|
29
23
|
|
|
24
|
+
### Features
|
|
30
25
|
|
|
26
|
+
- **geo:** add region to Amazon Location Service MapStyle ([#8736](https://github.com/aws-amplify/amplify-js/issues/8736)) ([#8745](https://github.com/aws-amplify/amplify-js/issues/8745)) ([21c95b2](https://github.com/aws-amplify/amplify-js/commit/21c95b2779c0973a6e012570b19bd40e8961e01e))
|
|
27
|
+
- **Geo:** add Geo category initial scaffolding - Geo milestone 1 - PR 1/6 ([#8615](https://github.com/aws-amplify/amplify-js/issues/8615)) ([81afbcf](https://github.com/aws-amplify/amplify-js/commit/81afbcfc3ba99807853d915032f1a97746fdd37f))
|
|
28
|
+
- **Geo:** add Geo class and amazonLocationServicesProvider - Geo milestone 1 - PR 3/6 ([#8618](https://github.com/aws-amplify/amplify-js/issues/8618)) ([4c1c1fe](https://github.com/aws-amplify/amplify-js/commit/4c1c1fe786f2a4b1d7e1260491357a248dd6d084))
|
|
29
|
+
- **Geo:** getAvailableMaps and getDefaultMap - Geo milestone 1 - PR 4 ([#8620](https://github.com/aws-amplify/amplify-js/issues/8620)) ([229f93e](https://github.com/aws-amplify/amplify-js/commit/229f93edf1bc07de26aebe28f26f3066d3e31a74))
|
|
30
|
+
- **Geo:** searchByCoordinates - Geo milestone 1 - PR 6 ([#8622](https://github.com/aws-amplify/amplify-js/issues/8622)) ([ae725c0](https://github.com/aws-amplify/amplify-js/commit/ae725c0f2d55ba95d4ecc76e46506a888e6b67c5))
|
|
31
|
+
- **Geo:** searchByText - Geo milestone 1 - PR 5 ([#8621](https://github.com/aws-amplify/amplify-js/issues/8621)) ([5346ae1](https://github.com/aws-amplify/amplify-js/commit/5346ae17dcf5672b3c25c46f483af53d5f5dfc93))
|
|
32
|
+
- **Geo:** update aws-amplify/core - Geo milestone 1 - PR 2/6 ([#8617](https://github.com/aws-amplify/amplify-js/issues/8617)) ([3a83893](https://github.com/aws-amplify/amplify-js/commit/3a8389388ebe7a521d0b78c58e24d91b53db4799))
|
|
33
|
+
- **Geo:** update types latitude <=> longitude ([5a8bebb](https://github.com/aws-amplify/amplify-js/commit/5a8bebb24945dcb3a64098407c17fa9195802191))
|
|
31
34
|
|
|
32
35
|
# 0.0.2-geo.6654 (2021-09-13)
|
|
33
36
|
|
|
34
37
|
### Features
|
|
38
|
+
|
|
35
39
|
Add region to Amazon Location Service MapStyle (#8736) (#8745)
|
|
36
40
|
|
|
37
41
|
### Bug fixes
|
|
42
|
+
|
|
38
43
|
Update webpack config to mark core as external (#8748)
|
|
39
44
|
|
|
40
45
|
### BREAKING CHANGES
|
|
41
46
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
- Rename all instances of Amazon Location Services to the singular Amazon Location Service
|
|
48
|
+
_ Update name for amazon location service provider (#8872)
|
|
49
|
+
_ All methods and variable instances of the same
|
package/dist/aws-amplify-geo.js
CHANGED
|
@@ -997,14 +997,16 @@ exports.convertToBuffer = convertToBuffer;
|
|
|
997
997
|
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
|
|
998
998
|
// SPDX-License-Identifier: Apache-2.0
|
|
999
999
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1000
|
-
exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0;
|
|
1000
|
+
exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0;
|
|
1001
1001
|
var convertToBuffer_1 = __webpack_require__(/*! ./convertToBuffer */ "../../node_modules/@aws-crypto/util/build/convertToBuffer.js");
|
|
1002
1002
|
Object.defineProperty(exports, "convertToBuffer", { enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } });
|
|
1003
1003
|
var isEmptyData_1 = __webpack_require__(/*! ./isEmptyData */ "../../node_modules/@aws-crypto/util/build/isEmptyData.js");
|
|
1004
1004
|
Object.defineProperty(exports, "isEmptyData", { enumerable: true, get: function () { return isEmptyData_1.isEmptyData; } });
|
|
1005
1005
|
var numToUint8_1 = __webpack_require__(/*! ./numToUint8 */ "../../node_modules/@aws-crypto/util/build/numToUint8.js");
|
|
1006
1006
|
Object.defineProperty(exports, "numToUint8", { enumerable: true, get: function () { return numToUint8_1.numToUint8; } });
|
|
1007
|
-
|
|
1007
|
+
var uint32ArrayFrom_1 = __webpack_require__(/*! ./uint32ArrayFrom */ "../../node_modules/@aws-crypto/util/build/uint32ArrayFrom.js");
|
|
1008
|
+
Object.defineProperty(exports, "uint32ArrayFrom", { enumerable: true, get: function () { return uint32ArrayFrom_1.uint32ArrayFrom; } });
|
|
1009
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9FQUFvRTtBQUNwRSxzQ0FBc0M7OztBQUV0QyxxREFBb0Q7QUFBM0Msa0hBQUEsZUFBZSxPQUFBO0FBQ3hCLDZDQUE0QztBQUFuQywwR0FBQSxXQUFXLE9BQUE7QUFDcEIsMkNBQTBDO0FBQWpDLHdHQUFBLFVBQVUsT0FBQTtBQUNuQixxREFBa0Q7QUFBMUMsa0hBQUEsZUFBZSxPQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IEFtYXpvbi5jb20gSW5jLiBvciBpdHMgYWZmaWxpYXRlcy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wXG5cbmV4cG9ydCB7IGNvbnZlcnRUb0J1ZmZlciB9IGZyb20gXCIuL2NvbnZlcnRUb0J1ZmZlclwiO1xuZXhwb3J0IHsgaXNFbXB0eURhdGEgfSBmcm9tIFwiLi9pc0VtcHR5RGF0YVwiO1xuZXhwb3J0IHsgbnVtVG9VaW50OCB9IGZyb20gXCIuL251bVRvVWludDhcIjtcbmV4cG9ydCB7dWludDMyQXJyYXlGcm9tfSBmcm9tICcuL3VpbnQzMkFycmF5RnJvbSc7XG4iXX0=
|
|
1008
1010
|
|
|
1009
1011
|
/***/ }),
|
|
1010
1012
|
|
|
@@ -1058,6 +1060,36 @@ exports.numToUint8 = numToUint8;
|
|
|
1058
1060
|
|
|
1059
1061
|
/***/ }),
|
|
1060
1062
|
|
|
1063
|
+
/***/ "../../node_modules/@aws-crypto/util/build/uint32ArrayFrom.js":
|
|
1064
|
+
/*!*******************************************************************************!*\
|
|
1065
|
+
!*** /root/amplify-js/node_modules/@aws-crypto/util/build/uint32ArrayFrom.js ***!
|
|
1066
|
+
\*******************************************************************************/
|
|
1067
|
+
/*! no static exports found */
|
|
1068
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1069
|
+
|
|
1070
|
+
"use strict";
|
|
1071
|
+
|
|
1072
|
+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
|
|
1073
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
1074
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1075
|
+
exports.uint32ArrayFrom = void 0;
|
|
1076
|
+
// IE 11 does not support Array.from, so we do it manually
|
|
1077
|
+
function uint32ArrayFrom(a_lookUpTable) {
|
|
1078
|
+
if (!Array.from) {
|
|
1079
|
+
var return_array = new Uint32Array(a_lookUpTable.length);
|
|
1080
|
+
var a_index = 0;
|
|
1081
|
+
while (a_index < a_lookUpTable.length) {
|
|
1082
|
+
return_array[a_index] = a_lookUpTable[a_index];
|
|
1083
|
+
}
|
|
1084
|
+
return return_array;
|
|
1085
|
+
}
|
|
1086
|
+
return Uint32Array.from(a_lookUpTable);
|
|
1087
|
+
}
|
|
1088
|
+
exports.uint32ArrayFrom = uint32ArrayFrom;
|
|
1089
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidWludDMyQXJyYXlGcm9tLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3VpbnQzMkFycmF5RnJvbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0VBQW9FO0FBQ3BFLHNDQUFzQzs7O0FBRXRDLDBEQUEwRDtBQUMxRCxTQUFnQixlQUFlLENBQUMsYUFBNEI7SUFDMUQsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLEVBQUU7UUFDZixJQUFNLFlBQVksR0FBRyxJQUFJLFdBQVcsQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLENBQUE7UUFDMUQsSUFBSSxPQUFPLEdBQUcsQ0FBQyxDQUFBO1FBQ2YsT0FBTyxPQUFPLEdBQUcsYUFBYSxDQUFDLE1BQU0sRUFBRTtZQUNyQyxZQUFZLENBQUMsT0FBTyxDQUFDLEdBQUcsYUFBYSxDQUFDLE9BQU8sQ0FBQyxDQUFBO1NBQy9DO1FBQ0QsT0FBTyxZQUFZLENBQUE7S0FDcEI7SUFDRCxPQUFPLFdBQVcsQ0FBQyxJQUFJLENBQUMsYUFBYSxDQUFDLENBQUE7QUFDeEMsQ0FBQztBQVZELDBDQVVDIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IEFtYXpvbi5jb20gSW5jLiBvciBpdHMgYWZmaWxpYXRlcy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wXG5cbi8vIElFIDExIGRvZXMgbm90IHN1cHBvcnQgQXJyYXkuZnJvbSwgc28gd2UgZG8gaXQgbWFudWFsbHlcbmV4cG9ydCBmdW5jdGlvbiB1aW50MzJBcnJheUZyb20oYV9sb29rVXBUYWJsZTogQXJyYXk8bnVtYmVyPik6IFVpbnQzMkFycmF5IHtcbiAgaWYgKCFBcnJheS5mcm9tKSB7XG4gICAgY29uc3QgcmV0dXJuX2FycmF5ID0gbmV3IFVpbnQzMkFycmF5KGFfbG9va1VwVGFibGUubGVuZ3RoKVxuICAgIGxldCBhX2luZGV4ID0gMFxuICAgIHdoaWxlIChhX2luZGV4IDwgYV9sb29rVXBUYWJsZS5sZW5ndGgpIHtcbiAgICAgIHJldHVybl9hcnJheVthX2luZGV4XSA9IGFfbG9va1VwVGFibGVbYV9pbmRleF1cbiAgICB9XG4gICAgcmV0dXJuIHJldHVybl9hcnJheVxuICB9XG4gIHJldHVybiBVaW50MzJBcnJheS5mcm9tKGFfbG9va1VwVGFibGUpXG59XG4iXX0=
|
|
1090
|
+
|
|
1091
|
+
/***/ }),
|
|
1092
|
+
|
|
1061
1093
|
/***/ "../../node_modules/@aws-crypto/util/node_modules/@aws-sdk/util-utf8-browser/dist-es/index.js":
|
|
1062
1094
|
/*!***************************************************************************************************************!*\
|
|
1063
1095
|
!*** /root/amplify-js/node_modules/@aws-crypto/util/node_modules/@aws-sdk/util-utf8-browser/dist-es/index.js ***!
|
|
@@ -1079,7 +1111,7 @@ var fromUtf8 = function (input) {
|
|
|
1079
1111
|
var toUtf8 = function (input) {
|
|
1080
1112
|
return typeof TextDecoder === "function" ? Object(_whatwgEncodingApi__WEBPACK_IMPORTED_MODULE_1__["toUtf8"])(input) : Object(_pureJs__WEBPACK_IMPORTED_MODULE_0__["toUtf8"])(input);
|
|
1081
1113
|
};
|
|
1082
|
-
|
|
1114
|
+
|
|
1083
1115
|
|
|
1084
1116
|
/***/ }),
|
|
1085
1117
|
|
|
@@ -1136,7 +1168,7 @@ var toUtf8 = function (input) {
|
|
|
1136
1168
|
}
|
|
1137
1169
|
return decoded;
|
|
1138
1170
|
};
|
|
1139
|
-
|
|
1171
|
+
|
|
1140
1172
|
|
|
1141
1173
|
/***/ }),
|
|
1142
1174
|
|
|
@@ -1157,7 +1189,7 @@ function fromUtf8(input) {
|
|
|
1157
1189
|
function toUtf8(input) {
|
|
1158
1190
|
return new TextDecoder("utf-8").decode(input);
|
|
1159
1191
|
}
|
|
1160
|
-
|
|
1192
|
+
|
|
1161
1193
|
|
|
1162
1194
|
/***/ }),
|
|
1163
1195
|
|
|
@@ -22279,7 +22311,7 @@ function locateWindow() {
|
|
|
22279
22311
|
}
|
|
22280
22312
|
return fallbackWindow;
|
|
22281
22313
|
}
|
|
22282
|
-
|
|
22314
|
+
|
|
22283
22315
|
|
|
22284
22316
|
/***/ }),
|
|
22285
22317
|
|
|
@@ -25332,7 +25364,9 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
|
|
|
25332
25364
|
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('Geo');
|
|
25333
25365
|
var DEFAULT_PROVIDER = 'AmazonLocationService';
|
|
25334
25366
|
|
|
25335
|
-
var GeoClass =
|
|
25367
|
+
var GeoClass =
|
|
25368
|
+
/** @class */
|
|
25369
|
+
function () {
|
|
25336
25370
|
function GeoClass() {
|
|
25337
25371
|
this._config = {};
|
|
25338
25372
|
this._pluggables = [];
|
|
@@ -25719,7 +25753,9 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
|
|
|
25719
25753
|
|
|
25720
25754
|
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AmazonLocationServiceProvider');
|
|
25721
25755
|
|
|
25722
|
-
var AmazonLocationServiceProvider =
|
|
25756
|
+
var AmazonLocationServiceProvider =
|
|
25757
|
+
/** @class */
|
|
25758
|
+
function () {
|
|
25723
25759
|
/**
|
|
25724
25760
|
* Initialize Geo with AWS configurations
|
|
25725
25761
|
* @param {Object} config - Configuration object for Geo
|
|
@@ -25810,25 +25846,23 @@ var AmazonLocationServiceProvider = function () {
|
|
|
25810
25846
|
|
|
25811
25847
|
|
|
25812
25848
|
AmazonLocationServiceProvider.prototype.searchByText = function (text, options) {
|
|
25813
|
-
var _a;
|
|
25814
|
-
|
|
25815
25849
|
return __awaiter(this, void 0, void 0, function () {
|
|
25816
25850
|
var credentialsOK, locationServiceInput, client, command, response, error_1, PascalResults, results;
|
|
25817
|
-
return __generator(this, function (
|
|
25818
|
-
switch (
|
|
25851
|
+
return __generator(this, function (_a) {
|
|
25852
|
+
switch (_a.label) {
|
|
25819
25853
|
case 0:
|
|
25820
25854
|
return [4
|
|
25821
25855
|
/*yield*/
|
|
25822
25856
|
, this._ensureCredentials()];
|
|
25823
25857
|
|
|
25824
25858
|
case 1:
|
|
25825
|
-
credentialsOK =
|
|
25859
|
+
credentialsOK = _a.sent();
|
|
25826
25860
|
|
|
25827
25861
|
if (!credentialsOK) {
|
|
25828
25862
|
throw new Error('No credentials');
|
|
25829
25863
|
}
|
|
25830
25864
|
|
|
25831
|
-
this._verifySearchIndex(
|
|
25865
|
+
this._verifySearchIndex(options === null || options === void 0 ? void 0 : options.searchIndexName);
|
|
25832
25866
|
|
|
25833
25867
|
locationServiceInput = {
|
|
25834
25868
|
Text: text,
|
|
@@ -25859,23 +25893,23 @@ var AmazonLocationServiceProvider = function () {
|
|
|
25859
25893
|
customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])()
|
|
25860
25894
|
});
|
|
25861
25895
|
command = new _aws_sdk_client_location__WEBPACK_IMPORTED_MODULE_2__["SearchPlaceIndexForTextCommand"](locationServiceInput);
|
|
25862
|
-
|
|
25896
|
+
_a.label = 2;
|
|
25863
25897
|
|
|
25864
25898
|
case 2:
|
|
25865
|
-
|
|
25899
|
+
_a.trys.push([2, 4,, 5]);
|
|
25866
25900
|
|
|
25867
25901
|
return [4
|
|
25868
25902
|
/*yield*/
|
|
25869
25903
|
, client.send(command)];
|
|
25870
25904
|
|
|
25871
25905
|
case 3:
|
|
25872
|
-
response =
|
|
25906
|
+
response = _a.sent();
|
|
25873
25907
|
return [3
|
|
25874
25908
|
/*break*/
|
|
25875
25909
|
, 5];
|
|
25876
25910
|
|
|
25877
25911
|
case 4:
|
|
25878
|
-
error_1 =
|
|
25912
|
+
error_1 = _a.sent();
|
|
25879
25913
|
logger.debug(error_1);
|
|
25880
25914
|
throw error_1;
|
|
25881
25915
|
|
|
@@ -25902,25 +25936,23 @@ var AmazonLocationServiceProvider = function () {
|
|
|
25902
25936
|
|
|
25903
25937
|
|
|
25904
25938
|
AmazonLocationServiceProvider.prototype.searchByCoordinates = function (coordinates, options) {
|
|
25905
|
-
var _a;
|
|
25906
|
-
|
|
25907
25939
|
return __awaiter(this, void 0, void 0, function () {
|
|
25908
25940
|
var credentialsOK, locationServiceInput, client, command, response, error_2, PascalResults, results;
|
|
25909
|
-
return __generator(this, function (
|
|
25910
|
-
switch (
|
|
25941
|
+
return __generator(this, function (_a) {
|
|
25942
|
+
switch (_a.label) {
|
|
25911
25943
|
case 0:
|
|
25912
25944
|
return [4
|
|
25913
25945
|
/*yield*/
|
|
25914
25946
|
, this._ensureCredentials()];
|
|
25915
25947
|
|
|
25916
25948
|
case 1:
|
|
25917
|
-
credentialsOK =
|
|
25949
|
+
credentialsOK = _a.sent();
|
|
25918
25950
|
|
|
25919
25951
|
if (!credentialsOK) {
|
|
25920
25952
|
throw new Error('No credentials');
|
|
25921
25953
|
}
|
|
25922
25954
|
|
|
25923
|
-
this._verifySearchIndex(
|
|
25955
|
+
this._verifySearchIndex(options === null || options === void 0 ? void 0 : options.searchIndexName);
|
|
25924
25956
|
|
|
25925
25957
|
locationServiceInput = {
|
|
25926
25958
|
Position: coordinates,
|
|
@@ -25941,23 +25973,23 @@ var AmazonLocationServiceProvider = function () {
|
|
|
25941
25973
|
customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["getAmplifyUserAgent"])()
|
|
25942
25974
|
});
|
|
25943
25975
|
command = new _aws_sdk_client_location__WEBPACK_IMPORTED_MODULE_2__["SearchPlaceIndexForPositionCommand"](locationServiceInput);
|
|
25944
|
-
|
|
25976
|
+
_a.label = 2;
|
|
25945
25977
|
|
|
25946
25978
|
case 2:
|
|
25947
|
-
|
|
25979
|
+
_a.trys.push([2, 4,, 5]);
|
|
25948
25980
|
|
|
25949
25981
|
return [4
|
|
25950
25982
|
/*yield*/
|
|
25951
25983
|
, client.send(command)];
|
|
25952
25984
|
|
|
25953
25985
|
case 3:
|
|
25954
|
-
response =
|
|
25986
|
+
response = _a.sent();
|
|
25955
25987
|
return [3
|
|
25956
25988
|
/*break*/
|
|
25957
25989
|
, 5];
|
|
25958
25990
|
|
|
25959
25991
|
case 4:
|
|
25960
|
-
error_2 =
|
|
25992
|
+
error_2 = _a.sent();
|
|
25961
25993
|
logger.debug(error_2);
|
|
25962
25994
|
throw error_2;
|
|
25963
25995
|
|