@aws-sdk/client-dynamodb 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.
@@ -1,440 +0,0 @@
1
- const { DynamoDBServiceException: __BaseException } = require("./DynamoDBServiceException");
2
- exports.BackupInUseException = class BackupInUseException extends __BaseException {
3
- name = "BackupInUseException";
4
- $fault = "client";
5
- constructor(opts) {
6
- super({
7
- name: "BackupInUseException",
8
- $fault: "client",
9
- ...opts,
10
- });
11
- Object.setPrototypeOf(this, BackupInUseException.prototype);
12
- }
13
- };
14
- exports.BackupNotFoundException = class BackupNotFoundException extends __BaseException {
15
- name = "BackupNotFoundException";
16
- $fault = "client";
17
- constructor(opts) {
18
- super({
19
- name: "BackupNotFoundException",
20
- $fault: "client",
21
- ...opts,
22
- });
23
- Object.setPrototypeOf(this, BackupNotFoundException.prototype);
24
- }
25
- };
26
- exports.InternalServerError = class InternalServerError extends __BaseException {
27
- name = "InternalServerError";
28
- $fault = "server";
29
- constructor(opts) {
30
- super({
31
- name: "InternalServerError",
32
- $fault: "server",
33
- ...opts,
34
- });
35
- Object.setPrototypeOf(this, InternalServerError.prototype);
36
- }
37
- };
38
- exports.RequestLimitExceeded = class RequestLimitExceeded extends __BaseException {
39
- name = "RequestLimitExceeded";
40
- $fault = "client";
41
- ThrottlingReasons;
42
- constructor(opts) {
43
- super({
44
- name: "RequestLimitExceeded",
45
- $fault: "client",
46
- ...opts,
47
- });
48
- Object.setPrototypeOf(this, RequestLimitExceeded.prototype);
49
- this.ThrottlingReasons = opts.ThrottlingReasons;
50
- }
51
- };
52
- exports.ThrottlingException = class ThrottlingException extends __BaseException {
53
- name = "ThrottlingException";
54
- $fault = "client";
55
- throttlingReasons;
56
- constructor(opts) {
57
- super({
58
- name: "ThrottlingException",
59
- $fault: "client",
60
- ...opts,
61
- });
62
- Object.setPrototypeOf(this, ThrottlingException.prototype);
63
- this.throttlingReasons = opts.throttlingReasons;
64
- }
65
- };
66
- exports.InvalidEndpointException = class InvalidEndpointException extends __BaseException {
67
- name = "InvalidEndpointException";
68
- $fault = "client";
69
- Message;
70
- constructor(opts) {
71
- super({
72
- name: "InvalidEndpointException",
73
- $fault: "client",
74
- ...opts,
75
- });
76
- Object.setPrototypeOf(this, InvalidEndpointException.prototype);
77
- this.Message = opts.Message;
78
- }
79
- };
80
- exports.ProvisionedThroughputExceededException = class ProvisionedThroughputExceededException extends __BaseException {
81
- name = "ProvisionedThroughputExceededException";
82
- $fault = "client";
83
- ThrottlingReasons;
84
- constructor(opts) {
85
- super({
86
- name: "ProvisionedThroughputExceededException",
87
- $fault: "client",
88
- ...opts,
89
- });
90
- Object.setPrototypeOf(this, ProvisionedThroughputExceededException.prototype);
91
- this.ThrottlingReasons = opts.ThrottlingReasons;
92
- }
93
- };
94
- exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
95
- name = "ResourceNotFoundException";
96
- $fault = "client";
97
- constructor(opts) {
98
- super({
99
- name: "ResourceNotFoundException",
100
- $fault: "client",
101
- ...opts,
102
- });
103
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
104
- }
105
- };
106
- exports.ItemCollectionSizeLimitExceededException = class ItemCollectionSizeLimitExceededException extends __BaseException {
107
- name = "ItemCollectionSizeLimitExceededException";
108
- $fault = "client";
109
- constructor(opts) {
110
- super({
111
- name: "ItemCollectionSizeLimitExceededException",
112
- $fault: "client",
113
- ...opts,
114
- });
115
- Object.setPrototypeOf(this, ItemCollectionSizeLimitExceededException.prototype);
116
- }
117
- };
118
- exports.ReplicatedWriteConflictException = class ReplicatedWriteConflictException extends __BaseException {
119
- name = "ReplicatedWriteConflictException";
120
- $fault = "client";
121
- $retryable = {};
122
- constructor(opts) {
123
- super({
124
- name: "ReplicatedWriteConflictException",
125
- $fault: "client",
126
- ...opts,
127
- });
128
- Object.setPrototypeOf(this, ReplicatedWriteConflictException.prototype);
129
- }
130
- };
131
- exports.ContinuousBackupsUnavailableException = class ContinuousBackupsUnavailableException extends __BaseException {
132
- name = "ContinuousBackupsUnavailableException";
133
- $fault = "client";
134
- constructor(opts) {
135
- super({
136
- name: "ContinuousBackupsUnavailableException",
137
- $fault: "client",
138
- ...opts,
139
- });
140
- Object.setPrototypeOf(this, ContinuousBackupsUnavailableException.prototype);
141
- }
142
- };
143
- exports.LimitExceededException = class LimitExceededException extends __BaseException {
144
- name = "LimitExceededException";
145
- $fault = "client";
146
- constructor(opts) {
147
- super({
148
- name: "LimitExceededException",
149
- $fault: "client",
150
- ...opts,
151
- });
152
- Object.setPrototypeOf(this, LimitExceededException.prototype);
153
- }
154
- };
155
- exports.TableInUseException = class TableInUseException extends __BaseException {
156
- name = "TableInUseException";
157
- $fault = "client";
158
- constructor(opts) {
159
- super({
160
- name: "TableInUseException",
161
- $fault: "client",
162
- ...opts,
163
- });
164
- Object.setPrototypeOf(this, TableInUseException.prototype);
165
- }
166
- };
167
- exports.TableNotFoundException = class TableNotFoundException extends __BaseException {
168
- name = "TableNotFoundException";
169
- $fault = "client";
170
- constructor(opts) {
171
- super({
172
- name: "TableNotFoundException",
173
- $fault: "client",
174
- ...opts,
175
- });
176
- Object.setPrototypeOf(this, TableNotFoundException.prototype);
177
- }
178
- };
179
- exports.GlobalTableAlreadyExistsException = class GlobalTableAlreadyExistsException extends __BaseException {
180
- name = "GlobalTableAlreadyExistsException";
181
- $fault = "client";
182
- constructor(opts) {
183
- super({
184
- name: "GlobalTableAlreadyExistsException",
185
- $fault: "client",
186
- ...opts,
187
- });
188
- Object.setPrototypeOf(this, GlobalTableAlreadyExistsException.prototype);
189
- }
190
- };
191
- exports.ResourceInUseException = class ResourceInUseException extends __BaseException {
192
- name = "ResourceInUseException";
193
- $fault = "client";
194
- constructor(opts) {
195
- super({
196
- name: "ResourceInUseException",
197
- $fault: "client",
198
- ...opts,
199
- });
200
- Object.setPrototypeOf(this, ResourceInUseException.prototype);
201
- }
202
- };
203
- exports.TransactionConflictException = class TransactionConflictException extends __BaseException {
204
- name = "TransactionConflictException";
205
- $fault = "client";
206
- constructor(opts) {
207
- super({
208
- name: "TransactionConflictException",
209
- $fault: "client",
210
- ...opts,
211
- });
212
- Object.setPrototypeOf(this, TransactionConflictException.prototype);
213
- }
214
- };
215
- exports.PolicyNotFoundException = class PolicyNotFoundException extends __BaseException {
216
- name = "PolicyNotFoundException";
217
- $fault = "client";
218
- constructor(opts) {
219
- super({
220
- name: "PolicyNotFoundException",
221
- $fault: "client",
222
- ...opts,
223
- });
224
- Object.setPrototypeOf(this, PolicyNotFoundException.prototype);
225
- }
226
- };
227
- exports.ExportNotFoundException = class ExportNotFoundException extends __BaseException {
228
- name = "ExportNotFoundException";
229
- $fault = "client";
230
- constructor(opts) {
231
- super({
232
- name: "ExportNotFoundException",
233
- $fault: "client",
234
- ...opts,
235
- });
236
- Object.setPrototypeOf(this, ExportNotFoundException.prototype);
237
- }
238
- };
239
- exports.GlobalTableNotFoundException = class GlobalTableNotFoundException extends __BaseException {
240
- name = "GlobalTableNotFoundException";
241
- $fault = "client";
242
- constructor(opts) {
243
- super({
244
- name: "GlobalTableNotFoundException",
245
- $fault: "client",
246
- ...opts,
247
- });
248
- Object.setPrototypeOf(this, GlobalTableNotFoundException.prototype);
249
- }
250
- };
251
- exports.ImportNotFoundException = class ImportNotFoundException extends __BaseException {
252
- name = "ImportNotFoundException";
253
- $fault = "client";
254
- constructor(opts) {
255
- super({
256
- name: "ImportNotFoundException",
257
- $fault: "client",
258
- ...opts,
259
- });
260
- Object.setPrototypeOf(this, ImportNotFoundException.prototype);
261
- }
262
- };
263
- exports.DuplicateItemException = class DuplicateItemException extends __BaseException {
264
- name = "DuplicateItemException";
265
- $fault = "client";
266
- constructor(opts) {
267
- super({
268
- name: "DuplicateItemException",
269
- $fault: "client",
270
- ...opts,
271
- });
272
- Object.setPrototypeOf(this, DuplicateItemException.prototype);
273
- }
274
- };
275
- exports.IdempotentParameterMismatchException = class IdempotentParameterMismatchException extends __BaseException {
276
- name = "IdempotentParameterMismatchException";
277
- $fault = "client";
278
- Message;
279
- constructor(opts) {
280
- super({
281
- name: "IdempotentParameterMismatchException",
282
- $fault: "client",
283
- ...opts,
284
- });
285
- Object.setPrototypeOf(this, IdempotentParameterMismatchException.prototype);
286
- this.Message = opts.Message;
287
- }
288
- };
289
- exports.TransactionInProgressException = class TransactionInProgressException extends __BaseException {
290
- name = "TransactionInProgressException";
291
- $fault = "client";
292
- Message;
293
- constructor(opts) {
294
- super({
295
- name: "TransactionInProgressException",
296
- $fault: "client",
297
- ...opts,
298
- });
299
- Object.setPrototypeOf(this, TransactionInProgressException.prototype);
300
- this.Message = opts.Message;
301
- }
302
- };
303
- exports.ExportConflictException = class ExportConflictException extends __BaseException {
304
- name = "ExportConflictException";
305
- $fault = "client";
306
- constructor(opts) {
307
- super({
308
- name: "ExportConflictException",
309
- $fault: "client",
310
- ...opts,
311
- });
312
- Object.setPrototypeOf(this, ExportConflictException.prototype);
313
- }
314
- };
315
- exports.InvalidExportTimeException = class InvalidExportTimeException extends __BaseException {
316
- name = "InvalidExportTimeException";
317
- $fault = "client";
318
- constructor(opts) {
319
- super({
320
- name: "InvalidExportTimeException",
321
- $fault: "client",
322
- ...opts,
323
- });
324
- Object.setPrototypeOf(this, InvalidExportTimeException.prototype);
325
- }
326
- };
327
- exports.PointInTimeRecoveryUnavailableException = class PointInTimeRecoveryUnavailableException extends __BaseException {
328
- name = "PointInTimeRecoveryUnavailableException";
329
- $fault = "client";
330
- constructor(opts) {
331
- super({
332
- name: "PointInTimeRecoveryUnavailableException",
333
- $fault: "client",
334
- ...opts,
335
- });
336
- Object.setPrototypeOf(this, PointInTimeRecoveryUnavailableException.prototype);
337
- }
338
- };
339
- exports.ImportConflictException = class ImportConflictException extends __BaseException {
340
- name = "ImportConflictException";
341
- $fault = "client";
342
- constructor(opts) {
343
- super({
344
- name: "ImportConflictException",
345
- $fault: "client",
346
- ...opts,
347
- });
348
- Object.setPrototypeOf(this, ImportConflictException.prototype);
349
- }
350
- };
351
- exports.TableAlreadyExistsException = class TableAlreadyExistsException extends __BaseException {
352
- name = "TableAlreadyExistsException";
353
- $fault = "client";
354
- constructor(opts) {
355
- super({
356
- name: "TableAlreadyExistsException",
357
- $fault: "client",
358
- ...opts,
359
- });
360
- Object.setPrototypeOf(this, TableAlreadyExistsException.prototype);
361
- }
362
- };
363
- exports.InvalidRestoreTimeException = class InvalidRestoreTimeException extends __BaseException {
364
- name = "InvalidRestoreTimeException";
365
- $fault = "client";
366
- constructor(opts) {
367
- super({
368
- name: "InvalidRestoreTimeException",
369
- $fault: "client",
370
- ...opts,
371
- });
372
- Object.setPrototypeOf(this, InvalidRestoreTimeException.prototype);
373
- }
374
- };
375
- exports.ReplicaAlreadyExistsException = class ReplicaAlreadyExistsException extends __BaseException {
376
- name = "ReplicaAlreadyExistsException";
377
- $fault = "client";
378
- constructor(opts) {
379
- super({
380
- name: "ReplicaAlreadyExistsException",
381
- $fault: "client",
382
- ...opts,
383
- });
384
- Object.setPrototypeOf(this, ReplicaAlreadyExistsException.prototype);
385
- }
386
- };
387
- exports.ReplicaNotFoundException = class ReplicaNotFoundException extends __BaseException {
388
- name = "ReplicaNotFoundException";
389
- $fault = "client";
390
- constructor(opts) {
391
- super({
392
- name: "ReplicaNotFoundException",
393
- $fault: "client",
394
- ...opts,
395
- });
396
- Object.setPrototypeOf(this, ReplicaNotFoundException.prototype);
397
- }
398
- };
399
- exports.IndexNotFoundException = class IndexNotFoundException extends __BaseException {
400
- name = "IndexNotFoundException";
401
- $fault = "client";
402
- constructor(opts) {
403
- super({
404
- name: "IndexNotFoundException",
405
- $fault: "client",
406
- ...opts,
407
- });
408
- Object.setPrototypeOf(this, IndexNotFoundException.prototype);
409
- }
410
- };
411
- exports.ConditionalCheckFailedException = class ConditionalCheckFailedException extends __BaseException {
412
- name = "ConditionalCheckFailedException";
413
- $fault = "client";
414
- Item;
415
- constructor(opts) {
416
- super({
417
- name: "ConditionalCheckFailedException",
418
- $fault: "client",
419
- ...opts,
420
- });
421
- Object.setPrototypeOf(this, ConditionalCheckFailedException.prototype);
422
- this.Item = opts.Item;
423
- }
424
- };
425
- exports.TransactionCanceledException = class TransactionCanceledException extends __BaseException {
426
- name = "TransactionCanceledException";
427
- $fault = "client";
428
- Message;
429
- CancellationReasons;
430
- constructor(opts) {
431
- super({
432
- name: "TransactionCanceledException",
433
- $fault: "client",
434
- ...opts,
435
- });
436
- Object.setPrototypeOf(this, TransactionCanceledException.prototype);
437
- this.Message = opts.Message;
438
- this.CancellationReasons = opts.CancellationReasons;
439
- }
440
- };
@@ -1,35 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { Sha256 } = require("@aws-crypto/sha256-browser");
3
- const { DEFAULT_ACCOUNT_ID_ENDPOINT_MODE } = require("@aws-sdk/core/account-id-endpoint");
4
- const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
5
- const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
6
- const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
7
- const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, Retry } = require("@smithy/core/retry");
8
- const { calculateBodyLength } = require("@smithy/core/serde");
9
- const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
10
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
11
- const getRuntimeConfig = (config) => {
12
- const defaultsMode = resolveDefaultsModeConfig(config);
13
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
14
- const clientSharedValues = getSharedRuntimeConfig(config);
15
- return {
16
- ...clientSharedValues,
17
- ...config,
18
- runtime: "browser",
19
- defaultsMode,
20
- accountIdEndpointMode: config?.accountIdEndpointMode ?? (() => Promise.resolve(DEFAULT_ACCOUNT_ID_ENDPOINT_MODE)),
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
- endpointDiscoveryEnabledProvider: config?.endpointDiscoveryEnabledProvider ?? (() => Promise.resolve(undefined)),
25
- maxAttempts: config?.maxAttempts ?? (Retry.v2026 ? 4 : DEFAULT_MAX_ATTEMPTS),
26
- region: config?.region ?? invalidProvider("Region is missing"),
27
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
28
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
29
- sha256: config?.sha256 ?? Sha256,
30
- streamCollector: config?.streamCollector ?? streamCollector,
31
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
32
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
33
- };
34
- };
35
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,49 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS } = require("@aws-sdk/core/account-id-endpoint");
3
- const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
4
- const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
5
- const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
6
- const { NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS } = require("@aws-sdk/middleware-endpoint-discovery");
7
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
8
- 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");
9
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, Retry } = require("@smithy/core/retry");
10
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
11
- const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
12
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
13
- const getRuntimeConfig = (config) => {
14
- emitWarningIfUnsupportedVersion(process.version);
15
- const defaultsMode = resolveDefaultsModeConfig(config);
16
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
17
- const clientSharedValues = getSharedRuntimeConfig(config);
18
- awsCheckVersion(process.version);
19
- const loaderConfig = {
20
- profile: config?.profile,
21
- logger: clientSharedValues.logger,
22
- };
23
- return {
24
- ...clientSharedValues,
25
- ...config,
26
- runtime: "node",
27
- defaultsMode,
28
- accountIdEndpointMode: config?.accountIdEndpointMode ?? loadNodeConfig(NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS, loaderConfig),
29
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
30
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
31
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
32
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
33
- endpointDiscoveryEnabledProvider: config?.endpointDiscoveryEnabledProvider ?? loadNodeConfig(NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS, loaderConfig),
34
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(Retry.v2026 ? { ...NODE_MAX_ATTEMPT_CONFIG_OPTIONS, default: 4 } : NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
35
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
36
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
37
- retryMode: config?.retryMode ??
38
- loadNodeConfig({
39
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
40
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
41
- }, config),
42
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
43
- streamCollector: config?.streamCollector ?? streamCollector,
44
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
45
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
46
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
47
- };
48
- };
49
- 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,41 +0,0 @@
1
- const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { AwsJson1_0Protocol } = require("@aws-sdk/core/protocols");
3
- const { DynamoDBJsonCodec } = require("@aws-sdk/dynamodb-codec");
4
- const { NoOpLogger } = require("@smithy/core/client");
5
- const { parseUrl } = require("@smithy/core/protocols");
6
- const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
7
- const { defaultDynamoDBHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
8
- const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
9
- const { errorTypeRegistries } = require("./schemas/schemas_0");
10
- exports.getRuntimeConfig = (config) => {
11
- return {
12
- apiVersion: "2012-08-10",
13
- base64Decoder: config?.base64Decoder ?? fromBase64,
14
- base64Encoder: config?.base64Encoder ?? toBase64,
15
- disableHostPrefix: config?.disableHostPrefix ?? false,
16
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
17
- extensions: config?.extensions ?? [],
18
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultDynamoDBHttpAuthSchemeProvider,
19
- httpAuthSchemes: config?.httpAuthSchemes ?? [
20
- {
21
- schemeId: "aws.auth#sigv4",
22
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
23
- signer: new AwsSdkSigV4Signer(),
24
- },
25
- ],
26
- logger: config?.logger ?? new NoOpLogger(),
27
- protocol: config?.protocol ?? AwsJson1_0Protocol,
28
- protocolSettings: config?.protocolSettings ?? {
29
- defaultNamespace: "com.amazonaws.dynamodb",
30
- errorTypeRegistries,
31
- xmlNamespace: "http://dynamodb.amazonaws.com/doc/2012-08-10/",
32
- version: "2012-08-10",
33
- serviceTarget: "DynamoDB_20120810",
34
- jsonCodec: new DynamoDBJsonCodec(),
35
- },
36
- serviceId: config?.serviceId ?? "DynamoDB",
37
- urlParser: config?.urlParser ?? parseUrl,
38
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
39
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
40
- };
41
- };