@aws-sdk/client-connectcampaigns 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-es/ConnectCampaigns.js +90 -97
  3. package/dist-es/ConnectCampaignsClient.js +22 -28
  4. package/dist-es/commands/CreateCampaignCommand.js +21 -28
  5. package/dist-es/commands/DeleteCampaignCommand.js +22 -29
  6. package/dist-es/commands/DeleteConnectInstanceConfigCommand.js +22 -29
  7. package/dist-es/commands/DeleteInstanceOnboardingJobCommand.js +22 -29
  8. package/dist-es/commands/DescribeCampaignCommand.js +21 -28
  9. package/dist-es/commands/GetCampaignStateBatchCommand.js +21 -28
  10. package/dist-es/commands/GetCampaignStateCommand.js +21 -28
  11. package/dist-es/commands/GetConnectInstanceConfigCommand.js +21 -28
  12. package/dist-es/commands/GetInstanceOnboardingJobStatusCommand.js +21 -28
  13. package/dist-es/commands/ListCampaignsCommand.js +21 -28
  14. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  15. package/dist-es/commands/PauseCampaignCommand.js +22 -29
  16. package/dist-es/commands/PutDialRequestBatchCommand.js +21 -28
  17. package/dist-es/commands/ResumeCampaignCommand.js +22 -29
  18. package/dist-es/commands/StartCampaignCommand.js +22 -29
  19. package/dist-es/commands/StartInstanceOnboardingJobCommand.js +21 -28
  20. package/dist-es/commands/StopCampaignCommand.js +22 -29
  21. package/dist-es/commands/TagResourceCommand.js +22 -29
  22. package/dist-es/commands/UntagResourceCommand.js +22 -29
  23. package/dist-es/commands/UpdateCampaignDialerConfigCommand.js +22 -29
  24. package/dist-es/commands/UpdateCampaignNameCommand.js +22 -29
  25. package/dist-es/commands/UpdateCampaignOutboundCallConfigCommand.js +22 -29
  26. package/dist-es/endpoints.js +8 -8
  27. package/dist-es/models/ConnectCampaignsServiceException.js +5 -10
  28. package/dist-es/models/models_0.js +265 -164
  29. package/dist-es/pagination/ListCampaignsPaginator.js +25 -68
  30. package/dist-es/protocols/Aws_restJson1.js +1625 -2300
  31. package/dist-es/runtimeConfig.browser.js +26 -12
  32. package/dist-es/runtimeConfig.js +30 -12
  33. package/dist-es/runtimeConfig.native.js +8 -5
  34. package/dist-es/runtimeConfig.shared.js +8 -11
  35. package/package.json +33 -33
