@aws-sdk/client-location 3.42.0 → 3.47.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.
- package/CHANGELOG.md +47 -0
- package/dist-cjs/Location.js +15 -0
- package/dist-cjs/commands/SearchPlaceIndexForSuggestionsCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +44 -45
- package/dist-cjs/protocols/Aws_restJson1.js +227 -2
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +9 -3
- package/dist-es/Location.js +15 -0
- package/dist-es/commands/SearchPlaceIndexForSuggestionsCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +24 -32
- package/dist-es/protocols/Aws_restJson1.js +234 -2
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -6
- package/dist-types/Location.d.ts +33 -4
- package/dist-types/LocationClient.d.ts +8 -3
- package/dist-types/commands/BatchEvaluateGeofencesCommand.d.ts +4 -0
- package/dist-types/commands/BatchUpdateDevicePositionCommand.d.ts +11 -3
- package/dist-types/commands/CreatePlaceIndexCommand.d.ts +2 -1
- package/dist-types/commands/SearchPlaceIndexForSuggestionsCommand.d.ts +44 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +267 -54
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/Location.d.ts +5 -0
- package/dist-types/ts3.4/LocationClient.d.ts +6 -3
- package/dist-types/ts3.4/commands/SearchPlaceIndexForSuggestionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +98 -33
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +38 -45
|
@@ -13,13 +13,18 @@ const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
|
|
|
13
13
|
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
14
14
|
const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
|
|
15
15
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
16
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
17
|
+
const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
|
|
16
18
|
const getRuntimeConfig = (config) => {
|
|
17
19
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
20
|
+
const defaultsMode = util_defaults_mode_browser_1.resolveDefaultsModeConfig(config);
|
|
21
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
18
22
|
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
19
23
|
return {
|
|
20
24
|
...clientSharedValues,
|
|
21
25
|
...config,
|
|
22
26
|
runtime: "browser",
|
|
27
|
+
defaultsMode,
|
|
23
28
|
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
|
|
24
29
|
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
|
|
25
30
|
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
|
|
@@ -27,8 +32,8 @@ const getRuntimeConfig = (config) => {
|
|
|
27
32
|
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_browser_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
28
33
|
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
29
34
|
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalid_dependency_1.invalidProvider("Region is missing"),
|
|
30
|
-
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(),
|
|
31
|
-
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (() =>
|
|
35
|
+
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
|
|
36
|
+
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
|
|
32
37
|
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
|
|
33
38
|
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
|
|
34
39
|
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
@@ -16,14 +16,17 @@ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
|
16
16
|
const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
|
|
17
17
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
18
18
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
19
|
+
const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
|
|
19
20
|
const getRuntimeConfig = (config) => {
|
|
20
21
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
21
|
-
|
|
22
|
+
const defaultsMode = util_defaults_mode_node_1.resolveDefaultsModeConfig(config);
|
|
23
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
22
24
|
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
23
25
|
return {
|
|
24
26
|
...clientSharedValues,
|
|
25
27
|
...config,
|
|
26
28
|
runtime: "node",
|
|
29
|
+
defaultsMode,
|
|
27
30
|
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
|
|
28
31
|
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
|
|
29
32
|
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
|
|
@@ -31,8 +34,11 @@ const getRuntimeConfig = (config) => {
|
|
|
31
34
|
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
32
35
|
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
33
36
|
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
34
|
-
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
|
|
35
|
-
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(
|
|
37
|
+
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
|
|
38
|
+
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig({
|
|
39
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
40
|
+
default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
|
|
41
|
+
}),
|
|
36
42
|
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
|
|
37
43
|
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
|
|
38
44
|
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
package/dist-es/Location.js
CHANGED
|
@@ -41,6 +41,7 @@ import { ListTrackerConsumersCommand, } from "./commands/ListTrackerConsumersCom
|
|
|
41
41
|
import { ListTrackersCommand, } from "./commands/ListTrackersCommand";
|
|
42
42
|
import { PutGeofenceCommand } from "./commands/PutGeofenceCommand";
|
|
43
43
|
import { SearchPlaceIndexForPositionCommand, } from "./commands/SearchPlaceIndexForPositionCommand";
|
|
44
|
+
import { SearchPlaceIndexForSuggestionsCommand, } from "./commands/SearchPlaceIndexForSuggestionsCommand";
|
|
44
45
|
import { SearchPlaceIndexForTextCommand, } from "./commands/SearchPlaceIndexForTextCommand";
|
|
45
46
|
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
46
47
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
@@ -643,6 +644,20 @@ var Location = (function (_super) {
|
|
|
643
644
|
return this.send(command, optionsOrCb);
|
|
644
645
|
}
|
|
645
646
|
};
|
|
647
|
+
Location.prototype.searchPlaceIndexForSuggestions = function (args, optionsOrCb, cb) {
|
|
648
|
+
var command = new SearchPlaceIndexForSuggestionsCommand(args);
|
|
649
|
+
if (typeof optionsOrCb === "function") {
|
|
650
|
+
this.send(command, optionsOrCb);
|
|
651
|
+
}
|
|
652
|
+
else if (typeof cb === "function") {
|
|
653
|
+
if (typeof optionsOrCb !== "object")
|
|
654
|
+
throw new Error("Expect http options but get " + typeof optionsOrCb);
|
|
655
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
656
|
+
}
|
|
657
|
+
else {
|
|
658
|
+
return this.send(command, optionsOrCb);
|
|
659
|
+
}
|
|
660
|
+
};
|
|
646
661
|
Location.prototype.searchPlaceIndexForText = function (args, optionsOrCb, cb) {
|
|
647
662
|
var command = new SearchPlaceIndexForTextCommand(args);
|
|
648
663
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { SearchPlaceIndexForSuggestionsRequest, SearchPlaceIndexForSuggestionsResponse } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand, serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var SearchPlaceIndexForSuggestionsCommand = (function (_super) {
|
|
7
|
+
__extends(SearchPlaceIndexForSuggestionsCommand, _super);
|
|
8
|
+
function SearchPlaceIndexForSuggestionsCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
SearchPlaceIndexForSuggestionsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "LocationClient";
|
|
18
|
+
var commandName = "SearchPlaceIndexForSuggestionsCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: SearchPlaceIndexForSuggestionsRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: SearchPlaceIndexForSuggestionsResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
SearchPlaceIndexForSuggestionsCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
SearchPlaceIndexForSuggestionsCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return SearchPlaceIndexForSuggestionsCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { SearchPlaceIndexForSuggestionsCommand };
|
|
@@ -40,6 +40,7 @@ export * from "./ListTrackerConsumersCommand";
|
|
|
40
40
|
export * from "./ListTrackersCommand";
|
|
41
41
|
export * from "./PutGeofenceCommand";
|
|
42
42
|
export * from "./SearchPlaceIndexForPositionCommand";
|
|
43
|
+
export * from "./SearchPlaceIndexForSuggestionsCommand";
|
|
43
44
|
export * from "./SearchPlaceIndexForTextCommand";
|
|
44
45
|
export * from "./TagResourceCommand";
|
|
45
46
|
export * from "./UntagResourceCommand";
|
package/dist-es/endpoints.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
|
|
3
|
-
export var AccessDeniedException;
|
|
4
|
-
(function (AccessDeniedException) {
|
|
5
|
-
AccessDeniedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
6
|
-
})(AccessDeniedException || (AccessDeniedException = {}));
|
|
7
3
|
export var AssociateTrackerConsumerRequest;
|
|
8
4
|
(function (AssociateTrackerConsumerRequest) {
|
|
9
5
|
AssociateTrackerConsumerRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -12,34 +8,10 @@ export var AssociateTrackerConsumerResponse;
|
|
|
12
8
|
(function (AssociateTrackerConsumerResponse) {
|
|
13
9
|
AssociateTrackerConsumerResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
14
10
|
})(AssociateTrackerConsumerResponse || (AssociateTrackerConsumerResponse = {}));
|
|
15
|
-
export var ConflictException;
|
|
16
|
-
(function (ConflictException) {
|
|
17
|
-
ConflictException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
18
|
-
})(ConflictException || (ConflictException = {}));
|
|
19
|
-
export var InternalServerException;
|
|
20
|
-
(function (InternalServerException) {
|
|
21
|
-
InternalServerException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
22
|
-
})(InternalServerException || (InternalServerException = {}));
|
|
23
|
-
export var ResourceNotFoundException;
|
|
24
|
-
(function (ResourceNotFoundException) {
|
|
25
|
-
ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
26
|
-
})(ResourceNotFoundException || (ResourceNotFoundException = {}));
|
|
27
|
-
export var ServiceQuotaExceededException;
|
|
28
|
-
(function (ServiceQuotaExceededException) {
|
|
29
|
-
ServiceQuotaExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
30
|
-
})(ServiceQuotaExceededException || (ServiceQuotaExceededException = {}));
|
|
31
|
-
export var ThrottlingException;
|
|
32
|
-
(function (ThrottlingException) {
|
|
33
|
-
ThrottlingException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
34
|
-
})(ThrottlingException || (ThrottlingException = {}));
|
|
35
11
|
export var ValidationExceptionField;
|
|
36
12
|
(function (ValidationExceptionField) {
|
|
37
13
|
ValidationExceptionField.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
38
14
|
})(ValidationExceptionField || (ValidationExceptionField = {}));
|
|
39
|
-
export var ValidationException;
|
|
40
|
-
(function (ValidationException) {
|
|
41
|
-
ValidationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
42
|
-
})(ValidationException || (ValidationException = {}));
|
|
43
15
|
export var BatchDeleteDevicePositionHistoryRequest;
|
|
44
16
|
(function (BatchDeleteDevicePositionHistoryRequest) {
|
|
45
17
|
BatchDeleteDevicePositionHistoryRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -68,9 +40,13 @@ export var BatchDeleteGeofenceResponse;
|
|
|
68
40
|
(function (BatchDeleteGeofenceResponse) {
|
|
69
41
|
BatchDeleteGeofenceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
70
42
|
})(BatchDeleteGeofenceResponse || (BatchDeleteGeofenceResponse = {}));
|
|
43
|
+
export var PositionalAccuracy;
|
|
44
|
+
(function (PositionalAccuracy) {
|
|
45
|
+
PositionalAccuracy.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
46
|
+
})(PositionalAccuracy || (PositionalAccuracy = {}));
|
|
71
47
|
export var DevicePositionUpdate;
|
|
72
48
|
(function (DevicePositionUpdate) {
|
|
73
|
-
DevicePositionUpdate.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING }))); };
|
|
49
|
+
DevicePositionUpdate.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING })), (obj.PositionProperties && { PositionProperties: SENSITIVE_STRING }))); };
|
|
74
50
|
})(DevicePositionUpdate || (DevicePositionUpdate = {}));
|
|
75
51
|
export var BatchEvaluateGeofencesRequest;
|
|
76
52
|
(function (BatchEvaluateGeofencesRequest) {
|
|
@@ -92,7 +68,7 @@ export var BatchGetDevicePositionRequest;
|
|
|
92
68
|
})(BatchGetDevicePositionRequest || (BatchGetDevicePositionRequest = {}));
|
|
93
69
|
export var DevicePosition;
|
|
94
70
|
(function (DevicePosition) {
|
|
95
|
-
DevicePosition.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING }))); };
|
|
71
|
+
DevicePosition.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING })), (obj.PositionProperties && { PositionProperties: SENSITIVE_STRING }))); };
|
|
96
72
|
})(DevicePosition || (DevicePosition = {}));
|
|
97
73
|
export var BatchGetDevicePositionError;
|
|
98
74
|
(function (BatchGetDevicePositionError) {
|
|
@@ -394,7 +370,7 @@ export var GetDevicePositionRequest;
|
|
|
394
370
|
})(GetDevicePositionRequest || (GetDevicePositionRequest = {}));
|
|
395
371
|
export var GetDevicePositionResponse;
|
|
396
372
|
(function (GetDevicePositionResponse) {
|
|
397
|
-
GetDevicePositionResponse.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING }))); };
|
|
373
|
+
GetDevicePositionResponse.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING })), (obj.PositionProperties && { PositionProperties: SENSITIVE_STRING }))); };
|
|
398
374
|
})(GetDevicePositionResponse || (GetDevicePositionResponse = {}));
|
|
399
375
|
export var GetDevicePositionHistoryRequest;
|
|
400
376
|
(function (GetDevicePositionHistoryRequest) {
|
|
@@ -444,7 +420,7 @@ export var ListDevicePositionsRequest;
|
|
|
444
420
|
})(ListDevicePositionsRequest || (ListDevicePositionsRequest = {}));
|
|
445
421
|
export var ListDevicePositionsResponseEntry;
|
|
446
422
|
(function (ListDevicePositionsResponseEntry) {
|
|
447
|
-
ListDevicePositionsResponseEntry.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING }))); };
|
|
423
|
+
ListDevicePositionsResponseEntry.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING })), (obj.PositionProperties && { PositionProperties: SENSITIVE_STRING }))); };
|
|
448
424
|
})(ListDevicePositionsResponseEntry || (ListDevicePositionsResponseEntry = {}));
|
|
449
425
|
export var ListDevicePositionsResponse;
|
|
450
426
|
(function (ListDevicePositionsResponse) {
|
|
@@ -544,6 +520,22 @@ export var SearchPlaceIndexForPositionResponse;
|
|
|
544
520
|
(function (SearchPlaceIndexForPositionResponse) {
|
|
545
521
|
SearchPlaceIndexForPositionResponse.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Summary && { Summary: SearchPlaceIndexForPositionSummary.filterSensitiveLog(obj.Summary) })), (obj.Results && { Results: obj.Results.map(function (item) { return SearchForPositionResult.filterSensitiveLog(item); }) }))); };
|
|
546
522
|
})(SearchPlaceIndexForPositionResponse || (SearchPlaceIndexForPositionResponse = {}));
|
|
523
|
+
export var SearchPlaceIndexForSuggestionsRequest;
|
|
524
|
+
(function (SearchPlaceIndexForSuggestionsRequest) {
|
|
525
|
+
SearchPlaceIndexForSuggestionsRequest.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign(__assign({}, obj), (obj.Text && { Text: SENSITIVE_STRING })), (obj.BiasPosition && { BiasPosition: SENSITIVE_STRING })), (obj.FilterBBox && { FilterBBox: SENSITIVE_STRING }))); };
|
|
526
|
+
})(SearchPlaceIndexForSuggestionsRequest || (SearchPlaceIndexForSuggestionsRequest = {}));
|
|
527
|
+
export var SearchForSuggestionsResult;
|
|
528
|
+
(function (SearchForSuggestionsResult) {
|
|
529
|
+
SearchForSuggestionsResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
530
|
+
})(SearchForSuggestionsResult || (SearchForSuggestionsResult = {}));
|
|
531
|
+
export var SearchPlaceIndexForSuggestionsSummary;
|
|
532
|
+
(function (SearchPlaceIndexForSuggestionsSummary) {
|
|
533
|
+
SearchPlaceIndexForSuggestionsSummary.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign(__assign({}, obj), (obj.Text && { Text: SENSITIVE_STRING })), (obj.BiasPosition && { BiasPosition: SENSITIVE_STRING })), (obj.FilterBBox && { FilterBBox: SENSITIVE_STRING }))); };
|
|
534
|
+
})(SearchPlaceIndexForSuggestionsSummary || (SearchPlaceIndexForSuggestionsSummary = {}));
|
|
535
|
+
export var SearchPlaceIndexForSuggestionsResponse;
|
|
536
|
+
(function (SearchPlaceIndexForSuggestionsResponse) {
|
|
537
|
+
SearchPlaceIndexForSuggestionsResponse.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Summary && { Summary: SearchPlaceIndexForSuggestionsSummary.filterSensitiveLog(obj.Summary) }))); };
|
|
538
|
+
})(SearchPlaceIndexForSuggestionsResponse || (SearchPlaceIndexForSuggestionsResponse = {}));
|
|
547
539
|
export var SearchPlaceIndexForTextRequest;
|
|
548
540
|
(function (SearchPlaceIndexForTextRequest) {
|
|
549
541
|
SearchPlaceIndexForTextRequest.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign(__assign({}, obj), (obj.Text && { Text: SENSITIVE_STRING })), (obj.BiasPosition && { BiasPosition: SENSITIVE_STRING })), (obj.FilterBBox && { FilterBBox: SENSITIVE_STRING }))); };
|
|
@@ -1830,6 +1830,55 @@ export var serializeAws_restJson1SearchPlaceIndexForPositionCommand = function (
|
|
|
1830
1830
|
}
|
|
1831
1831
|
});
|
|
1832
1832
|
}); };
|
|
1833
|
+
export var serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1834
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body, resolvedHostname;
|
|
1835
|
+
return __generator(this, function (_c) {
|
|
1836
|
+
switch (_c.label) {
|
|
1837
|
+
case 0: return [4, context.endpoint()];
|
|
1838
|
+
case 1:
|
|
1839
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1840
|
+
headers = {
|
|
1841
|
+
"content-type": "application/json",
|
|
1842
|
+
};
|
|
1843
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
1844
|
+
"/places/v0/indexes/{IndexName}/search/suggestions";
|
|
1845
|
+
if (input.IndexName !== undefined) {
|
|
1846
|
+
labelValue = input.IndexName;
|
|
1847
|
+
if (labelValue.length <= 0) {
|
|
1848
|
+
throw new Error("Empty value provided for input HTTP label: IndexName.");
|
|
1849
|
+
}
|
|
1850
|
+
resolvedPath = resolvedPath.replace("{IndexName}", __extendedEncodeURIComponent(labelValue));
|
|
1851
|
+
}
|
|
1852
|
+
else {
|
|
1853
|
+
throw new Error("No value provided for input HTTP label: IndexName.");
|
|
1854
|
+
}
|
|
1855
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.BiasPosition !== undefined &&
|
|
1856
|
+
input.BiasPosition !== null && { BiasPosition: serializeAws_restJson1Position(input.BiasPosition, context) })), (input.FilterBBox !== undefined &&
|
|
1857
|
+
input.FilterBBox !== null && { FilterBBox: serializeAws_restJson1BoundingBox(input.FilterBBox, context) })), (input.FilterCountries !== undefined &&
|
|
1858
|
+
input.FilterCountries !== null && {
|
|
1859
|
+
FilterCountries: serializeAws_restJson1CountryCodeList(input.FilterCountries, context),
|
|
1860
|
+
})), (input.Language !== undefined && input.Language !== null && { Language: input.Language })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.Text !== undefined && input.Text !== null && { Text: input.Text })));
|
|
1861
|
+
return [4, context.endpoint()];
|
|
1862
|
+
case 2:
|
|
1863
|
+
resolvedHostname = (_c.sent()).hostname;
|
|
1864
|
+
if (context.disableHostPrefix !== true) {
|
|
1865
|
+
resolvedHostname = "places." + resolvedHostname;
|
|
1866
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
1867
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
return [2, new __HttpRequest({
|
|
1871
|
+
protocol: protocol,
|
|
1872
|
+
hostname: resolvedHostname,
|
|
1873
|
+
port: port,
|
|
1874
|
+
method: "POST",
|
|
1875
|
+
headers: headers,
|
|
1876
|
+
path: resolvedPath,
|
|
1877
|
+
body: body,
|
|
1878
|
+
})];
|
|
1879
|
+
}
|
|
1880
|
+
});
|
|
1881
|
+
}); };
|
|
1833
1882
|
export var serializeAws_restJson1SearchPlaceIndexForTextCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1834
1883
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body, resolvedHostname;
|
|
1835
1884
|
return __generator(this, function (_c) {
|
|
@@ -4638,8 +4687,10 @@ export var deserializeAws_restJson1GetDevicePositionCommand = function (output,
|
|
|
4638
4687
|
}
|
|
4639
4688
|
contents = {
|
|
4640
4689
|
$metadata: deserializeMetadata(output),
|
|
4690
|
+
Accuracy: undefined,
|
|
4641
4691
|
DeviceId: undefined,
|
|
4642
4692
|
Position: undefined,
|
|
4693
|
+
PositionProperties: undefined,
|
|
4643
4694
|
ReceivedTime: undefined,
|
|
4644
4695
|
SampleTime: undefined,
|
|
4645
4696
|
};
|
|
@@ -4648,12 +4699,18 @@ export var deserializeAws_restJson1GetDevicePositionCommand = function (output,
|
|
|
4648
4699
|
return [4, parseBody(output.body, context)];
|
|
4649
4700
|
case 1:
|
|
4650
4701
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
4702
|
+
if (data.Accuracy !== undefined && data.Accuracy !== null) {
|
|
4703
|
+
contents.Accuracy = deserializeAws_restJson1PositionalAccuracy(data.Accuracy, context);
|
|
4704
|
+
}
|
|
4651
4705
|
if (data.DeviceId !== undefined && data.DeviceId !== null) {
|
|
4652
4706
|
contents.DeviceId = __expectString(data.DeviceId);
|
|
4653
4707
|
}
|
|
4654
4708
|
if (data.Position !== undefined && data.Position !== null) {
|
|
4655
4709
|
contents.Position = deserializeAws_restJson1Position(data.Position, context);
|
|
4656
4710
|
}
|
|
4711
|
+
if (data.PositionProperties !== undefined && data.PositionProperties !== null) {
|
|
4712
|
+
contents.PositionProperties = deserializeAws_restJson1PropertyMap(data.PositionProperties, context);
|
|
4713
|
+
}
|
|
4657
4714
|
if (data.ReceivedTime !== undefined && data.ReceivedTime !== null) {
|
|
4658
4715
|
contents.ReceivedTime = __expectNonNull(__parseRfc3339DateTime(data.ReceivedTime));
|
|
4659
4716
|
}
|
|
@@ -6356,6 +6413,104 @@ var deserializeAws_restJson1SearchPlaceIndexForPositionCommandError = function (
|
|
|
6356
6413
|
}
|
|
6357
6414
|
});
|
|
6358
6415
|
}); };
|
|
6416
|
+
export var deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6417
|
+
var contents, data, _a, _b;
|
|
6418
|
+
return __generator(this, function (_c) {
|
|
6419
|
+
switch (_c.label) {
|
|
6420
|
+
case 0:
|
|
6421
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6422
|
+
return [2, deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommandError(output, context)];
|
|
6423
|
+
}
|
|
6424
|
+
contents = {
|
|
6425
|
+
$metadata: deserializeMetadata(output),
|
|
6426
|
+
Results: undefined,
|
|
6427
|
+
Summary: undefined,
|
|
6428
|
+
};
|
|
6429
|
+
_a = __expectNonNull;
|
|
6430
|
+
_b = __expectObject;
|
|
6431
|
+
return [4, parseBody(output.body, context)];
|
|
6432
|
+
case 1:
|
|
6433
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
6434
|
+
if (data.Results !== undefined && data.Results !== null) {
|
|
6435
|
+
contents.Results = deserializeAws_restJson1SearchForSuggestionsResultList(data.Results, context);
|
|
6436
|
+
}
|
|
6437
|
+
if (data.Summary !== undefined && data.Summary !== null) {
|
|
6438
|
+
contents.Summary = deserializeAws_restJson1SearchPlaceIndexForSuggestionsSummary(data.Summary, context);
|
|
6439
|
+
}
|
|
6440
|
+
return [2, Promise.resolve(contents)];
|
|
6441
|
+
}
|
|
6442
|
+
});
|
|
6443
|
+
}); };
|
|
6444
|
+
var deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6445
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
6446
|
+
var _h;
|
|
6447
|
+
return __generator(this, function (_j) {
|
|
6448
|
+
switch (_j.label) {
|
|
6449
|
+
case 0:
|
|
6450
|
+
_a = [__assign({}, output)];
|
|
6451
|
+
_h = {};
|
|
6452
|
+
return [4, parseBody(output.body, context)];
|
|
6453
|
+
case 1:
|
|
6454
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
6455
|
+
errorCode = "UnknownError";
|
|
6456
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6457
|
+
_b = errorCode;
|
|
6458
|
+
switch (_b) {
|
|
6459
|
+
case "AccessDeniedException": return [3, 2];
|
|
6460
|
+
case "com.amazonaws.location#AccessDeniedException": return [3, 2];
|
|
6461
|
+
case "InternalServerException": return [3, 4];
|
|
6462
|
+
case "com.amazonaws.location#InternalServerException": return [3, 4];
|
|
6463
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
6464
|
+
case "com.amazonaws.location#ResourceNotFoundException": return [3, 6];
|
|
6465
|
+
case "ThrottlingException": return [3, 8];
|
|
6466
|
+
case "com.amazonaws.location#ThrottlingException": return [3, 8];
|
|
6467
|
+
case "ValidationException": return [3, 10];
|
|
6468
|
+
case "com.amazonaws.location#ValidationException": return [3, 10];
|
|
6469
|
+
}
|
|
6470
|
+
return [3, 12];
|
|
6471
|
+
case 2:
|
|
6472
|
+
_c = [{}];
|
|
6473
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
6474
|
+
case 3:
|
|
6475
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6476
|
+
return [3, 13];
|
|
6477
|
+
case 4:
|
|
6478
|
+
_d = [{}];
|
|
6479
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
6480
|
+
case 5:
|
|
6481
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6482
|
+
return [3, 13];
|
|
6483
|
+
case 6:
|
|
6484
|
+
_e = [{}];
|
|
6485
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
6486
|
+
case 7:
|
|
6487
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6488
|
+
return [3, 13];
|
|
6489
|
+
case 8:
|
|
6490
|
+
_f = [{}];
|
|
6491
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
6492
|
+
case 9:
|
|
6493
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6494
|
+
return [3, 13];
|
|
6495
|
+
case 10:
|
|
6496
|
+
_g = [{}];
|
|
6497
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
6498
|
+
case 11:
|
|
6499
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6500
|
+
return [3, 13];
|
|
6501
|
+
case 12:
|
|
6502
|
+
parsedBody = parsedOutput.body;
|
|
6503
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
6504
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
6505
|
+
_j.label = 13;
|
|
6506
|
+
case 13:
|
|
6507
|
+
message = response.message || response.Message || errorCode;
|
|
6508
|
+
response.message = message;
|
|
6509
|
+
delete response.Message;
|
|
6510
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
6511
|
+
}
|
|
6512
|
+
});
|
|
6513
|
+
}); };
|
|
6359
6514
|
export var deserializeAws_restJson1SearchPlaceIndexForTextCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6360
6515
|
var contents, data, _a, _b;
|
|
6361
6516
|
return __generator(this, function (_c) {
|
|
@@ -7318,8 +7473,12 @@ var serializeAws_restJson1DeviceIdsList = function (input, context) {
|
|
|
7318
7473
|
});
|
|
7319
7474
|
};
|
|
7320
7475
|
var serializeAws_restJson1DevicePositionUpdate = function (input, context) {
|
|
7321
|
-
return __assign(__assign(__assign(
|
|
7322
|
-
input.
|
|
7476
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.Accuracy !== undefined &&
|
|
7477
|
+
input.Accuracy !== null && { Accuracy: serializeAws_restJson1PositionalAccuracy(input.Accuracy, context) })), (input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId })), (input.Position !== undefined &&
|
|
7478
|
+
input.Position !== null && { Position: serializeAws_restJson1Position(input.Position, context) })), (input.PositionProperties !== undefined &&
|
|
7479
|
+
input.PositionProperties !== null && {
|
|
7480
|
+
PositionProperties: serializeAws_restJson1PropertyMap(input.PositionProperties, context),
|
|
7481
|
+
})), (input.SampleTime !== undefined &&
|
|
7323
7482
|
input.SampleTime !== null && { SampleTime: input.SampleTime.toISOString().split(".")[0] + "Z" }));
|
|
7324
7483
|
};
|
|
7325
7484
|
var serializeAws_restJson1DevicePositionUpdateList = function (input, context) {
|
|
@@ -7379,6 +7538,20 @@ var serializeAws_restJson1Position = function (input, context) {
|
|
|
7379
7538
|
return __serializeFloat(entry);
|
|
7380
7539
|
});
|
|
7381
7540
|
};
|
|
7541
|
+
var serializeAws_restJson1PositionalAccuracy = function (input, context) {
|
|
7542
|
+
return __assign({}, (input.Horizontal !== undefined &&
|
|
7543
|
+
input.Horizontal !== null && { Horizontal: __serializeFloat(input.Horizontal) }));
|
|
7544
|
+
};
|
|
7545
|
+
var serializeAws_restJson1PropertyMap = function (input, context) {
|
|
7546
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
7547
|
+
var _b;
|
|
7548
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
7549
|
+
if (value === null) {
|
|
7550
|
+
return acc;
|
|
7551
|
+
}
|
|
7552
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
7553
|
+
}, {});
|
|
7554
|
+
};
|
|
7382
7555
|
var serializeAws_restJson1TagMap = function (input, context) {
|
|
7383
7556
|
return Object.entries(input).reduce(function (acc, _a) {
|
|
7384
7557
|
var _b;
|
|
@@ -7594,10 +7767,16 @@ var deserializeAws_restJson1DataSourceConfiguration = function (output, context)
|
|
|
7594
7767
|
};
|
|
7595
7768
|
var deserializeAws_restJson1DevicePosition = function (output, context) {
|
|
7596
7769
|
return {
|
|
7770
|
+
Accuracy: output.Accuracy !== undefined && output.Accuracy !== null
|
|
7771
|
+
? deserializeAws_restJson1PositionalAccuracy(output.Accuracy, context)
|
|
7772
|
+
: undefined,
|
|
7597
7773
|
DeviceId: __expectString(output.DeviceId),
|
|
7598
7774
|
Position: output.Position !== undefined && output.Position !== null
|
|
7599
7775
|
? deserializeAws_restJson1Position(output.Position, context)
|
|
7600
7776
|
: undefined,
|
|
7777
|
+
PositionProperties: output.PositionProperties !== undefined && output.PositionProperties !== null
|
|
7778
|
+
? deserializeAws_restJson1PropertyMap(output.PositionProperties, context)
|
|
7779
|
+
: undefined,
|
|
7601
7780
|
ReceivedTime: output.ReceivedTime !== undefined && output.ReceivedTime !== null
|
|
7602
7781
|
? __expectNonNull(__parseRfc3339DateTime(output.ReceivedTime))
|
|
7603
7782
|
: undefined,
|
|
@@ -7690,10 +7869,16 @@ var deserializeAws_restJson1LineString = function (output, context) {
|
|
|
7690
7869
|
};
|
|
7691
7870
|
var deserializeAws_restJson1ListDevicePositionsResponseEntry = function (output, context) {
|
|
7692
7871
|
return {
|
|
7872
|
+
Accuracy: output.Accuracy !== undefined && output.Accuracy !== null
|
|
7873
|
+
? deserializeAws_restJson1PositionalAccuracy(output.Accuracy, context)
|
|
7874
|
+
: undefined,
|
|
7693
7875
|
DeviceId: __expectString(output.DeviceId),
|
|
7694
7876
|
Position: output.Position !== undefined && output.Position !== null
|
|
7695
7877
|
? deserializeAws_restJson1Position(output.Position, context)
|
|
7696
7878
|
: undefined,
|
|
7879
|
+
PositionProperties: output.PositionProperties !== undefined && output.PositionProperties !== null
|
|
7880
|
+
? deserializeAws_restJson1PropertyMap(output.PositionProperties, context)
|
|
7881
|
+
: undefined,
|
|
7697
7882
|
SampleTime: output.SampleTime !== undefined && output.SampleTime !== null
|
|
7698
7883
|
? __expectNonNull(__parseRfc3339DateTime(output.SampleTime))
|
|
7699
7884
|
: undefined,
|
|
@@ -7896,6 +8081,21 @@ var deserializeAws_restJson1Position = function (output, context) {
|
|
|
7896
8081
|
return __limitedParseDouble(entry);
|
|
7897
8082
|
});
|
|
7898
8083
|
};
|
|
8084
|
+
var deserializeAws_restJson1PositionalAccuracy = function (output, context) {
|
|
8085
|
+
return {
|
|
8086
|
+
Horizontal: __limitedParseDouble(output.Horizontal),
|
|
8087
|
+
};
|
|
8088
|
+
};
|
|
8089
|
+
var deserializeAws_restJson1PropertyMap = function (output, context) {
|
|
8090
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
8091
|
+
var _b;
|
|
8092
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
8093
|
+
if (value === null) {
|
|
8094
|
+
return acc;
|
|
8095
|
+
}
|
|
8096
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
8097
|
+
}, {});
|
|
8098
|
+
};
|
|
7899
8099
|
var deserializeAws_restJson1SearchForPositionResult = function (output, context) {
|
|
7900
8100
|
return {
|
|
7901
8101
|
Distance: __limitedParseDouble(output.Distance),
|
|
@@ -7914,6 +8114,21 @@ var deserializeAws_restJson1SearchForPositionResultList = function (output, cont
|
|
|
7914
8114
|
return deserializeAws_restJson1SearchForPositionResult(entry, context);
|
|
7915
8115
|
});
|
|
7916
8116
|
};
|
|
8117
|
+
var deserializeAws_restJson1SearchForSuggestionsResult = function (output, context) {
|
|
8118
|
+
return {
|
|
8119
|
+
Text: __expectString(output.Text),
|
|
8120
|
+
};
|
|
8121
|
+
};
|
|
8122
|
+
var deserializeAws_restJson1SearchForSuggestionsResultList = function (output, context) {
|
|
8123
|
+
return (output || [])
|
|
8124
|
+
.filter(function (e) { return e != null; })
|
|
8125
|
+
.map(function (entry) {
|
|
8126
|
+
if (entry === null) {
|
|
8127
|
+
return null;
|
|
8128
|
+
}
|
|
8129
|
+
return deserializeAws_restJson1SearchForSuggestionsResult(entry, context);
|
|
8130
|
+
});
|
|
8131
|
+
};
|
|
7917
8132
|
var deserializeAws_restJson1SearchForTextResult = function (output, context) {
|
|
7918
8133
|
return {
|
|
7919
8134
|
Distance: __limitedParseDouble(output.Distance),
|
|
@@ -7943,6 +8158,23 @@ var deserializeAws_restJson1SearchPlaceIndexForPositionSummary = function (outpu
|
|
|
7943
8158
|
: undefined,
|
|
7944
8159
|
};
|
|
7945
8160
|
};
|
|
8161
|
+
var deserializeAws_restJson1SearchPlaceIndexForSuggestionsSummary = function (output, context) {
|
|
8162
|
+
return {
|
|
8163
|
+
BiasPosition: output.BiasPosition !== undefined && output.BiasPosition !== null
|
|
8164
|
+
? deserializeAws_restJson1Position(output.BiasPosition, context)
|
|
8165
|
+
: undefined,
|
|
8166
|
+
DataSource: __expectString(output.DataSource),
|
|
8167
|
+
FilterBBox: output.FilterBBox !== undefined && output.FilterBBox !== null
|
|
8168
|
+
? deserializeAws_restJson1BoundingBox(output.FilterBBox, context)
|
|
8169
|
+
: undefined,
|
|
8170
|
+
FilterCountries: output.FilterCountries !== undefined && output.FilterCountries !== null
|
|
8171
|
+
? deserializeAws_restJson1CountryCodeList(output.FilterCountries, context)
|
|
8172
|
+
: undefined,
|
|
8173
|
+
Language: __expectString(output.Language),
|
|
8174
|
+
MaxResults: __expectInt32(output.MaxResults),
|
|
8175
|
+
Text: __expectString(output.Text),
|
|
8176
|
+
};
|
|
8177
|
+
};
|
|
7946
8178
|
var deserializeAws_restJson1SearchPlaceIndexForTextSummary = function (output, context) {
|
|
7947
8179
|
return {
|
|
7948
8180
|
BiasPosition: output.BiasPosition !== undefined && output.BiasPosition !== null
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
4
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
5
|
-
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
6
6
|
import { invalidProvider } from "@aws-sdk/invalid-dependency";
|
|
7
7
|
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
|
|
8
8
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
|
|
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
|
|
|
10
10
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
11
11
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
12
12
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
13
15
|
export var getRuntimeConfig = function (config) {
|
|
14
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
18
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
15
19
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new
|
|
20
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
21
|
+
switch (_a.label) {
|
|
22
|
+
case 0: return [4, defaultConfigProvider()];
|
|
23
|
+
case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
|
|
24
|
+
}
|
|
25
|
+
}); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
17
26
|
};
|