@aws-sdk/client-signer-data 3.995.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 (74) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +208 -0
  3. package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
  4. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  5. package/dist-cjs/endpoint/ruleset.js +7 -0
  6. package/dist-cjs/index.js +161 -0
  7. package/dist-cjs/models/SignerDataServiceException.js +12 -0
  8. package/dist-cjs/models/errors.js +64 -0
  9. package/dist-cjs/runtimeConfig.browser.js +38 -0
  10. package/dist-cjs/runtimeConfig.js +53 -0
  11. package/dist-cjs/runtimeConfig.native.js +15 -0
  12. package/dist-cjs/runtimeConfig.shared.js +43 -0
  13. package/dist-cjs/schemas/schemas_0.js +76 -0
  14. package/dist-es/SignerData.js +9 -0
  15. package/dist-es/SignerDataClient.js +50 -0
  16. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  17. package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
  18. package/dist-es/commands/GetRevocationStatusCommand.js +16 -0
  19. package/dist-es/commands/index.js +1 -0
  20. package/dist-es/endpoint/EndpointParameters.js +13 -0
  21. package/dist-es/endpoint/endpointResolver.js +14 -0
  22. package/dist-es/endpoint/ruleset.js +4 -0
  23. package/dist-es/extensionConfiguration.js +1 -0
  24. package/dist-es/index.js +7 -0
  25. package/dist-es/models/SignerDataServiceException.js +8 -0
  26. package/dist-es/models/errors.js +57 -0
  27. package/dist-es/models/models_0.js +1 -0
  28. package/dist-es/runtimeConfig.browser.js +33 -0
  29. package/dist-es/runtimeConfig.js +48 -0
  30. package/dist-es/runtimeConfig.native.js +11 -0
  31. package/dist-es/runtimeConfig.shared.js +39 -0
  32. package/dist-es/runtimeExtensions.js +9 -0
  33. package/dist-es/schemas/schemas_0.js +73 -0
  34. package/dist-types/SignerData.d.ts +17 -0
  35. package/dist-types/SignerDataClient.d.ts +188 -0
  36. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  37. package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
  38. package/dist-types/commands/GetRevocationStatusCommand.d.ts +115 -0
  39. package/dist-types/commands/index.d.ts +1 -0
  40. package/dist-types/endpoint/EndpointParameters.d.ts +50 -0
  41. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  42. package/dist-types/endpoint/ruleset.d.ts +2 -0
  43. package/dist-types/extensionConfiguration.d.ts +9 -0
  44. package/dist-types/index.d.ts +15 -0
  45. package/dist-types/models/SignerDataServiceException.d.ts +14 -0
  46. package/dist-types/models/errors.d.ts +54 -0
  47. package/dist-types/models/models_0.d.ts +42 -0
  48. package/dist-types/runtimeConfig.browser.d.ts +55 -0
  49. package/dist-types/runtimeConfig.d.ts +55 -0
  50. package/dist-types/runtimeConfig.native.d.ts +54 -0
  51. package/dist-types/runtimeConfig.shared.d.ts +27 -0
  52. package/dist-types/runtimeExtensions.d.ts +17 -0
  53. package/dist-types/schemas/schemas_0.d.ts +16 -0
  54. package/dist-types/ts3.4/SignerData.d.ts +24 -0
  55. package/dist-types/ts3.4/SignerDataClient.d.ts +123 -0
  56. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  57. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
  58. package/dist-types/ts3.4/commands/GetRevocationStatusCommand.d.ts +47 -0
  59. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  60. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  61. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  62. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  63. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  64. package/dist-types/ts3.4/index.d.ts +10 -0
  65. package/dist-types/ts3.4/models/SignerDataServiceException.d.ts +9 -0
  66. package/dist-types/ts3.4/models/errors.d.ts +34 -0
  67. package/dist-types/ts3.4/models/models_0.d.ts +10 -0
  68. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
  69. package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
  70. package/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
  71. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
  72. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  73. package/dist-types/ts3.4/schemas/schemas_0.d.ts +15 -0
  74. package/package.json +100 -0
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValidationException = exports.TooManyRequestsException = exports.InternalServiceErrorException = exports.AccessDeniedException = void 0;
4
+ const SignerDataServiceException_1 = require("./SignerDataServiceException");
5
+ class AccessDeniedException extends SignerDataServiceException_1.SignerDataServiceException {
6
+ name = "AccessDeniedException";
7
+ $fault = "client";
8
+ code;
9
+ constructor(opts) {
10
+ super({
11
+ name: "AccessDeniedException",
12
+ $fault: "client",
13
+ ...opts,
14
+ });
15
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
16
+ this.code = opts.code;
17
+ }
18
+ }
19
+ exports.AccessDeniedException = AccessDeniedException;
20
+ class InternalServiceErrorException extends SignerDataServiceException_1.SignerDataServiceException {
21
+ name = "InternalServiceErrorException";
22
+ $fault = "server";
23
+ code;
24
+ constructor(opts) {
25
+ super({
26
+ name: "InternalServiceErrorException",
27
+ $fault: "server",
28
+ ...opts,
29
+ });
30
+ Object.setPrototypeOf(this, InternalServiceErrorException.prototype);
31
+ this.code = opts.code;
32
+ }
33
+ }
34
+ exports.InternalServiceErrorException = InternalServiceErrorException;
35
+ class TooManyRequestsException extends SignerDataServiceException_1.SignerDataServiceException {
36
+ name = "TooManyRequestsException";
37
+ $fault = "client";
38
+ code;
39
+ constructor(opts) {
40
+ super({
41
+ name: "TooManyRequestsException",
42
+ $fault: "client",
43
+ ...opts,
44
+ });
45
+ Object.setPrototypeOf(this, TooManyRequestsException.prototype);
46
+ this.code = opts.code;
47
+ }
48
+ }
49
+ exports.TooManyRequestsException = TooManyRequestsException;
50
+ class ValidationException extends SignerDataServiceException_1.SignerDataServiceException {
51
+ name = "ValidationException";
52
+ $fault = "client";
53
+ code;
54
+ constructor(opts) {
55
+ super({
56
+ name: "ValidationException",
57
+ $fault: "client",
58
+ ...opts,
59
+ });
60
+ Object.setPrototypeOf(this, ValidationException.prototype);
61
+ this.code = opts.code;
62
+ }
63
+ }
64
+ exports.ValidationException = ValidationException;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
8
+ const config_resolver_1 = require("@smithy/config-resolver");
9
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
10
+ const invalid_dependency_1 = require("@smithy/invalid-dependency");
11
+ const smithy_client_1 = require("@smithy/smithy-client");
12
+ const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
13
+ const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
14
+ const util_retry_1 = require("@smithy/util-retry");
15
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
+ const getRuntimeConfig = (config) => {
17
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
18
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
19
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
+ return {
21
+ ...clientSharedValues,
22
+ ...config,
23
+ runtime: "browser",
24
+ defaultsMode,
25
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
26
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
28
+ maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
29
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
30
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
31
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
32
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
33
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
34
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
35
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
36
+ };
37
+ };
38
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const core_1 = require("@aws-sdk/core");
7
+ const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
8
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
9
+ const config_resolver_1 = require("@smithy/config-resolver");
10
+ const hash_node_1 = require("@smithy/hash-node");
11
+ const middleware_retry_1 = require("@smithy/middleware-retry");
12
+ const node_config_provider_1 = require("@smithy/node-config-provider");
13
+ const node_http_handler_1 = require("@smithy/node-http-handler");
14
+ const smithy_client_1 = require("@smithy/smithy-client");
15
+ const util_body_length_node_1 = require("@smithy/util-body-length-node");
16
+ const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
17
+ const util_retry_1 = require("@smithy/util-retry");
18
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
19
+ const getRuntimeConfig = (config) => {
20
+ (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
21
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
22
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
23
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
24
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
25
+ const loaderConfig = {
26
+ profile: config?.profile,
27
+ logger: clientSharedValues.logger,
28
+ };
29
+ return {
30
+ ...clientSharedValues,
31
+ ...config,
32
+ runtime: "node",
33
+ defaultsMode,
34
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
35
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
36
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
37
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
38
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
39
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
40
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
41
+ retryMode: config?.retryMode ??
42
+ (0, node_config_provider_1.loadConfig)({
43
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
44
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
45
+ }, config),
46
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
47
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
48
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
49
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
50
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
51
+ };
52
+ };
53
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const protocols_1 = require("@aws-sdk/core/protocols");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const url_parser_1 = require("@smithy/url-parser");
8
+ const util_base64_1 = require("@smithy/util-base64");
9
+ const util_utf8_1 = require("@smithy/util-utf8");
10
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
11
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
12
+ const schemas_0_1 = require("./schemas/schemas_0");
13
+ const getRuntimeConfig = (config) => {
14
+ return {
15
+ apiVersion: "2017-08-25",
16
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
17
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
18
+ disableHostPrefix: config?.disableHostPrefix ?? false,
19
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
20
+ extensions: config?.extensions ?? [],
21
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSignerDataHttpAuthSchemeProvider,
22
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
23
+ {
24
+ schemeId: "aws.auth#sigv4",
25
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
26
+ signer: new core_1.AwsSdkSigV4Signer(),
27
+ },
28
+ ],
29
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
30
+ protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
31
+ protocolSettings: config?.protocolSettings ?? {
32
+ defaultNamespace: "com.amazonaws.signerdata",
33
+ errorTypeRegistries: schemas_0_1.errorTypeRegistries,
34
+ version: "2017-08-25",
35
+ serviceTarget: "SignerDataPlane",
36
+ },
37
+ serviceId: config?.serviceId ?? "Signer Data",
38
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
39
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
40
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
41
+ };
42
+ };
43
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetRevocationStatus$ = exports.GetRevocationStatusResponse$ = exports.GetRevocationStatusRequest$ = exports.errorTypeRegistries = exports.ValidationException$ = exports.TooManyRequestsException$ = exports.InternalServiceErrorException$ = exports.AccessDeniedException$ = exports.SignerDataServiceException$ = void 0;
4
+ const _ADE = "AccessDeniedException";
5
+ const _GRS = "GetRevocationStatus";
6
+ const _GRSR = "GetRevocationStatusRequest";
7
+ const _GRSRe = "GetRevocationStatusResponse";
8
+ const _ISEE = "InternalServiceErrorException";
9
+ const _TMRE = "TooManyRequestsException";
10
+ const _VE = "ValidationException";
11
+ const _c = "client";
12
+ const _cH = "certificateHashes";
13
+ const _co = "code";
14
+ const _e = "error";
15
+ const _h = "http";
16
+ const _hE = "httpError";
17
+ const _hQ = "httpQuery";
18
+ const _jA = "jobArn";
19
+ const _m = "message";
20
+ const _pI = "platformId";
21
+ const _pVA = "profileVersionArn";
22
+ const _rE = "revokedEntities";
23
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.signerdata";
24
+ const _sT = "signatureTimestamp";
25
+ const _se = "server";
26
+ const n0 = "com.amazonaws.signerdata";
27
+ const schema_1 = require("@smithy/core/schema");
28
+ const errors_1 = require("../models/errors");
29
+ const SignerDataServiceException_1 = require("../models/SignerDataServiceException");
30
+ const _s_registry = schema_1.TypeRegistry.for(_s);
31
+ exports.SignerDataServiceException$ = [-3, _s, "SignerDataServiceException", 0, [], []];
32
+ _s_registry.registerError(exports.SignerDataServiceException$, SignerDataServiceException_1.SignerDataServiceException);
33
+ const n0_registry = schema_1.TypeRegistry.for(n0);
34
+ exports.AccessDeniedException$ = [-3, n0, _ADE,
35
+ { [_e]: _c, [_hE]: 403 },
36
+ [_m, _co],
37
+ [0, 0]
38
+ ];
39
+ n0_registry.registerError(exports.AccessDeniedException$, errors_1.AccessDeniedException);
40
+ exports.InternalServiceErrorException$ = [-3, n0, _ISEE,
41
+ { [_e]: _se, [_hE]: 500 },
42
+ [_m, _co],
43
+ [0, 0]
44
+ ];
45
+ n0_registry.registerError(exports.InternalServiceErrorException$, errors_1.InternalServiceErrorException);
46
+ exports.TooManyRequestsException$ = [-3, n0, _TMRE,
47
+ { [_e]: _c, [_hE]: 429 },
48
+ [_m, _co],
49
+ [0, 0]
50
+ ];
51
+ n0_registry.registerError(exports.TooManyRequestsException$, errors_1.TooManyRequestsException);
52
+ exports.ValidationException$ = [-3, n0, _VE,
53
+ { [_e]: _c, [_hE]: 400 },
54
+ [_m, _co],
55
+ [0, 0]
56
+ ];
57
+ n0_registry.registerError(exports.ValidationException$, errors_1.ValidationException);
58
+ exports.errorTypeRegistries = [
59
+ _s_registry,
60
+ n0_registry,
61
+ ];
62
+ exports.GetRevocationStatusRequest$ = [3, n0, _GRSR,
63
+ 0,
64
+ [_sT, _pI, _pVA, _jA, _cH],
65
+ [[4, { [_hQ]: _sT }], [0, { [_hQ]: _pI }], [0, { [_hQ]: _pVA }], [0, { [_hQ]: _jA }], [64 | 0, { [_hQ]: _cH }]], 5
66
+ ];
67
+ exports.GetRevocationStatusResponse$ = [3, n0, _GRSRe,
68
+ 0,
69
+ [_rE],
70
+ [64 | 0]
71
+ ];
72
+ var CertificateHashes = 64 | 0;
73
+ var RevokedEntities = 64 | 0;
74
+ exports.GetRevocationStatus$ = [9, n0, _GRS,
75
+ { [_h]: ["GET", "/revocations", 200] }, () => exports.GetRevocationStatusRequest$, () => exports.GetRevocationStatusResponse$
76
+ ];
@@ -0,0 +1,9 @@
1
+ import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { GetRevocationStatusCommand, } from "./commands/GetRevocationStatusCommand";
3
+ import { SignerDataClient } from "./SignerDataClient";
4
+ const commands = {
5
+ GetRevocationStatusCommand,
6
+ };
7
+ export class SignerData extends SignerDataClient {
8
+ }
9
+ createAggregatedClient(commands, SignerData);
@@ -0,0 +1,50 @@
1
+ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
2
+ import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
3
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
4
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
5
+ import { resolveRegionConfig } from "@smithy/config-resolver";
6
+ import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
7
+ import { getSchemaSerdePlugin } from "@smithy/core/schema";
8
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
9
+ import { resolveEndpointConfig, } from "@smithy/middleware-endpoint";
10
+ import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
11
+ import { Client as __Client, } from "@smithy/smithy-client";
12
+ import { defaultSignerDataHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
13
+ import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
14
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
15
+ import { resolveRuntimeExtensions } from "./runtimeExtensions";
16
+ export { __Client };
17
+ export class SignerDataClient extends __Client {
18
+ config;
19
+ constructor(...[configuration]) {
20
+ const _config_0 = __getRuntimeConfig(configuration || {});
21
+ super(_config_0);
22
+ this.initConfig = _config_0;
23
+ const _config_1 = resolveClientEndpointParameters(_config_0);
24
+ const _config_2 = resolveUserAgentConfig(_config_1);
25
+ const _config_3 = resolveRetryConfig(_config_2);
26
+ const _config_4 = resolveRegionConfig(_config_3);
27
+ const _config_5 = resolveHostHeaderConfig(_config_4);
28
+ const _config_6 = resolveEndpointConfig(_config_5);
29
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
30
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
31
+ this.config = _config_8;
32
+ this.middlewareStack.use(getSchemaSerdePlugin(this.config));
33
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
34
+ this.middlewareStack.use(getRetryPlugin(this.config));
35
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
36
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
37
+ this.middlewareStack.use(getLoggerPlugin(this.config));
38
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
39
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
40
+ httpAuthSchemeParametersProvider: defaultSignerDataHttpAuthSchemeParametersProvider,
41
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
42
+ "aws.auth#sigv4": config.credentials,
43
+ }),
44
+ }));
45
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
46
+ }
47
+ destroy() {
48
+ super.destroy();
49
+ }
50
+ }
@@ -0,0 +1,38 @@
1
+ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
2
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
3
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
4
+ let _credentials = runtimeConfig.credentials;
5
+ return {
6
+ setHttpAuthScheme(httpAuthScheme) {
7
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
8
+ if (index === -1) {
9
+ _httpAuthSchemes.push(httpAuthScheme);
10
+ }
11
+ else {
12
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
13
+ }
14
+ },
15
+ httpAuthSchemes() {
16
+ return _httpAuthSchemes;
17
+ },
18
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
19
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
20
+ },
21
+ httpAuthSchemeProvider() {
22
+ return _httpAuthSchemeProvider;
23
+ },
24
+ setCredentials(credentials) {
25
+ _credentials = credentials;
26
+ },
27
+ credentials() {
28
+ return _credentials;
29
+ },
30
+ };
31
+ };
32
+ export const resolveHttpAuthRuntimeConfig = (config) => {
33
+ return {
34
+ httpAuthSchemes: config.httpAuthSchemes(),
35
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
36
+ credentials: config.credentials(),
37
+ };
38
+ };
@@ -0,0 +1,40 @@
1
+ import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
2
+ import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
3
+ export const defaultSignerDataHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
+ return {
5
+ operation: getSmithyContext(context).operation,
6
+ region: await normalizeProvider(config.region)() || (() => {
7
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
8
+ })(),
9
+ };
10
+ };
11
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
12
+ return {
13
+ schemeId: "aws.auth#sigv4",
14
+ signingProperties: {
15
+ name: "signer",
16
+ region: authParameters.region,
17
+ },
18
+ propertiesExtractor: (config, context) => ({
19
+ signingProperties: {
20
+ config,
21
+ context,
22
+ },
23
+ }),
24
+ };
25
+ }
26
+ export const defaultSignerDataHttpAuthSchemeProvider = (authParameters) => {
27
+ const options = [];
28
+ switch (authParameters.operation) {
29
+ default: {
30
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
31
+ }
32
+ }
33
+ return options;
34
+ };
35
+ export const resolveHttpAuthSchemeConfig = (config) => {
36
+ const config_0 = resolveAwsSdkSigV4Config(config);
37
+ return Object.assign(config_0, {
38
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
39
+ });
40
+ };
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { GetRevocationStatus$ } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class GetRevocationStatusCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("SignerDataPlane", "GetRevocationStatus", {})
13
+ .n("SignerDataClient", "GetRevocationStatusCommand")
14
+ .sc(GetRevocationStatus$)
15
+ .build() {
16
+ }
@@ -0,0 +1 @@
1
+ export * from "./GetRevocationStatusCommand";
@@ -0,0 +1,13 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return Object.assign(options, {
3
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
4
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
5
+ defaultSigningName: "signer",
6
+ });
7
+ };
8
+ export const commonParams = {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
@@ -0,0 +1,14 @@
1
+ import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
2
+ import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
3
+ import { ruleSet } from "./ruleset";
4
+ const cache = new EndpointCache({
5
+ size: 50,
6
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
7
+ });
8
+ export const defaultEndpointResolver = (endpointParams, context = {}) => {
9
+ return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
10
+ endpointParams: endpointParams,
11
+ logger: context.logger,
12
+ }));
13
+ };
14
+ customEndpointFunctions.aws = awsEndpointFunctions;
@@ -0,0 +1,4 @@
1
+ const i = "ref";
2
+ const a = true, b = false, c = "String", d = "endpoint", e = { "required": true, "type": "Boolean", "default": false }, f = { [i]: "Endpoint" }, g = { "fn": "booleanEquals", "argv": [{ [i]: "UseFIPS" }, true] }, h = { "fn": "booleanEquals", "argv": [{ [i]: "UseDualStack" }, true] };
3
+ const _data = { version: "1.0", parameters: { Region: { required: a, type: c }, UseFIPS: e, UseDualStack: e, Endpoint: { required: b, type: c } }, rules: [{ type: d, conditions: [{ fn: "isSet", argv: [f] }], endpoint: { url: f } }, { type: "tree", conditions: [{ fn: "aws.partition", argv: [{ [i]: "Region" }], assign: "PartitionResult" }], rules: [{ type: d, conditions: [g, h], endpoint: { url: "https://data-signer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}" } }, { type: d, conditions: [g], endpoint: { url: "https://data-signer-fips.{Region}.{PartitionResult#dnsSuffix}" } }, { type: d, conditions: [h], endpoint: { url: "https://data-signer.{Region}.{PartitionResult#dualStackDnsSuffix}" } }, { type: d, endpoint: { url: "https://data-signer.{Region}.{PartitionResult#dnsSuffix}" } }] }] };
4
+ export const ruleSet = _data;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export * from "./SignerDataClient";
2
+ export * from "./SignerData";
3
+ export * from "./commands";
4
+ export * from "./schemas/schemas_0";
5
+ export * from "./models/errors";
6
+ export * from "./models/models_0";
7
+ export { SignerDataServiceException } from "./models/SignerDataServiceException";
@@ -0,0 +1,8 @@
1
+ import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
2
+ export { __ServiceException };
3
+ export class SignerDataServiceException extends __ServiceException {
4
+ constructor(options) {
5
+ super(options);
6
+ Object.setPrototypeOf(this, SignerDataServiceException.prototype);
7
+ }
8
+ }
@@ -0,0 +1,57 @@
1
+ import { SignerDataServiceException as __BaseException } from "./SignerDataServiceException";
2
+ export class AccessDeniedException extends __BaseException {
3
+ name = "AccessDeniedException";
4
+ $fault = "client";
5
+ code;
6
+ constructor(opts) {
7
+ super({
8
+ name: "AccessDeniedException",
9
+ $fault: "client",
10
+ ...opts,
11
+ });
12
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
+ this.code = opts.code;
14
+ }
15
+ }
16
+ export class InternalServiceErrorException extends __BaseException {
17
+ name = "InternalServiceErrorException";
18
+ $fault = "server";
19
+ code;
20
+ constructor(opts) {
21
+ super({
22
+ name: "InternalServiceErrorException",
23
+ $fault: "server",
24
+ ...opts,
25
+ });
26
+ Object.setPrototypeOf(this, InternalServiceErrorException.prototype);
27
+ this.code = opts.code;
28
+ }
29
+ }
30
+ export class TooManyRequestsException extends __BaseException {
31
+ name = "TooManyRequestsException";
32
+ $fault = "client";
33
+ code;
34
+ constructor(opts) {
35
+ super({
36
+ name: "TooManyRequestsException",
37
+ $fault: "client",
38
+ ...opts,
39
+ });
40
+ Object.setPrototypeOf(this, TooManyRequestsException.prototype);
41
+ this.code = opts.code;
42
+ }
43
+ }
44
+ export class ValidationException extends __BaseException {
45
+ name = "ValidationException";
46
+ $fault = "client";
47
+ code;
48
+ constructor(opts) {
49
+ super({
50
+ name: "ValidationException",
51
+ $fault: "client",
52
+ ...opts,
53
+ });
54
+ Object.setPrototypeOf(this, ValidationException.prototype);
55
+ this.code = opts.code;
56
+ }
57
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,33 @@
1
+ import packageInfo from "../package.json";
2
+ import { Sha256 } from "@aws-crypto/sha256-browser";
3
+ import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
6
+ import { invalidProvider } from "@smithy/invalid-dependency";
7
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
8
+ import { calculateBodyLength } from "@smithy/util-body-length-browser";
9
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
10
+ import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
11
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
12
+ export const getRuntimeConfig = (config) => {
13
+ const defaultsMode = resolveDefaultsModeConfig(config);
14
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
+ const clientSharedValues = getSharedRuntimeConfig(config);
16
+ return {
17
+ ...clientSharedValues,
18
+ ...config,
19
+ runtime: "browser",
20
+ defaultsMode,
21
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
22
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
23
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
24
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
25
+ region: config?.region ?? invalidProvider("Region is missing"),
26
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
28
+ sha256: config?.sha256 ?? Sha256,
29
+ streamCollector: config?.streamCollector ?? streamCollector,
30
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
31
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
32
+ };
33
+ };