@@ -1,6 +1,5 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {
2
+ const regionHash = {
4
3
  "us-east-1": {
5
4
  variants: [
6
5
  {
@@ -18,7 +17,7 @@ var regionHash = {
18
17
  ],
19
18
  },
20
19
  };
21
- var partitionHash = {
20
+ const partitionHash = {
22
21
  aws: {
23
22
  regions: [
24
23
  "af-south-1",
@@ -140,8 +139,9 @@ var partitionHash = {
140
139
  ],
141
140
  },
142
141
  };
143
- export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
144
- return __generator(this, function (_a) {
145
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "connect-campaigns", regionHash: regionHash, partitionHash: partitionHash }))];
146
- });
147
- }); };
142
+ export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
143
+ ...options,
144
+ signingService: "connect-campaigns",
145
+ regionHash,
146
+ partitionHash,
147
+ });
@@ -1,12 +1,7 @@
1
- import { __extends } from "tslib";
2
1
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
- var ConnectCampaignsServiceException = (function (_super) {
4
- __extends(ConnectCampaignsServiceException, _super);
5
- function ConnectCampaignsServiceException(options) {
6
- var _this = _super.call(this, options) || this;
7
- Object.setPrototypeOf(_this, ConnectCampaignsServiceException.prototype);
8
- return _this;
2
+ export class ConnectCampaignsServiceException extends __ServiceException {
3
+ constructor(options) {
4
+ super(options);
5
+ Object.setPrototypeOf(this, ConnectCampaignsServiceException.prototype);
9
6
  }
10
- return ConnectCampaignsServiceException;
11
- }(__ServiceException));
12
- export { ConnectCampaignsServiceException };
7
+ }
@@ -1,35 +1,34 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
3
2
  import { ConnectCampaignsServiceException as __BaseException } from "./ConnectCampaignsServiceException";
4
- var AccessDeniedException = (function (_super) {
5
- __extends(AccessDeniedException, _super);
6
- function AccessDeniedException(opts) {
7
- var _this = _super.call(this, __assign({ name: "AccessDeniedException", $fault: "client" }, opts)) || this;
8
- _this.name = "AccessDeniedException";
9
- _this.$fault = "client";
10
- Object.setPrototypeOf(_this, AccessDeniedException.prototype);
11
- _this.xAmzErrorType = opts.xAmzErrorType;
12
- return _this;
3
+ export class AccessDeniedException extends __BaseException {
4
+ constructor(opts) {
5
+ super({
6
+ name: "AccessDeniedException",
7
+ $fault: "client",
8
+ ...opts,
9
+ });
10
+ this.name = "AccessDeniedException";
11
+ this.$fault = "client";
12
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
+ this.xAmzErrorType = opts.xAmzErrorType;
13
14
  }
14
- return AccessDeniedException;
15
- }(__BaseException));
16
- export { AccessDeniedException };
17
- var ConflictException = (function (_super) {
18
- __extends(ConflictException, _super);
19
- function ConflictException(opts) {
20
- var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
21
- _this.name = "ConflictException";
22
- _this.$fault = "client";
23
- Object.setPrototypeOf(_this, ConflictException.prototype);
24
- _this.xAmzErrorType = opts.xAmzErrorType;
25
- return _this;
15
+ }
16
+ export class ConflictException extends __BaseException {
17
+ constructor(opts) {
18
+ super({
19
+ name: "ConflictException",
20
+ $fault: "client",
21
+ ...opts,
22
+ });
23
+ this.name = "ConflictException";
24
+ this.$fault = "client";
25
+ Object.setPrototypeOf(this, ConflictException.prototype);
26
+ this.xAmzErrorType = opts.xAmzErrorType;
26
27
  }
27
- return ConflictException;
28
- }(__BaseException));
29
- export { ConflictException };
28
+ }
30
29
  export var DialerConfig;
31
30
  (function (DialerConfig) {
32
- DialerConfig.visit = function (value, visitor) {
31
+ DialerConfig.visit = (value, visitor) => {
33
32
  if (value.progressiveDialerConfig !== undefined)
34
33
  return visitor.progressiveDialerConfig(value.progressiveDialerConfig);
35
34
  if (value.predictiveDialerConfig !== undefined)
@@ -37,86 +36,86 @@ export var DialerConfig;
37
36
  return visitor._(value.$unknown[0], value.$unknown[1]);
38
37
  };
39
38
  })(DialerConfig || (DialerConfig = {}));
40
- var InternalServerException = (function (_super) {
41
- __extends(InternalServerException, _super);
42
- function InternalServerException(opts) {
43
- var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
44
- _this.name = "InternalServerException";
45
- _this.$fault = "server";
46
- _this.$retryable = {};
47
- Object.setPrototypeOf(_this, InternalServerException.prototype);
48
- _this.xAmzErrorType = opts.xAmzErrorType;
49
- return _this;
39
+ export class InternalServerException extends __BaseException {
40
+ constructor(opts) {
41
+ super({
42
+ name: "InternalServerException",
43
+ $fault: "server",
44
+ ...opts,
45
+ });
46
+ this.name = "InternalServerException";
47
+ this.$fault = "server";
48
+ this.$retryable = {};
49
+ Object.setPrototypeOf(this, InternalServerException.prototype);
50
+ this.xAmzErrorType = opts.xAmzErrorType;
50
51
  }
51
- return InternalServerException;
52
- }(__BaseException));
53
- export { InternalServerException };
54
- var ResourceNotFoundException = (function (_super) {
55
- __extends(ResourceNotFoundException, _super);
56
- function ResourceNotFoundException(opts) {
57
- var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
58
- _this.name = "ResourceNotFoundException";
59
- _this.$fault = "client";
60
- Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
61
- _this.xAmzErrorType = opts.xAmzErrorType;
62
- return _this;
52
+ }
53
+ export class ResourceNotFoundException extends __BaseException {
54
+ constructor(opts) {
55
+ super({
56
+ name: "ResourceNotFoundException",
57
+ $fault: "client",
58
+ ...opts,
59
+ });
60
+ this.name = "ResourceNotFoundException";
61
+ this.$fault = "client";
62
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
63
+ this.xAmzErrorType = opts.xAmzErrorType;
63
64
  }
64
- return ResourceNotFoundException;
65
- }(__BaseException));
66
- export { ResourceNotFoundException };
67
- var ServiceQuotaExceededException = (function (_super) {
68
- __extends(ServiceQuotaExceededException, _super);
69
- function ServiceQuotaExceededException(opts) {
70
- var _this = _super.call(this, __assign({ name: "ServiceQuotaExceededException", $fault: "client" }, opts)) || this;
71
- _this.name = "ServiceQuotaExceededException";
72
- _this.$fault = "client";
73
- Object.setPrototypeOf(_this, ServiceQuotaExceededException.prototype);
74
- _this.xAmzErrorType = opts.xAmzErrorType;
75
- return _this;
65
+ }
66
+ export class ServiceQuotaExceededException extends __BaseException {
67
+ constructor(opts) {
68
+ super({
69
+ name: "ServiceQuotaExceededException",
70
+ $fault: "client",
71
+ ...opts,
72
+ });
73
+ this.name = "ServiceQuotaExceededException";
74
+ this.$fault = "client";
75
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
76
+ this.xAmzErrorType = opts.xAmzErrorType;
76
77
  }
77
- return ServiceQuotaExceededException;
78
- }(__BaseException));
79
- export { ServiceQuotaExceededException };
80
- var ThrottlingException = (function (_super) {
81
- __extends(ThrottlingException, _super);
82
- function ThrottlingException(opts) {
83
- var _this = _super.call(this, __assign({ name: "ThrottlingException", $fault: "client" }, opts)) || this;
84
- _this.name = "ThrottlingException";
85
- _this.$fault = "client";
86
- _this.$retryable = {};
87
- Object.setPrototypeOf(_this, ThrottlingException.prototype);
88
- _this.xAmzErrorType = opts.xAmzErrorType;
89
- return _this;
78
+ }
79
+ export class ThrottlingException extends __BaseException {
80
+ constructor(opts) {
81
+ super({
82
+ name: "ThrottlingException",
83
+ $fault: "client",
84
+ ...opts,
85
+ });
86
+ this.name = "ThrottlingException";
87
+ this.$fault = "client";
88
+ this.$retryable = {};
89
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
90
+ this.xAmzErrorType = opts.xAmzErrorType;
90
91
  }
91
- return ThrottlingException;
92
- }(__BaseException));
93
- export { ThrottlingException };
94
- var ValidationException = (function (_super) {
95
- __extends(ValidationException, _super);
96
- function ValidationException(opts) {
97
- var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
98
- _this.name = "ValidationException";
99
- _this.$fault = "client";
100
- Object.setPrototypeOf(_this, ValidationException.prototype);
101
- _this.xAmzErrorType = opts.xAmzErrorType;
102
- return _this;
92
+ }
93
+ export class ValidationException extends __BaseException {
94
+ constructor(opts) {
95
+ super({
96
+ name: "ValidationException",
97
+ $fault: "client",
98
+ ...opts,
99
+ });
100
+ this.name = "ValidationException";
101
+ this.$fault = "client";
102
+ Object.setPrototypeOf(this, ValidationException.prototype);
103
+ this.xAmzErrorType = opts.xAmzErrorType;
103
104
  }
104
- return ValidationException;
105
- }(__BaseException));
106
- export { ValidationException };
107
- var InvalidStateException = (function (_super) {
108
- __extends(InvalidStateException, _super);
109
- function InvalidStateException(opts) {
110
- var _this = _super.call(this, __assign({ name: "InvalidStateException", $fault: "client" }, opts)) || this;
111
- _this.name = "InvalidStateException";
112
- _this.$fault = "client";
113
- Object.setPrototypeOf(_this, InvalidStateException.prototype);
114
- _this.xAmzErrorType = opts.xAmzErrorType;
115
- return _this;
105
+ }
106
+ export class InvalidStateException extends __BaseException {
107
+ constructor(opts) {
108
+ super({
109
+ name: "InvalidStateException",
110
+ $fault: "client",
111
+ ...opts,
112
+ });
113
+ this.name = "InvalidStateException";
114
+ this.$fault = "client";
115
+ Object.setPrototypeOf(this, InvalidStateException.prototype);
116
+ this.xAmzErrorType = opts.xAmzErrorType;
116
117
  }
117
- return InvalidStateException;
118
- }(__BaseException));
119
- export { InvalidStateException };
118
+ }
120
119
  export var CampaignState;
121
120
  (function (CampaignState) {
122
121
  CampaignState["FAILED"] = "Failed";
@@ -153,80 +152,182 @@ export var InstanceIdFilterOperator;
153
152
  (function (InstanceIdFilterOperator) {
154
153
  InstanceIdFilterOperator["EQ"] = "Eq";
155
154
  })(InstanceIdFilterOperator || (InstanceIdFilterOperator = {}));
156
- var InvalidCampaignStateException = (function (_super) {
157
- __extends(InvalidCampaignStateException, _super);
158
- function InvalidCampaignStateException(opts) {
159
- var _this = _super.call(this, __assign({ name: "InvalidCampaignStateException", $fault: "client" }, opts)) || this;
160
- _this.name = "InvalidCampaignStateException";
161
- _this.$fault = "client";
162
- Object.setPrototypeOf(_this, InvalidCampaignStateException.prototype);
163
- _this.state = opts.state;
164
- _this.xAmzErrorType = opts.xAmzErrorType;
165
- return _this;
155
+ export class InvalidCampaignStateException extends __BaseException {
156
+ constructor(opts) {
157
+ super({
158
+ name: "InvalidCampaignStateException",
159
+ $fault: "client",
160
+ ...opts,
161
+ });
162
+ this.name = "InvalidCampaignStateException";
163
+ this.$fault = "client";
164
+ Object.setPrototypeOf(this, InvalidCampaignStateException.prototype);
165
+ this.state = opts.state;
166
+ this.xAmzErrorType = opts.xAmzErrorType;
166
167
  }
167
- return InvalidCampaignStateException;
168
- }(__BaseException));
169
- export { InvalidCampaignStateException };
168
+ }
170
169
  export var FailureCode;
171
170
  (function (FailureCode) {
172
171
  FailureCode["INVALID_INPUT"] = "InvalidInput";
173
172
  FailureCode["REQUEST_THROTTLED"] = "RequestThrottled";
174
173
  FailureCode["UNKNOWN_ERROR"] = "UnknownError";
175
174
  })(FailureCode || (FailureCode = {}));
176
- export var PredictiveDialerConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
177
- export var ProgressiveDialerConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
178
- export var DialerConfigFilterSensitiveLog = function (obj) {
179
- var _a;
175
+ export const PredictiveDialerConfigFilterSensitiveLog = (obj) => ({
176
+ ...obj,
177
+ });
178
+ export const ProgressiveDialerConfigFilterSensitiveLog = (obj) => ({
179
+ ...obj,
180
+ });
181
+ export const DialerConfigFilterSensitiveLog = (obj) => {
180
182
  if (obj.progressiveDialerConfig !== undefined)
181
183
  return { progressiveDialerConfig: ProgressiveDialerConfigFilterSensitiveLog(obj.progressiveDialerConfig) };
182
184
  if (obj.predictiveDialerConfig !== undefined)
183
185
  return { predictiveDialerConfig: PredictiveDialerConfigFilterSensitiveLog(obj.predictiveDialerConfig) };
184
186
  if (obj.$unknown !== undefined)
185
- return _a = {}, _a[obj.$unknown[0]] = "UNKNOWN", _a;
187
+ return { [obj.$unknown[0]]: "UNKNOWN" };
186
188
  };
187
- export var AnswerMachineDetectionConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
188
- export var OutboundCallConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
189
- export var CreateCampaignRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.dialerConfig && { dialerConfig: DialerConfigFilterSensitiveLog(obj.dialerConfig) }))); };
190
- export var CreateCampaignResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
191
- export var DeleteCampaignRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
192
- export var DeleteConnectInstanceConfigRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
193
- export var DeleteInstanceOnboardingJobRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
194
- export var DescribeCampaignRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
195
- export var CampaignFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.dialerConfig && { dialerConfig: DialerConfigFilterSensitiveLog(obj.dialerConfig) }))); };
196
- export var DescribeCampaignResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.campaign && { campaign: CampaignFilterSensitiveLog(obj.campaign) }))); };
197
- export var GetCampaignStateRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
198
- export var GetCampaignStateResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
199
- export var GetCampaignStateBatchRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
200
- export var FailedCampaignStateResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
201
- export var SuccessfulCampaignStateResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
202
- export var GetCampaignStateBatchResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
203
- export var GetConnectInstanceConfigRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
204
- export var EncryptionConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
205
- export var InstanceConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
206
- export var GetConnectInstanceConfigResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
207
- export var GetInstanceOnboardingJobStatusRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
208
- export var InstanceOnboardingJobStatusFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
209
- export var GetInstanceOnboardingJobStatusResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
210
- export var InstanceIdFilterFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
211
- export var CampaignFiltersFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
212
- export var ListCampaignsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
213
- export var CampaignSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
214
- export var ListCampaignsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
215
- export var ListTagsForResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
216
- export var ListTagsForResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
217
- export var PauseCampaignRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
218
- export var DialRequestFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.phoneNumber && { phoneNumber: SENSITIVE_STRING })), (obj.attributes && { attributes: SENSITIVE_STRING }))); };
219
- export var PutDialRequestBatchRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.dialRequests && { dialRequests: obj.dialRequests.map(function (item) { return DialRequestFilterSensitiveLog(item); }) }))); };
220
- export var FailedRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
221
- export var SuccessfulRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
222
- export var PutDialRequestBatchResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
223
- export var ResumeCampaignRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
224
- export var StartCampaignRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
225
- export var StartInstanceOnboardingJobRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
226
- export var StartInstanceOnboardingJobResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
227
- export var StopCampaignRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
228
- export var TagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
229
- export var UntagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
230
- export var UpdateCampaignDialerConfigRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.dialerConfig && { dialerConfig: DialerConfigFilterSensitiveLog(obj.dialerConfig) }))); };
231
- export var UpdateCampaignNameRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
232
- export var UpdateCampaignOutboundCallConfigRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
189
+ export const AnswerMachineDetectionConfigFilterSensitiveLog = (obj) => ({
190
+ ...obj,
191
+ });
192
+ export const OutboundCallConfigFilterSensitiveLog = (obj) => ({
193
+ ...obj,
194
+ });
195
+ export const CreateCampaignRequestFilterSensitiveLog = (obj) => ({
196
+ ...obj,
197
+ ...(obj.dialerConfig && { dialerConfig: DialerConfigFilterSensitiveLog(obj.dialerConfig) }),
198
+ });
199
+ export const CreateCampaignResponseFilterSensitiveLog = (obj) => ({
200
+ ...obj,
201
+ });
202
+ export const DeleteCampaignRequestFilterSensitiveLog = (obj) => ({
203
+ ...obj,
204
+ });
205
+ export const DeleteConnectInstanceConfigRequestFilterSensitiveLog = (obj) => ({
206
+ ...obj,
207
+ });
208
+ export const DeleteInstanceOnboardingJobRequestFilterSensitiveLog = (obj) => ({
209
+ ...obj,
210
+ });
211
+ export const DescribeCampaignRequestFilterSensitiveLog = (obj) => ({
212
+ ...obj,
213
+ });
214
+ export const CampaignFilterSensitiveLog = (obj) => ({
215
+ ...obj,
216
+ ...(obj.dialerConfig && { dialerConfig: DialerConfigFilterSensitiveLog(obj.dialerConfig) }),
217
+ });
218
+ export const DescribeCampaignResponseFilterSensitiveLog = (obj) => ({
219
+ ...obj,
220
+ ...(obj.campaign && { campaign: CampaignFilterSensitiveLog(obj.campaign) }),
221
+ });
222
+ export const GetCampaignStateRequestFilterSensitiveLog = (obj) => ({
223
+ ...obj,
224
+ });
225
+ export const GetCampaignStateResponseFilterSensitiveLog = (obj) => ({
226
+ ...obj,
227
+ });
228
+ export const GetCampaignStateBatchRequestFilterSensitiveLog = (obj) => ({
229
+ ...obj,
230
+ });
231
+ export const FailedCampaignStateResponseFilterSensitiveLog = (obj) => ({
232
+ ...obj,
233
+ });
234
+ export const SuccessfulCampaignStateResponseFilterSensitiveLog = (obj) => ({
235
+ ...obj,
236
+ });
237
+ export const GetCampaignStateBatchResponseFilterSensitiveLog = (obj) => ({
238
+ ...obj,
239
+ });
240
+ export const GetConnectInstanceConfigRequestFilterSensitiveLog = (obj) => ({
241
+ ...obj,
242
+ });
243
+ export const EncryptionConfigFilterSensitiveLog = (obj) => ({
244
+ ...obj,
245
+ });
246
+ export const InstanceConfigFilterSensitiveLog = (obj) => ({
247
+ ...obj,
248
+ });
249
+ export const GetConnectInstanceConfigResponseFilterSensitiveLog = (obj) => ({
250
+ ...obj,
251
+ });
252
+ export const GetInstanceOnboardingJobStatusRequestFilterSensitiveLog = (obj) => ({
253
+ ...obj,
254
+ });
255
+ export const InstanceOnboardingJobStatusFilterSensitiveLog = (obj) => ({
256
+ ...obj,
257
+ });
258
+ export const GetInstanceOnboardingJobStatusResponseFilterSensitiveLog = (obj) => ({
259
+ ...obj,
260
+ });
261
+ export const InstanceIdFilterFilterSensitiveLog = (obj) => ({
262
+ ...obj,
263
+ });
264
+ export const CampaignFiltersFilterSensitiveLog = (obj) => ({
265
+ ...obj,
266
+ });
267
+ export const ListCampaignsRequestFilterSensitiveLog = (obj) => ({
268
+ ...obj,
269
+ });
270
+ export const CampaignSummaryFilterSensitiveLog = (obj) => ({
271
+ ...obj,
272
+ });
273
+ export const ListCampaignsResponseFilterSensitiveLog = (obj) => ({
274
+ ...obj,
275
+ });
276
+ export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
277
+ ...obj,
278
+ });
279
+ export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
280
+ ...obj,
281
+ });
282
+ export const PauseCampaignRequestFilterSensitiveLog = (obj) => ({
283
+ ...obj,
284
+ });
285
+ export const DialRequestFilterSensitiveLog = (obj) => ({
286
+ ...obj,
287
+ ...(obj.phoneNumber && { phoneNumber: SENSITIVE_STRING }),
288
+ ...(obj.attributes && { attributes: SENSITIVE_STRING }),
289
+ });
290
+ export const PutDialRequestBatchRequestFilterSensitiveLog = (obj) => ({
291
+ ...obj,
292
+ ...(obj.dialRequests && { dialRequests: obj.dialRequests.map((item) => DialRequestFilterSensitiveLog(item)) }),
293
+ });
294
+ export const FailedRequestFilterSensitiveLog = (obj) => ({
295
+ ...obj,
296
+ });
297
+ export const SuccessfulRequestFilterSensitiveLog = (obj) => ({
298
+ ...obj,
299
+ });
300
+ export const PutDialRequestBatchResponseFilterSensitiveLog = (obj) => ({
301
+ ...obj,
302
+ });
303
+ export const ResumeCampaignRequestFilterSensitiveLog = (obj) => ({
304
+ ...obj,
305
+ });
306
+ export const StartCampaignRequestFilterSensitiveLog = (obj) => ({
307
+ ...obj,
308
+ });
309
+ export const StartInstanceOnboardingJobRequestFilterSensitiveLog = (obj) => ({
310
+ ...obj,
311
+ });
312
+ export const StartInstanceOnboardingJobResponseFilterSensitiveLog = (obj) => ({
313
+ ...obj,
314
+ });
315
+ export const StopCampaignRequestFilterSensitiveLog = (obj) => ({
316
+ ...obj,
317
+ });
318
+ export const TagResourceRequestFilterSensitiveLog = (obj) => ({
319
+ ...obj,
320
+ });
321
+ export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
322
+ ...obj,
323
+ });
324
+ export const UpdateCampaignDialerConfigRequestFilterSensitiveLog = (obj) => ({
325
+ ...obj,
326
+ ...(obj.dialerConfig && { dialerConfig: DialerConfigFilterSensitiveLog(obj.dialerConfig) }),
327
+ });
328
+ export const UpdateCampaignNameRequestFilterSensitiveLog = (obj) => ({
329
+ ...obj,
330
+ });
331
+ export const UpdateCampaignOutboundCallConfigRequestFilterSensitiveLog = (obj) => ({
332
+ ...obj,
333
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListCampaignsCommand, } from "../commands/ListCampaignsCommand";
3
2
  import { ConnectCampaigns } from "../ConnectCampaigns";
4
3
  import { ConnectCampaignsClient } from "../ConnectCampaignsClient";
5
- var makePagedClientRequest = function (client, input) {
6
- var args = [];
7
- for (var _i = 2; _i < arguments.length; _i++) {
8
- args[_i - 2] = arguments[_i];
9
- }
10
- return __awaiter(void 0, void 0, void 0, function () {
11
- return __generator(this, function (_a) {
12
- switch (_a.label) {
13
- case 0: return [4, client.send.apply(client, __spreadArray([new ListCampaignsCommand(input)], __read(args), false))];
14
- case 1: return [2, _a.sent()];
15
- }
16
- });
17
- });
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListCampaignsCommand(input), ...args);
18
6
  };
