@aws-sdk/client-geo-maps 3.683.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.
Files changed (99) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +273 -0
  3. package/dist-cjs/GeoMaps.js +21 -0
  4. package/dist-cjs/GeoMapsClient.js +50 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  7. package/dist-cjs/commands/GetGlyphsCommand.js +26 -0
  8. package/dist-cjs/commands/GetSpritesCommand.js +26 -0
  9. package/dist-cjs/commands/GetStaticMapCommand.js +27 -0
  10. package/dist-cjs/commands/GetStyleDescriptorCommand.js +27 -0
  11. package/dist-cjs/commands/GetTileCommand.js +27 -0
  12. package/dist-cjs/commands/index.js +8 -0
  13. package/dist-cjs/endpoint/EndpointParameters.js +18 -0
  14. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  15. package/dist-cjs/endpoint/ruleset.js +7 -0
  16. package/dist-cjs/extensionConfiguration.js +2 -0
  17. package/dist-cjs/index.js +10 -0
  18. package/dist-cjs/models/GeoMapsServiceException.js +12 -0
  19. package/dist-cjs/models/index.js +4 -0
  20. package/dist-cjs/models/models_0.js +110 -0
  21. package/dist-cjs/protocols/Aws_restJson1.js +307 -0
  22. package/dist-cjs/runtimeConfig.browser.js +39 -0
  23. package/dist-cjs/runtimeConfig.js +50 -0
  24. package/dist-cjs/runtimeConfig.native.js +15 -0
  25. package/dist-cjs/runtimeConfig.shared.js +34 -0
  26. package/dist-cjs/runtimeExtensions.js +25 -0
  27. package/dist-es/GeoMaps.js +17 -0
  28. package/dist-es/GeoMapsClient.js +46 -0
  29. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  30. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  31. package/dist-es/commands/GetGlyphsCommand.js +22 -0
  32. package/dist-es/commands/GetSpritesCommand.js +22 -0
  33. package/dist-es/commands/GetStaticMapCommand.js +23 -0
  34. package/dist-es/commands/GetStyleDescriptorCommand.js +23 -0
  35. package/dist-es/commands/GetTileCommand.js +23 -0
  36. package/dist-es/commands/index.js +5 -0
  37. package/dist-es/endpoint/EndpointParameters.js +14 -0
  38. package/dist-es/endpoint/endpointResolver.js +14 -0
  39. package/dist-es/endpoint/ruleset.js +4 -0
  40. package/dist-es/extensionConfiguration.js +1 -0
  41. package/dist-es/index.js +5 -0
  42. package/dist-es/models/GeoMapsServiceException.js +8 -0
  43. package/dist-es/models/index.js +1 -0
  44. package/dist-es/models/models_0.js +100 -0
  45. package/dist-es/protocols/Aws_restJson1.js +294 -0
  46. package/dist-es/runtimeConfig.browser.js +34 -0
  47. package/dist-es/runtimeConfig.js +45 -0
  48. package/dist-es/runtimeConfig.native.js +11 -0
  49. package/dist-es/runtimeConfig.shared.js +30 -0
  50. package/dist-es/runtimeExtensions.js +21 -0
  51. package/dist-types/GeoMaps.d.ts +73 -0
  52. package/dist-types/GeoMapsClient.d.ts +202 -0
  53. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  54. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  55. package/dist-types/commands/GetGlyphsCommand.d.ts +82 -0
  56. package/dist-types/commands/GetSpritesCommand.d.ts +84 -0
  57. package/dist-types/commands/GetStaticMapCommand.d.ts +107 -0
  58. package/dist-types/commands/GetStyleDescriptorCommand.d.ts +84 -0
  59. package/dist-types/commands/GetTileCommand.d.ts +98 -0
  60. package/dist-types/commands/index.d.ts +5 -0
  61. package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
  62. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  63. package/dist-types/endpoint/ruleset.d.ts +2 -0
  64. package/dist-types/extensionConfiguration.d.ts +9 -0
  65. package/dist-types/index.d.ts +41 -0
  66. package/dist-types/models/GeoMapsServiceException.d.ts +14 -0
  67. package/dist-types/models/index.d.ts +1 -0
  68. package/dist-types/models/models_0.d.ts +892 -0
  69. package/dist-types/protocols/Aws_restJson1.d.ts +47 -0
  70. package/dist-types/runtimeConfig.browser.d.ts +48 -0
  71. package/dist-types/runtimeConfig.d.ts +48 -0
  72. package/dist-types/runtimeConfig.native.d.ts +47 -0
  73. package/dist-types/runtimeConfig.shared.d.ts +21 -0
  74. package/dist-types/runtimeExtensions.d.ts +17 -0
  75. package/dist-types/ts3.4/GeoMaps.d.ts +90 -0
  76. package/dist-types/ts3.4/GeoMapsClient.d.ts +148 -0
  77. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  78. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  79. package/dist-types/ts3.4/commands/GetGlyphsCommand.d.ts +54 -0
  80. package/dist-types/ts3.4/commands/GetSpritesCommand.d.ts +54 -0
  81. package/dist-types/ts3.4/commands/GetStaticMapCommand.d.ts +54 -0
  82. package/dist-types/ts3.4/commands/GetStyleDescriptorCommand.d.ts +58 -0
  83. package/dist-types/ts3.4/commands/GetTileCommand.d.ts +50 -0
  84. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  85. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  86. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  87. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  88. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  89. package/dist-types/ts3.4/index.d.ts +8 -0
  90. package/dist-types/ts3.4/models/GeoMapsServiceException.d.ts +9 -0
  91. package/dist-types/ts3.4/models/index.d.ts +1 -0
  92. package/dist-types/ts3.4/models/models_0.d.ts +160 -0
  93. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +65 -0
  94. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
  95. package/dist-types/ts3.4/runtimeConfig.d.ts +94 -0
  96. package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
  97. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
  98. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  99. package/package.json +102 -0
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetSpritesCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
10
+ class GetSpritesCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep(EndpointParameters_1.commonParams)
13
+ .m(function (Command, cs, config, o) {
14
+ return [
15
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
16
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
17
+ ];
18
+ })
19
+ .s("MapsService", "GetSprites", {})
20
+ .n("GeoMapsClient", "GetSpritesCommand")
21
+ .f(void 0, void 0)
22
+ .ser(Aws_restJson1_1.se_GetSpritesCommand)
23
+ .de(Aws_restJson1_1.de_GetSpritesCommand)
24
+ .build() {
25
+ }
26
+ exports.GetSpritesCommand = GetSpritesCommand;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetStaticMapCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
+ const models_0_1 = require("../models/models_0");
10
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
11
+ class GetStaticMapCommand extends smithy_client_1.Command
12
+ .classBuilder()
13
+ .ep(EndpointParameters_1.commonParams)
14
+ .m(function (Command, cs, config, o) {
15
+ return [
16
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
17
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
18
+ ];
19
+ })
20
+ .s("MapsService", "GetStaticMap", {})
21
+ .n("GeoMapsClient", "GetStaticMapCommand")
22
+ .f(models_0_1.GetStaticMapRequestFilterSensitiveLog, void 0)
23
+ .ser(Aws_restJson1_1.se_GetStaticMapCommand)
24
+ .de(Aws_restJson1_1.de_GetStaticMapCommand)
25
+ .build() {
26
+ }
27
+ exports.GetStaticMapCommand = GetStaticMapCommand;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetStyleDescriptorCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
+ const models_0_1 = require("../models/models_0");
10
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
11
+ class GetStyleDescriptorCommand extends smithy_client_1.Command
12
+ .classBuilder()
13
+ .ep(EndpointParameters_1.commonParams)
14
+ .m(function (Command, cs, config, o) {
15
+ return [
16
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
17
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
18
+ ];
19
+ })
20
+ .s("MapsService", "GetStyleDescriptor", {})
21
+ .n("GeoMapsClient", "GetStyleDescriptorCommand")
22
+ .f(models_0_1.GetStyleDescriptorRequestFilterSensitiveLog, void 0)
23
+ .ser(Aws_restJson1_1.se_GetStyleDescriptorCommand)
24
+ .de(Aws_restJson1_1.de_GetStyleDescriptorCommand)
25
+ .build() {
26
+ }
27
+ exports.GetStyleDescriptorCommand = GetStyleDescriptorCommand;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetTileCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
+ const models_0_1 = require("../models/models_0");
10
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
11
+ class GetTileCommand extends smithy_client_1.Command
12
+ .classBuilder()
13
+ .ep(EndpointParameters_1.commonParams)
14
+ .m(function (Command, cs, config, o) {
15
+ return [
16
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
17
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
18
+ ];
19
+ })
20
+ .s("MapsService", "GetTile", {})
21
+ .n("GeoMapsClient", "GetTileCommand")
22
+ .f(models_0_1.GetTileRequestFilterSensitiveLog, void 0)
23
+ .ser(Aws_restJson1_1.se_GetTileCommand)
24
+ .de(Aws_restJson1_1.de_GetTileCommand)
25
+ .build() {
26
+ }
27
+ exports.GetTileCommand = GetTileCommand;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./GetGlyphsCommand"), exports);
5
+ tslib_1.__exportStar(require("./GetSpritesCommand"), exports);
6
+ tslib_1.__exportStar(require("./GetStaticMapCommand"), exports);
7
+ tslib_1.__exportStar(require("./GetStyleDescriptorCommand"), exports);
8
+ tslib_1.__exportStar(require("./GetTileCommand"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonParams = exports.resolveClientEndpointParameters = void 0;
4
+ const resolveClientEndpointParameters = (options) => {
5
+ return {
6
+ ...options,
7
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
8
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
9
+ defaultSigningName: "geo-maps",
10
+ };
11
+ };
12
+ exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
13
+ exports.commonParams = {
14
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
15
+ Endpoint: { type: "builtInParams", name: "endpoint" },
16
+ Region: { type: "builtInParams", name: "region" },
17
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultEndpointResolver = void 0;
4
+ const util_endpoints_1 = require("@aws-sdk/util-endpoints");
5
+ const util_endpoints_2 = require("@smithy/util-endpoints");
6
+ const ruleset_1 = require("./ruleset");
7
+ const cache = new util_endpoints_2.EndpointCache({
8
+ size: 50,
9
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
10
+ });
11
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
12
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
13
+ endpointParams: endpointParams,
14
+ logger: context.logger,
15
+ }));
16
+ };
17
+ exports.defaultEndpointResolver = defaultEndpointResolver;
18
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ruleSet = void 0;
4
+ const u = "required", v = "fn", w = "argv", x = "ref";
5
+ const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [u]: true, "default": false, "type": "Boolean" }, i = { [u]: false, "type": "String" }, j = { [x]: "Endpoint" }, k = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, l = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, m = {}, n = { [v]: "stringEquals", [w]: [{ [v]: "getAttr", [w]: [{ [x]: g }, "name"] }, "aws"] }, o = { [v]: c, [w]: [{ [x]: "UseFIPS" }, false] }, p = { [v]: c, [w]: [{ [x]: "UseDualStack" }, false] }, q = { [v]: "stringEquals", [w]: [{ [v]: "getAttr", [w]: [{ [x]: g }, "name"] }, "aws-us-gov"] }, r = { [v]: "getAttr", [w]: [{ [x]: g }, "supportsFIPS"] }, s = { [v]: c, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: g }, "supportsDualStack"] }] }, t = [{ [x]: "Region" }];
6
+ const _data = { version: "1.0", parameters: { UseDualStack: h, UseFIPS: h, Endpoint: i, Region: i }, rules: [{ conditions: [{ [v]: b, [w]: [j] }], rules: [{ conditions: [k], error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: [l], error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [n, o, p], endpoint: { url: "https://maps.geo.{Region}.{PartitionResult#dnsSuffix}/v2", properties: m, headers: m }, type: e }, { conditions: [n, k, l], endpoint: { url: "https://maps.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2", properties: m, headers: m }, type: e }, { conditions: [n, k, p], endpoint: { url: "https://maps.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2", properties: m, headers: m }, type: e }, { conditions: [n, o, l], endpoint: { url: "https://maps.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2", properties: m, headers: m }, type: e }, { conditions: [q, o, p], endpoint: { url: "https://maps.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2", properties: m, headers: m }, type: e }, { conditions: [q, k, l], endpoint: { url: "https://maps.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2", properties: m, headers: m }, type: e }, { conditions: [q, k, p], endpoint: { url: "https://maps.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2", properties: m, headers: m }, type: e }, { conditions: [q, o, l], endpoint: { url: "https://maps.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2", properties: m, headers: m }, type: e }, { conditions: [k, l], rules: [{ conditions: [{ [v]: c, [w]: [a, r] }, s], rules: [{ endpoint: { url: "https://geo-maps-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: [k, p], rules: [{ conditions: [{ [v]: c, [w]: [r, a] }], rules: [{ endpoint: { url: "https://geo-maps-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: [o, l], rules: [{ conditions: [s], rules: [{ endpoint: { url: "https://geo-maps.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://geo-maps.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
7
+ exports.ruleSet = _data;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeoMapsServiceException = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./GeoMapsClient"), exports);
6
+ tslib_1.__exportStar(require("./GeoMaps"), exports);
7
+ tslib_1.__exportStar(require("./commands"), exports);
8
+ tslib_1.__exportStar(require("./models"), exports);
9
+ var GeoMapsServiceException_1 = require("./models/GeoMapsServiceException");
10
+ Object.defineProperty(exports, "GeoMapsServiceException", { enumerable: true, get: function () { return GeoMapsServiceException_1.GeoMapsServiceException; } });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeoMapsServiceException = exports.__ServiceException = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
+ class GeoMapsServiceException extends smithy_client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, GeoMapsServiceException.prototype);
10
+ }
11
+ }
12
+ exports.GeoMapsServiceException = GeoMapsServiceException;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./models_0"), exports);
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetTileRequestFilterSensitiveLog = exports.GetStyleDescriptorRequestFilterSensitiveLog = exports.GetStaticMapRequestFilterSensitiveLog = exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.InternalServerException = exports.StaticMapStyle = exports.ScaleBarUnit = exports.Variant = exports.MapStyle = exports.ColorScheme = exports.AccessDeniedException = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ const GeoMapsServiceException_1 = require("./GeoMapsServiceException");
6
+ class AccessDeniedException extends GeoMapsServiceException_1.GeoMapsServiceException {
7
+ constructor(opts) {
8
+ super({
9
+ name: "AccessDeniedException",
10
+ $fault: "client",
11
+ ...opts,
12
+ });
13
+ this.name = "AccessDeniedException";
14
+ this.$fault = "client";
15
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
16
+ this.Message = opts.Message;
17
+ }
18
+ }
19
+ exports.AccessDeniedException = AccessDeniedException;
20
+ exports.ColorScheme = {
21
+ DARK: "Dark",
22
+ LIGHT: "Light",
23
+ };
24
+ exports.MapStyle = {
25
+ HYBRID: "Hybrid",
26
+ MONOCHROME: "Monochrome",
27
+ SATELLITE: "Satellite",
28
+ STANDARD: "Standard",
29
+ };
30
+ exports.Variant = {
31
+ DEFAULT: "Default",
32
+ };
33
+ exports.ScaleBarUnit = {
34
+ KILOMETERS: "Kilometers",
35
+ KILOMETERS_MILES: "KilometersMiles",
36
+ MILES: "Miles",
37
+ MILES_KILOMETERS: "MilesKilometers",
38
+ };
39
+ exports.StaticMapStyle = {
40
+ SATELLITE: "Satellite",
41
+ };
42
+ class InternalServerException extends GeoMapsServiceException_1.GeoMapsServiceException {
43
+ constructor(opts) {
44
+ super({
45
+ name: "InternalServerException",
46
+ $fault: "server",
47
+ ...opts,
48
+ });
49
+ this.name = "InternalServerException";
50
+ this.$fault = "server";
51
+ this.$retryable = {};
52
+ Object.setPrototypeOf(this, InternalServerException.prototype);
53
+ this.Message = opts.Message;
54
+ }
55
+ }
56
+ exports.InternalServerException = InternalServerException;
57
+ class ThrottlingException extends GeoMapsServiceException_1.GeoMapsServiceException {
58
+ constructor(opts) {
59
+ super({
60
+ name: "ThrottlingException",
61
+ $fault: "client",
62
+ ...opts,
63
+ });
64
+ this.name = "ThrottlingException";
65
+ this.$fault = "client";
66
+ this.$retryable = {};
67
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
68
+ this.Message = opts.Message;
69
+ }
70
+ }
71
+ exports.ThrottlingException = ThrottlingException;
72
+ exports.ValidationExceptionReason = {
73
+ CANNOT_PARSE: "CannotParse",
74
+ FIELD_VALIDATION_FAILED: "FieldValidationFailed",
75
+ MISSING: "Missing",
76
+ OTHER: "Other",
77
+ UNKNOWN_FIELD: "UnknownField",
78
+ UNKNOWN_OPERATION: "UnknownOperation",
79
+ };
80
+ class ValidationException extends GeoMapsServiceException_1.GeoMapsServiceException {
81
+ constructor(opts) {
82
+ super({
83
+ name: "ValidationException",
84
+ $fault: "client",
85
+ ...opts,
86
+ });
87
+ this.name = "ValidationException";
88
+ this.$fault = "client";
89
+ Object.setPrototypeOf(this, ValidationException.prototype);
90
+ this.Message = opts.Message;
91
+ this.Reason = opts.Reason;
92
+ this.FieldList = opts.FieldList;
93
+ }
94
+ }
95
+ exports.ValidationException = ValidationException;
96
+ const GetStaticMapRequestFilterSensitiveLog = (obj) => ({
97
+ ...obj,
98
+ ...(obj.Key && { Key: smithy_client_1.SENSITIVE_STRING }),
99
+ });
100
+ exports.GetStaticMapRequestFilterSensitiveLog = GetStaticMapRequestFilterSensitiveLog;
101
+ const GetStyleDescriptorRequestFilterSensitiveLog = (obj) => ({
102
+ ...obj,
103
+ ...(obj.Key && { Key: smithy_client_1.SENSITIVE_STRING }),
104
+ });
105
+ exports.GetStyleDescriptorRequestFilterSensitiveLog = GetStyleDescriptorRequestFilterSensitiveLog;
106
+ const GetTileRequestFilterSensitiveLog = (obj) => ({
107
+ ...obj,
108
+ ...(obj.Key && { Key: smithy_client_1.SENSITIVE_STRING }),
109
+ });
110
+ exports.GetTileRequestFilterSensitiveLog = GetTileRequestFilterSensitiveLog;
@@ -0,0 +1,307 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.de_GetTileCommand = exports.de_GetStyleDescriptorCommand = exports.de_GetStaticMapCommand = exports.de_GetSpritesCommand = exports.de_GetGlyphsCommand = exports.se_GetTileCommand = exports.se_GetStyleDescriptorCommand = exports.se_GetStaticMapCommand = exports.se_GetSpritesCommand = exports.se_GetGlyphsCommand = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const core_2 = require("@smithy/core");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const GeoMapsServiceException_1 = require("../models/GeoMapsServiceException");
8
+ const models_0_1 = require("../models/models_0");
9
+ const se_GetGlyphsCommand = async (input, context) => {
10
+ const b = (0, core_2.requestBuilder)(input, context);
11
+ const headers = {};
12
+ b.bp("/glyphs/{FontStack}/{FontUnicodeRange}");
13
+ b.p("FontStack", () => input.FontStack, "{FontStack}", false);
14
+ b.p("FontUnicodeRange", () => input.FontUnicodeRange, "{FontUnicodeRange}", false);
15
+ let body;
16
+ b.m("GET").h(headers).b(body);
17
+ return b.build();
18
+ };
19
+ exports.se_GetGlyphsCommand = se_GetGlyphsCommand;
20
+ const se_GetSpritesCommand = async (input, context) => {
21
+ const b = (0, core_2.requestBuilder)(input, context);
22
+ const headers = {};
23
+ b.bp("/styles/{Style}/{ColorScheme}/{Variant}/sprites/{FileName}");
24
+ b.p("FileName", () => input.FileName, "{FileName}", false);
25
+ b.p("Style", () => input.Style, "{Style}", false);
26
+ b.p("ColorScheme", () => input.ColorScheme, "{ColorScheme}", false);
27
+ b.p("Variant", () => input.Variant, "{Variant}", false);
28
+ let body;
29
+ b.m("GET").h(headers).b(body);
30
+ return b.build();
31
+ };
32
+ exports.se_GetSpritesCommand = se_GetSpritesCommand;
33
+ const se_GetStaticMapCommand = async (input, context) => {
34
+ const b = (0, core_2.requestBuilder)(input, context);
35
+ const headers = {};
36
+ b.bp("/static/{FileName}");
37
+ b.p("FileName", () => input.FileName, "{FileName}", false);
38
+ const query = (0, smithy_client_1.map)({
39
+ [_bb]: [, input[_BB]],
40
+ [_bp]: [, input[_BP]],
41
+ [_c]: [, input[_C]],
42
+ [_co]: [, input[_CO]],
43
+ [_go]: [, input[_GJO]],
44
+ [_h]: [(0, smithy_client_1.expectNonNull)(input.Height, `Height`) != null, () => input[_H].toString()],
45
+ [_k]: [, input[_K]],
46
+ [_p]: [() => input.Padding !== void 0, () => input[_P].toString()],
47
+ [_r]: [() => input.Radius !== void 0, () => input[_R].toString()],
48
+ [_su]: [, input[_SBU]],
49
+ [_s]: [, input[_S]],
50
+ [_w]: [(0, smithy_client_1.expectNonNull)(input.Width, `Width`) != null, () => input[_W].toString()],
51
+ [_z]: [() => input.Zoom !== void 0, () => (input[_Z] % 1 == 0 ? input[_Z] + ".0" : input[_Z].toString())],
52
+ });
53
+ let body;
54
+ b.m("GET").h(headers).q(query).b(body);
55
+ return b.build();
56
+ };
57
+ exports.se_GetStaticMapCommand = se_GetStaticMapCommand;
58
+ const se_GetStyleDescriptorCommand = async (input, context) => {
59
+ const b = (0, core_2.requestBuilder)(input, context);
60
+ const headers = {};
61
+ b.bp("/styles/{Style}/descriptor");
62
+ b.p("Style", () => input.Style, "{Style}", false);
63
+ const query = (0, smithy_client_1.map)({
64
+ [_cs]: [, input[_CS]],
65
+ [_pv]: [, input[_PV]],
66
+ [_k]: [, input[_K]],
67
+ });
68
+ let body;
69
+ b.m("GET").h(headers).q(query).b(body);
70
+ return b.build();
71
+ };
72
+ exports.se_GetStyleDescriptorCommand = se_GetStyleDescriptorCommand;
73
+ const se_GetTileCommand = async (input, context) => {
74
+ const b = (0, core_2.requestBuilder)(input, context);
75
+ const headers = {};
76
+ b.bp("/tiles/{Tileset}/{Z}/{X}/{Y}");
77
+ b.p("Tileset", () => input.Tileset, "{Tileset}", false);
78
+ b.p("Z", () => input.Z, "{Z}", false);
79
+ b.p("X", () => input.X, "{X}", false);
80
+ b.p("Y", () => input.Y, "{Y}", false);
81
+ const query = (0, smithy_client_1.map)({
82
+ [_k]: [, input[_K]],
83
+ });
84
+ let body;
85
+ b.m("GET").h(headers).q(query).b(body);
86
+ return b.build();
87
+ };
88
+ exports.se_GetTileCommand = se_GetTileCommand;
89
+ const de_GetGlyphsCommand = async (output, context) => {
90
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
91
+ return de_CommandError(output, context);
92
+ }
93
+ const contents = (0, smithy_client_1.map)({
94
+ $metadata: deserializeMetadata(output),
95
+ [_CT]: [, output.headers[_ct]],
96
+ [_CC]: [, output.headers[_cc]],
97
+ [_ET]: [, output.headers[_e]],
98
+ });
99
+ const data = await (0, smithy_client_1.collectBody)(output.body, context);
100
+ contents.Blob = data;
101
+ return contents;
102
+ };
103
+ exports.de_GetGlyphsCommand = de_GetGlyphsCommand;
104
+ const de_GetSpritesCommand = async (output, context) => {
105
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
106
+ return de_CommandError(output, context);
107
+ }
108
+ const contents = (0, smithy_client_1.map)({
109
+ $metadata: deserializeMetadata(output),
110
+ [_CT]: [, output.headers[_ct]],
111
+ [_CC]: [, output.headers[_cc]],
112
+ [_ET]: [, output.headers[_e]],
113
+ });
114
+ const data = await (0, smithy_client_1.collectBody)(output.body, context);
115
+ contents.Blob = data;
116
+ return contents;
117
+ };
118
+ exports.de_GetSpritesCommand = de_GetSpritesCommand;
119
+ const de_GetStaticMapCommand = async (output, context) => {
120
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
121
+ return de_CommandError(output, context);
122
+ }
123
+ const contents = (0, smithy_client_1.map)({
124
+ $metadata: deserializeMetadata(output),
125
+ [_CT]: [, output.headers[_ct]],
126
+ [_CC]: [, output.headers[_cc]],
127
+ [_ET]: [, output.headers[_e]],
128
+ [_PB]: [, output.headers[_xagpb]],
129
+ });
130
+ const data = await (0, smithy_client_1.collectBody)(output.body, context);
131
+ contents.Blob = data;
132
+ return contents;
133
+ };
134
+ exports.de_GetStaticMapCommand = de_GetStaticMapCommand;
135
+ const de_GetStyleDescriptorCommand = async (output, context) => {
136
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
137
+ return de_CommandError(output, context);
138
+ }
139
+ const contents = (0, smithy_client_1.map)({
140
+ $metadata: deserializeMetadata(output),
141
+ [_CT]: [, output.headers[_ct]],
142
+ [_CC]: [, output.headers[_cc]],
143
+ [_ET]: [, output.headers[_e]],
144
+ });
145
+ const data = await (0, smithy_client_1.collectBody)(output.body, context);
146
+ contents.Blob = data;
147
+ return contents;
148
+ };
149
+ exports.de_GetStyleDescriptorCommand = de_GetStyleDescriptorCommand;
150
+ const de_GetTileCommand = async (output, context) => {
151
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
152
+ return de_CommandError(output, context);
153
+ }
154
+ const contents = (0, smithy_client_1.map)({
155
+ $metadata: deserializeMetadata(output),
156
+ [_CT]: [, output.headers[_ct]],
157
+ [_CC]: [, output.headers[_cc]],
158
+ [_ET]: [, output.headers[_e]],
159
+ [_PB]: [, output.headers[_xagpb]],
160
+ });
161
+ const data = await (0, smithy_client_1.collectBody)(output.body, context);
162
+ contents.Blob = data;
163
+ return contents;
164
+ };
165
+ exports.de_GetTileCommand = de_GetTileCommand;
166
+ const de_CommandError = async (output, context) => {
167
+ const parsedOutput = {
168
+ ...output,
169
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context),
170
+ };
171
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
172
+ switch (errorCode) {
173
+ case "AccessDeniedException":
174
+ case "com.amazonaws.geomaps#AccessDeniedException":
175
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
176
+ case "InternalServerException":
177
+ case "com.amazonaws.geomaps#InternalServerException":
178
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
179
+ case "ThrottlingException":
180
+ case "com.amazonaws.geomaps#ThrottlingException":
181
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
182
+ case "ValidationException":
183
+ case "com.amazonaws.geomaps#ValidationException":
184
+ throw await de_ValidationExceptionRes(parsedOutput, context);
185
+ default:
186
+ const parsedBody = parsedOutput.body;
187
+ return throwDefaultError({
188
+ output,
189
+ parsedBody,
190
+ errorCode,
191
+ });
192
+ }
193
+ };
194
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(GeoMapsServiceException_1.GeoMapsServiceException);
195
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
196
+ const contents = (0, smithy_client_1.map)({});
197
+ const data = parsedOutput.body;
198
+ const doc = (0, smithy_client_1.take)(data, {
199
+ Message: [, smithy_client_1.expectString, `message`],
200
+ });
201
+ Object.assign(contents, doc);
202
+ const exception = new models_0_1.AccessDeniedException({
203
+ $metadata: deserializeMetadata(parsedOutput),
204
+ ...contents,
205
+ });
206
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
207
+ };
208
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
209
+ const contents = (0, smithy_client_1.map)({});
210
+ const data = parsedOutput.body;
211
+ const doc = (0, smithy_client_1.take)(data, {
212
+ Message: [, smithy_client_1.expectString, `message`],
213
+ });
214
+ Object.assign(contents, doc);
215
+ const exception = new models_0_1.InternalServerException({
216
+ $metadata: deserializeMetadata(parsedOutput),
217
+ ...contents,
218
+ });
219
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
220
+ };
221
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
222
+ const contents = (0, smithy_client_1.map)({});
223
+ const data = parsedOutput.body;
224
+ const doc = (0, smithy_client_1.take)(data, {
225
+ Message: [, smithy_client_1.expectString, `message`],
226
+ });
227
+ Object.assign(contents, doc);
228
+ const exception = new models_0_1.ThrottlingException({
229
+ $metadata: deserializeMetadata(parsedOutput),
230
+ ...contents,
231
+ });
232
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
233
+ };
234
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
235
+ const contents = (0, smithy_client_1.map)({});
236
+ const data = parsedOutput.body;
237
+ const doc = (0, smithy_client_1.take)(data, {
238
+ FieldList: [, (_) => de_ValidationExceptionFieldList(_, context), `fieldList`],
239
+ Message: [, smithy_client_1.expectString, `message`],
240
+ Reason: [, smithy_client_1.expectString, `reason`],
241
+ });
242
+ Object.assign(contents, doc);
243
+ const exception = new models_0_1.ValidationException({
244
+ $metadata: deserializeMetadata(parsedOutput),
245
+ ...contents,
246
+ });
247
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
248
+ };
249
+ const de_ValidationExceptionField = (output, context) => {
250
+ return (0, smithy_client_1.take)(output, {
251
+ Message: [, smithy_client_1.expectString, `message`],
252
+ Name: [, smithy_client_1.expectString, `name`],
253
+ });
254
+ };
255
+ const de_ValidationExceptionFieldList = (output, context) => {
256
+ const retVal = (output || [])
257
+ .filter((e) => e != null)
258
+ .map((entry) => {
259
+ return de_ValidationExceptionField(entry, context);
260
+ });
261
+ return retVal;
262
+ };
263
+ const deserializeMetadata = (output) => ({
264
+ httpStatusCode: output.statusCode,
265
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
266
+ extendedRequestId: output.headers["x-amz-id-2"],
267
+ cfId: output.headers["x-amz-cf-id"],
268
+ });
269
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
270
+ const _BB = "BoundingBox";
271
+ const _BP = "BoundedPositions";
272
+ const _C = "Center";
273
+ const _CC = "CacheControl";
274
+ const _CO = "CompactOverlay";
275
+ const _CS = "ColorScheme";
276
+ const _CT = "ContentType";
277
+ const _ET = "ETag";
278
+ const _GJO = "GeoJsonOverlay";
279
+ const _H = "Height";
280
+ const _K = "Key";
281
+ const _P = "Padding";
282
+ const _PB = "PricingBucket";
283
+ const _PV = "PoliticalView";
284
+ const _R = "Radius";
285
+ const _S = "Style";
286
+ const _SBU = "ScaleBarUnit";
287
+ const _W = "Width";
288
+ const _Z = "Zoom";
289
+ const _bb = "bounding-box";
290
+ const _bp = "bounded-positions";
291
+ const _c = "center";
292
+ const _cc = "cache-control";
293
+ const _co = "compact-overlay";
294
+ const _cs = "color-scheme";
295
+ const _ct = "content-type";
296
+ const _e = "etag";
297
+ const _go = "geojson-overlay";
298
+ const _h = "height";
299
+ const _k = "key";
300
+ const _p = "padding";
301
+ const _pv = "political-view";
302
+ const _r = "radius";
303
+ const _s = "style";
304
+ const _su = "scale-unit";
305
+ const _w = "width";
306
+ const _xagpb = "x-amz-geo-pricing-bucket";
307
+ const _z = "zoom";