@aws-sdk/client-sqs 3.828.0 → 3.831.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
@@ -1231,33 +1231,40 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1231
1231
  throw await de_OverLimitRes(parsedOutput, context);
1232
1232
  case "QueueDoesNotExist":
1233
1233
  case "com.amazonaws.sqs#QueueDoesNotExist":
1234
+ case "AWS.SimpleQueueService.NonExistentQueue":
1234
1235
  throw await de_QueueDoesNotExistRes(parsedOutput, context);
1235
1236
  case "RequestThrottled":
1236
1237
  case "com.amazonaws.sqs#RequestThrottled":
1237
1238
  throw await de_RequestThrottledRes(parsedOutput, context);
1238
1239
  case "UnsupportedOperation":
1239
1240
  case "com.amazonaws.sqs#UnsupportedOperation":
1241
+ case "AWS.SimpleQueueService.UnsupportedOperation":
1240
1242
  throw await de_UnsupportedOperationRes(parsedOutput, context);
1241
1243
  case "ResourceNotFoundException":
1242
1244
  case "com.amazonaws.sqs#ResourceNotFoundException":
1243
1245
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1244
1246
  case "MessageNotInflight":
1245
1247
  case "com.amazonaws.sqs#MessageNotInflight":
1248
+ case "AWS.SimpleQueueService.MessageNotInflight":
1246
1249
  throw await de_MessageNotInflightRes(parsedOutput, context);
1247
1250
  case "ReceiptHandleIsInvalid":
1248
1251
  case "com.amazonaws.sqs#ReceiptHandleIsInvalid":
1249
1252
  throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context);
1250
1253
  case "BatchEntryIdsNotDistinct":
1251
1254
  case "com.amazonaws.sqs#BatchEntryIdsNotDistinct":
1255
+ case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct":
1252
1256
  throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context);
1253
1257
  case "EmptyBatchRequest":
1254
1258
  case "com.amazonaws.sqs#EmptyBatchRequest":
1259
+ case "AWS.SimpleQueueService.EmptyBatchRequest":
1255
1260
  throw await de_EmptyBatchRequestRes(parsedOutput, context);
1256
1261
  case "InvalidBatchEntryId":
1257
1262
  case "com.amazonaws.sqs#InvalidBatchEntryId":
1263
+ case "AWS.SimpleQueueService.InvalidBatchEntryId":
1258
1264
  throw await de_InvalidBatchEntryIdRes(parsedOutput, context);
1259
1265
  case "TooManyEntriesInBatchRequest":
1260
1266
  case "com.amazonaws.sqs#TooManyEntriesInBatchRequest":
1267
+ case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest":
1261
1268
  throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context);
1262
1269
  case "InvalidAttributeName":
1263
1270
  case "com.amazonaws.sqs#InvalidAttributeName":
@@ -1267,42 +1274,53 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1267
1274
  throw await de_InvalidAttributeValueRes(parsedOutput, context);
1268
1275
  case "QueueDeletedRecently":
1269
1276
  case "com.amazonaws.sqs#QueueDeletedRecently":
1277
+ case "AWS.SimpleQueueService.QueueDeletedRecently":
1270
1278
  throw await de_QueueDeletedRecentlyRes(parsedOutput, context);
1271
1279
  case "QueueNameExists":
1272
1280
  case "com.amazonaws.sqs#QueueNameExists":
1281
+ case "QueueAlreadyExists":
1273
1282
  throw await de_QueueNameExistsRes(parsedOutput, context);
1274
1283
  case "InvalidIdFormat":
1275
1284
  case "com.amazonaws.sqs#InvalidIdFormat":
1276
1285
  throw await de_InvalidIdFormatRes(parsedOutput, context);
1277
1286
  case "PurgeQueueInProgress":
1278
1287
  case "com.amazonaws.sqs#PurgeQueueInProgress":
1288
+ case "AWS.SimpleQueueService.PurgeQueueInProgress":
1279
1289
  throw await de_PurgeQueueInProgressRes(parsedOutput, context);