19
- var makePagedRequest = function (client, input) {
20
- var args = [];
21
- for (var _i = 2; _i < arguments.length; _i++) {
22
- args[_i - 2] = arguments[_i];
23
- }
24
- return __awaiter(void 0, void 0, void 0, function () {
25
- return __generator(this, function (_a) {
26
- switch (_a.label) {
27
- case 0: return [4, client.listCampaigns.apply(client, __spreadArray([input], __read(args), false))];
28
- case 1: return [2, _a.sent()];
29
- }
30
- });
31
- });
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listCampaigns(input, ...args);
32
9
  };
33
- export function paginateListCampaigns(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListCampaigns(config, input, ...additionalArguments) {
11
+ let token = config.startingToken || undefined;
12
+ let hasNext = true;
13
+ let page;
14
+ while (hasNext) {
15
+ input.nextToken = token;
16
+ input["maxResults"] = config.pageSize;
17
+ if (config.client instanceof ConnectCampaigns) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof ConnectCampaignsClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected ConnectCampaigns | ConnectCampaignsClient");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.nextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateListCampaigns_1() {
39
- var token, hasNext, page, prevToken;
40
- return __generator(this, function (_a) {
41
- switch (_a.label) {
42
- case 0:
43
- token = config.startingToken || undefined;
44
- hasNext = true;
45
- _a.label = 1;
46
- case 1:
47
- if (!hasNext) return [3, 9];
48
- input.nextToken = token;
49
- input["maxResults"] = config.pageSize;
50
- if (!(config.client instanceof ConnectCampaigns)) return [3, 3];
51
- return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
- case 2:
53
- page = _a.sent();
54
- return [3, 6];
55
- case 3:
56
- if (!(config.client instanceof ConnectCampaignsClient)) return [3, 5];
57
- return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
- case 4:
59
- page = _a.sent();
60
- return [3, 6];
61
- case 5: throw new Error("Invalid client, expected ConnectCampaigns | ConnectCampaignsClient");
62
- case 6: return [4, __await(page)];
63
- case 7: return [4, _a.sent()];
64
- case 8:
65
- _a.sent();
66
- prevToken = token;
67
- token = page.nextToken;
68
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
- return [3, 1];
70
- case 9: return [4, __await(undefined)];
71
- case 10: return [2, _a.sent()];
72
- }
73
- });
74
- });
31
+ return undefined;
75
32
  }