@aws-sdk/client-signer-data 3.1074.0 → 3.1076.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/dist-cjs/index.js CHANGED
@@ -1,21 +1,57 @@
1
- var __exportStar = (m, e) => { Object.assign(e, m); };
2
- const { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
1
+ const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
3
2
  const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require("@smithy/core");
4
- const { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
3
+ const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
5
4
  exports.$Command = Command;
6
5
  exports.__Client = Client;
7
- const { resolveRegionConfig } = require("@smithy/core/config");
8
- const { resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
9
- const { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
10
- const { resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
11
- const { getSchemaSerdePlugin } = require("@smithy/core/schema");
12
- const { resolveHttpAuthSchemeConfig, defaultSignerDataHttpAuthSchemeParametersProvider } = require("./auth/httpAuthSchemeProvider");
13
- const { getRuntimeConfig } = require("./runtimeConfig");
14
- const { GetRevocationStatus$ } = require("./schemas/schemas_0");
15
- __exportStar(require("./schemas/schemas_0"), exports);
16
- __exportStar(require("./models/errors"), exports);
17
- const { SignerDataServiceException } = require("./models/SignerDataServiceException");
18
- exports.SignerDataServiceException = SignerDataServiceException;
6
+ const { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require("@smithy/core/config");
7
+ const { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
8
+ const { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
9
+ const { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
10
+ const { TypeRegistry, getSchemaSerdePlugin } = require("@smithy/core/schema");
11
+ const { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
12
+ const { defaultProvider } = require("@aws-sdk/credential-provider-node");
13
+ const { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require("@smithy/core/serde");
14
+ const { streamCollector, NodeHttpHandler } = require("@smithy/node-http-handler");
15
+ const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
16
+
17
+ const defaultSignerDataHttpAuthSchemeParametersProvider = async (config, context, input) => {
18
+ return {
19
+ operation: getSmithyContext(context).operation,
20
+ region: await normalizeProvider(config.region)() || (() => {
21
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
22
+ })(),
23
+ };
24
+ };
25
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
26
+ return {
27
+ schemeId: "aws.auth#sigv4",
28
+ signingProperties: {
29
+ name: "signer",
30
+ region: authParameters.region,
31
+ },
32
+ propertiesExtractor: (config, context) => ({
33
+ signingProperties: {
34
+ config,
35
+ context,
36
+ },
37
+ }),
38
+ };
39
+ }
40
+ const defaultSignerDataHttpAuthSchemeProvider = (authParameters) => {
41
+ const options = [];
42
+ switch (authParameters.operation) {
43
+ default: {
44
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
45
+ }
46
+ }
47
+ return options;
48
+ };
49
+ const resolveHttpAuthSchemeConfig = (config) => {
50
+ const config_0 = resolveAwsSdkSigV4Config(config);
51
+ return Object.assign(config_0, {
52
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
53
+ });
54
+ };
19
55
 
20
56
  const resolveClientEndpointParameters = (options) => {
21
57
  return Object.assign(options, {
@@ -31,6 +67,250 @@ const commonParams = {
31
67
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
32
68
  };
33
69
 
70
+ var version = "3.1075.0";
71
+ var packageInfo = {
72
+ version: version};
73
+
74
+ const a = "booleanEquals", b = { "ref": "Endpoint" }, c = {};
75
+ const _data = {
76
+ conditions: [
77
+ ["isSet", [b]],
78
+ ["aws.partition", [{ ref: "Region" }], "PartitionResult"],
79
+ [a, [{ ref: "UseFIPS" }, true]],
80
+ [a, [{ ref: "UseDualStack" }, true]]
81
+ ],
82
+ results: [
83
+ [-1],
84
+ [b, c],
85
+ ["https://data-signer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", c],
86
+ ["https://data-signer-fips.{Region}.{PartitionResult#dnsSuffix}", c],
87
+ ["https://data-signer.{Region}.{PartitionResult#dualStackDnsSuffix}", c],
88
+ ["https://data-signer.{Region}.{PartitionResult#dnsSuffix}", c]
89
+ ]
90
+ };
91
+ const root = 2;
92
+ const r = 100_000_000;
93
+ const nodes = new Int32Array([
94
+ -1, 1, -1,
95
+ 0, r + 1, 3,
96
+ 1, 4, r + 0,
97
+ 2, 6, 5,
98
+ 3, r + 4, r + 5,
99
+ 3, r + 2, r + 3,
100
+ ]);
101
+ const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
102
+
103
+ const cache = new EndpointCache({
104
+ size: 50,
105
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
106
+ });
107
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
108
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
109
+ endpointParams: endpointParams,
110
+ logger: context.logger,
111
+ }));
112
+ };
113
+ customEndpointFunctions.aws = awsEndpointFunctions;
114
+
115
+ class SignerDataServiceException extends ServiceException {
116
+ constructor(options) {
117
+ super(options);
118
+ Object.setPrototypeOf(this, SignerDataServiceException.prototype);
119
+ }
120
+ }
121
+
122
+ class AccessDeniedException extends SignerDataServiceException {
123
+ name = "AccessDeniedException";
124
+ $fault = "client";
125
+ code;
126
+ constructor(opts) {
127
+ super({
128
+ name: "AccessDeniedException",
129
+ $fault: "client",
130
+ ...opts,
131
+ });
132
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
133
+ this.code = opts.code;
134
+ }
135
+ }
136
+ class InternalServiceErrorException extends SignerDataServiceException {
137
+ name = "InternalServiceErrorException";
138
+ $fault = "server";
139
+ code;
140
+ constructor(opts) {
141
+ super({
142
+ name: "InternalServiceErrorException",
143
+ $fault: "server",
144
+ ...opts,
145
+ });
146
+ Object.setPrototypeOf(this, InternalServiceErrorException.prototype);
147
+ this.code = opts.code;
148
+ }
149
+ }
150
+ class TooManyRequestsException extends SignerDataServiceException {
151
+ name = "TooManyRequestsException";
152
+ $fault = "client";
153
+ code;
154
+ constructor(opts) {
155
+ super({
156
+ name: "TooManyRequestsException",
157
+ $fault: "client",
158
+ ...opts,
159
+ });
160
+ Object.setPrototypeOf(this, TooManyRequestsException.prototype);
161
+ this.code = opts.code;
162
+ }
163
+ }
164
+ class ValidationException extends SignerDataServiceException {
165
+ name = "ValidationException";
166
+ $fault = "client";
167
+ code;
168
+ constructor(opts) {
169
+ super({
170
+ name: "ValidationException",
171
+ $fault: "client",
172
+ ...opts,
173
+ });
174
+ Object.setPrototypeOf(this, ValidationException.prototype);
175
+ this.code = opts.code;
176
+ }
177
+ }
178
+
179
+ const _ADE = "AccessDeniedException";
180
+ const _GRS = "GetRevocationStatus";
181
+ const _GRSR = "GetRevocationStatusRequest";
182
+ const _GRSRe = "GetRevocationStatusResponse";
183
+ const _ISEE = "InternalServiceErrorException";
184
+ const _TMRE = "TooManyRequestsException";
185
+ const _VE = "ValidationException";
186
+ const _c = "client";
187
+ const _cH = "certificateHashes";
188
+ const _co = "code";
189
+ const _e = "error";
190
+ const _h = "http";
191
+ const _hE = "httpError";
192
+ const _hQ = "httpQuery";
193
+ const _jA = "jobArn";
194
+ const _m = "message";
195
+ const _pI = "platformId";
196
+ const _pVA = "profileVersionArn";
197
+ const _rE = "revokedEntities";
198
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.signerdata";
199
+ const _sT = "signatureTimestamp";
200
+ const _se = "server";
201
+ const n0 = "com.amazonaws.signerdata";
202
+ const _s_registry = TypeRegistry.for(_s);
203
+ var SignerDataServiceException$ = [-3, _s, "SignerDataServiceException", 0, [], []];
204
+ _s_registry.registerError(SignerDataServiceException$, SignerDataServiceException);
205
+ const n0_registry = TypeRegistry.for(n0);
206
+ var AccessDeniedException$ = [-3, n0, _ADE,
207
+ { [_e]: _c, [_hE]: 403 },
208
+ [_m, _co],
209
+ [0, 0]
210
+ ];
211
+ n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
212
+ var InternalServiceErrorException$ = [-3, n0, _ISEE,
213
+ { [_e]: _se, [_hE]: 500 },
214
+ [_m, _co],
215
+ [0, 0]
216
+ ];
217
+ n0_registry.registerError(InternalServiceErrorException$, InternalServiceErrorException);
218
+ var TooManyRequestsException$ = [-3, n0, _TMRE,
219
+ { [_e]: _c, [_hE]: 429 },
220
+ [_m, _co],
221
+ [0, 0]
222
+ ];
223
+ n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
224
+ var ValidationException$ = [-3, n0, _VE,
225
+ { [_e]: _c, [_hE]: 400 },
226
+ [_m, _co],
227
+ [0, 0]
228
+ ];
229
+ n0_registry.registerError(ValidationException$, ValidationException);
230
+ const errorTypeRegistries = [
231
+ _s_registry,
232
+ n0_registry,
233
+ ];
234
+ var GetRevocationStatusRequest$ = [3, n0, _GRSR,
235
+ 0,
236
+ [_sT, _pI, _pVA, _jA, _cH],
237
+ [[4, { [_hQ]: _sT }], [0, { [_hQ]: _pI }], [0, { [_hQ]: _pVA }], [0, { [_hQ]: _jA }], [64 | 0, { [_hQ]: _cH }]], 5
238
+ ];
239
+ var GetRevocationStatusResponse$ = [3, n0, _GRSRe,
240
+ 0,
241
+ [_rE],
242
+ [64 | 0]
243
+ ];
244
+ var GetRevocationStatus$ = [9, n0, _GRS,
245
+ { [_h]: ["GET", "/revocations", 200] }, () => GetRevocationStatusRequest$, () => GetRevocationStatusResponse$
246
+ ];
247
+
248
+ const getRuntimeConfig$1 = (config) => {
249
+ return {
250
+ apiVersion: "2017-08-25",
251
+ base64Decoder: config?.base64Decoder ?? fromBase64,
252
+ base64Encoder: config?.base64Encoder ?? toBase64,
253
+ disableHostPrefix: config?.disableHostPrefix ?? false,
254
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
255
+ extensions: config?.extensions ?? [],
256
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSignerDataHttpAuthSchemeProvider,
257
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
258
+ {
259
+ schemeId: "aws.auth#sigv4",
260
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
261
+ signer: new AwsSdkSigV4Signer(),
262
+ },
263
+ ],
264
+ logger: config?.logger ?? new NoOpLogger(),
265
+ protocol: config?.protocol ?? AwsRestJsonProtocol,
266
+ protocolSettings: config?.protocolSettings ?? {
267
+ defaultNamespace: "com.amazonaws.signerdata",
268
+ errorTypeRegistries,
269
+ version: "2017-08-25",
270
+ serviceTarget: "SignerDataPlane",
271
+ },
272
+ serviceId: config?.serviceId ?? "Signer Data",
273
+ urlParser: config?.urlParser ?? parseUrl,
274
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
275
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
276
+ };
277
+ };
278
+
279
+ const getRuntimeConfig = (config) => {
280
+ emitWarningIfUnsupportedVersion(process.version);
281
+ const defaultsMode = resolveDefaultsModeConfig(config);
282
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
283
+ const clientSharedValues = getRuntimeConfig$1(config);
284
+ emitWarningIfUnsupportedVersion$1(process.version);
285
+ const loaderConfig = {
286
+ profile: config?.profile,
287
+ logger: clientSharedValues.logger,
288
+ };
289
+ return {
290
+ ...clientSharedValues,
291
+ ...config,
292
+ runtime: "node",
293
+ defaultsMode,
294
+ authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
295
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
296
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider,
297
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
298
+ maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
299
+ region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
300
+ requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
301
+ retryMode: config?.retryMode ??
302
+ loadConfig({
303
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
304
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
305
+ }, config),
306
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
307
+ streamCollector: config?.streamCollector ?? streamCollector,
308
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
309
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
310
+ userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
311
+ };
312
+ };
313
+
34
314
  const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
315
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
316
  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
@@ -130,6 +410,20 @@ class SignerData extends SignerDataClient {
130
410
  }
131
411
  createAggregatedClient(commands, SignerData);
132
412
 
413
+ exports.AccessDeniedException = AccessDeniedException;
414
+ exports.AccessDeniedException$ = AccessDeniedException$;
415
+ exports.GetRevocationStatus$ = GetRevocationStatus$;
133
416
  exports.GetRevocationStatusCommand = GetRevocationStatusCommand;
417
+ exports.GetRevocationStatusRequest$ = GetRevocationStatusRequest$;
418
+ exports.GetRevocationStatusResponse$ = GetRevocationStatusResponse$;
419
+ exports.InternalServiceErrorException = InternalServiceErrorException;
420
+ exports.InternalServiceErrorException$ = InternalServiceErrorException$;
134
421
  exports.SignerData = SignerData;
135
422
  exports.SignerDataClient = SignerDataClient;
423
+ exports.SignerDataServiceException = SignerDataServiceException;
424
+ exports.SignerDataServiceException$ = SignerDataServiceException$;
425
+ exports.TooManyRequestsException = TooManyRequestsException;
426
+ exports.TooManyRequestsException$ = TooManyRequestsException$;
427
+ exports.ValidationException = ValidationException;
428
+ exports.ValidationException$ = ValidationException$;
429
+ exports.errorTypeRegistries = errorTypeRegistries;
@@ -14,7 +14,7 @@ export declare const getRuntimeConfig: (config: SignerDataClientConfig) => {
14
14
  requestHandler: import("@smithy/core/protocols").HttpHandler<any> | RequestHandler;
15
15
  retryMode: string | import("@smithy/types").Provider<string>;
16
16
  sha256: import("@smithy/types").HashConstructor;
17
- streamCollector: import("@smithy/types").StreamCollector;
17
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
18
18
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
19
19
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
20
20
  cacheMiddleware?: boolean | undefined;
@@ -15,7 +15,7 @@ export declare const getRuntimeConfig: (config: SignerDataClientConfig) => {
15
15
  requestHandler: RequestHandler | import("@smithy/core/protocols").HttpHandler<any>;
16
16
  retryMode: string | import("@smithy/types").Provider<string>;
17
17
  sha256: import("@smithy/types").HashConstructor;
18
- streamCollector: import("@smithy/types").StreamCollector;
18
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
19
19
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
20
20
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
21
21
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
@@ -15,7 +15,7 @@ export declare const getRuntimeConfig: (config: SignerDataClientConfig) => {
15
15
  apiVersion: string;
16
16
  urlParser: import("@smithy/types").UrlParser;
17
17
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
18
- streamCollector: import("@smithy/types").StreamCollector;
18
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
19
19
  base64Decoder: import("@smithy/types").Decoder;
20
20
  base64Encoder: (_input: Uint8Array | string) => string;
21
21
  utf8Decoder: import("@smithy/types").Decoder;
@@ -21,7 +21,13 @@ export declare const getRuntimeConfig: (config: SignerDataClientConfig) => {
21
21
  | RequestHandler;
22
22
  retryMode: string | import("@smithy/types").Provider<string>;
23
23
  sha256: import("@smithy/types").HashConstructor;
24
- streamCollector: import("@smithy/types").StreamCollector;
24
+ streamCollector: (
25
+ stream:
26
+ | import("stream").Readable
27
+ | import("stream/web").ReadableStream
28
+ | ReadableStream
29
+ | Blob
30
+ ) => Promise<Uint8Array>;
25
31
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
26
32
  (boolean | import("@smithy/types").Provider<boolean | undefined>);
27
33
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
@@ -22,7 +22,13 @@ export declare const getRuntimeConfig: (config: SignerDataClientConfig) => {
22
22
  | import("@smithy/core/protocols").HttpHandler<any>;
23
23
  retryMode: string | import("@smithy/types").Provider<string>;
24
24
  sha256: import("@smithy/types").HashConstructor;
25
- streamCollector: import("@smithy/types").StreamCollector;
25
+ streamCollector: (
26
+ stream:
27
+ | import("stream").Readable
28
+ | import("stream/web").ReadableStream
29
+ | ReadableStream
30
+ | Blob
31
+ ) => Promise<Uint8Array>;
26
32
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
27
33
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
28
34
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
@@ -20,7 +20,13 @@ export declare const getRuntimeConfig: (config: SignerDataClientConfig) => {
20
20
  apiVersion: string;
21
21
  urlParser: import("@smithy/types").UrlParser;
22
22
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
23
- streamCollector: import("@smithy/types").StreamCollector;
23
+ streamCollector: (
24
+ stream:
25
+ | import("stream").Readable
26
+ | import("stream/web").ReadableStream
27
+ | ReadableStream
28
+ | Blob
29
+ ) => Promise<Uint8Array>;
24
30
  base64Decoder: import("@smithy/types").Decoder;
25
31
  base64Encoder: (_input: Uint8Array | string) => string;
26
32
  utf8Decoder: import("@smithy/types").Decoder;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-signer-data",
3
3
  "description": "AWS SDK for JavaScript Signer Data Client for Node.js, Browser and React Native",
4
- "version": "3.1074.0",
4
+ "version": "3.1076.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline",
@@ -21,13 +21,13 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "5.2.0",
23
23
  "@aws-crypto/sha256-js": "5.2.0",
24
- "@aws-sdk/core": "^3.974.23",
25
- "@aws-sdk/credential-provider-node": "^3.972.58",
26
- "@aws-sdk/types": "^3.973.13",
27
- "@smithy/core": "^3.24.6",
28
- "@smithy/fetch-http-handler": "^5.4.6",
29
- "@smithy/node-http-handler": "^4.7.6",
30
- "@smithy/types": "^4.14.3",
24
+ "@aws-sdk/core": "^3.974.24",
25
+ "@aws-sdk/credential-provider-node": "^3.972.59",
26
+ "@aws-sdk/types": "^3.973.14",
27
+ "@smithy/core": "^3.27.0",
28
+ "@smithy/fetch-http-handler": "^5.6.0",
29
+ "@smithy/node-http-handler": "^4.9.0",
30
+ "@smithy/types": "^4.15.0",
31
31
  "tslib": "^2.6.2"
32
32
  },
33
33
  "devDependencies": {
@@ -1,40 +0,0 @@
1
- const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
3
- exports.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
- exports.defaultSignerDataHttpAuthSchemeProvider = (authParameters) => {
27
- const options = [];
28
- switch (authParameters.operation) {
29
- default: {
30
- options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
31
- }
32
- }
33
- return options;
34
- };
35
- exports.resolveHttpAuthSchemeConfig = (config) => {
36
- const config_0 = resolveAwsSdkSigV4Config(config);
37
- return Object.assign(config_0, {
38
- authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
39
- });
40
- };
@@ -1,29 +0,0 @@
1
- const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
2
- const a = "booleanEquals", b = { "ref": "Endpoint" }, c = {};
3
- const _data = {
4
- conditions: [
5
- ["isSet", [b]],
6
- ["aws.partition", [{ ref: "Region" }], "PartitionResult"],
7
- [a, [{ ref: "UseFIPS" }, true]],
8
- [a, [{ ref: "UseDualStack" }, true]]
9
- ],
10
- results: [
11
- [-1],
12
- [b, c],
13
- ["https://data-signer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", c],
14
- ["https://data-signer-fips.{Region}.{PartitionResult#dnsSuffix}", c],
15
- ["https://data-signer.{Region}.{PartitionResult#dualStackDnsSuffix}", c],
16
- ["https://data-signer.{Region}.{PartitionResult#dnsSuffix}", c]
17
- ]
18
- };
19
- const root = 2;
20
- const r = 100_000_000;
21
- const nodes = new Int32Array([
22
- -1, 1, -1,
23
- 0, r + 1, 3,
24
- 1, 4, r + 0,
25
- 2, 6, 5,
26
- 3, r + 4, r + 5,
27
- 3, r + 2, r + 3,
28
- ]);
29
- exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -1,14 +0,0 @@
1
- const { awsEndpointFunctions } = require("@aws-sdk/core/client");
2
- const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
3
- const { bdd } = require("./bdd");
4
- const cache = new EndpointCache({
5
- size: 50,
6
- params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
7
- });
8
- exports.defaultEndpointResolver = (endpointParams, context = {}) => {
9
- return cache.get(endpointParams, () => decideEndpoint(bdd, {
10
- endpointParams: endpointParams,
11
- logger: context.logger,
12
- }));
13
- };
14
- customEndpointFunctions.aws = awsEndpointFunctions;
@@ -1,8 +0,0 @@
1
- const { ServiceException: __ServiceException } = require("@smithy/core/client");
2
- exports.__ServiceException = __ServiceException;
3
- exports.SignerDataServiceException = class SignerDataServiceException extends __ServiceException {
4
- constructor(options) {
5
- super(options);
6
- Object.setPrototypeOf(this, SignerDataServiceException.prototype);
7
- }
8
- };
@@ -1,57 +0,0 @@
1
- const { SignerDataServiceException: __BaseException } = require("./SignerDataServiceException");
2
- exports.AccessDeniedException = 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
- exports.InternalServiceErrorException = 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
- exports.TooManyRequestsException = 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
- exports.ValidationException = 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
- };
@@ -1,32 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { Sha256 } = require("@aws-crypto/sha256-browser");
3
- const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
- const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
5
- const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
6
- const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
7
- const { calculateBodyLength } = require("@smithy/core/serde");
8
- const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
9
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
10
- const getRuntimeConfig = (config) => {
11
- const defaultsMode = resolveDefaultsModeConfig(config);
12
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
13
- const clientSharedValues = getSharedRuntimeConfig(config);
14
- return {
15
- ...clientSharedValues,
16
- ...config,
17
- runtime: "browser",
18
- defaultsMode,
19
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
20
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
21
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
22
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
23
- region: config?.region ?? invalidProvider("Region is missing"),
24
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
25
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
26
- sha256: config?.sha256 ?? Sha256,
27
- streamCollector: config?.streamCollector ?? streamCollector,
28
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
29
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
30
- };
31
- };
32
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,45 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
3
- const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
4
- const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
6
- const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
7
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
8
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
9
- const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
10
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
11
- const getRuntimeConfig = (config) => {
12
- emitWarningIfUnsupportedVersion(process.version);
13
- const defaultsMode = resolveDefaultsModeConfig(config);
14
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
- const clientSharedValues = getSharedRuntimeConfig(config);
16
- awsCheckVersion(process.version);
17
- const loaderConfig = {
18
- profile: config?.profile,
19
- logger: clientSharedValues.logger,
20
- };
21
- return {
22
- ...clientSharedValues,
23
- ...config,
24
- runtime: "node",
25
- defaultsMode,
26
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
27
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
30
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
31
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
32
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
33
- retryMode: config?.retryMode ??
34
- loadNodeConfig({
35
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
37
- }, config),
38
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
- streamCollector: config?.streamCollector ?? streamCollector,
40
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
41
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
42
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
43
- };
44
- };
45
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,12 +0,0 @@
1
- const { Sha256 } = require("@aws-crypto/sha256-js");
2
- const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
3
- const getRuntimeConfig = (config) => {
4
- const browserDefaults = getBrowserRuntimeConfig(config);
5
- return {
6
- ...browserDefaults,
7
- ...config,
8
- runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
- };
11
- };
12
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,38 +0,0 @@
1
- const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
3
- const { NoOpLogger } = require("@smithy/core/client");
4
- const { parseUrl } = require("@smithy/core/protocols");
5
- const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
6
- const { defaultSignerDataHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
7
- const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
8
- const { errorTypeRegistries } = require("./schemas/schemas_0");
9
- exports.getRuntimeConfig = (config) => {
10
- return {
11
- apiVersion: "2017-08-25",
12
- base64Decoder: config?.base64Decoder ?? fromBase64,
13
- base64Encoder: config?.base64Encoder ?? toBase64,
14
- disableHostPrefix: config?.disableHostPrefix ?? false,
15
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
16
- extensions: config?.extensions ?? [],
17
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSignerDataHttpAuthSchemeProvider,
18
- httpAuthSchemes: config?.httpAuthSchemes ?? [
19
- {
20
- schemeId: "aws.auth#sigv4",
21
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
22
- signer: new AwsSdkSigV4Signer(),
23
- },
24
- ],
25
- logger: config?.logger ?? new NoOpLogger(),
26
- protocol: config?.protocol ?? AwsRestJsonProtocol,
27
- protocolSettings: config?.protocolSettings ?? {
28
- defaultNamespace: "com.amazonaws.signerdata",
29
- errorTypeRegistries,
30
- version: "2017-08-25",
31
- serviceTarget: "SignerDataPlane",
32
- },
33
- serviceId: config?.serviceId ?? "Signer Data",
34
- urlParser: config?.urlParser ?? parseUrl,
35
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
36
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
37
- };
38
- };
@@ -1,80 +0,0 @@
1
- const _ADE = "AccessDeniedException";
2
- const _GRS = "GetRevocationStatus";
3
- const _GRSR = "GetRevocationStatusRequest";
4
- const _GRSRe = "GetRevocationStatusResponse";
5
- const _ISEE = "InternalServiceErrorException";
6
- const _TMRE = "TooManyRequestsException";
7
- const _VE = "ValidationException";
8
- const _c = "client";
9
- const _cH = "certificateHashes";
10
- const _co = "code";
11
- const _e = "error";
12
- const _h = "http";
13
- const _hE = "httpError";
14
- const _hQ = "httpQuery";
15
- const _jA = "jobArn";
16
- const _m = "message";
17
- const _pI = "platformId";
18
- const _pVA = "profileVersionArn";
19
- const _rE = "revokedEntities";
20
- const _s = "smithy.ts.sdk.synthetic.com.amazonaws.signerdata";
21
- const _sT = "signatureTimestamp";
22
- const _se = "server";
23
- const n0 = "com.amazonaws.signerdata";
24
- const { TypeRegistry } = require("@smithy/core/schema");
25
- const { AccessDeniedException, InternalServiceErrorException, TooManyRequestsException, ValidationException } = require("../models/errors");
26
- const { SignerDataServiceException } = require("../models/SignerDataServiceException");
27
- const _s_registry = TypeRegistry.for(_s);
28
- const SignerDataServiceException$ = [-3, _s, "SignerDataServiceException", 0, [], []];
29
- exports.SignerDataServiceException$ = SignerDataServiceException$;
30
- _s_registry.registerError(SignerDataServiceException$, SignerDataServiceException);
31
- const n0_registry = TypeRegistry.for(n0);
32
- const AccessDeniedException$ = [-3, n0, _ADE,
33
- { [_e]: _c, [_hE]: 403 },
34
- [_m, _co],
35
- [0, 0]
36
- ];
37
- exports.AccessDeniedException$ = AccessDeniedException$;
38
- n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
39
- const InternalServiceErrorException$ = [-3, n0, _ISEE,
40
- { [_e]: _se, [_hE]: 500 },
41
- [_m, _co],
42
- [0, 0]
43
- ];
44
- exports.InternalServiceErrorException$ = InternalServiceErrorException$;
45
- n0_registry.registerError(InternalServiceErrorException$, InternalServiceErrorException);
46
- const TooManyRequestsException$ = [-3, n0, _TMRE,
47
- { [_e]: _c, [_hE]: 429 },
48
- [_m, _co],
49
- [0, 0]
50
- ];
51
- exports.TooManyRequestsException$ = TooManyRequestsException$;
52
- n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
53
- const ValidationException$ = [-3, n0, _VE,
54
- { [_e]: _c, [_hE]: 400 },
55
- [_m, _co],
56
- [0, 0]
57
- ];
58
- exports.ValidationException$ = ValidationException$;
59
- n0_registry.registerError(ValidationException$, ValidationException);
60
- exports.errorTypeRegistries = [
61
- _s_registry,
62
- n0_registry,
63
- ];
64
- const GetRevocationStatusRequest$ = [3, n0, _GRSR,
65
- 0,
66
- [_sT, _pI, _pVA, _jA, _cH],
67
- [[4, { [_hQ]: _sT }], [0, { [_hQ]: _pI }], [0, { [_hQ]: _pVA }], [0, { [_hQ]: _jA }], [64 | 0, { [_hQ]: _cH }]], 5
68
- ];
69
- exports.GetRevocationStatusRequest$ = GetRevocationStatusRequest$;
70
- const GetRevocationStatusResponse$ = [3, n0, _GRSRe,
71
- 0,
72
- [_rE],
73
- [64 | 0]
74
- ];
75
- exports.GetRevocationStatusResponse$ = GetRevocationStatusResponse$;
76
- var CertificateHashes = 64 | 0;
77
- var RevokedEntities = 64 | 0;
78
- exports.GetRevocationStatus$ = [9, n0, _GRS,
79
- { [_h]: ["GET", "/revocations", 200] }, () => GetRevocationStatusRequest$, () => GetRevocationStatusResponse$
80
- ];