@aws-sdk/client-sqs 3.185.0 → 3.188.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist-cjs/protocols/Aws_query.js +8 -4
  3. package/dist-es/SQS.js +82 -89
  4. package/dist-es/SQSClient.js +22 -28
  5. package/dist-es/commands/AddPermissionCommand.js +22 -29
  6. package/dist-es/commands/ChangeMessageVisibilityBatchCommand.js +21 -28
  7. package/dist-es/commands/ChangeMessageVisibilityCommand.js +22 -29
  8. package/dist-es/commands/CreateQueueCommand.js +21 -28
  9. package/dist-es/commands/DeleteMessageBatchCommand.js +21 -28
  10. package/dist-es/commands/DeleteMessageCommand.js +22 -29
  11. package/dist-es/commands/DeleteQueueCommand.js +22 -29
  12. package/dist-es/commands/GetQueueAttributesCommand.js +21 -28
  13. package/dist-es/commands/GetQueueUrlCommand.js +21 -28
  14. package/dist-es/commands/ListDeadLetterSourceQueuesCommand.js +21 -28
  15. package/dist-es/commands/ListQueueTagsCommand.js +21 -28
  16. package/dist-es/commands/ListQueuesCommand.js +21 -28
  17. package/dist-es/commands/PurgeQueueCommand.js +22 -29
  18. package/dist-es/commands/ReceiveMessageCommand.js +21 -28
  19. package/dist-es/commands/RemovePermissionCommand.js +22 -29
  20. package/dist-es/commands/SendMessageBatchCommand.js +21 -28
  21. package/dist-es/commands/SendMessageCommand.js +21 -28
  22. package/dist-es/commands/SetQueueAttributesCommand.js +22 -29
  23. package/dist-es/commands/TagQueueCommand.js +22 -29
  24. package/dist-es/commands/UntagQueueCommand.js +22 -29
  25. package/dist-es/endpoints.js +8 -8
  26. package/dist-es/models/SQSServiceException.js +5 -10
  27. package/dist-es/models/models_0.js +315 -234
  28. package/dist-es/pagination/ListDeadLetterSourceQueuesPaginator.js +25 -68
  29. package/dist-es/pagination/ListQueuesPaginator.js +25 -68
  30. package/dist-es/protocols/Aws_query.js +1420 -1912
  31. package/dist-es/runtimeConfig.browser.js +27 -12
  32. package/dist-es/runtimeConfig.js +31 -12
  33. package/dist-es/runtimeConfig.native.js +8 -5
  34. package/dist-es/runtimeConfig.shared.js +8 -11
  35. package/package.json +36 -37
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-sqs
9
+
10
+
11
+
12
+
13
+
14
+ # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-sqs
17
+
18
+
19
+
20
+
21
+
6
22
  # [3.185.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.184.0...v3.185.0) (2022-10-05)
7
23
 
8
24
 
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deserializeAws_queryUntagQueueCommand = exports.deserializeAws_queryTagQueueCommand = exports.deserializeAws_querySetQueueAttributesCommand = exports.deserializeAws_querySendMessageBatchCommand = exports.deserializeAws_querySendMessageCommand = exports.deserializeAws_queryRemovePermissionCommand = exports.deserializeAws_queryReceiveMessageCommand = exports.deserializeAws_queryPurgeQueueCommand = exports.deserializeAws_queryListQueueTagsCommand = exports.deserializeAws_queryListQueuesCommand = exports.deserializeAws_queryListDeadLetterSourceQueuesCommand = exports.deserializeAws_queryGetQueueUrlCommand = exports.deserializeAws_queryGetQueueAttributesCommand = exports.deserializeAws_queryDeleteQueueCommand = exports.deserializeAws_queryDeleteMessageBatchCommand = exports.deserializeAws_queryDeleteMessageCommand = exports.deserializeAws_queryCreateQueueCommand = exports.deserializeAws_queryChangeMessageVisibilityBatchCommand = exports.deserializeAws_queryChangeMessageVisibilityCommand = exports.deserializeAws_queryAddPermissionCommand = exports.serializeAws_queryUntagQueueCommand = exports.serializeAws_queryTagQueueCommand = exports.serializeAws_querySetQueueAttributesCommand = exports.serializeAws_querySendMessageBatchCommand = exports.serializeAws_querySendMessageCommand = exports.serializeAws_queryRemovePermissionCommand = exports.serializeAws_queryReceiveMessageCommand = exports.serializeAws_queryPurgeQueueCommand = exports.serializeAws_queryListQueueTagsCommand = exports.serializeAws_queryListQueuesCommand = exports.serializeAws_queryListDeadLetterSourceQueuesCommand = exports.serializeAws_queryGetQueueUrlCommand = exports.serializeAws_queryGetQueueAttributesCommand = exports.serializeAws_queryDeleteQueueCommand = exports.serializeAws_queryDeleteMessageBatchCommand = exports.serializeAws_queryDeleteMessageCommand = exports.serializeAws_queryCreateQueueCommand = exports.serializeAws_queryChangeMessageVisibilityBatchCommand = exports.serializeAws_queryChangeMessageVisibilityCommand = exports.serializeAws_queryAddPermissionCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
- const entities_1 = require("entities");
7
6
  const fast_xml_parser_1 = require("fast-xml-parser");