1280
1290
  case "KmsAccessDenied":
1281
1291
  case "com.amazonaws.sqs#KmsAccessDenied":
1292
+ case "KMS.AccessDeniedException":
1282
1293
  throw await de_KmsAccessDeniedRes(parsedOutput, context);
1283
1294
  case "KmsDisabled":
1284
1295
  case "com.amazonaws.sqs#KmsDisabled":
1296
+ case "KMS.DisabledException":
1285
1297
  throw await de_KmsDisabledRes(parsedOutput, context);
1286
1298
  case "KmsInvalidKeyUsage":
1287
1299
  case "com.amazonaws.sqs#KmsInvalidKeyUsage":
1300
+ case "KMS.InvalidKeyUsageException":
1288
1301
  throw await de_KmsInvalidKeyUsageRes(parsedOutput, context);
1289
1302
  case "KmsInvalidState":
1290
1303
  case "com.amazonaws.sqs#KmsInvalidState":
1304
+ case "KMS.InvalidStateException":
1291
1305
  throw await de_KmsInvalidStateRes(parsedOutput, context);
1292
1306
  case "KmsNotFound":
1293
1307
  case "com.amazonaws.sqs#KmsNotFound":
1308
+ case "KMS.NotFoundException":
1294
1309
  throw await de_KmsNotFoundRes(parsedOutput, context);
1295
1310
  case "KmsOptInRequired":
1296
1311
  case "com.amazonaws.sqs#KmsOptInRequired":
1312
+ case "KMS.OptInRequired":
1297
1313
  throw await de_KmsOptInRequiredRes(parsedOutput, context);
1298
1314
  case "KmsThrottled":
1299
1315
  case "com.amazonaws.sqs#KmsThrottled":
1316
+ case "KMS.ThrottlingException":
1300
1317
  throw await de_KmsThrottledRes(parsedOutput, context);
1301
1318
  case "InvalidMessageContents":
1302
1319
  case "com.amazonaws.sqs#InvalidMessageContents":
1303
1320
  throw await de_InvalidMessageContentsRes(parsedOutput, context);
1304
1321
  case "BatchRequestTooLong":
1305
1322
  case "com.amazonaws.sqs#BatchRequestTooLong":
1323
+ case "AWS.SimpleQueueService.BatchRequestTooLong":
1306
1324
  throw await de_BatchRequestTooLongRes(parsedOutput, context);
1307
1325
  default:
1308
1326
  const parsedBody = parsedOutput.body;
@@ -1935,9 +1953,18 @@ __name(sharedHeaders, "sharedHeaders");
1935
1953
  var populateBodyWithQueryCompatibility = /* @__PURE__ */ __name((parsedOutput, headers) => {
1936
1954
  const queryErrorHeader = headers["x-amzn-query-error"];
1937
1955
  if (parsedOutput.body !== void 0 && queryErrorHeader != null) {
1938
- const codeAndType = queryErrorHeader.split(";");
1939
- parsedOutput.body.Code = codeAndType[0];
1940
- parsedOutput.body.Type = codeAndType[1];
1956
+ const [Code, Type] = queryErrorHeader.split(";");
1957
+ const entries = Object.entries(parsedOutput.body);
1958
+ const Error2 = {
1959
+ Type,
1960
+ Code
1961
+ };
1962
+ Object.assign(parsedOutput.body, Error2);
1963
+ for (const [k, v] of entries) {
1964
+ Error2[k] = v;
1965
+ }
1966
+ delete Error2.__type;
1967
+ parsedOutput.body.Error = Error2;
1941
1968
  }
1942
1969
  }, "populateBodyWithQueryCompatibility");
1943
1970
 
