@aws-sdk/client-location 3.179.0 → 3.180.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/GetPlaceCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +25 -16
- package/dist-cjs/protocols/Aws_restJson1.js +84 -3
- package/dist-es/Location.js +15 -0
- package/dist-es/commands/GetPlaceCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +5 -3
- package/dist-es/protocols/Aws_restJson1.js +114 -0
- package/dist-types/Location.d.ts +23 -0
- package/dist-types/LocationClient.d.ts +3 -2
- package/dist-types/commands/GetPlaceCommand.d.ts +51 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +207 -123
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/Location.d.ts +17 -0
- package/dist-types/ts3.4/LocationClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/GetPlaceCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +45 -26
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +6 -6
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.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **client-location:** This release adds place IDs, which are unique identifiers of places, along with a new GetPlace operation, which can be used with place IDs to find a place again later. UnitNumber and UnitType are also added as new properties of places. ([df2b1a5](https://github.com/aws/aws-sdk-js-v3/commit/df2b1a586de3456b3a092b863ddca010bb755605))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.179.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.178.0...v3.179.0) (2022-09-26)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/client-location
|
package/dist-cjs/Location.js
CHANGED
|
@@ -33,6 +33,7 @@ const GetMapGlyphsCommand_1 = require("./commands/GetMapGlyphsCommand");
|
|
|
33
33
|
const GetMapSpritesCommand_1 = require("./commands/GetMapSpritesCommand");
|
|
34
34
|
const GetMapStyleDescriptorCommand_1 = require("./commands/GetMapStyleDescriptorCommand");
|
|
35
35
|
const GetMapTileCommand_1 = require("./commands/GetMapTileCommand");
|
|
36
|
+
const GetPlaceCommand_1 = require("./commands/GetPlaceCommand");
|
|
36
37
|
const ListDevicePositionsCommand_1 = require("./commands/ListDevicePositionsCommand");
|
|
37
38
|
const ListGeofenceCollectionsCommand_1 = require("./commands/ListGeofenceCollectionsCommand");
|
|
38
39
|
const ListGeofencesCommand_1 = require("./commands/ListGeofencesCommand");
|
|
@@ -503,6 +504,20 @@ class Location extends LocationClient_1.LocationClient {
|
|
|
503
504
|
return this.send(command, optionsOrCb);
|
|
504
505
|
}
|
|
505
506
|
}
|
|
507
|
+
getPlace(args, optionsOrCb, cb) {
|
|
508
|
+
const command = new GetPlaceCommand_1.GetPlaceCommand(args);
|
|
509
|
+
if (typeof optionsOrCb === "function") {
|
|
510
|
+
this.send(command, optionsOrCb);
|
|
511
|
+
}
|
|
512
|
+
else if (typeof cb === "function") {
|
|
513
|
+
if (typeof optionsOrCb !== "object")
|
|
514
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
515
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
516
|
+
}
|
|
517
|
+
else {
|
|
518
|
+
return this.send(command, optionsOrCb);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
506
521
|
listDevicePositions(args, optionsOrCb, cb) {
|
|
507
522
|
const command = new ListDevicePositionsCommand_1.ListDevicePositionsCommand(args);
|
|
508
523
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPlaceCommand = 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 GetPlaceCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use((0, 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 = "GetPlaceCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.GetPlaceRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.GetPlaceResponseFilterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1GetPlaceCommand)(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1GetPlaceCommand)(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.GetPlaceCommand = GetPlaceCommand;
|
|
@@ -33,6 +33,7 @@ tslib_1.__exportStar(require("./GetMapGlyphsCommand"), exports);
|
|
|
33
33
|
tslib_1.__exportStar(require("./GetMapSpritesCommand"), exports);
|
|
34
34
|
tslib_1.__exportStar(require("./GetMapStyleDescriptorCommand"), exports);
|
|
35
35
|
tslib_1.__exportStar(require("./GetMapTileCommand"), exports);
|
|
36
|
+
tslib_1.__exportStar(require("./GetPlaceCommand"), exports);
|
|
36
37
|
tslib_1.__exportStar(require("./ListDevicePositionsCommand"), exports);
|
|
37
38
|
tslib_1.__exportStar(require("./ListGeofenceCollectionsCommand"), exports);
|
|
38
39
|
tslib_1.__exportStar(require("./ListGeofencesCommand"), exports);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CalculateRouteMatrixSummaryFilterSensitiveLog = exports.RouteMatrixEntryFilterSensitiveLog = exports.RouteMatrixEntryErrorFilterSensitiveLog = exports.CalculateRouteMatrixRequestFilterSensitiveLog = exports.CalculateRouteResponseFilterSensitiveLog = exports.CalculateRouteSummaryFilterSensitiveLog = exports.LegFilterSensitiveLog = exports.StepFilterSensitiveLog = exports.LegGeometryFilterSensitiveLog = exports.CalculateRouteRequestFilterSensitiveLog = exports.CalculateRouteTruckModeOptionsFilterSensitiveLog = exports.TruckWeightFilterSensitiveLog = exports.TruckDimensionsFilterSensitiveLog = exports.CalculateRouteCarModeOptionsFilterSensitiveLog = exports.BatchUpdateDevicePositionResponseFilterSensitiveLog = exports.BatchUpdateDevicePositionErrorFilterSensitiveLog = exports.BatchUpdateDevicePositionRequestFilterSensitiveLog = exports.BatchPutGeofenceResponseFilterSensitiveLog = exports.BatchPutGeofenceSuccessFilterSensitiveLog = exports.BatchPutGeofenceErrorFilterSensitiveLog = exports.BatchPutGeofenceRequestFilterSensitiveLog = exports.BatchPutGeofenceRequestEntryFilterSensitiveLog = exports.GeofenceGeometryFilterSensitiveLog = exports.CircleFilterSensitiveLog = exports.BatchGetDevicePositionResponseFilterSensitiveLog = exports.BatchGetDevicePositionErrorFilterSensitiveLog = exports.DevicePositionFilterSensitiveLog = exports.BatchGetDevicePositionRequestFilterSensitiveLog = exports.BatchEvaluateGeofencesResponseFilterSensitiveLog = exports.BatchEvaluateGeofencesErrorFilterSensitiveLog = exports.BatchEvaluateGeofencesRequestFilterSensitiveLog = exports.DevicePositionUpdateFilterSensitiveLog = exports.PositionalAccuracyFilterSensitiveLog = exports.BatchDeleteGeofenceResponseFilterSensitiveLog = exports.BatchDeleteGeofenceErrorFilterSensitiveLog = exports.BatchDeleteGeofenceRequestFilterSensitiveLog = exports.BatchDeleteDevicePositionHistoryResponseFilterSensitiveLog = exports.BatchDeleteDevicePositionHistoryErrorFilterSensitiveLog = exports.BatchItemErrorFilterSensitiveLog = exports.BatchDeleteDevicePositionHistoryRequestFilterSensitiveLog = exports.ValidationExceptionFieldFilterSensitiveLog = exports.AssociateTrackerConsumerResponseFilterSensitiveLog = exports.AssociateTrackerConsumerRequestFilterSensitiveLog = exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.AccessDeniedException = void 0;
|
|
4
4
|
exports.PutGeofenceRequestFilterSensitiveLog = exports.ListGeofencesResponseFilterSensitiveLog = exports.ListGeofenceResponseEntryFilterSensitiveLog = exports.ListGeofencesRequestFilterSensitiveLog = exports.ListGeofenceCollectionsResponseFilterSensitiveLog = exports.ListGeofenceCollectionsResponseEntryFilterSensitiveLog = exports.ListGeofenceCollectionsRequestFilterSensitiveLog = exports.GetGeofenceResponseFilterSensitiveLog = exports.GetGeofenceRequestFilterSensitiveLog = exports.UntagResourceResponseFilterSensitiveLog = exports.UntagResourceRequestFilterSensitiveLog = exports.TagResourceResponseFilterSensitiveLog = exports.TagResourceRequestFilterSensitiveLog = exports.ListTagsForResourceResponseFilterSensitiveLog = exports.ListTagsForResourceRequestFilterSensitiveLog = exports.DisassociateTrackerConsumerResponseFilterSensitiveLog = exports.DisassociateTrackerConsumerRequestFilterSensitiveLog = exports.DescribeTrackerResponseFilterSensitiveLog = exports.DescribeTrackerRequestFilterSensitiveLog = exports.DescribeRouteCalculatorResponseFilterSensitiveLog = exports.DescribeRouteCalculatorRequestFilterSensitiveLog = exports.DescribePlaceIndexResponseFilterSensitiveLog = exports.DescribePlaceIndexRequestFilterSensitiveLog = exports.DescribeMapResponseFilterSensitiveLog = exports.DescribeMapRequestFilterSensitiveLog = exports.DescribeGeofenceCollectionResponseFilterSensitiveLog = exports.DescribeGeofenceCollectionRequestFilterSensitiveLog = exports.DeleteTrackerResponseFilterSensitiveLog = exports.DeleteTrackerRequestFilterSensitiveLog = exports.DeleteRouteCalculatorResponseFilterSensitiveLog = exports.DeleteRouteCalculatorRequestFilterSensitiveLog = exports.DeletePlaceIndexResponseFilterSensitiveLog = exports.DeletePlaceIndexRequestFilterSensitiveLog = exports.DeleteMapResponseFilterSensitiveLog = exports.DeleteMapRequestFilterSensitiveLog = exports.DeleteGeofenceCollectionResponseFilterSensitiveLog = exports.DeleteGeofenceCollectionRequestFilterSensitiveLog = exports.CreateTrackerResponseFilterSensitiveLog = exports.CreateTrackerRequestFilterSensitiveLog = exports.CreateRouteCalculatorResponseFilterSensitiveLog = exports.CreateRouteCalculatorRequestFilterSensitiveLog = exports.CreatePlaceIndexResponseFilterSensitiveLog = exports.CreatePlaceIndexRequestFilterSensitiveLog = exports.DataSourceConfigurationFilterSensitiveLog = exports.CreateMapResponseFilterSensitiveLog = exports.CreateMapRequestFilterSensitiveLog = exports.MapConfigurationFilterSensitiveLog = exports.CreateGeofenceCollectionResponseFilterSensitiveLog = exports.CreateGeofenceCollectionRequestFilterSensitiveLog = exports.CalculateRouteMatrixResponseFilterSensitiveLog = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.UpdateTrackerResponseFilterSensitiveLog = exports.UpdateTrackerRequestFilterSensitiveLog = exports.UpdateRouteCalculatorResponseFilterSensitiveLog = exports.UpdateRouteCalculatorRequestFilterSensitiveLog = exports.UpdatePlaceIndexResponseFilterSensitiveLog = void 0;
|
|
5
|
+
exports.SearchPlaceIndexForTextSummaryFilterSensitiveLog = exports.SearchForTextResultFilterSensitiveLog = exports.SearchPlaceIndexForTextRequestFilterSensitiveLog = exports.SearchPlaceIndexForSuggestionsResponseFilterSensitiveLog = exports.SearchPlaceIndexForSuggestionsSummaryFilterSensitiveLog = exports.SearchForSuggestionsResultFilterSensitiveLog = exports.SearchPlaceIndexForSuggestionsRequestFilterSensitiveLog = exports.SearchPlaceIndexForPositionResponseFilterSensitiveLog = exports.SearchPlaceIndexForPositionSummaryFilterSensitiveLog = exports.SearchForPositionResultFilterSensitiveLog = exports.SearchPlaceIndexForPositionRequestFilterSensitiveLog = exports.UpdateMapResponseFilterSensitiveLog = exports.UpdateMapRequestFilterSensitiveLog = exports.ListTrackersResponseFilterSensitiveLog = exports.ListTrackersResponseEntryFilterSensitiveLog = exports.ListTrackersRequestFilterSensitiveLog = exports.ListTrackerConsumersResponseFilterSensitiveLog = exports.ListTrackerConsumersRequestFilterSensitiveLog = exports.ListRouteCalculatorsResponseFilterSensitiveLog = exports.ListRouteCalculatorsResponseEntryFilterSensitiveLog = exports.ListRouteCalculatorsRequestFilterSensitiveLog = exports.ListPlaceIndexesResponseFilterSensitiveLog = exports.ListPlaceIndexesResponseEntryFilterSensitiveLog = exports.ListPlaceIndexesRequestFilterSensitiveLog = exports.ListMapsResponseFilterSensitiveLog = exports.ListMapsResponseEntryFilterSensitiveLog = exports.ListMapsRequestFilterSensitiveLog = exports.ListDevicePositionsResponseFilterSensitiveLog = exports.ListDevicePositionsResponseEntryFilterSensitiveLog = exports.ListDevicePositionsRequestFilterSensitiveLog = exports.GetPlaceResponseFilterSensitiveLog = exports.PlaceFilterSensitiveLog = exports.TimeZoneFilterSensitiveLog = exports.PlaceGeometryFilterSensitiveLog = exports.GetPlaceRequestFilterSensitiveLog = exports.GetMapTileResponseFilterSensitiveLog = exports.GetMapTileRequestFilterSensitiveLog = exports.GetMapStyleDescriptorResponseFilterSensitiveLog = exports.GetMapStyleDescriptorRequestFilterSensitiveLog = exports.GetMapSpritesResponseFilterSensitiveLog = exports.GetMapSpritesRequestFilterSensitiveLog = exports.GetMapGlyphsResponseFilterSensitiveLog = exports.GetMapGlyphsRequestFilterSensitiveLog = exports.GetDevicePositionHistoryResponseFilterSensitiveLog = exports.GetDevicePositionHistoryRequestFilterSensitiveLog = exports.GetDevicePositionResponseFilterSensitiveLog = exports.GetDevicePositionRequestFilterSensitiveLog = exports.UpdateGeofenceCollectionResponseFilterSensitiveLog = exports.UpdateGeofenceCollectionRequestFilterSensitiveLog = exports.PutGeofenceResponseFilterSensitiveLog = void 0;
|
|
6
|
+
exports.UpdateTrackerResponseFilterSensitiveLog = exports.UpdateTrackerRequestFilterSensitiveLog = exports.UpdateRouteCalculatorResponseFilterSensitiveLog = exports.UpdateRouteCalculatorRequestFilterSensitiveLog = exports.UpdatePlaceIndexResponseFilterSensitiveLog = exports.UpdatePlaceIndexRequestFilterSensitiveLog = exports.SearchPlaceIndexForTextResponseFilterSensitiveLog = void 0;
|
|
7
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
8
|
const LocationServiceException_1 = require("./LocationServiceException");
|
|
9
9
|
class AccessDeniedException extends LocationServiceException_1.LocationServiceException {
|
|
@@ -582,6 +582,29 @@ const GetMapTileResponseFilterSensitiveLog = (obj) => ({
|
|
|
582
582
|
...obj,
|
|
583
583
|
});
|
|
584
584
|
exports.GetMapTileResponseFilterSensitiveLog = GetMapTileResponseFilterSensitiveLog;
|
|
585
|
+
const GetPlaceRequestFilterSensitiveLog = (obj) => ({
|
|
586
|
+
...obj,
|
|
587
|
+
});
|
|
588
|
+
exports.GetPlaceRequestFilterSensitiveLog = GetPlaceRequestFilterSensitiveLog;
|
|
589
|
+
const PlaceGeometryFilterSensitiveLog = (obj) => ({
|
|
590
|
+
...obj,
|
|
591
|
+
...(obj.Point && { Point: smithy_client_1.SENSITIVE_STRING }),
|
|
592
|
+
});
|
|
593
|
+
exports.PlaceGeometryFilterSensitiveLog = PlaceGeometryFilterSensitiveLog;
|
|
594
|
+
const TimeZoneFilterSensitiveLog = (obj) => ({
|
|
595
|
+
...obj,
|
|
596
|
+
});
|
|
597
|
+
exports.TimeZoneFilterSensitiveLog = TimeZoneFilterSensitiveLog;
|
|
598
|
+
const PlaceFilterSensitiveLog = (obj) => ({
|
|
599
|
+
...obj,
|
|
600
|
+
...(obj.Geometry && { Geometry: (0, exports.PlaceGeometryFilterSensitiveLog)(obj.Geometry) }),
|
|
601
|
+
});
|
|
602
|
+
exports.PlaceFilterSensitiveLog = PlaceFilterSensitiveLog;
|
|
603
|
+
const GetPlaceResponseFilterSensitiveLog = (obj) => ({
|
|
604
|
+
...obj,
|
|
605
|
+
...(obj.Place && { Place: (0, exports.PlaceFilterSensitiveLog)(obj.Place) }),
|
|
606
|
+
});
|
|
607
|
+
exports.GetPlaceResponseFilterSensitiveLog = GetPlaceResponseFilterSensitiveLog;
|
|
585
608
|
const ListDevicePositionsRequestFilterSensitiveLog = (obj) => ({
|
|
586
609
|
...obj,
|
|
587
610
|
});
|
|
@@ -666,20 +689,6 @@ const SearchPlaceIndexForPositionRequestFilterSensitiveLog = (obj) => ({
|
|
|
666
689
|
...(obj.Position && { Position: smithy_client_1.SENSITIVE_STRING }),
|
|
667
690
|
});
|
|
668
691
|
exports.SearchPlaceIndexForPositionRequestFilterSensitiveLog = SearchPlaceIndexForPositionRequestFilterSensitiveLog;
|
|
669
|
-
const PlaceGeometryFilterSensitiveLog = (obj) => ({
|
|
670
|
-
...obj,
|
|
671
|
-
...(obj.Point && { Point: smithy_client_1.SENSITIVE_STRING }),
|
|
672
|
-
});
|
|
673
|
-
exports.PlaceGeometryFilterSensitiveLog = PlaceGeometryFilterSensitiveLog;
|
|
674
|
-
const TimeZoneFilterSensitiveLog = (obj) => ({
|
|
675
|
-
...obj,
|
|
676
|
-
});
|
|
677
|
-
exports.TimeZoneFilterSensitiveLog = TimeZoneFilterSensitiveLog;
|
|
678
|
-
const PlaceFilterSensitiveLog = (obj) => ({
|
|
679
|
-
...obj,
|
|
680
|
-
...(obj.Geometry && { Geometry: (0, exports.PlaceGeometryFilterSensitiveLog)(obj.Geometry) }),
|
|
681
|
-
});
|
|
682
|
-
exports.PlaceFilterSensitiveLog = PlaceFilterSensitiveLog;
|
|
683
692
|
const SearchForPositionResultFilterSensitiveLog = (obj) => ({
|
|
684
693
|
...obj,
|
|
685
694
|
...(obj.Place && { Place: (0, exports.PlaceFilterSensitiveLog)(obj.Place) }),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.deserializeAws_restJson1UpdateTrackerCommand = exports.deserializeAws_restJson1UpdateRouteCalculatorCommand = exports.deserializeAws_restJson1UpdatePlaceIndexCommand = exports.deserializeAws_restJson1UpdateMapCommand = void 0;
|
|
3
|
+
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_restJson1GetPlaceCommand = 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_restJson1CalculateRouteMatrixCommand = 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_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_restJson1GetPlaceCommand = 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_restJson1CalculateRouteMatrixCommand = 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 = exports.serializeAws_restJson1UpdateRouteCalculatorCommand = exports.serializeAws_restJson1UpdatePlaceIndexCommand = void 0;
|
|
5
|
+
exports.deserializeAws_restJson1UpdateTrackerCommand = exports.deserializeAws_restJson1UpdateRouteCalculatorCommand = exports.deserializeAws_restJson1UpdatePlaceIndexCommand = exports.deserializeAws_restJson1UpdateMapCommand = exports.deserializeAws_restJson1UpdateGeofenceCollectionCommand = exports.deserializeAws_restJson1UntagResourceCommand = void 0;
|
|
6
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
8
|
const LocationServiceException_1 = require("../models/LocationServiceException");
|
|
@@ -945,6 +945,36 @@ const serializeAws_restJson1GetMapTileCommand = async (input, context) => {
|
|
|
945
945
|
});
|
|
946
946
|
};
|
|
947
947
|
exports.serializeAws_restJson1GetMapTileCommand = serializeAws_restJson1GetMapTileCommand;
|
|
948
|
+
const serializeAws_restJson1GetPlaceCommand = async (input, context) => {
|
|
949
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
950
|
+
const headers = {};
|
|
951
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
952
|
+
"/places/v0/indexes/{IndexName}/places/{PlaceId}";
|
|
953
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IndexName", () => input.IndexName, "{IndexName}", false);
|
|
954
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PlaceId", () => input.PlaceId, "{PlaceId}", false);
|
|
955
|
+
const query = map({
|
|
956
|
+
language: [, input.Language],
|
|
957
|
+
});
|
|
958
|
+
let body;
|
|
959
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
960
|
+
if (context.disableHostPrefix !== true) {
|
|
961
|
+
resolvedHostname = "places." + resolvedHostname;
|
|
962
|
+
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
963
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
return new protocol_http_1.HttpRequest({
|
|
967
|
+
protocol,
|
|
968
|
+
hostname: resolvedHostname,
|
|
969
|
+
port,
|
|
970
|
+
method: "GET",
|
|
971
|
+
headers,
|
|
972
|
+
path: resolvedPath,
|
|
973
|
+
query,
|
|
974
|
+
body,
|
|
975
|
+
});
|
|
976
|
+
};
|
|
977
|
+
exports.serializeAws_restJson1GetPlaceCommand = serializeAws_restJson1GetPlaceCommand;
|
|
948
978
|
const serializeAws_restJson1ListDevicePositionsCommand = async (input, context) => {
|
|
949
979
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
950
980
|
const headers = {
|
|
@@ -3209,6 +3239,52 @@ const deserializeAws_restJson1GetMapTileCommandError = async (output, context) =
|
|
|
3209
3239
|
});
|
|
3210
3240
|
}
|
|
3211
3241
|
};
|
|
3242
|
+
const deserializeAws_restJson1GetPlaceCommand = async (output, context) => {
|
|
3243
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3244
|
+
return deserializeAws_restJson1GetPlaceCommandError(output, context);
|
|
3245
|
+
}
|
|
3246
|
+
const contents = map({
|
|
3247
|
+
$metadata: deserializeMetadata(output),
|
|
3248
|
+
});
|
|
3249
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3250
|
+
if (data.Place != null) {
|
|
3251
|
+
contents.Place = deserializeAws_restJson1Place(data.Place, context);
|
|
3252
|
+
}
|
|
3253
|
+
return contents;
|
|
3254
|
+
};
|
|
3255
|
+
exports.deserializeAws_restJson1GetPlaceCommand = deserializeAws_restJson1GetPlaceCommand;
|
|
3256
|
+
const deserializeAws_restJson1GetPlaceCommandError = async (output, context) => {
|
|
3257
|
+
const parsedOutput = {
|
|
3258
|
+
...output,
|
|
3259
|
+
body: await parseBody(output.body, context),
|
|
3260
|
+
};
|
|
3261
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3262
|
+
switch (errorCode) {
|
|
3263
|
+
case "AccessDeniedException":
|
|
3264
|
+
case "com.amazonaws.location#AccessDeniedException":
|
|
3265
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
3266
|
+
case "InternalServerException":
|
|
3267
|
+
case "com.amazonaws.location#InternalServerException":
|
|
3268
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
3269
|
+
case "ResourceNotFoundException":
|
|
3270
|
+
case "com.amazonaws.location#ResourceNotFoundException":
|
|
3271
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3272
|
+
case "ThrottlingException":
|
|
3273
|
+
case "com.amazonaws.location#ThrottlingException":
|
|
3274
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3275
|
+
case "ValidationException":
|
|
3276
|
+
case "com.amazonaws.location#ValidationException":
|
|
3277
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
3278
|
+
default:
|
|
3279
|
+
const parsedBody = parsedOutput.body;
|
|
3280
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3281
|
+
output,
|
|
3282
|
+
parsedBody,
|
|
3283
|
+
exceptionCtor: LocationServiceException_1.LocationServiceException,
|
|
3284
|
+
errorCode,
|
|
3285
|
+
});
|
|
3286
|
+
}
|
|
3287
|
+
};
|
|
3212
3288
|
const deserializeAws_restJson1ListDevicePositionsCommand = async (output, context) => {
|
|
3213
3289
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3214
3290
|
return deserializeAws_restJson1ListDevicePositionsCommandError(output, context);
|
|
@@ -4882,6 +4958,8 @@ const deserializeAws_restJson1Place = (output, context) => {
|
|
|
4882
4958
|
Street: (0, smithy_client_1.expectString)(output.Street),
|
|
4883
4959
|
SubRegion: (0, smithy_client_1.expectString)(output.SubRegion),
|
|
4884
4960
|
TimeZone: output.TimeZone != null ? deserializeAws_restJson1TimeZone(output.TimeZone, context) : undefined,
|
|
4961
|
+
UnitNumber: (0, smithy_client_1.expectString)(output.UnitNumber),
|
|
4962
|
+
UnitType: (0, smithy_client_1.expectString)(output.UnitType),
|
|
4885
4963
|
};
|
|
4886
4964
|
};
|
|
4887
4965
|
const deserializeAws_restJson1PlaceGeometry = (output, context) => {
|
|
@@ -4966,6 +5044,7 @@ const deserializeAws_restJson1SearchForPositionResult = (output, context) => {
|
|
|
4966
5044
|
return {
|
|
4967
5045
|
Distance: (0, smithy_client_1.limitedParseDouble)(output.Distance),
|
|
4968
5046
|
Place: output.Place != null ? deserializeAws_restJson1Place(output.Place, context) : undefined,
|
|
5047
|
+
PlaceId: (0, smithy_client_1.expectString)(output.PlaceId),
|
|
4969
5048
|
};
|
|
4970
5049
|
};
|
|
4971
5050
|
const deserializeAws_restJson1SearchForPositionResultList = (output, context) => {
|
|
@@ -4981,6 +5060,7 @@ const deserializeAws_restJson1SearchForPositionResultList = (output, context) =>
|
|
|
4981
5060
|
};
|
|
4982
5061
|
const deserializeAws_restJson1SearchForSuggestionsResult = (output, context) => {
|
|
4983
5062
|
return {
|
|
5063
|
+
PlaceId: (0, smithy_client_1.expectString)(output.PlaceId),
|
|
4984
5064
|
Text: (0, smithy_client_1.expectString)(output.Text),
|
|
4985
5065
|
};
|
|
4986
5066
|
};
|
|
@@ -4999,6 +5079,7 @@ const deserializeAws_restJson1SearchForTextResult = (output, context) => {
|
|
|
4999
5079
|
return {
|
|
5000
5080
|
Distance: (0, smithy_client_1.limitedParseDouble)(output.Distance),
|
|
5001
5081
|
Place: output.Place != null ? deserializeAws_restJson1Place(output.Place, context) : undefined,
|
|
5082
|
+
PlaceId: (0, smithy_client_1.expectString)(output.PlaceId),
|
|
5002
5083
|
Relevance: (0, smithy_client_1.limitedParseDouble)(output.Relevance),
|
|
5003
5084
|
};
|
|
5004
5085
|
};
|
package/dist-es/Location.js
CHANGED
|
@@ -31,6 +31,7 @@ import { GetMapGlyphsCommand, } from "./commands/GetMapGlyphsCommand";
|
|
|
31
31
|
import { GetMapSpritesCommand, } from "./commands/GetMapSpritesCommand";
|
|
32
32
|
import { GetMapStyleDescriptorCommand, } from "./commands/GetMapStyleDescriptorCommand";
|
|
33
33
|
import { GetMapTileCommand } from "./commands/GetMapTileCommand";
|
|
34
|
+
import { GetPlaceCommand } from "./commands/GetPlaceCommand";
|
|
34
35
|
import { ListDevicePositionsCommand, } from "./commands/ListDevicePositionsCommand";
|
|
35
36
|
import { ListGeofenceCollectionsCommand, } from "./commands/ListGeofenceCollectionsCommand";
|
|
36
37
|
import { ListGeofencesCommand, } from "./commands/ListGeofencesCommand";
|
|
@@ -505,6 +506,20 @@ var Location = (function (_super) {
|
|
|
505
506
|
return this.send(command, optionsOrCb);
|
|
506
507
|
}
|
|
507
508
|
};
|
|
509
|
+
Location.prototype.getPlace = function (args, optionsOrCb, cb) {
|
|
510
|
+
var command = new GetPlaceCommand(args);
|
|
511
|
+
if (typeof optionsOrCb === "function") {
|
|
512
|
+
this.send(command, optionsOrCb);
|
|
513
|
+
}
|
|
514
|
+
else if (typeof cb === "function") {
|
|
515
|
+
if (typeof optionsOrCb !== "object")
|
|
516
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
517
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
return this.send(command, optionsOrCb);
|
|
521
|
+
}
|
|
522
|
+
};
|
|
508
523
|
Location.prototype.listDevicePositions = function (args, optionsOrCb, cb) {
|
|
509
524
|
var command = new ListDevicePositionsCommand(args);
|
|
510
525
|
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 { GetPlaceRequestFilterSensitiveLog, GetPlaceResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1GetPlaceCommand, serializeAws_restJson1GetPlaceCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var GetPlaceCommand = (function (_super) {
|
|
7
|
+
__extends(GetPlaceCommand, _super);
|
|
8
|
+
function GetPlaceCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
GetPlaceCommand.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 = "GetPlaceCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: GetPlaceRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: GetPlaceResponseFilterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
GetPlaceCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1GetPlaceCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
GetPlaceCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1GetPlaceCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return GetPlaceCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { GetPlaceCommand };
|
|
@@ -30,6 +30,7 @@ export * from "./GetMapGlyphsCommand";
|
|
|
30
30
|
export * from "./GetMapSpritesCommand";
|
|
31
31
|
export * from "./GetMapStyleDescriptorCommand";
|
|
32
32
|
export * from "./GetMapTileCommand";
|
|
33
|
+
export * from "./GetPlaceCommand";
|
|
33
34
|
export * from "./ListDevicePositionsCommand";
|
|
34
35
|
export * from "./ListGeofenceCollectionsCommand";
|
|
35
36
|
export * from "./ListGeofencesCommand";
|
|
@@ -210,6 +210,11 @@ export var GetMapStyleDescriptorRequestFilterSensitiveLog = function (obj) { ret
|
|
|
210
210
|
export var GetMapStyleDescriptorResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
211
211
|
export var GetMapTileRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
212
212
|
export var GetMapTileResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
213
|
+
export var GetPlaceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
214
|
+
export var PlaceGeometryFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Point && { Point: SENSITIVE_STRING }))); };
|
|
215
|
+
export var TimeZoneFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
216
|
+
export var PlaceFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Geometry && { Geometry: PlaceGeometryFilterSensitiveLog(obj.Geometry) }))); };
|
|
217
|
+
export var GetPlaceResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Place && { Place: PlaceFilterSensitiveLog(obj.Place) }))); };
|
|
213
218
|
export var ListDevicePositionsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
214
219
|
export var ListDevicePositionsResponseEntryFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING })), (obj.PositionProperties && { PositionProperties: SENSITIVE_STRING }))); };
|
|
215
220
|
export var ListDevicePositionsResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Entries && { Entries: obj.Entries.map(function (item) { return ListDevicePositionsResponseEntryFilterSensitiveLog(item); }) }))); };
|
|
@@ -230,9 +235,6 @@ export var ListTrackersResponseFilterSensitiveLog = function (obj) { return (__a
|
|
|
230
235
|
export var UpdateMapRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
231
236
|
export var UpdateMapResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
232
237
|
export var SearchPlaceIndexForPositionRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING }))); };
|
|
233
|
-
export var PlaceGeometryFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Point && { Point: SENSITIVE_STRING }))); };
|
|
234
|
-
export var TimeZoneFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
235
|
-
export var PlaceFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Geometry && { Geometry: PlaceGeometryFilterSensitiveLog(obj.Geometry) }))); };
|
|
236
238
|
export var SearchForPositionResultFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Place && { Place: PlaceFilterSensitiveLog(obj.Place) }))); };
|
|
237
239
|
export var SearchPlaceIndexForPositionSummaryFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Position && { Position: SENSITIVE_STRING }))); };
|
|
238
240
|
export var SearchPlaceIndexForPositionResponseFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Summary && { Summary: SearchPlaceIndexForPositionSummaryFilterSensitiveLog(obj.Summary) })), (obj.Results && { Results: obj.Results.map(function (item) { return SearchForPositionResultFilterSensitiveLog(item); }) }))); };
|
|
@@ -1092,6 +1092,43 @@ export var serializeAws_restJson1GetMapTileCommand = function (input, context) {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
});
|
|
1094
1094
|
}); };
|
|
1095
|
+
export var serializeAws_restJson1GetPlaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1096
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body, resolvedHostname;
|
|
1097
|
+
return __generator(this, function (_c) {
|
|
1098
|
+
switch (_c.label) {
|
|
1099
|
+
case 0: return [4, context.endpoint()];
|
|
1100
|
+
case 1:
|
|
1101
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1102
|
+
headers = {};
|
|
1103
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
1104
|
+
"/places/v0/indexes/{IndexName}/places/{PlaceId}";
|
|
1105
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IndexName", function () { return input.IndexName; }, "{IndexName}", false);
|
|
1106
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "PlaceId", function () { return input.PlaceId; }, "{PlaceId}", false);
|
|
1107
|
+
query = map({
|
|
1108
|
+
language: [, input.Language],
|
|
1109
|
+
});
|
|
1110
|
+
return [4, context.endpoint()];
|
|
1111
|
+
case 2:
|
|
1112
|
+
resolvedHostname = (_c.sent()).hostname;
|
|
1113
|
+
if (context.disableHostPrefix !== true) {
|
|
1114
|
+
resolvedHostname = "places." + resolvedHostname;
|
|
1115
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
1116
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
return [2, new __HttpRequest({
|
|
1120
|
+
protocol: protocol,
|
|
1121
|
+
hostname: resolvedHostname,
|
|
1122
|
+
port: port,
|
|
1123
|
+
method: "GET",
|
|
1124
|
+
headers: headers,
|
|
1125
|
+
path: resolvedPath,
|
|
1126
|
+
query: query,
|
|
1127
|
+
body: body,
|
|
1128
|
+
})];
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
}); };
|
|
1095
1132
|
export var serializeAws_restJson1ListDevicePositionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1096
1133
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
|
|
1097
1134
|
return __generator(this, function (_c) {
|
|
@@ -4243,6 +4280,78 @@ var deserializeAws_restJson1GetMapTileCommandError = function (output, context)
|
|
|
4243
4280
|
}
|
|
4244
4281
|
});
|
|
4245
4282
|
}); };
|
|
4283
|
+
export var deserializeAws_restJson1GetPlaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4284
|
+
var contents, data, _a, _b;
|
|
4285
|
+
return __generator(this, function (_c) {
|
|
4286
|
+
switch (_c.label) {
|
|
4287
|
+
case 0:
|
|
4288
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4289
|
+
return [2, deserializeAws_restJson1GetPlaceCommandError(output, context)];
|
|
4290
|
+
}
|
|
4291
|
+
contents = map({
|
|
4292
|
+
$metadata: deserializeMetadata(output),
|
|
4293
|
+
});
|
|
4294
|
+
_a = __expectNonNull;
|
|
4295
|
+
_b = __expectObject;
|
|
4296
|
+
return [4, parseBody(output.body, context)];
|
|
4297
|
+
case 1:
|
|
4298
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
4299
|
+
if (data.Place != null) {
|
|
4300
|
+
contents.Place = deserializeAws_restJson1Place(data.Place, context);
|
|
4301
|
+
}
|
|
4302
|
+
return [2, contents];
|
|
4303
|
+
}
|
|
4304
|
+
});
|
|
4305
|
+
}); };
|
|
4306
|
+
var deserializeAws_restJson1GetPlaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4307
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
4308
|
+
var _c;
|
|
4309
|
+
return __generator(this, function (_d) {
|
|
4310
|
+
switch (_d.label) {
|
|
4311
|
+
case 0:
|
|
4312
|
+
_a = [__assign({}, output)];
|
|
4313
|
+
_c = {};
|
|
4314
|
+
return [4, parseBody(output.body, context)];
|
|
4315
|
+
case 1:
|
|
4316
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
4317
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4318
|
+
_b = errorCode;
|
|
4319
|
+
switch (_b) {
|
|
4320
|
+
case "AccessDeniedException": return [3, 2];
|
|
4321
|
+
case "com.amazonaws.location#AccessDeniedException": return [3, 2];
|
|
4322
|
+
case "InternalServerException": return [3, 4];
|
|
4323
|
+
case "com.amazonaws.location#InternalServerException": return [3, 4];
|
|
4324
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
4325
|
+
case "com.amazonaws.location#ResourceNotFoundException": return [3, 6];
|
|
4326
|
+
case "ThrottlingException": return [3, 8];
|
|
4327
|
+
case "com.amazonaws.location#ThrottlingException": return [3, 8];
|
|
4328
|
+
case "ValidationException": return [3, 10];
|
|
4329
|
+
case "com.amazonaws.location#ValidationException": return [3, 10];
|
|
4330
|
+
}
|
|
4331
|
+
return [3, 12];
|
|
4332
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
4333
|
+
case 3: throw _d.sent();
|
|
4334
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
4335
|
+
case 5: throw _d.sent();
|
|
4336
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
4337
|
+
case 7: throw _d.sent();
|
|
4338
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
4339
|
+
case 9: throw _d.sent();
|
|
4340
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
4341
|
+
case 11: throw _d.sent();
|
|
4342
|
+
case 12:
|
|
4343
|
+
parsedBody = parsedOutput.body;
|
|
4344
|
+
throwDefaultError({
|
|
4345
|
+
output: output,
|
|
4346
|
+
parsedBody: parsedBody,
|
|
4347
|
+
exceptionCtor: __BaseException,
|
|
4348
|
+
errorCode: errorCode,
|
|
4349
|
+
});
|
|
4350
|
+
_d.label = 13;
|
|
4351
|
+
case 13: return [2];
|
|
4352
|
+
}
|
|
4353
|
+
});
|
|
4354
|
+
}); };
|
|
4246
4355
|
export var deserializeAws_restJson1ListDevicePositionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4247
4356
|
var contents, data, _a, _b;
|
|
4248
4357
|
return __generator(this, function (_c) {
|
|
@@ -6388,6 +6497,8 @@ var deserializeAws_restJson1Place = function (output, context) {
|
|
|
6388
6497
|
Street: __expectString(output.Street),
|
|
6389
6498
|
SubRegion: __expectString(output.SubRegion),
|
|
6390
6499
|
TimeZone: output.TimeZone != null ? deserializeAws_restJson1TimeZone(output.TimeZone, context) : undefined,
|
|
6500
|
+
UnitNumber: __expectString(output.UnitNumber),
|
|
6501
|
+
UnitType: __expectString(output.UnitType),
|
|
6391
6502
|
};
|
|
6392
6503
|
};
|
|
6393
6504
|
var deserializeAws_restJson1PlaceGeometry = function (output, context) {
|
|
@@ -6471,6 +6582,7 @@ var deserializeAws_restJson1SearchForPositionResult = function (output, context)
|
|
|
6471
6582
|
return {
|
|
6472
6583
|
Distance: __limitedParseDouble(output.Distance),
|
|
6473
6584
|
Place: output.Place != null ? deserializeAws_restJson1Place(output.Place, context) : undefined,
|
|
6585
|
+
PlaceId: __expectString(output.PlaceId),
|
|
6474
6586
|
};
|
|
6475
6587
|
};
|
|
6476
6588
|
var deserializeAws_restJson1SearchForPositionResultList = function (output, context) {
|
|
@@ -6486,6 +6598,7 @@ var deserializeAws_restJson1SearchForPositionResultList = function (output, cont
|
|
|
6486
6598
|
};
|
|
6487
6599
|
var deserializeAws_restJson1SearchForSuggestionsResult = function (output, context) {
|
|
6488
6600
|
return {
|
|
6601
|
+
PlaceId: __expectString(output.PlaceId),
|
|
6489
6602
|
Text: __expectString(output.Text),
|
|
6490
6603
|
};
|
|
6491
6604
|
};
|
|
@@ -6504,6 +6617,7 @@ var deserializeAws_restJson1SearchForTextResult = function (output, context) {
|
|
|
6504
6617
|
return {
|
|
6505
6618
|
Distance: __limitedParseDouble(output.Distance),
|
|
6506
6619
|
Place: output.Place != null ? deserializeAws_restJson1Place(output.Place, context) : undefined,
|
|
6620
|
+
PlaceId: __expectString(output.PlaceId),
|
|
6507
6621
|
Relevance: __limitedParseDouble(output.Relevance),
|
|
6508
6622
|
};
|
|
6509
6623
|
};
|
package/dist-types/Location.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import { GetMapGlyphsCommandInput, GetMapGlyphsCommandOutput } from "./commands/
|
|
|
31
31
|
import { GetMapSpritesCommandInput, GetMapSpritesCommandOutput } from "./commands/GetMapSpritesCommand";
|
|
32
32
|
import { GetMapStyleDescriptorCommandInput, GetMapStyleDescriptorCommandOutput } from "./commands/GetMapStyleDescriptorCommand";
|
|
33
33
|
import { GetMapTileCommandInput, GetMapTileCommandOutput } from "./commands/GetMapTileCommand";
|
|
34
|
+
import { GetPlaceCommandInput, GetPlaceCommandOutput } from "./commands/GetPlaceCommand";
|
|
34
35
|
import { ListDevicePositionsCommandInput, ListDevicePositionsCommandOutput } from "./commands/ListDevicePositionsCommand";
|
|
35
36
|
import { ListGeofenceCollectionsCommandInput, ListGeofenceCollectionsCommandOutput } from "./commands/ListGeofenceCollectionsCommand";
|
|
36
37
|
import { ListGeofencesCommandInput, ListGeofencesCommandOutput } from "./commands/ListGeofencesCommand";
|
|
@@ -445,6 +446,28 @@ export declare class Location extends LocationClient {
|
|
|
445
446
|
getMapTile(args: GetMapTileCommandInput, options?: __HttpHandlerOptions): Promise<GetMapTileCommandOutput>;
|
|
446
447
|
getMapTile(args: GetMapTileCommandInput, cb: (err: any, data?: GetMapTileCommandOutput) => void): void;
|
|
447
448
|
getMapTile(args: GetMapTileCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetMapTileCommandOutput) => void): void;
|
|
449
|
+
/**
|
|
450
|
+
* <p>Finds a place by its unique ID. A <code>PlaceId</code> is returned by other search
|
|
451
|
+
* operations.</p>
|
|
452
|
+
* <note>
|
|
453
|
+
* <p>A PlaceId is valid only if all of the following are the same in the original
|
|
454
|
+
* search request and the call to <code>GetPlace</code>.</p>
|
|
455
|
+
* <ul>
|
|
456
|
+
* <li>
|
|
457
|
+
* <p>Customer AWS account</p>
|
|
458
|
+
* </li>
|
|
459
|
+
* <li>
|
|
460
|
+
* <p>AWS Region</p>
|
|
461
|
+
* </li>
|
|
462
|
+
* <li>
|
|
463
|
+
* <p>Data provider specified in the place index resource</p>
|
|
464
|
+
* </li>
|
|
465
|
+
* </ul>
|
|
466
|
+
* </note>
|
|
467
|
+
*/
|
|
468
|
+
getPlace(args: GetPlaceCommandInput, options?: __HttpHandlerOptions): Promise<GetPlaceCommandOutput>;
|
|
469
|
+
getPlace(args: GetPlaceCommandInput, cb: (err: any, data?: GetPlaceCommandOutput) => void): void;
|
|
470
|
+
getPlace(args: GetPlaceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPlaceCommandOutput) => void): void;
|
|
448
471
|
/**
|
|
449
472
|
* <p>A batch request to retrieve all device positions.</p>
|
|
450
473
|
*/
|