@aws-sdk/client-iot 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.
@@ -14,7 +14,7 @@ export declare const getRuntimeConfig: (config: IoTClientConfig) => {
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: IoTClientConfig) => {
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: IoTClientConfig) => {
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: IoTClientConfig) => {
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: IoTClientConfig) => {
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: IoTClientConfig) => {
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-iot",
3
3
  "description": "AWS SDK for JavaScript Iot 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",
@@ -23,13 +23,13 @@
23
23
  "dependencies": {
24
24
  "@aws-crypto/sha256-browser": "5.2.0",
25
25
  "@aws-crypto/sha256-js": "5.2.0",
26
- "@aws-sdk/core": "^3.974.23",
27
- "@aws-sdk/credential-provider-node": "^3.972.58",
28
- "@aws-sdk/types": "^3.973.13",
29
- "@smithy/core": "^3.24.6",
30
- "@smithy/fetch-http-handler": "^5.4.6",
31
- "@smithy/node-http-handler": "^4.7.6",
32
- "@smithy/types": "^4.14.3",
26
+ "@aws-sdk/core": "^3.974.24",
27
+ "@aws-sdk/credential-provider-node": "^3.972.59",
28
+ "@aws-sdk/types": "^3.973.14",
29
+ "@smithy/core": "^3.27.0",
30
+ "@smithy/fetch-http-handler": "^5.6.0",
31
+ "@smithy/node-http-handler": "^4.9.0",
32
+ "@smithy/types": "^4.15.0",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "devDependencies": {
@@ -1,40 +0,0 @@
1
- const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
3
- exports.defaultIoTHttpAuthSchemeParametersProvider = 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: "iot",
16
- region: authParameters.region,
17
- },
18
- propertiesExtractor: (config, context) => ({
19
- signingProperties: {
20
- config,
21
- context,
22
- },
23
- }),
24
- };
25
- }
26
- exports.defaultIoTHttpAuthSchemeProvider = (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,54 +0,0 @@
1
- const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
2
- const m = "ref";
3
- const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = "stringEquals", h = { [m]: "Endpoint" }, i = { [m]: d }, j = { "fn": f, "argv": [i, "name"] }, k = {}, l = [{ [m]: "Region" }];
4
- const _data = {
5
- conditions: [
6
- [c, [h]],
7
- [c, l],
8
- ["aws.partition", l, d],
9
- [e, [{ [m]: "UseFIPS" }, b]],
10
- [e, [{ fn: f, argv: [i, "supportsFIPS"] }, b]],
11
- [e, [{ [m]: "UseDualStack" }, b]],
12
- [e, [{ fn: f, argv: [i, "supportsDualStack"] }, b]],
13
- [g, [j, "aws"]],
14
- [g, [j, "aws-cn"]],
15
- [g, [j, "aws-us-gov"]]
16
- ],
17
- results: [
18
- [a],
19
- [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
20
- [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
21
- [h, k],
22
- ["https://iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", k],
23
- [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
24
- ["https://iot-fips.{Region}.{PartitionResult#dnsSuffix}", k],
25
- [a, "FIPS is enabled but this partition does not support FIPS"],
26
- ["https://iot.{Region}.{PartitionResult#dualStackDnsSuffix}", k],
27
- [a, "DualStack is enabled but this partition does not support DualStack"],
28
- ["https://iot.{Region}.amazonaws.com", k],
29
- ["https://iot.{Region}.amazonaws.com.cn", k],
30
- ["https://iot.{Region}.{PartitionResult#dnsSuffix}", k],
31
- [a, "Invalid Configuration: Missing Region"]
32
- ]
33
- };
34
- const root = 2;
35
- const r = 100_000_000;
36
- const nodes = new Int32Array([
37
- -1, 1, -1,
38
- 0, 15, 3,
39
- 1, 4, r + 13,
40
- 2, 5, r + 13,
41
- 3, 11, 6,
42
- 5, 10, 7,
43
- 7, r + 10, 8,
44
- 8, r + 11, 9,
45
- 9, r + 10, r + 12,
46
- 6, r + 8, r + 9,
47
- 4, 13, 12,
48
- 5, r + 5, r + 7,
49
- 5, 14, r + 6,
50
- 6, r + 4, r + 5,
51
- 3, r + 1, 16,
52
- 5, r + 2, r + 3,
53
- ]);
54
- 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.IoTServiceException = class IoTServiceException extends __ServiceException {
4
- constructor(options) {
5
- super(options);
6
- Object.setPrototypeOf(this, IoTServiceException.prototype);
7
- }
8
- };
@@ -1,403 +0,0 @@
1
- const { IoTServiceException: __BaseException } = require("./IoTServiceException");
2
- exports.InternalFailureException = class InternalFailureException extends __BaseException {
3
- name = "InternalFailureException";
4
- $fault = "server";
5
- constructor(opts) {
6
- super({
7
- name: "InternalFailureException",
8
- $fault: "server",
9
- ...opts,
10
- });
11
- Object.setPrototypeOf(this, InternalFailureException.prototype);
12
- }
13
- };
14
- exports.InvalidRequestException = class InvalidRequestException extends __BaseException {
15
- name = "InvalidRequestException";
16
- $fault = "client";
17
- constructor(opts) {
18
- super({
19
- name: "InvalidRequestException",
20
- $fault: "client",
21
- ...opts,
22
- });
23
- Object.setPrototypeOf(this, InvalidRequestException.prototype);
24
- }
25
- };
26
- exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
27
- name = "ResourceNotFoundException";
28
- $fault = "client";
29
- constructor(opts) {
30
- super({
31
- name: "ResourceNotFoundException",
32
- $fault: "client",
33
- ...opts,
34
- });
35
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
36
- }
37
- };
38
- exports.ServiceUnavailableException = class ServiceUnavailableException extends __BaseException {
39
- name = "ServiceUnavailableException";
40
- $fault = "server";
41
- constructor(opts) {
42
- super({
43
- name: "ServiceUnavailableException",
44
- $fault: "server",
45
- ...opts,
46
- });
47
- Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
48
- }
49
- };
50
- exports.ThrottlingException = class ThrottlingException extends __BaseException {
51
- name = "ThrottlingException";
52
- $fault = "client";
53
- constructor(opts) {
54
- super({
55
- name: "ThrottlingException",
56
- $fault: "client",
57
- ...opts,
58
- });
59
- Object.setPrototypeOf(this, ThrottlingException.prototype);
60
- }
61
- };
62
- exports.TransferAlreadyCompletedException = class TransferAlreadyCompletedException extends __BaseException {
63
- name = "TransferAlreadyCompletedException";
64
- $fault = "client";
65
- constructor(opts) {
66
- super({
67
- name: "TransferAlreadyCompletedException",
68
- $fault: "client",
69
- ...opts,
70
- });
71
- Object.setPrototypeOf(this, TransferAlreadyCompletedException.prototype);
72
- }
73
- };
74
- exports.UnauthorizedException = class UnauthorizedException extends __BaseException {
75
- name = "UnauthorizedException";
76
- $fault = "client";
77
- constructor(opts) {
78
- super({
79
- name: "UnauthorizedException",
80
- $fault: "client",
81
- ...opts,
82
- });
83
- Object.setPrototypeOf(this, UnauthorizedException.prototype);
84
- }
85
- };
86
- exports.ConflictException = class ConflictException extends __BaseException {
87
- name = "ConflictException";
88
- $fault = "client";
89
- resourceId;
90
- constructor(opts) {
91
- super({
92
- name: "ConflictException",
93
- $fault: "client",
94
- ...opts,
95
- });
96
- Object.setPrototypeOf(this, ConflictException.prototype);
97
- this.resourceId = opts.resourceId;
98
- }
99
- };
100
- exports.InternalServerException = class InternalServerException extends __BaseException {
101
- name = "InternalServerException";
102
- $fault = "server";
103
- constructor(opts) {
104
- super({
105
- name: "InternalServerException",
106
- $fault: "server",
107
- ...opts,
108
- });
109
- Object.setPrototypeOf(this, InternalServerException.prototype);
110
- }
111
- };
112
- exports.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
113
- name = "ServiceQuotaExceededException";
114
- $fault = "client";
115
- constructor(opts) {
116
- super({
117
- name: "ServiceQuotaExceededException",
118
- $fault: "client",
119
- ...opts,
120
- });
121
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
122
- }
123
- };
124
- exports.ValidationException = class ValidationException extends __BaseException {
125
- name = "ValidationException";
126
- $fault = "client";
127
- constructor(opts) {
128
- super({
129
- name: "ValidationException",
130
- $fault: "client",
131
- ...opts,
132
- });
133
- Object.setPrototypeOf(this, ValidationException.prototype);
134
- }
135
- };
136
- exports.LimitExceededException = class LimitExceededException extends __BaseException {
137
- name = "LimitExceededException";
138
- $fault = "client";
139
- constructor(opts) {
140
- super({
141
- name: "LimitExceededException",
142
- $fault: "client",
143
- ...opts,
144
- });
145
- Object.setPrototypeOf(this, LimitExceededException.prototype);
146
- }
147
- };
148
- exports.VersionConflictException = class VersionConflictException extends __BaseException {
149
- name = "VersionConflictException";
150
- $fault = "client";
151
- constructor(opts) {
152
- super({
153
- name: "VersionConflictException",
154
- $fault: "client",
155
- ...opts,
156
- });
157
- Object.setPrototypeOf(this, VersionConflictException.prototype);
158
- }
159
- };
160
- exports.InvalidStateTransitionException = class InvalidStateTransitionException extends __BaseException {
161
- name = "InvalidStateTransitionException";
162
- $fault = "client";
163
- constructor(opts) {
164
- super({
165
- name: "InvalidStateTransitionException",
166
- $fault: "client",
167
- ...opts,
168
- });
169
- Object.setPrototypeOf(this, InvalidStateTransitionException.prototype);
170
- }
171
- };
172
- exports.ConflictingResourceUpdateException = class ConflictingResourceUpdateException extends __BaseException {
173
- name = "ConflictingResourceUpdateException";
174
- $fault = "client";
175
- constructor(opts) {
176
- super({
177
- name: "ConflictingResourceUpdateException",
178
- $fault: "client",
179
- ...opts,
180
- });
181
- Object.setPrototypeOf(this, ConflictingResourceUpdateException.prototype);
182
- }
183
- };
184
- exports.InternalException = class InternalException extends __BaseException {
185
- name = "InternalException";
186
- $fault = "server";
187
- constructor(opts) {
188
- super({
189
- name: "InternalException",
190
- $fault: "server",
191
- ...opts,
192
- });
193
- Object.setPrototypeOf(this, InternalException.prototype);
194
- }
195
- };
196
- exports.ResourceAlreadyExistsException = class ResourceAlreadyExistsException extends __BaseException {
197
- name = "ResourceAlreadyExistsException";
198
- $fault = "client";
199
- resourceId;
200
- resourceArn;
201
- constructor(opts) {
202
- super({
203
- name: "ResourceAlreadyExistsException",
204
- $fault: "client",
205
- ...opts,
206
- });
207
- Object.setPrototypeOf(this, ResourceAlreadyExistsException.prototype);
208
- this.resourceId = opts.resourceId;
209
- this.resourceArn = opts.resourceArn;
210
- }
211
- };
212
- exports.CertificateValidationException = class CertificateValidationException extends __BaseException {
213
- name = "CertificateValidationException";
214
- $fault = "client";
215
- constructor(opts) {
216
- super({
217
- name: "CertificateValidationException",
218
- $fault: "client",
219
- ...opts,
220
- });
221
- Object.setPrototypeOf(this, CertificateValidationException.prototype);
222
- }
223
- };
224
- exports.InvalidQueryException = class InvalidQueryException extends __BaseException {
225
- name = "InvalidQueryException";
226
- $fault = "client";
227
- constructor(opts) {
228
- super({
229
- name: "InvalidQueryException",
230
- $fault: "client",
231
- ...opts,
232
- });
233
- Object.setPrototypeOf(this, InvalidQueryException.prototype);
234
- }
235
- };
236
- exports.IndexNotReadyException = class IndexNotReadyException extends __BaseException {
237
- name = "IndexNotReadyException";
238
- $fault = "client";
239
- constructor(opts) {
240
- super({
241
- name: "IndexNotReadyException",
242
- $fault: "client",
243
- ...opts,
244
- });
245
- Object.setPrototypeOf(this, IndexNotReadyException.prototype);
246
- }
247
- };
248
- exports.InvalidAggregationException = class InvalidAggregationException extends __BaseException {
249
- name = "InvalidAggregationException";
250
- $fault = "client";
251
- constructor(opts) {
252
- super({
253
- name: "InvalidAggregationException",
254
- $fault: "client",
255
- ...opts,
256
- });
257
- Object.setPrototypeOf(this, InvalidAggregationException.prototype);
258
- }
259
- };
260
- exports.MalformedPolicyException = class MalformedPolicyException extends __BaseException {
261
- name = "MalformedPolicyException";
262
- $fault = "client";
263
- constructor(opts) {
264
- super({
265
- name: "MalformedPolicyException",
266
- $fault: "client",
267
- ...opts,
268
- });
269
- Object.setPrototypeOf(this, MalformedPolicyException.prototype);
270
- }
271
- };
272
- exports.VersionsLimitExceededException = class VersionsLimitExceededException extends __BaseException {
273
- name = "VersionsLimitExceededException";
274
- $fault = "client";
275
- constructor(opts) {
276
- super({
277
- name: "VersionsLimitExceededException",
278
- $fault: "client",
279
- ...opts,
280
- });
281
- Object.setPrototypeOf(this, VersionsLimitExceededException.prototype);
282
- }
283
- };
284
- exports.SqlParseException = class SqlParseException extends __BaseException {
285
- name = "SqlParseException";
286
- $fault = "client";
287
- constructor(opts) {
288
- super({
289
- name: "SqlParseException",
290
- $fault: "client",
291
- ...opts,
292
- });
293
- Object.setPrototypeOf(this, SqlParseException.prototype);
294
- }
295
- };
296
- exports.DeleteConflictException = class DeleteConflictException extends __BaseException {
297
- name = "DeleteConflictException";
298
- $fault = "client";
299
- constructor(opts) {
300
- super({
301
- name: "DeleteConflictException",
302
- $fault: "client",
303
- ...opts,
304
- });
305
- Object.setPrototypeOf(this, DeleteConflictException.prototype);
306
- }
307
- };
308
- exports.CertificateStateException = class CertificateStateException extends __BaseException {
309
- name = "CertificateStateException";
310
- $fault = "client";
311
- constructor(opts) {
312
- super({
313
- name: "CertificateStateException",
314
- $fault: "client",
315
- ...opts,
316
- });
317
- Object.setPrototypeOf(this, CertificateStateException.prototype);
318
- }
319
- };
320
- exports.NotConfiguredException = class NotConfiguredException extends __BaseException {
321
- name = "NotConfiguredException";
322
- $fault = "client";
323
- constructor(opts) {
324
- super({
325
- name: "NotConfiguredException",
326
- $fault: "client",
327
- ...opts,
328
- });
329
- Object.setPrototypeOf(this, NotConfiguredException.prototype);
330
- }
331
- };
332
- exports.RegistrationCodeValidationException = class RegistrationCodeValidationException extends __BaseException {
333
- name = "RegistrationCodeValidationException";
334
- $fault = "client";
335
- constructor(opts) {
336
- super({
337
- name: "RegistrationCodeValidationException",
338
- $fault: "client",
339
- ...opts,
340
- });
341
- Object.setPrototypeOf(this, RegistrationCodeValidationException.prototype);
342
- }
343
- };
344
- exports.CertificateConflictException = class CertificateConflictException extends __BaseException {
345
- name = "CertificateConflictException";
346
- $fault = "client";
347
- constructor(opts) {
348
- super({
349
- name: "CertificateConflictException",
350
- $fault: "client",
351
- ...opts,
352
- });
353
- Object.setPrototypeOf(this, CertificateConflictException.prototype);
354
- }
355
- };
356
- exports.ResourceRegistrationFailureException = class ResourceRegistrationFailureException extends __BaseException {
357
- name = "ResourceRegistrationFailureException";
358
- $fault = "client";
359
- constructor(opts) {
360
- super({
361
- name: "ResourceRegistrationFailureException",
362
- $fault: "client",
363
- ...opts,
364
- });
365
- Object.setPrototypeOf(this, ResourceRegistrationFailureException.prototype);
366
- }
367
- };
368
- exports.TaskAlreadyExistsException = class TaskAlreadyExistsException extends __BaseException {
369
- name = "TaskAlreadyExistsException";
370
- $fault = "client";
371
- constructor(opts) {
372
- super({
373
- name: "TaskAlreadyExistsException",
374
- $fault: "client",
375
- ...opts,
376
- });
377
- Object.setPrototypeOf(this, TaskAlreadyExistsException.prototype);
378
- }
379
- };
380
- exports.InvalidResponseException = class InvalidResponseException extends __BaseException {
381
- name = "InvalidResponseException";
382
- $fault = "client";
383
- constructor(opts) {
384
- super({
385
- name: "InvalidResponseException",
386
- $fault: "client",
387
- ...opts,
388
- });
389
- Object.setPrototypeOf(this, InvalidResponseException.prototype);
390
- }
391
- };
392
- exports.TransferConflictException = class TransferConflictException extends __BaseException {
393
- name = "TransferConflictException";
394
- $fault = "client";
395
- constructor(opts) {
396
- super({
397
- name: "TransferConflictException",
398
- $fault: "client",
399
- ...opts,
400
- });
401
- Object.setPrototypeOf(this, TransferConflictException.prototype);
402
- }
403
- };
@@ -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;