@@ -432,33 +432,40 @@ const de_CommandError = async (output, context) => {
432
432
  throw await de_OverLimitRes(parsedOutput, context);
433
433
  case "QueueDoesNotExist":
434
434
  case "com.amazonaws.sqs#QueueDoesNotExist":
435
+ case "AWS.SimpleQueueService.NonExistentQueue":
435
436
  throw await de_QueueDoesNotExistRes(parsedOutput, context);
436
437
  case "RequestThrottled":
437
438
  case "com.amazonaws.sqs#RequestThrottled":
438
439
  throw await de_RequestThrottledRes(parsedOutput, context);
439
440
  case "UnsupportedOperation":
440
441
  case "com.amazonaws.sqs#UnsupportedOperation":
442
+ case "AWS.SimpleQueueService.UnsupportedOperation":
441
443
  throw await de_UnsupportedOperationRes(parsedOutput, context);
442
444
  case "ResourceNotFoundException":
443
445
  case "com.amazonaws.sqs#ResourceNotFoundException":
444
446
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
445
447
  case "MessageNotInflight":
446
448
  case "com.amazonaws.sqs#MessageNotInflight":
449
+ case "AWS.SimpleQueueService.MessageNotInflight":
447
450
  throw await de_MessageNotInflightRes(parsedOutput, context);
448
451
  case "ReceiptHandleIsInvalid":
449
452
  case "com.amazonaws.sqs#ReceiptHandleIsInvalid":
450
453
  throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context);
451
454
  case "BatchEntryIdsNotDistinct":
452
455
  case "com.amazonaws.sqs#BatchEntryIdsNotDistinct":
456
+ case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct":
453
457
  throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context);
454
458
  case "EmptyBatchRequest":
455
459
  case "com.amazonaws.sqs#EmptyBatchRequest":
460
+ case "AWS.SimpleQueueService.EmptyBatchRequest":
456
461
  throw await de_EmptyBatchRequestRes(parsedOutput, context);
457
462
  case "InvalidBatchEntryId":
458
463
  case "com.amazonaws.sqs#InvalidBatchEntryId":
464
+ case "AWS.SimpleQueueService.InvalidBatchEntryId":
459
465
  throw await de_InvalidBatchEntryIdRes(parsedOutput, context);
460
466
  case "TooManyEntriesInBatchRequest":
461
467
  case "com.amazonaws.sqs#TooManyEntriesInBatchRequest":
468
+ case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest":
462
469
  throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context);
463
470
  case "InvalidAttributeName":
464
471
  case "com.amazonaws.sqs#InvalidAttributeName":
