@aws-sdk/client-sns 3.183.0 → 3.186.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 (63) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/protocols/Aws_query.js +2 -2
  3. package/dist-es/SNS.js +177 -170
  4. package/dist-es/SNSClient.js +28 -22
  5. package/dist-es/commands/AddPermissionCommand.js +29 -22
  6. package/dist-es/commands/CheckIfPhoneNumberIsOptedOutCommand.js +28 -21
  7. package/dist-es/commands/ConfirmSubscriptionCommand.js +28 -21
  8. package/dist-es/commands/CreatePlatformApplicationCommand.js +28 -21
  9. package/dist-es/commands/CreatePlatformEndpointCommand.js +28 -21
  10. package/dist-es/commands/CreateSMSSandboxPhoneNumberCommand.js +28 -21
  11. package/dist-es/commands/CreateTopicCommand.js +28 -21
  12. package/dist-es/commands/DeleteEndpointCommand.js +29 -22
  13. package/dist-es/commands/DeletePlatformApplicationCommand.js +29 -22
  14. package/dist-es/commands/DeleteSMSSandboxPhoneNumberCommand.js +28 -21
  15. package/dist-es/commands/DeleteTopicCommand.js +29 -22
  16. package/dist-es/commands/GetDataProtectionPolicyCommand.js +28 -21
  17. package/dist-es/commands/GetEndpointAttributesCommand.js +28 -21
  18. package/dist-es/commands/GetPlatformApplicationAttributesCommand.js +28 -21
  19. package/dist-es/commands/GetSMSAttributesCommand.js +28 -21
  20. package/dist-es/commands/GetSMSSandboxAccountStatusCommand.js +28 -21
  21. package/dist-es/commands/GetSubscriptionAttributesCommand.js +28 -21
  22. package/dist-es/commands/GetTopicAttributesCommand.js +28 -21
  23. package/dist-es/commands/ListEndpointsByPlatformApplicationCommand.js +28 -21
  24. package/dist-es/commands/ListOriginationNumbersCommand.js +28 -21
  25. package/dist-es/commands/ListPhoneNumbersOptedOutCommand.js +28 -21
  26. package/dist-es/commands/ListPlatformApplicationsCommand.js +28 -21
  27. package/dist-es/commands/ListSMSSandboxPhoneNumbersCommand.js +28 -21
  28. package/dist-es/commands/ListSubscriptionsByTopicCommand.js +28 -21
  29. package/dist-es/commands/ListSubscriptionsCommand.js +28 -21
  30. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  31. package/dist-es/commands/ListTopicsCommand.js +28 -21
  32. package/dist-es/commands/OptInPhoneNumberCommand.js +28 -21
  33. package/dist-es/commands/PublishBatchCommand.js +28 -21
  34. package/dist-es/commands/PublishCommand.js +28 -21
  35. package/dist-es/commands/PutDataProtectionPolicyCommand.js +29 -22
  36. package/dist-es/commands/RemovePermissionCommand.js +29 -22
  37. package/dist-es/commands/SetEndpointAttributesCommand.js +29 -22
  38. package/dist-es/commands/SetPlatformApplicationAttributesCommand.js +29 -22
  39. package/dist-es/commands/SetSMSAttributesCommand.js +28 -21
  40. package/dist-es/commands/SetSubscriptionAttributesCommand.js +29 -22
  41. package/dist-es/commands/SetTopicAttributesCommand.js +29 -22
  42. package/dist-es/commands/SubscribeCommand.js +28 -21
  43. package/dist-es/commands/TagResourceCommand.js +28 -21
  44. package/dist-es/commands/UnsubscribeCommand.js +29 -22
  45. package/dist-es/commands/UntagResourceCommand.js +28 -21
  46. package/dist-es/commands/VerifySMSSandboxPhoneNumberCommand.js +28 -21
  47. package/dist-es/endpoints.js +8 -8
  48. package/dist-es/models/SNSServiceException.js +10 -5
  49. package/dist-es/models/models_0.js +472 -639
  50. package/dist-es/pagination/ListEndpointsByPlatformApplicationPaginator.js +67 -24
  51. package/dist-es/pagination/ListOriginationNumbersPaginator.js +68 -25
  52. package/dist-es/pagination/ListPhoneNumbersOptedOutPaginator.js +67 -24
  53. package/dist-es/pagination/ListPlatformApplicationsPaginator.js +67 -24
  54. package/dist-es/pagination/ListSMSSandboxPhoneNumbersPaginator.js +68 -25
  55. package/dist-es/pagination/ListSubscriptionsByTopicPaginator.js +67 -24
  56. package/dist-es/pagination/ListSubscriptionsPaginator.js +67 -24
  57. package/dist-es/pagination/ListTopicsPaginator.js +67 -24
  58. package/dist-es/protocols/Aws_query.js +4117 -3124
  59. package/dist-es/runtimeConfig.browser.js +12 -26
  60. package/dist-es/runtimeConfig.js +12 -30
  61. package/dist-es/runtimeConfig.native.js +5 -8
  62. package/dist-es/runtimeConfig.shared.js +11 -8
  63. package/package.json +33 -33
