@aws-sdk/client-location 3.43.0 → 3.45.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 +11 -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 -3
- package/dist-cjs/protocols/Aws_restJson1.js +227 -2
- 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 -4
- package/dist-es/protocols/Aws_restJson1.js +234 -2
- package/dist-types/Location.d.ts +33 -4
- package/dist-types/LocationClient.d.ts +3 -2
- 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 -12
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/Location.d.ts +5 -0
- package/dist-types/ts3.4/LocationClient.d.ts +3 -2
- 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 -5
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
# [3.45.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.44.0...v3.45.0) (2021-12-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** update clients as of 2021/12/23 ([#3110](https://github.com/aws/aws-sdk-js-v3/issues/3110)) ([5d638e1](https://github.com/aws/aws-sdk-js-v3/commit/5d638e188ce64fa80fe36b8cba79ba63b80b50b7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.43.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.42.0...v3.43.0) (2021-11-29)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/client-location
|
package/dist-cjs/Location.js
CHANGED
|
@@ -43,6 +43,7 @@ const ListTrackerConsumersCommand_1 = require("./commands/ListTrackerConsumersCo
|
|
|
43
43
|
const ListTrackersCommand_1 = require("./commands/ListTrackersCommand");
|
|
44
44
|
const PutGeofenceCommand_1 = require("./commands/PutGeofenceCommand");
|
|
45
45
|
const SearchPlaceIndexForPositionCommand_1 = require("./commands/SearchPlaceIndexForPositionCommand");
|
|
46
|
+
const SearchPlaceIndexForSuggestionsCommand_1 = require("./commands/SearchPlaceIndexForSuggestionsCommand");
|
|
46
47
|
const SearchPlaceIndexForTextCommand_1 = require("./commands/SearchPlaceIndexForTextCommand");
|
|
47
48
|
const TagResourceCommand_1 = require("./commands/TagResourceCommand");
|
|
48
49
|
const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
|
|
@@ -641,6 +642,20 @@ class Location extends LocationClient_1.LocationClient {
|
|
|
641
642
|
return this.send(command, optionsOrCb);
|
|
642
643
|
}
|
|
643
644
|
}
|
|
645
|
+
searchPlaceIndexForSuggestions(args, optionsOrCb, cb) {
|
|
646
|
+
const command = new SearchPlaceIndexForSuggestionsCommand_1.SearchPlaceIndexForSuggestionsCommand(args);
|
|
647
|
+
if (typeof optionsOrCb === "function") {
|
|
648
|
+
this.send(command, optionsOrCb);
|
|
649
|
+
}
|
|
650
|
+
else if (typeof cb === "function") {
|
|
651
|
+
if (typeof optionsOrCb !== "object")
|
|
652
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
653
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
654
|
+
}
|
|
655
|
+
else {
|
|
656
|
+
return this.send(command, optionsOrCb);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
644
659
|
searchPlaceIndexForText(args, optionsOrCb, cb) {
|
|
645
660
|
const command = new SearchPlaceIndexForTextCommand_1.SearchPlaceIndexForTextCommand(args);
|
|
646
661
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchPlaceIndexForSuggestionsCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
8
|
+
class SearchPlaceIndexForSuggestionsCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "LocationClient";
|
|
18
|
+
const commandName = "SearchPlaceIndexForSuggestionsCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.SearchPlaceIndexForSuggestionsRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.SearchPlaceIndexForSuggestionsResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return Aws_restJson1_1.serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return Aws_restJson1_1.deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.SearchPlaceIndexForSuggestionsCommand = SearchPlaceIndexForSuggestionsCommand;
|
|
@@ -43,6 +43,7 @@ tslib_1.__exportStar(require("./ListTrackerConsumersCommand"), exports);
|
|
|
43
43
|
tslib_1.__exportStar(require("./ListTrackersCommand"), exports);
|
|
44
44
|
tslib_1.__exportStar(require("./PutGeofenceCommand"), exports);
|
|
45
45
|
tslib_1.__exportStar(require("./SearchPlaceIndexForPositionCommand"), exports);
|
|
46
|
+
tslib_1.__exportStar(require("./SearchPlaceIndexForSuggestionsCommand"), exports);
|
|
46
47
|
tslib_1.__exportStar(require("./SearchPlaceIndexForTextCommand"), exports);
|
|
47
48
|
tslib_1.__exportStar(require("./TagResourceCommand"), exports);
|
|
48
49
|
tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
|
package/dist-cjs/endpoints.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.UpdateTrackerResponse = exports.UpdateTrackerRequest = exports.UpdateRouteCalculatorResponse = exports.UpdateRouteCalculatorRequest = exports.UpdatePlaceIndexResponse = exports.UpdatePlaceIndexRequest = exports.SearchPlaceIndexForTextResponse = exports.SearchPlaceIndexForTextSummary = exports.SearchForTextResult = exports.SearchPlaceIndexForTextRequest = exports.SearchPlaceIndexForPositionResponse = exports.SearchPlaceIndexForPositionSummary = exports.SearchForPositionResult = exports.Place = exports.TimeZone = exports.PlaceGeometry = exports.SearchPlaceIndexForPositionRequest = exports.UpdateMapResponse = exports.UpdateMapRequest = exports.ListTrackersResponse = exports.ListTrackersResponseEntry = exports.ListTrackersRequest = exports.ListTrackerConsumersResponse = exports.ListTrackerConsumersRequest = exports.ListRouteCalculatorsResponse = exports.ListRouteCalculatorsResponseEntry = exports.ListRouteCalculatorsRequest = exports.ListPlaceIndexesResponse = exports.ListPlaceIndexesResponseEntry = exports.ListPlaceIndexesRequest = exports.ListMapsResponse = exports.ListMapsResponseEntry = exports.ListMapsRequest = exports.ListDevicePositionsResponse = exports.ListDevicePositionsResponseEntry = exports.ListDevicePositionsRequest = exports.GetMapTileResponse = exports.GetMapTileRequest = exports.GetMapStyleDescriptorResponse = exports.GetMapStyleDescriptorRequest = exports.GetMapSpritesResponse = exports.GetMapSpritesRequest = exports.GetMapGlyphsResponse = exports.GetMapGlyphsRequest = void 0;
|
|
3
|
+
exports.CreateMapResponse = exports.CreateMapRequest = exports.MapConfiguration = exports.CreateGeofenceCollectionResponse = exports.CreateGeofenceCollectionRequest = exports.CalculateRouteResponse = exports.CalculateRouteSummary = exports.Leg = exports.Step = exports.LegGeometry = exports.CalculateRouteRequest = exports.CalculateRouteTruckModeOptions = exports.TruckWeight = exports.TruckDimensions = exports.CalculateRouteCarModeOptions = exports.BatchUpdateDevicePositionResponse = exports.BatchUpdateDevicePositionError = exports.BatchUpdateDevicePositionRequest = exports.BatchPutGeofenceResponse = exports.BatchPutGeofenceSuccess = exports.BatchPutGeofenceError = exports.BatchPutGeofenceRequest = exports.BatchPutGeofenceRequestEntry = exports.GeofenceGeometry = exports.BatchGetDevicePositionResponse = exports.BatchGetDevicePositionError = exports.DevicePosition = exports.BatchGetDevicePositionRequest = exports.BatchEvaluateGeofencesResponse = exports.BatchEvaluateGeofencesError = exports.BatchEvaluateGeofencesRequest = exports.DevicePositionUpdate = exports.PositionalAccuracy = exports.BatchDeleteGeofenceResponse = exports.BatchDeleteGeofenceError = exports.BatchDeleteGeofenceRequest = exports.BatchDeleteDevicePositionHistoryResponse = exports.BatchDeleteDevicePositionHistoryError = exports.BatchItemError = exports.BatchDeleteDevicePositionHistoryRequest = exports.ValidationException = exports.ValidationExceptionField = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.AssociateTrackerConsumerResponse = exports.AssociateTrackerConsumerRequest = exports.AccessDeniedException = void 0;
|
|
4
|
+
exports.GetDevicePositionHistoryRequest = exports.GetDevicePositionResponse = exports.GetDevicePositionRequest = exports.UpdateGeofenceCollectionResponse = exports.UpdateGeofenceCollectionRequest = exports.PutGeofenceResponse = exports.PutGeofenceRequest = exports.ListGeofencesResponse = exports.ListGeofenceResponseEntry = exports.ListGeofencesRequest = exports.ListGeofenceCollectionsResponse = exports.ListGeofenceCollectionsResponseEntry = exports.ListGeofenceCollectionsRequest = exports.GetGeofenceResponse = exports.GetGeofenceRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.DisassociateTrackerConsumerResponse = exports.DisassociateTrackerConsumerRequest = exports.DescribeTrackerResponse = exports.DescribeTrackerRequest = exports.DescribeRouteCalculatorResponse = exports.DescribeRouteCalculatorRequest = exports.DescribePlaceIndexResponse = exports.DescribePlaceIndexRequest = exports.DescribeMapResponse = exports.DescribeMapRequest = exports.DescribeGeofenceCollectionResponse = exports.DescribeGeofenceCollectionRequest = exports.DeleteTrackerResponse = exports.DeleteTrackerRequest = exports.DeleteRouteCalculatorResponse = exports.DeleteRouteCalculatorRequest = exports.DeletePlaceIndexResponse = exports.DeletePlaceIndexRequest = exports.DeleteMapResponse = exports.DeleteMapRequest = exports.DeleteGeofenceCollectionResponse = exports.DeleteGeofenceCollectionRequest = exports.CreateTrackerResponse = exports.CreateTrackerRequest = exports.CreateRouteCalculatorResponse = exports.CreateRouteCalculatorRequest = exports.CreatePlaceIndexResponse = exports.CreatePlaceIndexRequest = exports.DataSourceConfiguration = void 0;
|
|
5
|
+
exports.UpdateTrackerResponse = exports.UpdateTrackerRequest = exports.UpdateRouteCalculatorResponse = exports.UpdateRouteCalculatorRequest = exports.UpdatePlaceIndexResponse = exports.UpdatePlaceIndexRequest = exports.SearchPlaceIndexForTextResponse = exports.SearchPlaceIndexForTextSummary = exports.SearchForTextResult = exports.SearchPlaceIndexForTextRequest = exports.SearchPlaceIndexForSuggestionsResponse = exports.SearchPlaceIndexForSuggestionsSummary = exports.SearchForSuggestionsResult = exports.SearchPlaceIndexForSuggestionsRequest = exports.SearchPlaceIndexForPositionResponse = exports.SearchPlaceIndexForPositionSummary = exports.SearchForPositionResult = exports.Place = exports.TimeZone = exports.PlaceGeometry = exports.SearchPlaceIndexForPositionRequest = exports.UpdateMapResponse = exports.UpdateMapRequest = exports.ListTrackersResponse = exports.ListTrackersResponseEntry = exports.ListTrackersRequest = exports.ListTrackerConsumersResponse = exports.ListTrackerConsumersRequest = exports.ListRouteCalculatorsResponse = exports.ListRouteCalculatorsResponseEntry = exports.ListRouteCalculatorsRequest = exports.ListPlaceIndexesResponse = exports.ListPlaceIndexesResponseEntry = exports.ListPlaceIndexesRequest = exports.ListMapsResponse = exports.ListMapsResponseEntry = exports.ListMapsRequest = exports.ListDevicePositionsResponse = exports.ListDevicePositionsResponseEntry = exports.ListDevicePositionsRequest = exports.GetMapTileResponse = exports.GetMapTileRequest = exports.GetMapStyleDescriptorResponse = exports.GetMapStyleDescriptorRequest = exports.GetMapSpritesResponse = exports.GetMapSpritesRequest = exports.GetMapGlyphsResponse = exports.GetMapGlyphsRequest = exports.GetDevicePositionHistoryResponse = void 0;
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
var AccessDeniedException;
|
|
8
8
|
(function (AccessDeniedException) {
|
|
@@ -106,11 +106,18 @@ var BatchDeleteGeofenceResponse;
|
|
|
106
106
|
...obj,
|
|
107
107
|
});
|
|
108
108
|
})(BatchDeleteGeofenceResponse = exports.BatchDeleteGeofenceResponse || (exports.BatchDeleteGeofenceResponse = {}));
|
|
109
|
+
var PositionalAccuracy;
|
|
110
|
+
(function (PositionalAccuracy) {
|
|
111
|
+
PositionalAccuracy.filterSensitiveLog = (obj) => ({
|
|
112
|
+
...obj,
|
|
113
|
+
});
|
|
114
|
+
})(PositionalAccuracy = exports.PositionalAccuracy || (exports.PositionalAccuracy = {}));
|
|
109
115
|
var DevicePositionUpdate;
|
|
110
116
|
(function (DevicePositionUpdate) {
|
|
111
117
|
DevicePositionUpdate.filterSensitiveLog = (obj) => ({
|
|
112
118
|
...obj,
|
|
113
119
|
...(obj.Position && { Position: smithy_client_1.SENSITIVE_STRING }),
|
|
120
|
+
...(obj.PositionProperties && { PositionProperties: smithy_client_1.SENSITIVE_STRING }),
|
|
114
121
|
});
|
|
115
122
|
})(DevicePositionUpdate = exports.DevicePositionUpdate || (exports.DevicePositionUpdate = {}));
|
|
116
123
|
var BatchEvaluateGeofencesRequest;
|
|
@@ -145,6 +152,7 @@ var DevicePosition;
|
|
|
145
152
|
DevicePosition.filterSensitiveLog = (obj) => ({
|
|
146
153
|
...obj,
|
|
147
154
|
...(obj.Position && { Position: smithy_client_1.SENSITIVE_STRING }),
|
|
155
|
+
...(obj.PositionProperties && { PositionProperties: smithy_client_1.SENSITIVE_STRING }),
|
|
148
156
|
});
|
|
149
157
|
})(DevicePosition = exports.DevicePosition || (exports.DevicePosition = {}));
|
|
150
158
|
var BatchGetDevicePositionError;
|
|
@@ -620,6 +628,7 @@ var GetDevicePositionResponse;
|
|
|
620
628
|
GetDevicePositionResponse.filterSensitiveLog = (obj) => ({
|
|
621
629
|
...obj,
|
|
622
630
|
...(obj.Position && { Position: smithy_client_1.SENSITIVE_STRING }),
|
|
631
|
+
...(obj.PositionProperties && { PositionProperties: smithy_client_1.SENSITIVE_STRING }),
|
|
623
632
|
});
|
|
624
633
|
})(GetDevicePositionResponse = exports.GetDevicePositionResponse || (exports.GetDevicePositionResponse = {}));
|
|
625
634
|
var GetDevicePositionHistoryRequest;
|
|
@@ -696,6 +705,7 @@ var ListDevicePositionsResponseEntry;
|
|
|
696
705
|
ListDevicePositionsResponseEntry.filterSensitiveLog = (obj) => ({
|
|
697
706
|
...obj,
|
|
698
707
|
...(obj.Position && { Position: smithy_client_1.SENSITIVE_STRING }),
|
|
708
|
+
...(obj.PositionProperties && { PositionProperties: smithy_client_1.SENSITIVE_STRING }),
|
|
699
709
|
});
|
|
700
710
|
})(ListDevicePositionsResponseEntry = exports.ListDevicePositionsResponseEntry || (exports.ListDevicePositionsResponseEntry = {}));
|
|
701
711
|
var ListDevicePositionsResponse;
|
|
@@ -852,6 +862,37 @@ var SearchPlaceIndexForPositionResponse;
|
|
|
852
862
|
...(obj.Results && { Results: obj.Results.map((item) => SearchForPositionResult.filterSensitiveLog(item)) }),
|
|
853
863
|
});
|
|
854
864
|
})(SearchPlaceIndexForPositionResponse = exports.SearchPlaceIndexForPositionResponse || (exports.SearchPlaceIndexForPositionResponse = {}));
|
|
865
|
+
var SearchPlaceIndexForSuggestionsRequest;
|
|
866
|
+
(function (SearchPlaceIndexForSuggestionsRequest) {
|
|
867
|
+
SearchPlaceIndexForSuggestionsRequest.filterSensitiveLog = (obj) => ({
|
|
868
|
+
...obj,
|
|
869
|
+
...(obj.Text && { Text: smithy_client_1.SENSITIVE_STRING }),
|
|
870
|
+
...(obj.BiasPosition && { BiasPosition: smithy_client_1.SENSITIVE_STRING }),
|
|
871
|
+
...(obj.FilterBBox && { FilterBBox: smithy_client_1.SENSITIVE_STRING }),
|
|
872
|
+
});
|
|
873
|
+
})(SearchPlaceIndexForSuggestionsRequest = exports.SearchPlaceIndexForSuggestionsRequest || (exports.SearchPlaceIndexForSuggestionsRequest = {}));
|
|
874
|
+
var SearchForSuggestionsResult;
|
|
875
|
+
(function (SearchForSuggestionsResult) {
|
|
876
|
+
SearchForSuggestionsResult.filterSensitiveLog = (obj) => ({
|
|
877
|
+
...obj,
|
|
878
|
+
});
|
|
879
|
+
})(SearchForSuggestionsResult = exports.SearchForSuggestionsResult || (exports.SearchForSuggestionsResult = {}));
|
|
880
|
+
var SearchPlaceIndexForSuggestionsSummary;
|
|
881
|
+
(function (SearchPlaceIndexForSuggestionsSummary) {
|
|
882
|
+
SearchPlaceIndexForSuggestionsSummary.filterSensitiveLog = (obj) => ({
|
|
883
|
+
...obj,
|
|
884
|
+
...(obj.Text && { Text: smithy_client_1.SENSITIVE_STRING }),
|
|
885
|
+
...(obj.BiasPosition && { BiasPosition: smithy_client_1.SENSITIVE_STRING }),
|
|
886
|
+
...(obj.FilterBBox && { FilterBBox: smithy_client_1.SENSITIVE_STRING }),
|
|
887
|
+
});
|
|
888
|
+
})(SearchPlaceIndexForSuggestionsSummary = exports.SearchPlaceIndexForSuggestionsSummary || (exports.SearchPlaceIndexForSuggestionsSummary = {}));
|
|
889
|
+
var SearchPlaceIndexForSuggestionsResponse;
|
|
890
|
+
(function (SearchPlaceIndexForSuggestionsResponse) {
|
|
891
|
+
SearchPlaceIndexForSuggestionsResponse.filterSensitiveLog = (obj) => ({
|
|
892
|
+
...obj,
|
|
893
|
+
...(obj.Summary && { Summary: SearchPlaceIndexForSuggestionsSummary.filterSensitiveLog(obj.Summary) }),
|
|
894
|
+
});
|
|
895
|
+
})(SearchPlaceIndexForSuggestionsResponse = exports.SearchPlaceIndexForSuggestionsResponse || (exports.SearchPlaceIndexForSuggestionsResponse = {}));
|
|
855
896
|
var SearchPlaceIndexForTextRequest;
|
|
856
897
|
(function (SearchPlaceIndexForTextRequest) {
|
|
857
898
|
SearchPlaceIndexForTextRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.serializeAws_restJson1UpdateRouteCalculatorCommand = exports.serializeAws_restJson1UpdatePlaceIndexCommand = exports.serializeAws_restJson1UpdateMapCommand = exports.serializeAws_restJson1UpdateGeofenceCollectionCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SearchPlaceIndexForTextCommand = exports.serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = exports.serializeAws_restJson1SearchPlaceIndexForPositionCommand = exports.serializeAws_restJson1PutGeofenceCommand = exports.serializeAws_restJson1ListTrackersCommand = exports.serializeAws_restJson1ListTrackerConsumersCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRouteCalculatorsCommand = exports.serializeAws_restJson1ListPlaceIndexesCommand = exports.serializeAws_restJson1ListMapsCommand = exports.serializeAws_restJson1ListGeofencesCommand = exports.serializeAws_restJson1ListGeofenceCollectionsCommand = exports.serializeAws_restJson1ListDevicePositionsCommand = exports.serializeAws_restJson1GetMapTileCommand = exports.serializeAws_restJson1GetMapStyleDescriptorCommand = exports.serializeAws_restJson1GetMapSpritesCommand = exports.serializeAws_restJson1GetMapGlyphsCommand = exports.serializeAws_restJson1GetGeofenceCommand = exports.serializeAws_restJson1GetDevicePositionHistoryCommand = exports.serializeAws_restJson1GetDevicePositionCommand = exports.serializeAws_restJson1DisassociateTrackerConsumerCommand = exports.serializeAws_restJson1DescribeTrackerCommand = exports.serializeAws_restJson1DescribeRouteCalculatorCommand = exports.serializeAws_restJson1DescribePlaceIndexCommand = exports.serializeAws_restJson1DescribeMapCommand = exports.serializeAws_restJson1DescribeGeofenceCollectionCommand = exports.serializeAws_restJson1DeleteTrackerCommand = exports.serializeAws_restJson1DeleteRouteCalculatorCommand = exports.serializeAws_restJson1DeletePlaceIndexCommand = exports.serializeAws_restJson1DeleteMapCommand = exports.serializeAws_restJson1DeleteGeofenceCollectionCommand = exports.serializeAws_restJson1CreateTrackerCommand = exports.serializeAws_restJson1CreateRouteCalculatorCommand = exports.serializeAws_restJson1CreatePlaceIndexCommand = exports.serializeAws_restJson1CreateMapCommand = exports.serializeAws_restJson1CreateGeofenceCollectionCommand = exports.serializeAws_restJson1CalculateRouteCommand = exports.serializeAws_restJson1BatchUpdateDevicePositionCommand = exports.serializeAws_restJson1BatchPutGeofenceCommand = exports.serializeAws_restJson1BatchGetDevicePositionCommand = exports.serializeAws_restJson1BatchEvaluateGeofencesCommand = exports.serializeAws_restJson1BatchDeleteGeofenceCommand = exports.serializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = exports.serializeAws_restJson1AssociateTrackerConsumerCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1UpdatePlaceIndexCommand = exports.deserializeAws_restJson1UpdateMapCommand = exports.deserializeAws_restJson1UpdateGeofenceCollectionCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SearchPlaceIndexForTextCommand = exports.deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = exports.deserializeAws_restJson1SearchPlaceIndexForPositionCommand = exports.deserializeAws_restJson1PutGeofenceCommand = exports.deserializeAws_restJson1ListTrackersCommand = exports.deserializeAws_restJson1ListTrackerConsumersCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRouteCalculatorsCommand = exports.deserializeAws_restJson1ListPlaceIndexesCommand = exports.deserializeAws_restJson1ListMapsCommand = exports.deserializeAws_restJson1ListGeofencesCommand = exports.deserializeAws_restJson1ListGeofenceCollectionsCommand = exports.deserializeAws_restJson1ListDevicePositionsCommand = exports.deserializeAws_restJson1GetMapTileCommand = exports.deserializeAws_restJson1GetMapStyleDescriptorCommand = exports.deserializeAws_restJson1GetMapSpritesCommand = exports.deserializeAws_restJson1GetMapGlyphsCommand = exports.deserializeAws_restJson1GetGeofenceCommand = exports.deserializeAws_restJson1GetDevicePositionHistoryCommand = exports.deserializeAws_restJson1GetDevicePositionCommand = exports.deserializeAws_restJson1DisassociateTrackerConsumerCommand = exports.deserializeAws_restJson1DescribeTrackerCommand = exports.deserializeAws_restJson1DescribeRouteCalculatorCommand = exports.deserializeAws_restJson1DescribePlaceIndexCommand = exports.deserializeAws_restJson1DescribeMapCommand = exports.deserializeAws_restJson1DescribeGeofenceCollectionCommand = exports.deserializeAws_restJson1DeleteTrackerCommand = exports.deserializeAws_restJson1DeleteRouteCalculatorCommand = exports.deserializeAws_restJson1DeletePlaceIndexCommand = exports.deserializeAws_restJson1DeleteMapCommand = exports.deserializeAws_restJson1DeleteGeofenceCollectionCommand = exports.deserializeAws_restJson1CreateTrackerCommand = exports.deserializeAws_restJson1CreateRouteCalculatorCommand = exports.deserializeAws_restJson1CreatePlaceIndexCommand = exports.deserializeAws_restJson1CreateMapCommand = exports.deserializeAws_restJson1CreateGeofenceCollectionCommand = exports.deserializeAws_restJson1CalculateRouteCommand = exports.deserializeAws_restJson1BatchUpdateDevicePositionCommand = exports.deserializeAws_restJson1BatchPutGeofenceCommand = exports.deserializeAws_restJson1BatchGetDevicePositionCommand = exports.deserializeAws_restJson1BatchEvaluateGeofencesCommand = exports.deserializeAws_restJson1BatchDeleteGeofenceCommand = exports.deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = exports.deserializeAws_restJson1AssociateTrackerConsumerCommand = exports.serializeAws_restJson1UpdateTrackerCommand = void 0;
|
|
5
|
+
exports.deserializeAws_restJson1UpdateTrackerCommand = exports.deserializeAws_restJson1UpdateRouteCalculatorCommand = void 0;
|
|
5
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
8
|
const serializeAws_restJson1AssociateTrackerConsumerCommand = async (input, context) => {
|
|
@@ -1631,6 +1632,55 @@ const serializeAws_restJson1SearchPlaceIndexForPositionCommand = async (input, c
|
|
|
1631
1632
|
});
|
|
1632
1633
|
};
|
|
1633
1634
|
exports.serializeAws_restJson1SearchPlaceIndexForPositionCommand = serializeAws_restJson1SearchPlaceIndexForPositionCommand;
|
|
1635
|
+
const serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = async (input, context) => {
|
|
1636
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1637
|
+
const headers = {
|
|
1638
|
+
"content-type": "application/json",
|
|
1639
|
+
};
|
|
1640
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1641
|
+
"/places/v0/indexes/{IndexName}/search/suggestions";
|
|
1642
|
+
if (input.IndexName !== undefined) {
|
|
1643
|
+
const labelValue = input.IndexName;
|
|
1644
|
+
if (labelValue.length <= 0) {
|
|
1645
|
+
throw new Error("Empty value provided for input HTTP label: IndexName.");
|
|
1646
|
+
}
|
|
1647
|
+
resolvedPath = resolvedPath.replace("{IndexName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1648
|
+
}
|
|
1649
|
+
else {
|
|
1650
|
+
throw new Error("No value provided for input HTTP label: IndexName.");
|
|
1651
|
+
}
|
|
1652
|
+
let body;
|
|
1653
|
+
body = JSON.stringify({
|
|
1654
|
+
...(input.BiasPosition !== undefined &&
|
|
1655
|
+
input.BiasPosition !== null && { BiasPosition: serializeAws_restJson1Position(input.BiasPosition, context) }),
|
|
1656
|
+
...(input.FilterBBox !== undefined &&
|
|
1657
|
+
input.FilterBBox !== null && { FilterBBox: serializeAws_restJson1BoundingBox(input.FilterBBox, context) }),
|
|
1658
|
+
...(input.FilterCountries !== undefined &&
|
|
1659
|
+
input.FilterCountries !== null && {
|
|
1660
|
+
FilterCountries: serializeAws_restJson1CountryCodeList(input.FilterCountries, context),
|
|
1661
|
+
}),
|
|
1662
|
+
...(input.Language !== undefined && input.Language !== null && { Language: input.Language }),
|
|
1663
|
+
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
1664
|
+
...(input.Text !== undefined && input.Text !== null && { Text: input.Text }),
|
|
1665
|
+
});
|
|
1666
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
1667
|
+
if (context.disableHostPrefix !== true) {
|
|
1668
|
+
resolvedHostname = "places." + resolvedHostname;
|
|
1669
|
+
if (!protocol_http_1.isValidHostname(resolvedHostname)) {
|
|
1670
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
return new protocol_http_1.HttpRequest({
|
|
1674
|
+
protocol,
|
|
1675
|
+
hostname: resolvedHostname,
|
|
1676
|
+
port,
|
|
1677
|
+
method: "POST",
|
|
1678
|
+
headers,
|
|
1679
|
+
path: resolvedPath,
|
|
1680
|
+
body,
|
|
1681
|
+
});
|
|
1682
|
+
};
|
|
1683
|
+
exports.serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand;
|
|
1634
1684
|
const serializeAws_restJson1SearchPlaceIndexForTextCommand = async (input, context) => {
|
|
1635
1685
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1636
1686
|
const headers = {
|
|
@@ -4087,18 +4137,26 @@ const deserializeAws_restJson1GetDevicePositionCommand = async (output, context)
|
|
|
4087
4137
|
}
|
|
4088
4138
|
const contents = {
|
|
4089
4139
|
$metadata: deserializeMetadata(output),
|
|
4140
|
+
Accuracy: undefined,
|
|
4090
4141
|
DeviceId: undefined,
|
|
4091
4142
|
Position: undefined,
|
|
4143
|
+
PositionProperties: undefined,
|
|
4092
4144
|
ReceivedTime: undefined,
|
|
4093
4145
|
SampleTime: undefined,
|
|
4094
4146
|
};
|
|
4095
4147
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
4148
|
+
if (data.Accuracy !== undefined && data.Accuracy !== null) {
|
|
4149
|
+
contents.Accuracy = deserializeAws_restJson1PositionalAccuracy(data.Accuracy, context);
|
|
4150
|
+
}
|
|
4096
4151
|
if (data.DeviceId !== undefined && data.DeviceId !== null) {
|
|
4097
4152
|
contents.DeviceId = smithy_client_1.expectString(data.DeviceId);
|
|
4098
4153
|
}
|
|
4099
4154
|
if (data.Position !== undefined && data.Position !== null) {
|
|
4100
4155
|
contents.Position = deserializeAws_restJson1Position(data.Position, context);
|
|
4101
4156
|
}
|
|
4157
|
+
if (data.PositionProperties !== undefined && data.PositionProperties !== null) {
|
|
4158
|
+
contents.PositionProperties = deserializeAws_restJson1PropertyMap(data.PositionProperties, context);
|
|
4159
|
+
}
|
|
4102
4160
|
if (data.ReceivedTime !== undefined && data.ReceivedTime !== null) {
|
|
4103
4161
|
contents.ReceivedTime = smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(data.ReceivedTime));
|
|
4104
4162
|
}
|
|
@@ -5565,6 +5623,90 @@ const deserializeAws_restJson1SearchPlaceIndexForPositionCommandError = async (o
|
|
|
5565
5623
|
delete response.Message;
|
|
5566
5624
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
5567
5625
|
};
|
|
5626
|
+
const deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = async (output, context) => {
|
|
5627
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5628
|
+
return deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommandError(output, context);
|
|
5629
|
+
}
|
|
5630
|
+
const contents = {
|
|
5631
|
+
$metadata: deserializeMetadata(output),
|
|
5632
|
+
Results: undefined,
|
|
5633
|
+
Summary: undefined,
|
|
5634
|
+
};
|
|
5635
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
5636
|
+
if (data.Results !== undefined && data.Results !== null) {
|
|
5637
|
+
contents.Results = deserializeAws_restJson1SearchForSuggestionsResultList(data.Results, context);
|
|
5638
|
+
}
|
|
5639
|
+
if (data.Summary !== undefined && data.Summary !== null) {
|
|
5640
|
+
contents.Summary = deserializeAws_restJson1SearchPlaceIndexForSuggestionsSummary(data.Summary, context);
|
|
5641
|
+
}
|
|
5642
|
+
return Promise.resolve(contents);
|
|
5643
|
+
};
|
|
5644
|
+
exports.deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand;
|
|
5645
|
+
const deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommandError = async (output, context) => {
|
|
5646
|
+
const parsedOutput = {
|
|
5647
|
+
...output,
|
|
5648
|
+
body: await parseBody(output.body, context),
|
|
5649
|
+
};
|
|
5650
|
+
let response;
|
|
5651
|
+
let errorCode = "UnknownError";
|
|
5652
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5653
|
+
switch (errorCode) {
|
|
5654
|
+
case "AccessDeniedException":
|
|
5655
|
+
case "com.amazonaws.location#AccessDeniedException":
|
|
5656
|
+
response = {
|
|
5657
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
5658
|
+
name: errorCode,
|
|
5659
|
+
$metadata: deserializeMetadata(output),
|
|
5660
|
+
};
|
|
5661
|
+
break;
|
|
5662
|
+
case "InternalServerException":
|
|
5663
|
+
case "com.amazonaws.location#InternalServerException":
|
|
5664
|
+
response = {
|
|
5665
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
5666
|
+
name: errorCode,
|
|
5667
|
+
$metadata: deserializeMetadata(output),
|
|
5668
|
+
};
|
|
5669
|
+
break;
|
|
5670
|
+
case "ResourceNotFoundException":
|
|
5671
|
+
case "com.amazonaws.location#ResourceNotFoundException":
|
|
5672
|
+
response = {
|
|
5673
|
+
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
5674
|
+
name: errorCode,
|
|
5675
|
+
$metadata: deserializeMetadata(output),
|
|
5676
|
+
};
|
|
5677
|
+
break;
|
|
5678
|
+
case "ThrottlingException":
|
|
5679
|
+
case "com.amazonaws.location#ThrottlingException":
|
|
5680
|
+
response = {
|
|
5681
|
+
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
5682
|
+
name: errorCode,
|
|
5683
|
+
$metadata: deserializeMetadata(output),
|
|
5684
|
+
};
|
|
5685
|
+
break;
|
|
5686
|
+
case "ValidationException":
|
|
5687
|
+
case "com.amazonaws.location#ValidationException":
|
|
5688
|
+
response = {
|
|
5689
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
5690
|
+
name: errorCode,
|
|
5691
|
+
$metadata: deserializeMetadata(output),
|
|
5692
|
+
};
|
|
5693
|
+
break;
|
|
5694
|
+
default:
|
|
5695
|
+
const parsedBody = parsedOutput.body;
|
|
5696
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5697
|
+
response = {
|
|
5698
|
+
...parsedBody,
|
|
5699
|
+
name: `${errorCode}`,
|
|
5700
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
5701
|
+
$fault: "client",
|
|
5702
|
+
$metadata: deserializeMetadata(output),
|
|
5703
|
+
};
|
|
5704
|
+
}
|
|
5705
|
+
const message = response.message || response.Message || errorCode;
|
|
5706
|
+
response.message = message;
|
|
5707
|
+
delete response.Message;
|
|
5708
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
5709
|
+
};
|
|
5568
5710
|
const deserializeAws_restJson1SearchPlaceIndexForTextCommand = async (output, context) => {
|
|
5569
5711
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5570
5712
|
return deserializeAws_restJson1SearchPlaceIndexForTextCommandError(output, context);
|
|
@@ -6412,9 +6554,15 @@ const serializeAws_restJson1DeviceIdsList = (input, context) => {
|
|
|
6412
6554
|
};
|
|
6413
6555
|
const serializeAws_restJson1DevicePositionUpdate = (input, context) => {
|
|
6414
6556
|
return {
|
|
6557
|
+
...(input.Accuracy !== undefined &&
|
|
6558
|
+
input.Accuracy !== null && { Accuracy: serializeAws_restJson1PositionalAccuracy(input.Accuracy, context) }),
|
|
6415
6559
|
...(input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId }),
|
|
6416
6560
|
...(input.Position !== undefined &&
|
|
6417
6561
|
input.Position !== null && { Position: serializeAws_restJson1Position(input.Position, context) }),
|
|
6562
|
+
...(input.PositionProperties !== undefined &&
|
|
6563
|
+
input.PositionProperties !== null && {
|
|
6564
|
+
PositionProperties: serializeAws_restJson1PropertyMap(input.PositionProperties, context),
|
|
6565
|
+
}),
|
|
6418
6566
|
...(input.SampleTime !== undefined &&
|
|
6419
6567
|
input.SampleTime !== null && { SampleTime: input.SampleTime.toISOString().split(".")[0] + "Z" }),
|
|
6420
6568
|
};
|
|
@@ -6480,6 +6628,23 @@ const serializeAws_restJson1Position = (input, context) => {
|
|
|
6480
6628
|
return smithy_client_1.serializeFloat(entry);
|
|
6481
6629
|
});
|
|
6482
6630
|
};
|
|
6631
|
+
const serializeAws_restJson1PositionalAccuracy = (input, context) => {
|
|
6632
|
+
return {
|
|
6633
|
+
...(input.Horizontal !== undefined &&
|
|
6634
|
+
input.Horizontal !== null && { Horizontal: smithy_client_1.serializeFloat(input.Horizontal) }),
|
|
6635
|
+
};
|
|
6636
|
+
};
|
|
6637
|
+
const serializeAws_restJson1PropertyMap = (input, context) => {
|
|
6638
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
6639
|
+
if (value === null) {
|
|
6640
|
+
return acc;
|
|
6641
|
+
}
|
|
6642
|
+
return {
|
|
6643
|
+
...acc,
|
|
6644
|
+
[key]: value,
|
|
6645
|
+
};
|
|
6646
|
+
}, {});
|
|
6647
|
+
};
|
|
6483
6648
|
const serializeAws_restJson1TagMap = (input, context) => {
|
|
6484
6649
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
6485
6650
|
if (value === null) {
|
|
@@ -6704,10 +6869,16 @@ const deserializeAws_restJson1DataSourceConfiguration = (output, context) => {
|
|
|
6704
6869
|
};
|
|
6705
6870
|
const deserializeAws_restJson1DevicePosition = (output, context) => {
|
|
6706
6871
|
return {
|
|
6872
|
+
Accuracy: output.Accuracy !== undefined && output.Accuracy !== null
|
|
6873
|
+
? deserializeAws_restJson1PositionalAccuracy(output.Accuracy, context)
|
|
6874
|
+
: undefined,
|
|
6707
6875
|
DeviceId: smithy_client_1.expectString(output.DeviceId),
|
|
6708
6876
|
Position: output.Position !== undefined && output.Position !== null
|
|
6709
6877
|
? deserializeAws_restJson1Position(output.Position, context)
|
|
6710
6878
|
: undefined,
|
|
6879
|
+
PositionProperties: output.PositionProperties !== undefined && output.PositionProperties !== null
|
|
6880
|
+
? deserializeAws_restJson1PropertyMap(output.PositionProperties, context)
|
|
6881
|
+
: undefined,
|
|
6711
6882
|
ReceivedTime: output.ReceivedTime !== undefined && output.ReceivedTime !== null
|
|
6712
6883
|
? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.ReceivedTime))
|
|
6713
6884
|
: undefined,
|
|
@@ -6800,10 +6971,16 @@ const deserializeAws_restJson1LineString = (output, context) => {
|
|
|
6800
6971
|
};
|
|
6801
6972
|
const deserializeAws_restJson1ListDevicePositionsResponseEntry = (output, context) => {
|
|
6802
6973
|
return {
|
|
6974
|
+
Accuracy: output.Accuracy !== undefined && output.Accuracy !== null
|
|
6975
|
+
? deserializeAws_restJson1PositionalAccuracy(output.Accuracy, context)
|
|
6976
|
+
: undefined,
|
|
6803
6977
|
DeviceId: smithy_client_1.expectString(output.DeviceId),
|
|
6804
6978
|
Position: output.Position !== undefined && output.Position !== null
|
|
6805
6979
|
? deserializeAws_restJson1Position(output.Position, context)
|
|
6806
6980
|
: undefined,
|
|
6981
|
+
PositionProperties: output.PositionProperties !== undefined && output.PositionProperties !== null
|
|
6982
|
+
? deserializeAws_restJson1PropertyMap(output.PositionProperties, context)
|
|
6983
|
+
: undefined,
|
|
6807
6984
|
SampleTime: output.SampleTime !== undefined && output.SampleTime !== null
|
|
6808
6985
|
? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.SampleTime))
|
|
6809
6986
|
: undefined,
|
|
@@ -7006,6 +7183,22 @@ const deserializeAws_restJson1Position = (output, context) => {
|
|
|
7006
7183
|
return smithy_client_1.limitedParseDouble(entry);
|
|
7007
7184
|
});
|
|
7008
7185
|
};
|
|
7186
|
+
const deserializeAws_restJson1PositionalAccuracy = (output, context) => {
|
|
7187
|
+
return {
|
|
7188
|
+
Horizontal: smithy_client_1.limitedParseDouble(output.Horizontal),
|
|
7189
|
+
};
|
|
7190
|
+
};
|
|
7191
|
+
const deserializeAws_restJson1PropertyMap = (output, context) => {
|
|
7192
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
7193
|
+
if (value === null) {
|
|
7194
|
+
return acc;
|
|
7195
|
+
}
|
|
7196
|
+
return {
|
|
7197
|
+
...acc,
|
|
7198
|
+
[key]: smithy_client_1.expectString(value),
|
|
7199
|
+
};
|
|
7200
|
+
}, {});
|
|
7201
|
+
};
|
|
7009
7202
|
const deserializeAws_restJson1SearchForPositionResult = (output, context) => {
|
|
7010
7203
|
return {
|
|
7011
7204
|
Distance: smithy_client_1.limitedParseDouble(output.Distance),
|
|
@@ -7024,6 +7217,21 @@ const deserializeAws_restJson1SearchForPositionResultList = (output, context) =>
|
|
|
7024
7217
|
return deserializeAws_restJson1SearchForPositionResult(entry, context);
|
|
7025
7218
|
});
|
|
7026
7219
|
};
|
|
7220
|
+
const deserializeAws_restJson1SearchForSuggestionsResult = (output, context) => {
|
|
7221
|
+
return {
|
|
7222
|
+
Text: smithy_client_1.expectString(output.Text),
|
|
7223
|
+
};
|
|
7224
|
+
};
|
|
7225
|
+
const deserializeAws_restJson1SearchForSuggestionsResultList = (output, context) => {
|
|
7226
|
+
return (output || [])
|
|
7227
|
+
.filter((e) => e != null)
|
|
7228
|
+
.map((entry) => {
|
|
7229
|
+
if (entry === null) {
|
|
7230
|
+
return null;
|
|
7231
|
+
}
|
|
7232
|
+
return deserializeAws_restJson1SearchForSuggestionsResult(entry, context);
|
|
7233
|
+
});
|
|
7234
|
+
};
|
|
7027
7235
|
const deserializeAws_restJson1SearchForTextResult = (output, context) => {
|
|
7028
7236
|
return {
|
|
7029
7237
|
Distance: smithy_client_1.limitedParseDouble(output.Distance),
|
|
@@ -7053,6 +7261,23 @@ const deserializeAws_restJson1SearchPlaceIndexForPositionSummary = (output, cont
|
|
|
7053
7261
|
: undefined,
|
|
7054
7262
|
};
|
|
7055
7263
|
};
|
|
7264
|
+
const deserializeAws_restJson1SearchPlaceIndexForSuggestionsSummary = (output, context) => {
|
|
7265
|
+
return {
|
|
7266
|
+
BiasPosition: output.BiasPosition !== undefined && output.BiasPosition !== null
|
|
7267
|
+
? deserializeAws_restJson1Position(output.BiasPosition, context)
|
|
7268
|
+
: undefined,
|
|
7269
|
+
DataSource: smithy_client_1.expectString(output.DataSource),
|
|
7270
|
+
FilterBBox: output.FilterBBox !== undefined && output.FilterBBox !== null
|
|
7271
|
+
? deserializeAws_restJson1BoundingBox(output.FilterBBox, context)
|
|
7272
|
+
: undefined,
|
|
7273
|
+
FilterCountries: output.FilterCountries !== undefined && output.FilterCountries !== null
|
|
7274
|
+
? deserializeAws_restJson1CountryCodeList(output.FilterCountries, context)
|
|
7275
|
+
: undefined,
|
|
7276
|
+
Language: smithy_client_1.expectString(output.Language),
|
|
7277
|
+
MaxResults: smithy_client_1.expectInt32(output.MaxResults),
|
|
7278
|
+
Text: smithy_client_1.expectString(output.Text),
|
|
7279
|
+
};
|
|
7280
|
+
};
|
|
7056
7281
|
const deserializeAws_restJson1SearchPlaceIndexForTextSummary = (output, context) => {
|
|
7057
7282
|
return {
|
|
7058
7283
|
BiasPosition: output.BiasPosition !== undefined && output.BiasPosition !== null
|
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";
|