@@ -468,42 +475,53 @@ const de_CommandError = async (output, context) => {
468
475
  throw await de_InvalidAttributeValueRes(parsedOutput, context);
469
476
  case "QueueDeletedRecently":
470
477
  case "com.amazonaws.sqs#QueueDeletedRecently":
478
+ case "AWS.SimpleQueueService.QueueDeletedRecently":
471
479
  throw await de_QueueDeletedRecentlyRes(parsedOutput, context);
472
480
  case "QueueNameExists":
473
481
  case "com.amazonaws.sqs#QueueNameExists":
482
+ case "QueueAlreadyExists":
474
483
  throw await de_QueueNameExistsRes(parsedOutput, context);
475
484
  case "InvalidIdFormat":
476
485
  case "com.amazonaws.sqs#InvalidIdFormat":
477
486
  throw await de_InvalidIdFormatRes(parsedOutput, context);
478
487
  case "PurgeQueueInProgress":
479
488
  case "com.amazonaws.sqs#PurgeQueueInProgress":
489
+ case "AWS.SimpleQueueService.PurgeQueueInProgress":
480
490
  throw await de_PurgeQueueInProgressRes(parsedOutput, context);
481
491
  case "KmsAccessDenied":
482
492
  case "com.amazonaws.sqs#KmsAccessDenied":
493
+ case "KMS.AccessDeniedException":
483
494
  throw await de_KmsAccessDeniedRes(parsedOutput, context);
484
495
  case "KmsDisabled":
485
496
  case "com.amazonaws.sqs#KmsDisabled":
497
+ case "KMS.DisabledException":
486
498
  throw await de_KmsDisabledRes(parsedOutput, context);
487
499
  case "KmsInvalidKeyUsage":
488
500
  case "com.amazonaws.sqs#KmsInvalidKeyUsage":
501
+ case "KMS.InvalidKeyUsageException":
489
502
  throw await de_KmsInvalidKeyUsageRes(parsedOutput, context);
490
503
  case "KmsInvalidState":
491
504
  case "com.amazonaws.sqs#KmsInvalidState":
505
+ case "KMS.InvalidStateException":
492
506
  throw await de_KmsInvalidStateRes(parsedOutput, context);
493
507
  case "KmsNotFound":
494
508
  case "com.amazonaws.sqs#KmsNotFound":
509
+ case "KMS.NotFoundException":
495
510
  throw await de_KmsNotFoundRes(parsedOutput, context);
496
511
  case "KmsOptInRequired":
497
512
  case "com.amazonaws.sqs#KmsOptInRequired":
513
+ case "KMS.OptInRequired":
498
514
  throw await de_KmsOptInRequiredRes(parsedOutput, context);
499
515
  case "KmsThrottled":
500
516
  case "com.amazonaws.sqs#KmsThrottled":
517
+ case "KMS.ThrottlingException":
501
518
  throw await de_KmsThrottledRes(parsedOutput, context);
502
519
  case "InvalidMessageContents":
503
520
  case "com.amazonaws.sqs#InvalidMessageContents":
504
521
  throw await de_InvalidMessageContentsRes(parsedOutput, context);
505
522
  case "BatchRequestTooLong":
506
523
  case "com.amazonaws.sqs#BatchRequestTooLong":
524
+ case "AWS.SimpleQueueService.BatchRequestTooLong":
507
525
  throw await de_BatchRequestTooLongRes(parsedOutput, context);
508
526
  default:
509
527
  const parsedBody = parsedOutput.body;
@@ -1159,8 +1177,17 @@ function sharedHeaders(operation) {
1159
1177
  const populateBodyWithQueryCompatibility = (parsedOutput, headers) => {
1160
1178
  const queryErrorHeader = headers["x-amzn-query-error"];
1161
1179
  if (parsedOutput.body !== undefined && queryErrorHeader != null) {
1162
- const codeAndType = queryErrorHeader.split(";");
1163
- parsedOutput.body.Code = codeAndType[0];
1164
- parsedOutput.body.Type = codeAndType[1];
1180
+ const [Code, Type] = queryErrorHeader.split(";");
1181
+ const entries = Object.entries(parsedOutput.body);
1182
+ const Error = {
1183
+ Type,
1184
+ Code,
1185
+ };
1186
+ Object.assign(parsedOutput.body, Error);
1187
+ for (const [k, v] of entries) {
1188
+ Error[k] = v;
1189
+ }
1190
+ delete Error.__type;
1191
+ parsedOutput.body.Error = Error;
1165
1192
  }
1166
1193
  };
@@ -3,9 +3,9 @@ import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provi
3
3
  * @public
4
4
  */
5
5
  export interface ClientInputEndpointParameters {
6
- region?: string | Provider<string>;
7
- useDualstackEndpoint?: boolean | Provider<boolean>;
8
- useFipsEndpoint?: boolean | Provider<boolean>;
6
+ region?: string | undefined | Provider<string | undefined>;
7
+ useDualstackEndpoint?: boolean | undefined | Provider<boolean | undefined>;
8
+ useFipsEndpoint?: boolean | undefined | Provider<boolean | undefined>;
9
9
  endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
10
10
  }
11
11
  export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & {
@@ -31,8 +31,8 @@ export declare const commonParams: {
31
31
  };
32
32
  };
33
33
  export interface EndpointParameters extends __EndpointParameters {
34
- Region?: string;
35
- UseDualStack?: boolean;
36
- UseFIPS?: boolean;
37
- Endpoint?: string;
34
+ Region?: string | undefined;
35
+ UseDualStack?: boolean | undefined;
36
+ UseFIPS?: boolean | undefined;
37
+ Endpoint?: string | undefined;
38
38
  }
@@ -16,8 +16,8 @@ export declare const getRuntimeConfig: (config: SQSClientConfig) => {
16
16
  retryMode: string | import("@smithy/types").Provider<string>;
17
17
  sha256: import("@smithy/types").HashConstructor;
18
18
  streamCollector: import("@smithy/types").StreamCollector;
19
- useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
20
- useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
19
+ useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
20
+ useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
21
21
  apiVersion: string;
22
22
  cacheMiddleware?: boolean | undefined;
23
23
  urlParser: import("@smithy/types").UrlParser;
@@ -17,8 +17,8 @@ export declare const getRuntimeConfig: (config: SQSClientConfig) => {
17
17
  utf8Encoder: (input: Uint8Array | string) => string;
18
18
  disableHostPrefix: boolean;
19
19
  serviceId: string;
20
- useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
21
- useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
20
+ useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
21
+ useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
22
22
  region: string | import("@smithy/types").Provider<any>;
23
23
  profile?: string;
24
24
  defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
@@ -5,9 +5,9 @@ import {
5
5
  Provider,
6
6
  } from "@smithy/types";
7
7
  export interface ClientInputEndpointParameters {
8
- region?: string | Provider<string>;
9
- useDualstackEndpoint?: boolean | Provider<boolean>;
10
- useFipsEndpoint?: boolean | Provider<boolean>;
8
+ region?: string | undefined | Provider<string | undefined>;
9
+ useDualstackEndpoint?: boolean | undefined | Provider<boolean | undefined>;
10
+ useFipsEndpoint?: boolean | undefined | Provider<boolean | undefined>;
11
11
  endpoint?:
12
12
  | string
13
13
  | Provider<string>
@@ -41,8 +41,8 @@ export declare const commonParams: {
41
41
  };
42
42
  };
43
43
  export interface EndpointParameters extends __EndpointParameters {
44
- Region?: string;
45
- UseDualStack?: boolean;
46
- UseFIPS?: boolean;
47
- Endpoint?: string;
44
+ Region?: string | undefined;
45
+ UseDualStack?: boolean | undefined;
46
+ UseFIPS?: boolean | undefined;
47
+ Endpoint?: string | undefined;
48
48
  }
@@ -23,8 +23,10 @@ export declare const getRuntimeConfig: (config: SQSClientConfig) => {
23
23
  retryMode: string | import("@smithy/types").Provider<string>;
24
24
  sha256: import("@smithy/types").HashConstructor;
25
25
  streamCollector: import("@smithy/types").StreamCollector;
26
- useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
27
- useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
26
+ useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
27
+ (boolean | import("@smithy/types").Provider<boolean | undefined>);
28
+ useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
29
+ (boolean | import("@smithy/types").Provider<boolean | undefined>);
28
30
  apiVersion: string;
29
31
  cacheMiddleware?: boolean | undefined;
30
32
  urlParser: import("@smithy/types").UrlParser;
@@ -19,8 +19,10 @@ export declare const getRuntimeConfig: (config: SQSClientConfig) => {
19
19
  utf8Encoder: (input: Uint8Array | string) => string;
20
20
  disableHostPrefix: boolean;
21
21
  serviceId: string;
22
- useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
23
- useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
22
+ useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
23
+ (boolean | import("@smithy/types").Provider<boolean | undefined>);
24
+ useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
25
+ (boolean | import("@smithy/types").Provider<boolean | undefined>);
24
26
  region: string | import("@smithy/types").Provider<any>;
25
27
  profile?: string;
26
28
  defaultUserAgentProvider: (
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sqs",
3
3
  "description": "AWS SDK for JavaScript Sqs Client for Node.js, Browser and React Native",
4
- "version": "3.828.0",
4
+ "version": "3.831.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-sqs",
@@ -21,7 +21,7 @@
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
23
  "@aws-sdk/core": "3.826.0",
24
- "@aws-sdk/credential-provider-node": "3.828.0",
24
+ "@aws-sdk/credential-provider-node": "3.830.0",
25
25
  "@aws-sdk/middleware-host-header": "3.821.0",
26
26
  "@aws-sdk/middleware-logger": "3.821.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.821.0",