@aws-sdk/client-connectcampaigns 3.180.0 → 3.183.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 (36) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +28 -22
  3. package/dist-es/ConnectCampaigns.js +90 -97
  4. package/dist-es/ConnectCampaignsClient.js +22 -28
  5. package/dist-es/commands/CreateCampaignCommand.js +21 -28
  6. package/dist-es/commands/DeleteCampaignCommand.js +22 -29
  7. package/dist-es/commands/DeleteConnectInstanceConfigCommand.js +22 -29
  8. package/dist-es/commands/DeleteInstanceOnboardingJobCommand.js +22 -29
  9. package/dist-es/commands/DescribeCampaignCommand.js +21 -28
  10. package/dist-es/commands/GetCampaignStateBatchCommand.js +21 -28
  11. package/dist-es/commands/GetCampaignStateCommand.js +21 -28
  12. package/dist-es/commands/GetConnectInstanceConfigCommand.js +21 -28
  13. package/dist-es/commands/GetInstanceOnboardingJobStatusCommand.js +21 -28
  14. package/dist-es/commands/ListCampaignsCommand.js +21 -28
  15. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  16. package/dist-es/commands/PauseCampaignCommand.js +22 -29
  17. package/dist-es/commands/PutDialRequestBatchCommand.js +21 -28
  18. package/dist-es/commands/ResumeCampaignCommand.js +22 -29
  19. package/dist-es/commands/StartCampaignCommand.js +22 -29
  20. package/dist-es/commands/StartInstanceOnboardingJobCommand.js +21 -28
  21. package/dist-es/commands/StopCampaignCommand.js +22 -29
  22. package/dist-es/commands/TagResourceCommand.js +22 -29
  23. package/dist-es/commands/UntagResourceCommand.js +22 -29
  24. package/dist-es/commands/UpdateCampaignDialerConfigCommand.js +22 -29
  25. package/dist-es/commands/UpdateCampaignNameCommand.js +22 -29
  26. package/dist-es/commands/UpdateCampaignOutboundCallConfigCommand.js +22 -29
  27. package/dist-es/endpoints.js +8 -8
  28. package/dist-es/models/ConnectCampaignsServiceException.js +5 -10
  29. package/dist-es/models/models_0.js +265 -164
  30. package/dist-es/pagination/ListCampaignsPaginator.js +25 -68
  31. package/dist-es/protocols/Aws_restJson1.js +1625 -2287
  32. package/dist-es/runtimeConfig.browser.js +26 -12
  33. package/dist-es/runtimeConfig.js +30 -12
  34. package/dist-es/runtimeConfig.native.js +8 -5
  35. package/dist-es/runtimeConfig.shared.js +8 -11
  36. package/package.json +33 -33
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
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.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-connectcampaigns
9
+
10
+
11
+
12
+
13
+
14
+ # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
20
+ * **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-connectcampaigns
@@ -473,7 +473,7 @@ exports.deserializeAws_restJson1CreateCampaignCommand = deserializeAws_restJson1
473
473
  const deserializeAws_restJson1CreateCampaignCommandError = async (output, context) => {
474
474
  const parsedOutput = {
475
475
  ...output,
476
- body: await parseBody(output.body, context),
476
+ body: await parseErrorBody(output.body, context),
477
477
  };
478
478
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
479
479
  switch (errorCode) {
@@ -522,7 +522,7 @@ exports.deserializeAws_restJson1DeleteCampaignCommand = deserializeAws_restJson1
522
522
  const deserializeAws_restJson1DeleteCampaignCommandError = async (output, context) => {
523
523
  const parsedOutput = {
524
524
  ...output,
525
- body: await parseBody(output.body, context),
525
+ body: await parseErrorBody(output.body, context),
526
526
  };
527
527
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
528
528
  switch (errorCode) {
@@ -562,7 +562,7 @@ exports.deserializeAws_restJson1DeleteConnectInstanceConfigCommand = deserialize
562
562
  const deserializeAws_restJson1DeleteConnectInstanceConfigCommandError = async (output, context) => {
563
563
  const parsedOutput = {
564
564
  ...output,
565
- body: await parseBody(output.body, context),
565
+ body: await parseErrorBody(output.body, context),
566
566
  };
567
567
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
568
568
  switch (errorCode) {
@@ -608,7 +608,7 @@ exports.deserializeAws_restJson1DeleteInstanceOnboardingJobCommand = deserialize
608
608
  const deserializeAws_restJson1DeleteInstanceOnboardingJobCommandError = async (output, context) => {
609
609
  const parsedOutput = {
610
610
  ...output,
611
- body: await parseBody(output.body, context),
611
+ body: await parseErrorBody(output.body, context),
612
612
  };
613
613
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
614
614
  switch (errorCode) {
@@ -654,7 +654,7 @@ exports.deserializeAws_restJson1DescribeCampaignCommand = deserializeAws_restJso
654
654
  const deserializeAws_restJson1DescribeCampaignCommandError = async (output, context) => {
655
655
  const parsedOutput = {
656
656
  ...output,
657
- body: await parseBody(output.body, context),
657
+ body: await parseErrorBody(output.body, context),
658
658
  };
659
659
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
660
  switch (errorCode) {
@@ -697,7 +697,7 @@ exports.deserializeAws_restJson1GetCampaignStateCommand = deserializeAws_restJso
697
697
  const deserializeAws_restJson1GetCampaignStateCommandError = async (output, context) => {
698
698
  const parsedOutput = {
699
699
  ...output,
700
- body: await parseBody(output.body, context),
700
+ body: await parseErrorBody(output.body, context),
701
701
  };
702
702
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
703
703
  switch (errorCode) {
@@ -746,7 +746,7 @@ exports.deserializeAws_restJson1GetCampaignStateBatchCommand = deserializeAws_re
746
746
  const deserializeAws_restJson1GetCampaignStateBatchCommandError = async (output, context) => {
747
747
  const parsedOutput = {
748
748
  ...output,
749
- body: await parseBody(output.body, context),
749
+ body: await parseErrorBody(output.body, context),
750
750
  };
751
751
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
752
752
  switch (errorCode) {
@@ -789,7 +789,7 @@ exports.deserializeAws_restJson1GetConnectInstanceConfigCommand = deserializeAws
789
789
  const deserializeAws_restJson1GetConnectInstanceConfigCommandError = async (output, context) => {
790
790
  const parsedOutput = {
791
791
  ...output,
792
- body: await parseBody(output.body, context),
792
+ body: await parseErrorBody(output.body, context),
793
793
  };
794
794
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
795
795
  switch (errorCode) {
@@ -832,7 +832,7 @@ exports.deserializeAws_restJson1GetInstanceOnboardingJobStatusCommand = deserial
832
832
  const deserializeAws_restJson1GetInstanceOnboardingJobStatusCommandError = async (output, context) => {
833
833
  const parsedOutput = {
834
834
  ...output,
835
- body: await parseBody(output.body, context),
835
+ body: await parseErrorBody(output.body, context),
836
836
  };
837
837
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
838
838
  switch (errorCode) {
@@ -878,7 +878,7 @@ exports.deserializeAws_restJson1ListCampaignsCommand = deserializeAws_restJson1L
878
878
  const deserializeAws_restJson1ListCampaignsCommandError = async (output, context) => {
879
879
  const parsedOutput = {
880
880
  ...output,
881
- body: await parseBody(output.body, context),
881
+ body: await parseErrorBody(output.body, context),
882
882
  };
883
883
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
884
884
  switch (errorCode) {
@@ -918,7 +918,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
918
918
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
919
919
  const parsedOutput = {
920
920
  ...output,
921
- body: await parseBody(output.body, context),
921
+ body: await parseErrorBody(output.body, context),
922
922
  };
923
923
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
924
924
  switch (errorCode) {
@@ -961,7 +961,7 @@ exports.deserializeAws_restJson1PauseCampaignCommand = deserializeAws_restJson1P
961
961
  const deserializeAws_restJson1PauseCampaignCommandError = async (output, context) => {
962
962
  const parsedOutput = {
963
963
  ...output,
964
- body: await parseBody(output.body, context),
964
+ body: await parseErrorBody(output.body, context),
965
965
  };
966
966
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
967
967
  switch (errorCode) {
@@ -1016,7 +1016,7 @@ exports.deserializeAws_restJson1PutDialRequestBatchCommand = deserializeAws_rest
1016
1016
  const deserializeAws_restJson1PutDialRequestBatchCommandError = async (output, context) => {
1017
1017
  const parsedOutput = {
1018
1018
  ...output,
1019
- body: await parseBody(output.body, context),
1019
+ body: await parseErrorBody(output.body, context),
1020
1020
  };
1021
1021
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1022
1022
  switch (errorCode) {
@@ -1065,7 +1065,7 @@ exports.deserializeAws_restJson1ResumeCampaignCommand = deserializeAws_restJson1
1065
1065
  const deserializeAws_restJson1ResumeCampaignCommandError = async (output, context) => {
1066
1066
  const parsedOutput = {
1067
1067
  ...output,
1068
- body: await parseBody(output.body, context),
1068
+ body: await parseErrorBody(output.body, context),
1069
1069
  };
1070
1070
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1071
1071
  switch (errorCode) {
@@ -1114,7 +1114,7 @@ exports.deserializeAws_restJson1StartCampaignCommand = deserializeAws_restJson1S
1114
1114
  const deserializeAws_restJson1StartCampaignCommandError = async (output, context) => {
1115
1115
  const parsedOutput = {
1116
1116
  ...output,
1117
- body: await parseBody(output.body, context),
1117
+ body: await parseErrorBody(output.body, context),
1118
1118
  };
1119
1119
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1120
1120
  switch (errorCode) {
@@ -1166,7 +1166,7 @@ exports.deserializeAws_restJson1StartInstanceOnboardingJobCommand = deserializeA
1166
1166
  const deserializeAws_restJson1StartInstanceOnboardingJobCommandError = async (output, context) => {
1167
1167
  const parsedOutput = {
1168
1168
  ...output,
1169
- body: await parseBody(output.body, context),
1169
+ body: await parseErrorBody(output.body, context),
1170
1170
  };
1171
1171
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1172
1172
  switch (errorCode) {
@@ -1212,7 +1212,7 @@ exports.deserializeAws_restJson1StopCampaignCommand = deserializeAws_restJson1St
1212
1212
  const deserializeAws_restJson1StopCampaignCommandError = async (output, context) => {
1213
1213
  const parsedOutput = {
1214
1214
  ...output,
1215
- body: await parseBody(output.body, context),
1215
+ body: await parseErrorBody(output.body, context),
1216
1216
  };
1217
1217
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1218
1218
  switch (errorCode) {
@@ -1261,7 +1261,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
1261
1261
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
1262
1262
  const parsedOutput = {
1263
1263
  ...output,
1264
- body: await parseBody(output.body, context),
1264
+ body: await parseErrorBody(output.body, context),
1265
1265
  };
1266
1266
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1267
1267
  switch (errorCode) {
@@ -1304,7 +1304,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
1304
1304
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
1305
1305
  const parsedOutput = {
1306
1306
  ...output,
1307
- body: await parseBody(output.body, context),
1307
+ body: await parseErrorBody(output.body, context),
1308
1308
  };
1309
1309
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1310
1310
  switch (errorCode) {
@@ -1347,7 +1347,7 @@ exports.deserializeAws_restJson1UpdateCampaignDialerConfigCommand = deserializeA
1347
1347
  const deserializeAws_restJson1UpdateCampaignDialerConfigCommandError = async (output, context) => {
1348
1348
  const parsedOutput = {
1349
1349
  ...output,
1350
- body: await parseBody(output.body, context),
1350
+ body: await parseErrorBody(output.body, context),
1351
1351
  };
1352
1352
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1353
1353
  switch (errorCode) {
@@ -1390,7 +1390,7 @@ exports.deserializeAws_restJson1UpdateCampaignNameCommand = deserializeAws_restJ
1390
1390
  const deserializeAws_restJson1UpdateCampaignNameCommandError = async (output, context) => {
1391
1391
  const parsedOutput = {
1392
1392
  ...output,
1393
- body: await parseBody(output.body, context),
1393
+ body: await parseErrorBody(output.body, context),
1394
1394
  };
1395
1395
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1396
1396
  switch (errorCode) {
@@ -1433,7 +1433,7 @@ exports.deserializeAws_restJson1UpdateCampaignOutboundCallConfigCommand = deseri
1433
1433
  const deserializeAws_restJson1UpdateCampaignOutboundCallConfigCommandError = async (output, context) => {
1434
1434
  const parsedOutput = {
1435
1435
  ...output,
1436
- body: await parseBody(output.body, context),
1436
+ body: await parseErrorBody(output.body, context),
1437
1437
  };
1438
1438
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1439
1439
  switch (errorCode) {
@@ -1899,6 +1899,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1899
1899
  }
1900
1900
  return {};
1901
1901
  });
1902
+ const parseErrorBody = async (errorBody, context) => {
1903
+ var _a;
1904
+ const value = await parseBody(errorBody, context);
1905
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1906
+ return value;
1907
+ };
1902
1908
  const loadRestJsonErrorCode = (output, data) => {
1903
1909
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1904
1910
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { CreateCampaignCommand, } from "./commands/CreateCampaignCommand";
3
2
  import { DeleteCampaignCommand, } from "./commands/DeleteCampaignCommand";
4
3
  import { DeleteConnectInstanceConfigCommand, } from "./commands/DeleteConnectInstanceConfigCommand";
@@ -22,319 +21,313 @@ import { UpdateCampaignDialerConfigCommand, } from "./commands/UpdateCampaignDia
22
21
  import { UpdateCampaignNameCommand, } from "./commands/UpdateCampaignNameCommand";
23
22
  import { UpdateCampaignOutboundCallConfigCommand, } from "./commands/UpdateCampaignOutboundCallConfigCommand";
24
23
  import { ConnectCampaignsClient } from "./ConnectCampaignsClient";
25
- var ConnectCampaigns = (function (_super) {
26
- __extends(ConnectCampaigns, _super);
27
- function ConnectCampaigns() {
28
- return _super !== null && _super.apply(this, arguments) || this;
29
- }
30
- ConnectCampaigns.prototype.createCampaign = function (args, optionsOrCb, cb) {
31
- var command = new CreateCampaignCommand(args);
24
+ export class ConnectCampaigns extends ConnectCampaignsClient {
25
+ createCampaign(args, optionsOrCb, cb) {
26
+ const command = new CreateCampaignCommand(args);
32
27
  if (typeof optionsOrCb === "function") {
33
28
  this.send(command, optionsOrCb);
34
29
  }
35
30
  else if (typeof cb === "function") {
36
31
  if (typeof optionsOrCb !== "object")
37
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
32
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
38
33
  this.send(command, optionsOrCb || {}, cb);
39
34
  }
40
35
  else {
41
36
  return this.send(command, optionsOrCb);
42
37
  }
43
- };
44
- ConnectCampaigns.prototype.deleteCampaign = function (args, optionsOrCb, cb) {
45
- var command = new DeleteCampaignCommand(args);
38
+ }
39
+ deleteCampaign(args, optionsOrCb, cb) {
40
+ const command = new DeleteCampaignCommand(args);
46
41
  if (typeof optionsOrCb === "function") {
47
42
  this.send(command, optionsOrCb);
48
43
  }
49
44
  else if (typeof cb === "function") {
50
45
  if (typeof optionsOrCb !== "object")
51
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
46
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
52
47
  this.send(command, optionsOrCb || {}, cb);
53
48
  }
54
49
  else {
55
50
  return this.send(command, optionsOrCb);
56
51
  }
57
- };
58
- ConnectCampaigns.prototype.deleteConnectInstanceConfig = function (args, optionsOrCb, cb) {
59
- var command = new DeleteConnectInstanceConfigCommand(args);
52
+ }
53
+ deleteConnectInstanceConfig(args, optionsOrCb, cb) {
54
+ const command = new DeleteConnectInstanceConfigCommand(args);
60
55
  if (typeof optionsOrCb === "function") {
61
56
  this.send(command, optionsOrCb);
62
57
  }
63
58
  else if (typeof cb === "function") {
64
59
  if (typeof optionsOrCb !== "object")
65
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
60
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
66
61
  this.send(command, optionsOrCb || {}, cb);
67
62
  }
68
63
  else {
69
64
  return this.send(command, optionsOrCb);
70
65
  }
71
- };
72
- ConnectCampaigns.prototype.deleteInstanceOnboardingJob = function (args, optionsOrCb, cb) {
73
- var command = new DeleteInstanceOnboardingJobCommand(args);
66
+ }
67
+ deleteInstanceOnboardingJob(args, optionsOrCb, cb) {
68
+ const command = new DeleteInstanceOnboardingJobCommand(args);
74
69
  if (typeof optionsOrCb === "function") {
75
70
  this.send(command, optionsOrCb);
76
71
  }
77
72
  else if (typeof cb === "function") {
78
73
  if (typeof optionsOrCb !== "object")
79
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
74
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
80
75
  this.send(command, optionsOrCb || {}, cb);
81
76
  }
82
77
  else {
83
78
  return this.send(command, optionsOrCb);
84
79
  }
85
- };
86
- ConnectCampaigns.prototype.describeCampaign = function (args, optionsOrCb, cb) {
87
- var command = new DescribeCampaignCommand(args);
80
+ }
81
+ describeCampaign(args, optionsOrCb, cb) {
82
+ const command = new DescribeCampaignCommand(args);
88
83
  if (typeof optionsOrCb === "function") {
89
84
  this.send(command, optionsOrCb);
90
85
  }
91
86
  else if (typeof cb === "function") {
92
87
  if (typeof optionsOrCb !== "object")
93
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
88
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
94
89
  this.send(command, optionsOrCb || {}, cb);
95
90
  }
96
91
  else {
97
92
  return this.send(command, optionsOrCb);
98
93
  }
99
- };
100
- ConnectCampaigns.prototype.getCampaignState = function (args, optionsOrCb, cb) {
101
- var command = new GetCampaignStateCommand(args);
94
+ }
95
+ getCampaignState(args, optionsOrCb, cb) {
96
+ const command = new GetCampaignStateCommand(args);
102
97
  if (typeof optionsOrCb === "function") {
103
98
  this.send(command, optionsOrCb);
104
99
  }
105
100
  else if (typeof cb === "function") {
106
101
  if (typeof optionsOrCb !== "object")
107
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
102
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
108
103
  this.send(command, optionsOrCb || {}, cb);
109
104
  }
110
105
  else {
111
106
  return this.send(command, optionsOrCb);
112
107
  }
113
- };
114
- ConnectCampaigns.prototype.getCampaignStateBatch = function (args, optionsOrCb, cb) {
115
- var command = new GetCampaignStateBatchCommand(args);
108
+ }
109
+ getCampaignStateBatch(args, optionsOrCb, cb) {
110
+ const command = new GetCampaignStateBatchCommand(args);
116
111
  if (typeof optionsOrCb === "function") {
117
112
  this.send(command, optionsOrCb);
118
113
  }
119
114
  else if (typeof cb === "function") {
120
115
  if (typeof optionsOrCb !== "object")
121
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
116
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
122
117
  this.send(command, optionsOrCb || {}, cb);
123
118
  }
124
119
  else {
125
120
  return this.send(command, optionsOrCb);
126
121
  }
127
- };
128
- ConnectCampaigns.prototype.getConnectInstanceConfig = function (args, optionsOrCb, cb) {
129
- var command = new GetConnectInstanceConfigCommand(args);
122
+ }
123
+ getConnectInstanceConfig(args, optionsOrCb, cb) {
124
+ const command = new GetConnectInstanceConfigCommand(args);
130
125
  if (typeof optionsOrCb === "function") {
131
126
  this.send(command, optionsOrCb);
132
127
  }
133
128
  else if (typeof cb === "function") {
134
129
  if (typeof optionsOrCb !== "object")
135
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
130
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
136
131
  this.send(command, optionsOrCb || {}, cb);
137
132
  }
138
133
  else {
139
134
  return this.send(command, optionsOrCb);
140
135
  }
141
- };
142
- ConnectCampaigns.prototype.getInstanceOnboardingJobStatus = function (args, optionsOrCb, cb) {
143
- var command = new GetInstanceOnboardingJobStatusCommand(args);
136
+ }
137
+ getInstanceOnboardingJobStatus(args, optionsOrCb, cb) {
138
+ const command = new GetInstanceOnboardingJobStatusCommand(args);
144
139
  if (typeof optionsOrCb === "function") {
145
140
  this.send(command, optionsOrCb);
146
141
  }
147
142
  else if (typeof cb === "function") {
148
143
  if (typeof optionsOrCb !== "object")
149
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
144
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
150
145
  this.send(command, optionsOrCb || {}, cb);
151
146
  }
152
147
  else {
153
148
  return this.send(command, optionsOrCb);
154
149
  }
155
- };
156
- ConnectCampaigns.prototype.listCampaigns = function (args, optionsOrCb, cb) {
157
- var command = new ListCampaignsCommand(args);
150
+ }
151
+ listCampaigns(args, optionsOrCb, cb) {
152
+ const command = new ListCampaignsCommand(args);
158
153
  if (typeof optionsOrCb === "function") {
159
154
  this.send(command, optionsOrCb);
160
155
  }
161
156
  else if (typeof cb === "function") {
162
157
  if (typeof optionsOrCb !== "object")
163
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
158
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
164
159
  this.send(command, optionsOrCb || {}, cb);
165
160
  }
166
161
  else {
167
162
  return this.send(command, optionsOrCb);
168
163
  }
169
- };
170
- ConnectCampaigns.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
171
- var command = new ListTagsForResourceCommand(args);
164
+ }
165
+ listTagsForResource(args, optionsOrCb, cb) {
166
+ const command = new ListTagsForResourceCommand(args);
172
167
  if (typeof optionsOrCb === "function") {
173
168
  this.send(command, optionsOrCb);
174
169
  }
175
170
  else if (typeof cb === "function") {
176
171
  if (typeof optionsOrCb !== "object")
177
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
172
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
178
173
  this.send(command, optionsOrCb || {}, cb);
179
174
  }
180
175
  else {
181
176
  return this.send(command, optionsOrCb);
182
177
  }
183
- };
184
- ConnectCampaigns.prototype.pauseCampaign = function (args, optionsOrCb, cb) {
185
- var command = new PauseCampaignCommand(args);
178
+ }
179
+ pauseCampaign(args, optionsOrCb, cb) {
180
+ const command = new PauseCampaignCommand(args);
186
181
  if (typeof optionsOrCb === "function") {
187
182
  this.send(command, optionsOrCb);
188
183
  }
189
184
  else if (typeof cb === "function") {
190
185
  if (typeof optionsOrCb !== "object")
191
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
186
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
192
187
  this.send(command, optionsOrCb || {}, cb);
193
188
  }
194
189
  else {
195
190
  return this.send(command, optionsOrCb);
196
191
  }
197
- };
198
- ConnectCampaigns.prototype.putDialRequestBatch = function (args, optionsOrCb, cb) {
199
- var command = new PutDialRequestBatchCommand(args);
192
+ }
193
+ putDialRequestBatch(args, optionsOrCb, cb) {
194
+ const command = new PutDialRequestBatchCommand(args);
200
195
  if (typeof optionsOrCb === "function") {
201
196
  this.send(command, optionsOrCb);
202
197
  }
203
198
  else if (typeof cb === "function") {
204
199
  if (typeof optionsOrCb !== "object")
205
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
200
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
206
201
  this.send(command, optionsOrCb || {}, cb);
207
202
  }
208
203
  else {
209
204
  return this.send(command, optionsOrCb);
210
205
  }
211
- };
212
- ConnectCampaigns.prototype.resumeCampaign = function (args, optionsOrCb, cb) {
213
- var command = new ResumeCampaignCommand(args);
206
+ }
207
+ resumeCampaign(args, optionsOrCb, cb) {
208
+ const command = new ResumeCampaignCommand(args);
214
209
  if (typeof optionsOrCb === "function") {
215
210
  this.send(command, optionsOrCb);
216
211
  }
217
212
  else if (typeof cb === "function") {
218
213
  if (typeof optionsOrCb !== "object")
219
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
214
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
220
215
  this.send(command, optionsOrCb || {}, cb);
221
216
  }
222
217
  else {
223
218
  return this.send(command, optionsOrCb);
224
219
  }
225
- };
226
- ConnectCampaigns.prototype.startCampaign = function (args, optionsOrCb, cb) {
227
- var command = new StartCampaignCommand(args);
220
+ }
221
+ startCampaign(args, optionsOrCb, cb) {
222
+ const command = new StartCampaignCommand(args);
228
223
  if (typeof optionsOrCb === "function") {
229
224
  this.send(command, optionsOrCb);
230
225
  }
231
226
  else if (typeof cb === "function") {
232
227
  if (typeof optionsOrCb !== "object")
233
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
228
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
234
229
  this.send(command, optionsOrCb || {}, cb);
235
230
  }
236
231
  else {
237
232
  return this.send(command, optionsOrCb);
238
233
  }
239
- };
240
- ConnectCampaigns.prototype.startInstanceOnboardingJob = function (args, optionsOrCb, cb) {
241
- var command = new StartInstanceOnboardingJobCommand(args);
234
+ }
235
+ startInstanceOnboardingJob(args, optionsOrCb, cb) {
236
+ const command = new StartInstanceOnboardingJobCommand(args);
242
237
  if (typeof optionsOrCb === "function") {
243
238
  this.send(command, optionsOrCb);
244
239
  }
245
240
  else if (typeof cb === "function") {
246
241
  if (typeof optionsOrCb !== "object")
247
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
242
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
248
243
  this.send(command, optionsOrCb || {}, cb);
249
244
  }
250
245
  else {
251
246
  return this.send(command, optionsOrCb);
252
247
  }
253
- };
254
- ConnectCampaigns.prototype.stopCampaign = function (args, optionsOrCb, cb) {
255
- var command = new StopCampaignCommand(args);
248
+ }
249
+ stopCampaign(args, optionsOrCb, cb) {
250
+ const command = new StopCampaignCommand(args);
256
251
  if (typeof optionsOrCb === "function") {
257
252
  this.send(command, optionsOrCb);
258
253
  }
259
254
  else if (typeof cb === "function") {
260
255
  if (typeof optionsOrCb !== "object")
261
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
256
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
262
257
  this.send(command, optionsOrCb || {}, cb);
263
258
  }
264
259
  else {
265
260
  return this.send(command, optionsOrCb);
266
261
  }
267
- };
268
- ConnectCampaigns.prototype.tagResource = function (args, optionsOrCb, cb) {
269
- var command = new TagResourceCommand(args);
262
+ }
263
+ tagResource(args, optionsOrCb, cb) {
264
+ const command = new TagResourceCommand(args);
270
265
  if (typeof optionsOrCb === "function") {
271
266
  this.send(command, optionsOrCb);
272
267
  }
273
268
  else if (typeof cb === "function") {
274
269
  if (typeof optionsOrCb !== "object")
275
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
270
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
276
271
  this.send(command, optionsOrCb || {}, cb);
277
272
  }
278
273
  else {
279
274
  return this.send(command, optionsOrCb);
280
275
  }
281
- };
282
- ConnectCampaigns.prototype.untagResource = function (args, optionsOrCb, cb) {
283
- var command = new UntagResourceCommand(args);
276
+ }
277
+ untagResource(args, optionsOrCb, cb) {
278
+ const command = new UntagResourceCommand(args);
284
279
  if (typeof optionsOrCb === "function") {
285
280
  this.send(command, optionsOrCb);
286
281
  }
287
282
  else if (typeof cb === "function") {
288
283
  if (typeof optionsOrCb !== "object")
289
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
284
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
290
285
  this.send(command, optionsOrCb || {}, cb);
291
286
  }
292
287
  else {
293
288
  return this.send(command, optionsOrCb);
294
289
  }
295
- };
296
- ConnectCampaigns.prototype.updateCampaignDialerConfig = function (args, optionsOrCb, cb) {
297
- var command = new UpdateCampaignDialerConfigCommand(args);
290
+ }
291
+ updateCampaignDialerConfig(args, optionsOrCb, cb) {
292
+ const command = new UpdateCampaignDialerConfigCommand(args);
298
293
  if (typeof optionsOrCb === "function") {
299
294
  this.send(command, optionsOrCb);
300
295
  }
301
296
  else if (typeof cb === "function") {
302
297
  if (typeof optionsOrCb !== "object")
303
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
298
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
304
299
  this.send(command, optionsOrCb || {}, cb);
305
300
  }
306
301
  else {
307
302
  return this.send(command, optionsOrCb);
308
303
  }
309
- };
310
- ConnectCampaigns.prototype.updateCampaignName = function (args, optionsOrCb, cb) {
311
- var command = new UpdateCampaignNameCommand(args);
304
+ }
305
+ updateCampaignName(args, optionsOrCb, cb) {
306
+ const command = new UpdateCampaignNameCommand(args);
312
307
  if (typeof optionsOrCb === "function") {
313
308
  this.send(command, optionsOrCb);
314
309
  }
315
310
  else if (typeof cb === "function") {
316
311
  if (typeof optionsOrCb !== "object")
317
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
312
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
318
313
  this.send(command, optionsOrCb || {}, cb);
319
314
  }
320
315
  else {
321
316
  return this.send(command, optionsOrCb);
322
317
  }
323
- };
324
- ConnectCampaigns.prototype.updateCampaignOutboundCallConfig = function (args, optionsOrCb, cb) {
325
- var command = new UpdateCampaignOutboundCallConfigCommand(args);
318
+ }
319
+ updateCampaignOutboundCallConfig(args, optionsOrCb, cb) {
320
+ const command = new UpdateCampaignOutboundCallConfigCommand(args);
326
321
  if (typeof optionsOrCb === "function") {
327
322
  this.send(command, optionsOrCb);
328
323
  }
329
324
  else if (typeof cb === "function") {
330
325
  if (typeof optionsOrCb !== "object")
331
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
326
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
332
327
  this.send(command, optionsOrCb || {}, cb);
333
328
  }
334
329
  else {
335
330
  return this.send(command, optionsOrCb);
336
331
  }
337
- };
338
- return ConnectCampaigns;
339
- }(ConnectCampaignsClient));
340
- export { ConnectCampaigns };
332
+ }
333
+ }