8
7
  const models_0_1 = require("../models/models_0");
9
8
  const SQSServiceException_1 = require("../models/SQSServiceException");
@@ -2174,13 +2173,18 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2174
2173
  };
2175
2174
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2176
2175
  if (encoded.length) {
2177
- const parsedObj = (0, fast_xml_parser_1.parse)(encoded, {
2176
+ const parser = new fast_xml_parser_1.XMLParser({
2178
2177
  attributeNamePrefix: "",
2178
+ htmlEntities: true,
2179
2179
  ignoreAttributes: false,
2180
- parseNodeValue: false,
2180
+ ignoreDeclaration: true,
2181
+ parseTagValue: false,
2181
2182
  trimValues: false,
2182
- tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : (0, entities_1.decodeHTML)(val)),
2183
+ tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
2183
2184
  });
2185
+ parser.addEntity("#xD", "\r");
2186
+ parser.addEntity("#10", "\n");
2187
+ const parsedObj = parser.parse(encoded);
2184
2188
  const textNodeName = "#text";
2185
2189
  const key = Object.keys(parsedObj)[0];
2186
2190
  const parsedObjToReturn = parsedObj[key];
package/dist-es/SQS.js CHANGED
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { AddPermissionCommand, } from "./commands/AddPermissionCommand";
3
2
  import { ChangeMessageVisibilityBatchCommand, } from "./commands/ChangeMessageVisibilityBatchCommand";
4
3
  import { ChangeMessageVisibilityCommand, } from "./commands/ChangeMessageVisibilityCommand";
@@ -20,291 +19,285 @@ import { SetQueueAttributesCommand, } from "./commands/SetQueueAttributesCommand
20
19
  import { TagQueueCommand } from "./commands/TagQueueCommand";
21
20
  import { UntagQueueCommand } from "./commands/UntagQueueCommand";
22
21
  import { SQSClient } from "./SQSClient";
23
- var SQS = (function (_super) {
24
- __extends(SQS, _super);
25
- function SQS() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- SQS.prototype.addPermission = function (args, optionsOrCb, cb) {
29
- var command = new AddPermissionCommand(args);
22
+ export class SQS extends SQSClient {
23
+ addPermission(args, optionsOrCb, cb) {
24
+ const command = new AddPermissionCommand(args);
30
25
  if (typeof optionsOrCb === "function") {
31
26
  this.send(command, optionsOrCb);
32
27
  }
33
28
  else if (typeof cb === "function") {
34
29
  if (typeof optionsOrCb !== "object")
35
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
30
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
36
31
  this.send(command, optionsOrCb || {}, cb);
37
32
  }
38
33
  else {
39
34
  return this.send(command, optionsOrCb);
40
35
  }
41
- };
42
- SQS.prototype.changeMessageVisibility = function (args, optionsOrCb, cb) {
43
- var command = new ChangeMessageVisibilityCommand(args);
36
+ }
37
+ changeMessageVisibility(args, optionsOrCb, cb) {
38
+ const command = new ChangeMessageVisibilityCommand(args);
44
39
  if (typeof optionsOrCb === "function") {
45
40
  this.send(command, optionsOrCb);
46
41
  }
47
42
  else if (typeof cb === "function") {
48
43
  if (typeof optionsOrCb !== "object")
49
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
44
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
50
45
  this.send(command, optionsOrCb || {}, cb);
51
46
  }
52
47
  else {
53
48
  return this.send(command, optionsOrCb);
54
49
  }
55
- };
56
- SQS.prototype.changeMessageVisibilityBatch = function (args, optionsOrCb, cb) {
57
- var command = new ChangeMessageVisibilityBatchCommand(args);
50
+ }
51
+ changeMessageVisibilityBatch(args, optionsOrCb, cb) {
52
+ const command = new ChangeMessageVisibilityBatchCommand(args);
58
53
  if (typeof optionsOrCb === "function") {
59
54
  this.send(command, optionsOrCb);
60
55
  }
61
56
  else if (typeof cb === "function") {
62
57
  if (typeof optionsOrCb !== "object")
63
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
58
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
64
59
  this.send(command, optionsOrCb || {}, cb);
65
60
  }
66
61
  else {
67
62
  return this.send(command, optionsOrCb);
68
63
  }
69
- };
70
- SQS.prototype.createQueue = function (args, optionsOrCb, cb) {
71
- var command = new CreateQueueCommand(args);
64
+ }
65
+ createQueue(args, optionsOrCb, cb) {
66
+ const command = new CreateQueueCommand(args);
72
67
  if (typeof optionsOrCb === "function") {
73
68
  this.send(command, optionsOrCb);
74
69
  }
75
70
  else if (typeof cb === "function") {
76
71
  if (typeof optionsOrCb !== "object")
77
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
72
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
78
73
  this.send(command, optionsOrCb || {}, cb);
79
74
  }
80
75
  else {
81
76
  return this.send(command, optionsOrCb);
82
77
  }
83
- };
84
- SQS.prototype.deleteMessage = function (args, optionsOrCb, cb) {
85
- var command = new DeleteMessageCommand(args);
78
+ }
79
+ deleteMessage(args, optionsOrCb, cb) {
80
+ const command = new DeleteMessageCommand(args);
86
81
  if (typeof optionsOrCb === "function") {
87
82
  this.send(command, optionsOrCb);
88
83
  }
89
84
  else if (typeof cb === "function") {
90
85
  if (typeof optionsOrCb !== "object")
91
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
86
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
92
87
  this.send(command, optionsOrCb || {}, cb);
93
88
  }
94
89
  else {
95
90
  return this.send(command, optionsOrCb);
96
91
  }
97
- };
98
- SQS.prototype.deleteMessageBatch = function (args, optionsOrCb, cb) {
99
- var command = new DeleteMessageBatchCommand(args);
92
+ }
93
+ deleteMessageBatch(args, optionsOrCb, cb) {
94
+ const command = new DeleteMessageBatchCommand(args);
100
95
  if (typeof optionsOrCb === "function") {
101
96
  this.send(command, optionsOrCb);
102
97
  }
103
98
  else if (typeof cb === "function") {
104
99
  if (typeof optionsOrCb !== "object")
105
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
100
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
106
101
  this.send(command, optionsOrCb || {}, cb);
107
102
  }
108
103
  else {
109
104
  return this.send(command, optionsOrCb);
110
105
  }
111
- };
112
- SQS.prototype.deleteQueue = function (args, optionsOrCb, cb) {
113
- var command = new DeleteQueueCommand(args);
106
+ }
107
+ deleteQueue(args, optionsOrCb, cb) {
108
+ const command = new DeleteQueueCommand(args);
114
109
  if (typeof optionsOrCb === "function") {
115
110
  this.send(command, optionsOrCb);
116
111
  }
117
112
  else if (typeof cb === "function") {
118
113
  if (typeof optionsOrCb !== "object")
119
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
114
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
120
115
  this.send(command, optionsOrCb || {}, cb);
121
116
  }
122
117
  else {
123
118
  return this.send(command, optionsOrCb);
124
119
  }
125
- };
126
- SQS.prototype.getQueueAttributes = function (args, optionsOrCb, cb) {
127
- var command = new GetQueueAttributesCommand(args);
120
+ }
121
+ getQueueAttributes(args, optionsOrCb, cb) {
122
+ const command = new GetQueueAttributesCommand(args);
128
123
  if (typeof optionsOrCb === "function") {
129
124
  this.send(command, optionsOrCb);
130
125
  }
131
126
  else if (typeof cb === "function") {
132
127
  if (typeof optionsOrCb !== "object")
133
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
128
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
134
129
  this.send(command, optionsOrCb || {}, cb);
135
130
  }
136
131
  else {
137
132
  return this.send(command, optionsOrCb);
138
133
  }
139
- };
140
- SQS.prototype.getQueueUrl = function (args, optionsOrCb, cb) {
141
- var command = new GetQueueUrlCommand(args);
134
+ }
135
+ getQueueUrl(args, optionsOrCb, cb) {
136
+ const command = new GetQueueUrlCommand(args);
142
137
  if (typeof optionsOrCb === "function") {
143
138
  this.send(command, optionsOrCb);
144
139
  }
145
140
  else if (typeof cb === "function") {
146
141
  if (typeof optionsOrCb !== "object")
147
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
142
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
148
143
  this.send(command, optionsOrCb || {}, cb);
149
144
  }
150
145
  else {
151
146
  return this.send(command, optionsOrCb);
152
147
  }
153
- };
154
- SQS.prototype.listDeadLetterSourceQueues = function (args, optionsOrCb, cb) {
155
- var command = new ListDeadLetterSourceQueuesCommand(args);
148
+ }
149
+ listDeadLetterSourceQueues(args, optionsOrCb, cb) {
150
+ const command = new ListDeadLetterSourceQueuesCommand(args);
156
151
  if (typeof optionsOrCb === "function") {
157
152
  this.send(command, optionsOrCb);
158
153
  }
159
154
  else if (typeof cb === "function") {
160
155
  if (typeof optionsOrCb !== "object")
161
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
156
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
162
157
  this.send(command, optionsOrCb || {}, cb);
163
158
  }
164
159
  else {
165
160
  return this.send(command, optionsOrCb);
166
161
  }
167
- };
168
- SQS.prototype.listQueues = function (args, optionsOrCb, cb) {
169
- var command = new ListQueuesCommand(args);
162
+ }
163
+ listQueues(args, optionsOrCb, cb) {
164
+ const command = new ListQueuesCommand(args);
170
165
  if (typeof optionsOrCb === "function") {
171
166
  this.send(command, optionsOrCb);
172
167
  }
173
168
  else if (typeof cb === "function") {
174
169
  if (typeof optionsOrCb !== "object")
175
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
170
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
176
171
  this.send(command, optionsOrCb || {}, cb);
177
172
  }
178
173
  else {
179
174
  return this.send(command, optionsOrCb);
180
175
  }
181
- };
182
- SQS.prototype.listQueueTags = function (args, optionsOrCb, cb) {
183
- var command = new ListQueueTagsCommand(args);
176
+ }
177
+ listQueueTags(args, optionsOrCb, cb) {
178
+ const command = new ListQueueTagsCommand(args);
184
179
  if (typeof optionsOrCb === "function") {
185
180
  this.send(command, optionsOrCb);
186
181
  }
187
182
  else if (typeof cb === "function") {
188
183
  if (typeof optionsOrCb !== "object")
189
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
184
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
190
185
  this.send(command, optionsOrCb || {}, cb);
191
186
  }
192
187
  else {
193
188
  return this.send(command, optionsOrCb);
194
189
  }
195
- };
196
- SQS.prototype.purgeQueue = function (args, optionsOrCb, cb) {
197
- var command = new PurgeQueueCommand(args);
190
+ }
191
+ purgeQueue(args, optionsOrCb, cb) {
192
+ const command = new PurgeQueueCommand(args);
198
193
  if (typeof optionsOrCb === "function") {
199
194
  this.send(command, optionsOrCb);
200
195
  }
201
196
  else if (typeof cb === "function") {
202
197
  if (typeof optionsOrCb !== "object")
203
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
198
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
204
199
  this.send(command, optionsOrCb || {}, cb);
205
200
  }
206
201
  else {
207
202
  return this.send(command, optionsOrCb);
208
203
  }
209
- };
210
- SQS.prototype.receiveMessage = function (args, optionsOrCb, cb) {
211
- var command = new ReceiveMessageCommand(args);
204
+ }
205
+ receiveMessage(args, optionsOrCb, cb) {
206
+ const command = new ReceiveMessageCommand(args);
212
207
  if (typeof optionsOrCb === "function") {
213
208
  this.send(command, optionsOrCb);
214
209
  }
215
210
  else if (typeof cb === "function") {
216
211
  if (typeof optionsOrCb !== "object")
217
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
212
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
218
213
  this.send(command, optionsOrCb || {}, cb);
219
214
  }
220
215
  else {
221
216
  return this.send(command, optionsOrCb);
222
217
  }
223
- };
224
- SQS.prototype.removePermission = function (args, optionsOrCb, cb) {
225
- var command = new RemovePermissionCommand(args);
218
+ }
219
+ removePermission(args, optionsOrCb, cb) {
220
+ const command = new RemovePermissionCommand(args);
226
221
  if (typeof optionsOrCb === "function") {
227
222
  this.send(command, optionsOrCb);
228
223
  }
229
224
  else if (typeof cb === "function") {
230
225
  if (typeof optionsOrCb !== "object")
231
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
226
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
232
227
  this.send(command, optionsOrCb || {}, cb);
233
228
  }
234
229
  else {
235
230
  return this.send(command, optionsOrCb);
236
231
  }
237
- };
238
- SQS.prototype.sendMessage = function (args, optionsOrCb, cb) {
239
- var command = new SendMessageCommand(args);
232
+ }
233
+ sendMessage(args, optionsOrCb, cb) {
234
+ const command = new SendMessageCommand(args);
240
235
  if (typeof optionsOrCb === "function") {
241
236
  this.send(command, optionsOrCb);
242
237
  }
243
238
  else if (typeof cb === "function") {
244
239
  if (typeof optionsOrCb !== "object")
245
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
240
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
246
241
  this.send(command, optionsOrCb || {}, cb);
247
242
  }
248
243
  else {
249
244
  return this.send(command, optionsOrCb);
250
245
  }
251
- };
252
- SQS.prototype.sendMessageBatch = function (args, optionsOrCb, cb) {
253
- var command = new SendMessageBatchCommand(args);
246
+ }
247
+ sendMessageBatch(args, optionsOrCb, cb) {
248
+ const command = new SendMessageBatchCommand(args);
254
249
  if (typeof optionsOrCb === "function") {
255
250
  this.send(command, optionsOrCb);
256
251
  }
257
252
  else if (typeof cb === "function") {
258
253
  if (typeof optionsOrCb !== "object")
259
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
254
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
260
255
  this.send(command, optionsOrCb || {}, cb);
261
256
  }
262
257
  else {
263
258
  return this.send(command, optionsOrCb);
264
259
  }
265
- };
266
- SQS.prototype.setQueueAttributes = function (args, optionsOrCb, cb) {
267
- var command = new SetQueueAttributesCommand(args);
260
+ }
261
+ setQueueAttributes(args, optionsOrCb, cb) {
262
+ const command = new SetQueueAttributesCommand(args);
268
263
  if (typeof optionsOrCb === "function") {
269
264
  this.send(command, optionsOrCb);
270
265
  }
271
266
  else if (typeof cb === "function") {
272
267
  if (typeof optionsOrCb !== "object")
273
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
268
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
274
269
  this.send(command, optionsOrCb || {}, cb);
275
270
  }
276
271
  else {
277
272
  return this.send(command, optionsOrCb);
278
273
  }
279
- };
280
- SQS.prototype.tagQueue = function (args, optionsOrCb, cb) {
281
- var command = new TagQueueCommand(args);
274
+ }
275
+ tagQueue(args, optionsOrCb, cb) {
276
+ const command = new TagQueueCommand(args);
282
277
  if (typeof optionsOrCb === "function") {
283
278
  this.send(command, optionsOrCb);
284
279
  }
285
280
  else if (typeof cb === "function") {
286
281
  if (typeof optionsOrCb !== "object")
287
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
282
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
288
283
  this.send(command, optionsOrCb || {}, cb);
289
284
  }
290
285
  else {
291
286
  return this.send(command, optionsOrCb);
292
287
  }
293
- };
294
- SQS.prototype.untagQueue = function (args, optionsOrCb, cb) {
295
- var command = new UntagQueueCommand(args);
288
+ }
289
+ untagQueue(args, optionsOrCb, cb) {
290
+ const command = new UntagQueueCommand(args);
296
291
  if (typeof optionsOrCb === "function") {
297
292
  this.send(command, optionsOrCb);
298
293
  }
299
294
  else if (typeof cb === "function") {
300
295
  if (typeof optionsOrCb !== "object")
301
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
296
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
302
297
  this.send(command, optionsOrCb || {}, cb);
303
298
  }
304
299
  else {
305
300
  return this.send(command, optionsOrCb);
306
301
  }
307
- };
308
- return SQS;
309
- }(SQSClient));
310
- export { SQS };
302
+ }
303
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
3
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
9
8
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
10
9
  import { Client as __Client, } from "@aws-sdk/smithy-client";
11
10
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
12
- var SQSClient = (function (_super) {
13
- __extends(SQSClient, _super);
14
- function SQSClient(configuration) {
15
- var _this = this;
16
- var _config_0 = __getRuntimeConfig(configuration);
17
- var _config_1 = resolveRegionConfig(_config_0);
18
- var _config_2 = resolveEndpointsConfig(_config_1);
19
- var _config_3 = resolveRetryConfig(_config_2);
20
- var _config_4 = resolveHostHeaderConfig(_config_3);
21
- var _config_5 = resolveAwsAuthConfig(_config_4);
22
- var _config_6 = resolveUserAgentConfig(_config_5);
23
- _this = _super.call(this, _config_6) || this;
24
- _this.config = _config_6;
25
- _this.middlewareStack.use(getRetryPlugin(_this.config));
26
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
30
- _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
31
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
32
- return _this;
11
+ export class SQSClient extends __Client {
12
+ constructor(configuration) {
13
+ const _config_0 = __getRuntimeConfig(configuration);
14
+ const _config_1 = resolveRegionConfig(_config_0);
15
+ const _config_2 = resolveEndpointsConfig(_config_1);
16
+ const _config_3 = resolveRetryConfig(_config_2);
17
+ const _config_4 = resolveHostHeaderConfig(_config_3);
18
+ const _config_5 = resolveAwsAuthConfig(_config_4);
19
+ const _config_6 = resolveUserAgentConfig(_config_5);
20
+ super(_config_6);
21
+ this.config = _config_6;
22
+ this.middlewareStack.use(getRetryPlugin(this.config));
23
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
24
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
25
+ this.middlewareStack.use(getLoggerPlugin(this.config));
26
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
27
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
28
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
33
29
  }
34
- SQSClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return SQSClient;
38
- }(__Client));
39
- export { SQSClient };
30
+ destroy() {
31
+ super.destroy();
32
+ }
33
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { AddPermissionRequestFilterSensitiveLog } from "../models/models_0";
5
4
  import { deserializeAws_queryAddPermissionCommand, serializeAws_queryAddPermissionCommand, } from "../protocols/Aws_query";
6
- var AddPermissionCommand = (function (_super) {
7
- __extends(AddPermissionCommand, _super);
8
- function AddPermissionCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class AddPermissionCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- AddPermissionCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "SQSClient";
18
- var commandName = "AddPermissionCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "SQSClient";
15
+ const commandName = "AddPermissionCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: AddPermissionRequestFilterSensitiveLog,
24
- outputFilterSensitiveLog: function (output) { return output; },
21
+ outputFilterSensitiveLog: (output) => output,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- AddPermissionCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_queryAddPermissionCommand(input, context);
33
- };
34
- AddPermissionCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_queryAddPermissionCommand(output, context);
36
- };
37
- return AddPermissionCommand;
38
- }($Command));
39
- export { AddPermissionCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { ChangeMessageVisibilityBatchRequestFilterSensitiveLog, ChangeMessageVisibilityBatchResultFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_queryChangeMessageVisibilityBatchCommand, serializeAws_queryChangeMessageVisibilityBatchCommand, } from "../protocols/Aws_query";
6
- var ChangeMessageVisibilityBatchCommand = (function (_super) {
7
- __extends(ChangeMessageVisibilityBatchCommand, _super);
8
- function ChangeMessageVisibilityBatchCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class ChangeMessageVisibilityBatchCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- ChangeMessageVisibilityBatchCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "SQSClient";
18
- var commandName = "ChangeMessageVisibilityBatchCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "SQSClient";
15
+ const commandName = "ChangeMessageVisibilityBatchCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: ChangeMessageVisibilityBatchRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: ChangeMessageVisibilityBatchResultFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- ChangeMessageVisibilityBatchCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_queryChangeMessageVisibilityBatchCommand(input, context);
33
- };
34
- ChangeMessageVisibilityBatchCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_queryChangeMessageVisibilityBatchCommand(output, context);
36
- };
37
- return ChangeMessageVisibilityBatchCommand;
38
- }($Command));
39
- export { ChangeMessageVisibilityBatchCommand };
31
+ }
32
+ }