package/dist-es/SNS.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { __extends } from "tslib";
1
2
  import { AddPermissionCommand, } from "./commands/AddPermissionCommand";
2
3
  import { CheckIfPhoneNumberIsOptedOutCommand, } from "./commands/CheckIfPhoneNumberIsOptedOutCommand";
3
4
  import { ConfirmSubscriptionCommand, } from "./commands/ConfirmSubscriptionCommand";
@@ -41,593 +42,599 @@ import { UnsubscribeCommand } from "./commands/UnsubscribeCommand";
41
42
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
42
43
  import { VerifySMSSandboxPhoneNumberCommand, } from "./commands/VerifySMSSandboxPhoneNumberCommand";
43
44
  import { SNSClient } from "./SNSClient";
44
- export class SNS extends SNSClient {
45
- addPermission(args, optionsOrCb, cb) {
46
- const command = new AddPermissionCommand(args);
45
+ var SNS = (function (_super) {
46
+ __extends(SNS, _super);
47
+ function SNS() {
48
+ return _super !== null && _super.apply(this, arguments) || this;
49
+ }
50
+ SNS.prototype.addPermission = function (args, optionsOrCb, cb) {
51
+ var command = new AddPermissionCommand(args);
47
52
  if (typeof optionsOrCb === "function") {
48
53
  this.send(command, optionsOrCb);
49
54
  }
50
55
  else if (typeof cb === "function") {
51
56
  if (typeof optionsOrCb !== "object")
52
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
57
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
53
58
  this.send(command, optionsOrCb || {}, cb);
54
59
  }
55
60
  else {
56
61
  return this.send(command, optionsOrCb);
57
62
  }
58
- }
59
- checkIfPhoneNumberIsOptedOut(args, optionsOrCb, cb) {
60
- const command = new CheckIfPhoneNumberIsOptedOutCommand(args);
63
+ };
64
+ SNS.prototype.checkIfPhoneNumberIsOptedOut = function (args, optionsOrCb, cb) {
65
+ var command = new CheckIfPhoneNumberIsOptedOutCommand(args);
61
66
  if (typeof optionsOrCb === "function") {
62
67
  this.send(command, optionsOrCb);
63
68
  }
64
69
  else if (typeof cb === "function") {
65
70
  if (typeof optionsOrCb !== "object")
66
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
71
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
67
72
  this.send(command, optionsOrCb || {}, cb);
68
73
  }
69
74
  else {
70
75
  return this.send(command, optionsOrCb);
71
76
  }
72
- }
73
- confirmSubscription(args, optionsOrCb, cb) {
74
- const command = new ConfirmSubscriptionCommand(args);
77
+ };
78
+ SNS.prototype.confirmSubscription = function (args, optionsOrCb, cb) {
79
+ var command = new ConfirmSubscriptionCommand(args);
75
80
  if (typeof optionsOrCb === "function") {
76
81
  this.send(command, optionsOrCb);
77
82
  }
78
83
  else if (typeof cb === "function") {
79
84
  if (typeof optionsOrCb !== "object")
80
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
85
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
81
86
  this.send(command, optionsOrCb || {}, cb);
82
87
  }
83
88
  else {
84
89
  return this.send(command, optionsOrCb);
85
90
  }
86
- }
87
- createPlatformApplication(args, optionsOrCb, cb) {
88
- const command = new CreatePlatformApplicationCommand(args);
91
+ };
92
+ SNS.prototype.createPlatformApplication = function (args, optionsOrCb, cb) {
93
+ var command = new CreatePlatformApplicationCommand(args);
89
94
  if (typeof optionsOrCb === "function") {
90
95
  this.send(command, optionsOrCb);
91
96
  }
92
97
  else if (typeof cb === "function") {
93
98
  if (typeof optionsOrCb !== "object")
94
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
99
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
95
100
  this.send(command, optionsOrCb || {}, cb);
96
101
  }
97
102
  else {
98
103
  return this.send(command, optionsOrCb);
99
104
  }
100
- }
101
- createPlatformEndpoint(args, optionsOrCb, cb) {
102
- const command = new CreatePlatformEndpointCommand(args);
105
+ };
106
+ SNS.prototype.createPlatformEndpoint = function (args, optionsOrCb, cb) {
107
+ var command = new CreatePlatformEndpointCommand(args);
103
108
  if (typeof optionsOrCb === "function") {
104
109
  this.send(command, optionsOrCb);
105
110
  }
106
111
  else if (typeof cb === "function") {
107
112
  if (typeof optionsOrCb !== "object")
108
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
113
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
109
114
  this.send(command, optionsOrCb || {}, cb);
110
115
  }
111
116
  else {
112
117
  return this.send(command, optionsOrCb);
113
118
  }
114
- }
115
- createSMSSandboxPhoneNumber(args, optionsOrCb, cb) {
116
- const command = new CreateSMSSandboxPhoneNumberCommand(args);
119
+ };
120
+ SNS.prototype.createSMSSandboxPhoneNumber = function (args, optionsOrCb, cb) {
121
+ var command = new CreateSMSSandboxPhoneNumberCommand(args);
117
122
  if (typeof optionsOrCb === "function") {
118
123
  this.send(command, optionsOrCb);
119
124
  }
120
125
  else if (typeof cb === "function") {
121
126
  if (typeof optionsOrCb !== "object")
122
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
127
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
123
128
  this.send(command, optionsOrCb || {}, cb);
124
129
  }
125
130
  else {
126
131
  return this.send(command, optionsOrCb);
127
132
  }
128
- }
129
- createTopic(args, optionsOrCb, cb) {
130
- const command = new CreateTopicCommand(args);
133
+ };
134
+ SNS.prototype.createTopic = function (args, optionsOrCb, cb) {
135
+ var command = new CreateTopicCommand(args);
131
136
  if (typeof optionsOrCb === "function") {
132
137
  this.send(command, optionsOrCb);
133
138
  }
134
139
  else if (typeof cb === "function") {
135
140
  if (typeof optionsOrCb !== "object")
136
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
141
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
137
142
  this.send(command, optionsOrCb || {}, cb);
138
143
  }
139
144
  else {
140
145
  return this.send(command, optionsOrCb);
141
146
  }
142
- }
143
- deleteEndpoint(args, optionsOrCb, cb) {
144
- const command = new DeleteEndpointCommand(args);
147
+ };
148
+ SNS.prototype.deleteEndpoint = function (args, optionsOrCb, cb) {
149
+ var command = new DeleteEndpointCommand(args);
145
150
  if (typeof optionsOrCb === "function") {
146
151
  this.send(command, optionsOrCb);
147
152
  }
148
153
  else if (typeof cb === "function") {
149
154
  if (typeof optionsOrCb !== "object")
150
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
155
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
151
156
  this.send(command, optionsOrCb || {}, cb);
152
157
  }
153
158
  else {
154
159
  return this.send(command, optionsOrCb);
155
160
  }
156
- }
157
- deletePlatformApplication(args, optionsOrCb, cb) {
158
- const command = new DeletePlatformApplicationCommand(args);
161
+ };
162
+ SNS.prototype.deletePlatformApplication = function (args, optionsOrCb, cb) {
163
+ var command = new DeletePlatformApplicationCommand(args);
159
164
  if (typeof optionsOrCb === "function") {
160
165
  this.send(command, optionsOrCb);
161
166
  }
162
167
  else if (typeof cb === "function") {
163
168
  if (typeof optionsOrCb !== "object")
164
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
169
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
165
170
  this.send(command, optionsOrCb || {}, cb);
166
171
  }
167
172
  else {
168
173
  return this.send(command, optionsOrCb);
169
174
  }
170
- }
171
- deleteSMSSandboxPhoneNumber(args, optionsOrCb, cb) {
172
- const command = new DeleteSMSSandboxPhoneNumberCommand(args);
175
+ };
176
+ SNS.prototype.deleteSMSSandboxPhoneNumber = function (args, optionsOrCb, cb) {
177
+ var command = new DeleteSMSSandboxPhoneNumberCommand(args);
173
178
  if (typeof optionsOrCb === "function") {
174
179
  this.send(command, optionsOrCb);
175
180
  }
176
181
  else if (typeof cb === "function") {
177
182
  if (typeof optionsOrCb !== "object")
178
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
183
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
179
184
  this.send(command, optionsOrCb || {}, cb);
180
185
  }
181
186
  else {
182
187
  return this.send(command, optionsOrCb);
183
188
  }
184
- }
185
- deleteTopic(args, optionsOrCb, cb) {
186
- const command = new DeleteTopicCommand(args);
189
+ };
190
+ SNS.prototype.deleteTopic = function (args, optionsOrCb, cb) {
191
+ var command = new DeleteTopicCommand(args);
187
192
  if (typeof optionsOrCb === "function") {
188
193
  this.send(command, optionsOrCb);
189
194
  }
190
195
  else if (typeof cb === "function") {
191
196
  if (typeof optionsOrCb !== "object")
192
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
197
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
193
198
  this.send(command, optionsOrCb || {}, cb);
194
199
  }
195
200
  else {
196
201
  return this.send(command, optionsOrCb);
197
202
  }
198
- }
199
- getDataProtectionPolicy(args, optionsOrCb, cb) {
200
- const command = new GetDataProtectionPolicyCommand(args);
203
+ };
204
+ SNS.prototype.getDataProtectionPolicy = function (args, optionsOrCb, cb) {
205
+ var command = new GetDataProtectionPolicyCommand(args);
201
206
  if (typeof optionsOrCb === "function") {
202
207
  this.send(command, optionsOrCb);
203
208
  }
204
209
  else if (typeof cb === "function") {
205
210
  if (typeof optionsOrCb !== "object")
206
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
211
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
207
212
  this.send(command, optionsOrCb || {}, cb);
208
213
  }
209
214
  else {
210
215
  return this.send(command, optionsOrCb);
211
216
  }
212
- }
213
- getEndpointAttributes(args, optionsOrCb, cb) {
214
- const command = new GetEndpointAttributesCommand(args);
217
+ };
218
+ SNS.prototype.getEndpointAttributes = function (args, optionsOrCb, cb) {
219
+ var command = new GetEndpointAttributesCommand(args);
215
220
  if (typeof optionsOrCb === "function") {
216
221
  this.send(command, optionsOrCb);
217
222
  }
218
223
  else if (typeof cb === "function") {
219
224
  if (typeof optionsOrCb !== "object")
220
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
225
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
221
226
  this.send(command, optionsOrCb || {}, cb);
222
227
  }
223
228
  else {
224
229
  return this.send(command, optionsOrCb);
225
230
  }
226
- }
227
- getPlatformApplicationAttributes(args, optionsOrCb, cb) {
228
- const command = new GetPlatformApplicationAttributesCommand(args);
231
+ };
232
+ SNS.prototype.getPlatformApplicationAttributes = function (args, optionsOrCb, cb) {
233
+ var command = new GetPlatformApplicationAttributesCommand(args);
229
234
  if (typeof optionsOrCb === "function") {
230
235
  this.send(command, optionsOrCb);
231
236
  }
232
237
  else if (typeof cb === "function") {
233
238
  if (typeof optionsOrCb !== "object")
234
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
239
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
235
240
  this.send(command, optionsOrCb || {}, cb);
236
241
  }
237
242
  else {
238
243
  return this.send(command, optionsOrCb);
239
244
  }
240
- }
241
- getSMSAttributes(args, optionsOrCb, cb) {
242
- const command = new GetSMSAttributesCommand(args);
245
+ };
246
+ SNS.prototype.getSMSAttributes = function (args, optionsOrCb, cb) {
247
+ var command = new GetSMSAttributesCommand(args);
243
248
  if (typeof optionsOrCb === "function") {
244
249
  this.send(command, optionsOrCb);
245
250
  }
246
251
  else if (typeof cb === "function") {
247
252
  if (typeof optionsOrCb !== "object")
248
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
253
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
249
254
  this.send(command, optionsOrCb || {}, cb);
250
255
  }
251
256
  else {
252
257
  return this.send(command, optionsOrCb);
253
258
  }
254
- }
255
- getSMSSandboxAccountStatus(args, optionsOrCb, cb) {
256
- const command = new GetSMSSandboxAccountStatusCommand(args);
259
+ };
260
+ SNS.prototype.getSMSSandboxAccountStatus = function (args, optionsOrCb, cb) {
261
+ var command = new GetSMSSandboxAccountStatusCommand(args);
257
262
  if (typeof optionsOrCb === "function") {
258
263
  this.send(command, optionsOrCb);
259
264
  }
260
265
  else if (typeof cb === "function") {
261
266
  if (typeof optionsOrCb !== "object")
262
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
267
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
263
268
  this.send(command, optionsOrCb || {}, cb);
264
269
  }
265
270
  else {
266
271
  return this.send(command, optionsOrCb);
267
272
  }
268
- }
269
- getSubscriptionAttributes(args, optionsOrCb, cb) {
270
- const command = new GetSubscriptionAttributesCommand(args);
273
+ };
274
+ SNS.prototype.getSubscriptionAttributes = function (args, optionsOrCb, cb) {
275
+ var command = new GetSubscriptionAttributesCommand(args);
271
276
  if (typeof optionsOrCb === "function") {
272
277
  this.send(command, optionsOrCb);
273
278
  }
274
279
  else if (typeof cb === "function") {
275
280
  if (typeof optionsOrCb !== "object")
276
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
281
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
277
282
  this.send(command, optionsOrCb || {}, cb);
278
283
  }
279
284
  else {
280
285
  return this.send(command, optionsOrCb);
281
286
  }
282
- }
283
- getTopicAttributes(args, optionsOrCb, cb) {
284
- const command = new GetTopicAttributesCommand(args);
287
+ };
288
+ SNS.prototype.getTopicAttributes = function (args, optionsOrCb, cb) {
289
+ var command = new GetTopicAttributesCommand(args);
285
290
  if (typeof optionsOrCb === "function") {
286
291
  this.send(command, optionsOrCb);
287
292
  }
288
293
  else if (typeof cb === "function") {
289
294
  if (typeof optionsOrCb !== "object")
290
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
295
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
291
296
  this.send(command, optionsOrCb || {}, cb);
292
297
  }
293
298
  else {
294
299
  return this.send(command, optionsOrCb);
295
300
  }
296
- }
297
- listEndpointsByPlatformApplication(args, optionsOrCb, cb) {
298
- const command = new ListEndpointsByPlatformApplicationCommand(args);
301
+ };
302
+ SNS.prototype.listEndpointsByPlatformApplication = function (args, optionsOrCb, cb) {
303
+ var command = new ListEndpointsByPlatformApplicationCommand(args);
299
304
  if (typeof optionsOrCb === "function") {
300
305
  this.send(command, optionsOrCb);
301
306
  }
302
307
  else if (typeof cb === "function") {
303
308
  if (typeof optionsOrCb !== "object")
304
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
309
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
305
310
  this.send(command, optionsOrCb || {}, cb);
306
311
  }
307
312
  else {
308
313
  return this.send(command, optionsOrCb);
309
314
  }
310
- }
311
- listOriginationNumbers(args, optionsOrCb, cb) {
312
- const command = new ListOriginationNumbersCommand(args);
315
+ };
316
+ SNS.prototype.listOriginationNumbers = function (args, optionsOrCb, cb) {
317
+ var command = new ListOriginationNumbersCommand(args);
313
318
  if (typeof optionsOrCb === "function") {
314
319
  this.send(command, optionsOrCb);
315
320
  }
316
321
  else if (typeof cb === "function") {
317
322
  if (typeof optionsOrCb !== "object")
318
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
323
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
319
324
  this.send(command, optionsOrCb || {}, cb);
320
325
  }
321
326
  else {
322
327
  return this.send(command, optionsOrCb);
323
328
  }
324
- }
325
- listPhoneNumbersOptedOut(args, optionsOrCb, cb) {
326
- const command = new ListPhoneNumbersOptedOutCommand(args);
329
+ };
330
+ SNS.prototype.listPhoneNumbersOptedOut = function (args, optionsOrCb, cb) {
331
+ var command = new ListPhoneNumbersOptedOutCommand(args);
327
332
  if (typeof optionsOrCb === "function") {
328
333
  this.send(command, optionsOrCb);
329
334
  }
330
335
  else if (typeof cb === "function") {
331
336
  if (typeof optionsOrCb !== "object")
332
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
337
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
333
338
  this.send(command, optionsOrCb || {}, cb);
334
339
  }
335
340
  else {
336
341
  return this.send(command, optionsOrCb);
337
342
  }
338
- }
339
- listPlatformApplications(args, optionsOrCb, cb) {
340
- const command = new ListPlatformApplicationsCommand(args);
343
+ };
344
+ SNS.prototype.listPlatformApplications = function (args, optionsOrCb, cb) {
345
+ var command = new ListPlatformApplicationsCommand(args);
341
346
  if (typeof optionsOrCb === "function") {
342
347
  this.send(command, optionsOrCb);
343
348
  }
344
349
  else if (typeof cb === "function") {
345
350
  if (typeof optionsOrCb !== "object")
346
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
351
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
347
352
  this.send(command, optionsOrCb || {}, cb);
348
353
  }
349
354
  else {
350
355
  return this.send(command, optionsOrCb);
351
356
  }
352
- }
353
- listSMSSandboxPhoneNumbers(args, optionsOrCb, cb) {
354
- const command = new ListSMSSandboxPhoneNumbersCommand(args);
357
+ };
358
+ SNS.prototype.listSMSSandboxPhoneNumbers = function (args, optionsOrCb, cb) {
359
+ var command = new ListSMSSandboxPhoneNumbersCommand(args);
355
360
  if (typeof optionsOrCb === "function") {
356
361
  this.send(command, optionsOrCb);
357
362
  }
358
363
  else if (typeof cb === "function") {
359
364
  if (typeof optionsOrCb !== "object")
360
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
365
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
361
366
  this.send(command, optionsOrCb || {}, cb);
362
367
  }
363
368
  else {
364
369
  return this.send(command, optionsOrCb);
365
370
  }
366
- }
367
- listSubscriptions(args, optionsOrCb, cb) {
368
- const command = new ListSubscriptionsCommand(args);
371
+ };
372
+ SNS.prototype.listSubscriptions = function (args, optionsOrCb, cb) {
373
+ var command = new ListSubscriptionsCommand(args);
369
374
  if (typeof optionsOrCb === "function") {
370
375
  this.send(command, optionsOrCb);
371
376
  }
372
377
  else if (typeof cb === "function") {
373
378
  if (typeof optionsOrCb !== "object")
374
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
379
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
375
380
  this.send(command, optionsOrCb || {}, cb);
376
381
  }
377
382
  else {
378
383
  return this.send(command, optionsOrCb);
379
384
  }
380
- }
381
- listSubscriptionsByTopic(args, optionsOrCb, cb) {
382
- const command = new ListSubscriptionsByTopicCommand(args);
385
+ };
386
+ SNS.prototype.listSubscriptionsByTopic = function (args, optionsOrCb, cb) {
387
+ var command = new ListSubscriptionsByTopicCommand(args);
383
388
  if (typeof optionsOrCb === "function") {
384
389
  this.send(command, optionsOrCb);
385
390
  }
386
391
  else if (typeof cb === "function") {
387
392
  if (typeof optionsOrCb !== "object")
388
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
393
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
389
394
  this.send(command, optionsOrCb || {}, cb);
390
395
  }
391
396
  else {
392
397
  return this.send(command, optionsOrCb);
393
398
  }
394
- }
395
- listTagsForResource(args, optionsOrCb, cb) {
396
- const command = new ListTagsForResourceCommand(args);
399
+ };
400
+ SNS.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
401
+ var command = new ListTagsForResourceCommand(args);
397
402
  if (typeof optionsOrCb === "function") {
398
403
  this.send(command, optionsOrCb);
399
404
  }
400
405
  else if (typeof cb === "function") {
401
406
  if (typeof optionsOrCb !== "object")
402
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
407
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
403
408
  this.send(command, optionsOrCb || {}, cb);
404
409
  }
405
410
  else {
406
411
  return this.send(command, optionsOrCb);
407
412
  }
408
- }
409
- listTopics(args, optionsOrCb, cb) {
410
- const command = new ListTopicsCommand(args);
413
+ };
414
+ SNS.prototype.listTopics = function (args, optionsOrCb, cb) {
415
+ var command = new ListTopicsCommand(args);
411
416
  if (typeof optionsOrCb === "function") {
412
417
  this.send(command, optionsOrCb);
413
418
  }
414
419
  else if (typeof cb === "function") {
415
420
  if (typeof optionsOrCb !== "object")
416
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
421
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
417
422
  this.send(command, optionsOrCb || {}, cb);
418
423
  }
419
424
  else {
420
425
  return this.send(command, optionsOrCb);
421
426
  }
422
- }
423
- optInPhoneNumber(args, optionsOrCb, cb) {
424
- const command = new OptInPhoneNumberCommand(args);
427
+ };
428
+ SNS.prototype.optInPhoneNumber = function (args, optionsOrCb, cb) {
429
+ var command = new OptInPhoneNumberCommand(args);
425
430
  if (typeof optionsOrCb === "function") {
426
431
  this.send(command, optionsOrCb);
427
432
  }
428
433
  else if (typeof cb === "function") {
429
434
  if (typeof optionsOrCb !== "object")
430
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
435
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
431
436
  this.send(command, optionsOrCb || {}, cb);
432
437
  }
433
438
  else {
434
439
  return this.send(command, optionsOrCb);
435
440
  }
436
- }
437
- publish(args, optionsOrCb, cb) {
438
- const command = new PublishCommand(args);
441
+ };
442
+ SNS.prototype.publish = function (args, optionsOrCb, cb) {
443
+ var command = new PublishCommand(args);
439
444
  if (typeof optionsOrCb === "function") {
440
445
  this.send(command, optionsOrCb);
441
446
  }
442
447
  else if (typeof cb === "function") {
443
448
  if (typeof optionsOrCb !== "object")
444
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
449
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
445
450
  this.send(command, optionsOrCb || {}, cb);
446
451
  }
447
452
  else {
448
453
  return this.send(command, optionsOrCb);
449
454
  }
450
- }
451
- publishBatch(args, optionsOrCb, cb) {
452
- const command = new PublishBatchCommand(args);
455
+ };
456
+ SNS.prototype.publishBatch = function (args, optionsOrCb, cb) {
457
+ var command = new PublishBatchCommand(args);
453
458
  if (typeof optionsOrCb === "function") {
454
459
  this.send(command, optionsOrCb);
455
460
  }
456
461
  else if (typeof cb === "function") {
457
462
  if (typeof optionsOrCb !== "object")
458
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
463
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
459
464
  this.send(command, optionsOrCb || {}, cb);
460
465
  }
461
466
  else {
462
467
  return this.send(command, optionsOrCb);
463
468
  }
464
- }
465
- putDataProtectionPolicy(args, optionsOrCb, cb) {
466
- const command = new PutDataProtectionPolicyCommand(args);
469
+ };
470
+ SNS.prototype.putDataProtectionPolicy = function (args, optionsOrCb, cb) {
471
+ var command = new PutDataProtectionPolicyCommand(args);
467
472
  if (typeof optionsOrCb === "function") {
468
473
  this.send(command, optionsOrCb);
469
474
  }
470
475
  else if (typeof cb === "function") {
471
476
  if (typeof optionsOrCb !== "object")
472
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
477
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
473
478
  this.send(command, optionsOrCb || {}, cb);
474
479
  }
475
480
  else {
476
481
  return this.send(command, optionsOrCb);
477
482
  }
478
- }
479
- removePermission(args, optionsOrCb, cb) {
480
- const command = new RemovePermissionCommand(args);
483
+ };
484
+ SNS.prototype.removePermission = function (args, optionsOrCb, cb) {
485
+ var command = new RemovePermissionCommand(args);
481
486
  if (typeof optionsOrCb === "function") {
482
487
  this.send(command, optionsOrCb);
483
488
  }
484
489
  else if (typeof cb === "function") {
485
490
  if (typeof optionsOrCb !== "object")
486
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
491
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
487
492
  this.send(command, optionsOrCb || {}, cb);
488
493
  }
489
494
  else {
490
495
  return this.send(command, optionsOrCb);
491
496
  }
492
- }
493
- setEndpointAttributes(args, optionsOrCb, cb) {
494
- const command = new SetEndpointAttributesCommand(args);
497
+ };
498
+ SNS.prototype.setEndpointAttributes = function (args, optionsOrCb, cb) {
499
+ var command = new SetEndpointAttributesCommand(args);
495
500
  if (typeof optionsOrCb === "function") {
496
501
  this.send(command, optionsOrCb);
497
502
  }
498
503
  else if (typeof cb === "function") {
499
504
  if (typeof optionsOrCb !== "object")
500
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
505
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
501
506
  this.send(command, optionsOrCb || {}, cb);
502
507
  }
503
508
  else {
504
509
  return this.send(command, optionsOrCb);
505
510
  }
506
- }
507
- setPlatformApplicationAttributes(args, optionsOrCb, cb) {
508
- const command = new SetPlatformApplicationAttributesCommand(args);
511
+ };
512
+ SNS.prototype.setPlatformApplicationAttributes = function (args, optionsOrCb, cb) {
513
+ var command = new SetPlatformApplicationAttributesCommand(args);
509
514
  if (typeof optionsOrCb === "function") {
510
515
  this.send(command, optionsOrCb);
511
516
  }
512
517
  else if (typeof cb === "function") {
513
518
  if (typeof optionsOrCb !== "object")
514
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
519
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
515
520
  this.send(command, optionsOrCb || {}, cb);
516
521
  }
517
522
  else {
518
523
  return this.send(command, optionsOrCb);
519
524
  }
520
- }
521
- setSMSAttributes(args, optionsOrCb, cb) {
522
- const command = new SetSMSAttributesCommand(args);
525
+ };
526
+ SNS.prototype.setSMSAttributes = function (args, optionsOrCb, cb) {
527
+ var command = new SetSMSAttributesCommand(args);
523
528
  if (typeof optionsOrCb === "function") {
524
529
  this.send(command, optionsOrCb);
525
530
  }
526
531
  else if (typeof cb === "function") {
527
532
  if (typeof optionsOrCb !== "object")
528
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
533
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
529
534
  this.send(command, optionsOrCb || {}, cb);
530
535
  }
531
536
  else {
532
537
  return this.send(command, optionsOrCb);
533
538
  }
534
- }
535
- setSubscriptionAttributes(args, optionsOrCb, cb) {
536
- const command = new SetSubscriptionAttributesCommand(args);
539
+ };
540
+ SNS.prototype.setSubscriptionAttributes = function (args, optionsOrCb, cb) {
541
+ var command = new SetSubscriptionAttributesCommand(args);
537
542
  if (typeof optionsOrCb === "function") {
538
543
  this.send(command, optionsOrCb);
539
544
  }
540
545
  else if (typeof cb === "function") {
541
546
  if (typeof optionsOrCb !== "object")
542
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
547
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
543
548
  this.send(command, optionsOrCb || {}, cb);
544
549
  }
545
550
  else {
546
551
  return this.send(command, optionsOrCb);
547
552
  }
548
- }
549
- setTopicAttributes(args, optionsOrCb, cb) {
550
- const command = new SetTopicAttributesCommand(args);
553
+ };
554
+ SNS.prototype.setTopicAttributes = function (args, optionsOrCb, cb) {
555
+ var command = new SetTopicAttributesCommand(args);
551
556
  if (typeof optionsOrCb === "function") {
552
557
  this.send(command, optionsOrCb);
553
558
  }
554
559
  else if (typeof cb === "function") {
555
560
  if (typeof optionsOrCb !== "object")
556
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
561
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
557
562
  this.send(command, optionsOrCb || {}, cb);
558
563
  }
559
564
  else {
560
565
  return this.send(command, optionsOrCb);
561
566
  }
562
- }
563
- subscribe(args, optionsOrCb, cb) {
564
- const command = new SubscribeCommand(args);
567
+ };
568
+ SNS.prototype.subscribe = function (args, optionsOrCb, cb) {
569
+ var command = new SubscribeCommand(args);
565
570
  if (typeof optionsOrCb === "function") {
566
571
  this.send(command, optionsOrCb);
567
572
  }
568
573
  else if (typeof cb === "function") {
569
574
  if (typeof optionsOrCb !== "object")
570
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
575
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
571
576
  this.send(command, optionsOrCb || {}, cb);
572
577
  }
573
578
  else {
574
579
  return this.send(command, optionsOrCb);
575
580
  }
576
- }
577
- tagResource(args, optionsOrCb, cb) {
578
- const command = new TagResourceCommand(args);
581
+ };
582
+ SNS.prototype.tagResource = function (args, optionsOrCb, cb) {
583
+ var command = new TagResourceCommand(args);
579
584
  if (typeof optionsOrCb === "function") {
580
585
  this.send(command, optionsOrCb);
581
586
  }
582
587
  else if (typeof cb === "function") {
583
588
  if (typeof optionsOrCb !== "object")
584
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
589
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
585
590
  this.send(command, optionsOrCb || {}, cb);
586
591
  }
587
592
  else {
588
593
  return this.send(command, optionsOrCb);
589
594
  }
590
- }
591
- unsubscribe(args, optionsOrCb, cb) {
592
- const command = new UnsubscribeCommand(args);
595
+ };
596
+ SNS.prototype.unsubscribe = function (args, optionsOrCb, cb) {
597
+ var command = new UnsubscribeCommand(args);
593
598
  if (typeof optionsOrCb === "function") {
594
599
  this.send(command, optionsOrCb);
595
600
  }
596
601
  else if (typeof cb === "function") {
597
602
  if (typeof optionsOrCb !== "object")
598
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
603
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
599
604
  this.send(command, optionsOrCb || {}, cb);
600
605
  }
601
606
  else {
602
607
  return this.send(command, optionsOrCb);
603
608
  }
604
- }
605
- untagResource(args, optionsOrCb, cb) {
606
- const command = new UntagResourceCommand(args);
609
+ };
610
+ SNS.prototype.untagResource = function (args, optionsOrCb, cb) {
611
+ var command = new UntagResourceCommand(args);
607
612
  if (typeof optionsOrCb === "function") {
608
613
  this.send(command, optionsOrCb);
609
614
  }
610
615
  else if (typeof cb === "function") {
611
616
  if (typeof optionsOrCb !== "object")
612
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
617
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
613
618
  this.send(command, optionsOrCb || {}, cb);
614
619
  }
615
620
  else {
616
621
  return this.send(command, optionsOrCb);
617
622
  }
618
- }
619
- verifySMSSandboxPhoneNumber(args, optionsOrCb, cb) {
620
- const command = new VerifySMSSandboxPhoneNumberCommand(args);
623
+ };
624
+ SNS.prototype.verifySMSSandboxPhoneNumber = function (args, optionsOrCb, cb) {
625
+ var command = new VerifySMSSandboxPhoneNumberCommand(args);
621
626
  if (typeof optionsOrCb === "function") {
622
627
  this.send(command, optionsOrCb);
623
628
  }
624
629
  else if (typeof cb === "function") {
625
630
  if (typeof optionsOrCb !== "object")
626
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
631
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
627
632
  this.send(command, optionsOrCb || {}, cb);
628
633
  }
629
634
  else {
630
635
  return this.send(command, optionsOrCb);
631
636
  }
632
- }
633
- }
637
+ };
638
+ return SNS;
639
+ }(SNSClient));
640
+ export { SNS };