@aws-sdk/client-codestar-notifications 3.183.0 → 3.185.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 (29) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +2 -2
  3. package/dist-es/CodestarNotifications.js +61 -54
  4. package/dist-es/CodestarNotificationsClient.js +28 -22
  5. package/dist-es/commands/CreateNotificationRuleCommand.js +28 -21
  6. package/dist-es/commands/DeleteNotificationRuleCommand.js +28 -21
  7. package/dist-es/commands/DeleteTargetCommand.js +28 -21
  8. package/dist-es/commands/DescribeNotificationRuleCommand.js +28 -21
  9. package/dist-es/commands/ListEventTypesCommand.js +28 -21
  10. package/dist-es/commands/ListNotificationRulesCommand.js +28 -21
  11. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  12. package/dist-es/commands/ListTargetsCommand.js +28 -21
  13. package/dist-es/commands/SubscribeCommand.js +28 -21
  14. package/dist-es/commands/TagResourceCommand.js +28 -21
  15. package/dist-es/commands/UnsubscribeCommand.js +28 -21
  16. package/dist-es/commands/UntagResourceCommand.js +28 -21
  17. package/dist-es/commands/UpdateNotificationRuleCommand.js +28 -21
  18. package/dist-es/endpoints.js +8 -8
  19. package/dist-es/models/CodestarNotificationsServiceException.js +10 -5
  20. package/dist-es/models/models_0.js +130 -207
  21. package/dist-es/pagination/ListEventTypesPaginator.js +68 -25
  22. package/dist-es/pagination/ListNotificationRulesPaginator.js +68 -25
  23. package/dist-es/pagination/ListTargetsPaginator.js +68 -25
  24. package/dist-es/protocols/Aws_restJson1.js +1306 -954
  25. package/dist-es/runtimeConfig.browser.js +12 -26
  26. package/dist-es/runtimeConfig.js +12 -30
  27. package/dist-es/runtimeConfig.native.js +5 -8
  28. package/dist-es/runtimeConfig.shared.js +11 -8
  29. package/package.json +5 -5
@@ -1,44 +1,45 @@
1
+ import { __assign, __extends } from "tslib";
1
2
  import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
2
3
  import { CodestarNotificationsServiceException as __BaseException } from "./CodestarNotificationsServiceException";
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.Message = opts.Message;
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.Message = opts.Message;
12
+ return _this;
14
13
  }
15
- }
16
- export class ConcurrentModificationException extends __BaseException {
17
- constructor(opts) {
18
- super({
19
- name: "ConcurrentModificationException",
20
- $fault: "client",
21
- ...opts,
22
- });
23
- this.name = "ConcurrentModificationException";
24
- this.$fault = "client";
25
- Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
26
- this.Message = opts.Message;
14
+ return AccessDeniedException;
15
+ }(__BaseException));
16
+ export { AccessDeniedException };
17
+ var ConcurrentModificationException = (function (_super) {
18
+ __extends(ConcurrentModificationException, _super);
19
+ function ConcurrentModificationException(opts) {
20
+ var _this = _super.call(this, __assign({ name: "ConcurrentModificationException", $fault: "client" }, opts)) || this;
21
+ _this.name = "ConcurrentModificationException";
22
+ _this.$fault = "client";
23
+ Object.setPrototypeOf(_this, ConcurrentModificationException.prototype);
24
+ _this.Message = opts.Message;
25
+ return _this;
27
26
  }
28
- }
29
- export class ConfigurationException extends __BaseException {
30
- constructor(opts) {
31
- super({
32
- name: "ConfigurationException",
33
- $fault: "client",
34
- ...opts,
35
- });
36
- this.name = "ConfigurationException";
37
- this.$fault = "client";
38
- Object.setPrototypeOf(this, ConfigurationException.prototype);
39
- this.Message = opts.Message;
27
+ return ConcurrentModificationException;
28
+ }(__BaseException));
29
+ export { ConcurrentModificationException };
30
+ var ConfigurationException = (function (_super) {
31
+ __extends(ConfigurationException, _super);
32
+ function ConfigurationException(opts) {
33
+ var _this = _super.call(this, __assign({ name: "ConfigurationException", $fault: "client" }, opts)) || this;
34
+ _this.name = "ConfigurationException";
35
+ _this.$fault = "client";
36
+ Object.setPrototypeOf(_this, ConfigurationException.prototype);
37
+ _this.Message = opts.Message;
38
+ return _this;
40
39
  }
41
- }
40
+ return ConfigurationException;
41
+ }(__BaseException));
42
+ export { ConfigurationException };
42
43
  export var DetailType;
43
44
  (function (DetailType) {
44
45
  DetailType["BASIC"] = "BASIC";
@@ -49,45 +50,45 @@ export var NotificationRuleStatus;
49
50
  NotificationRuleStatus["DISABLED"] = "DISABLED";
50
51
  NotificationRuleStatus["ENABLED"] = "ENABLED";
51
52
  })(NotificationRuleStatus || (NotificationRuleStatus = {}));
52
- export class LimitExceededException extends __BaseException {
53
- constructor(opts) {
54
- super({
55
- name: "LimitExceededException",
56
- $fault: "client",
57
- ...opts,
58
- });
59
- this.name = "LimitExceededException";
60
- this.$fault = "client";
61
- Object.setPrototypeOf(this, LimitExceededException.prototype);
62
- this.Message = opts.Message;
53
+ var LimitExceededException = (function (_super) {
54
+ __extends(LimitExceededException, _super);
55
+ function LimitExceededException(opts) {
56
+ var _this = _super.call(this, __assign({ name: "LimitExceededException", $fault: "client" }, opts)) || this;
57
+ _this.name = "LimitExceededException";
58
+ _this.$fault = "client";
59
+ Object.setPrototypeOf(_this, LimitExceededException.prototype);
60
+ _this.Message = opts.Message;
61
+ return _this;
63
62
  }
64
- }
65
- export class ResourceAlreadyExistsException extends __BaseException {
66
- constructor(opts) {
67
- super({
68
- name: "ResourceAlreadyExistsException",
69
- $fault: "client",
70
- ...opts,
71
- });
72
- this.name = "ResourceAlreadyExistsException";
73
- this.$fault = "client";
74
- Object.setPrototypeOf(this, ResourceAlreadyExistsException.prototype);
75
- this.Message = opts.Message;
63
+ return LimitExceededException;
64
+ }(__BaseException));
65
+ export { LimitExceededException };
66
+ var ResourceAlreadyExistsException = (function (_super) {
67
+ __extends(ResourceAlreadyExistsException, _super);
68
+ function ResourceAlreadyExistsException(opts) {
69
+ var _this = _super.call(this, __assign({ name: "ResourceAlreadyExistsException", $fault: "client" }, opts)) || this;
70
+ _this.name = "ResourceAlreadyExistsException";
71
+ _this.$fault = "client";
72
+ Object.setPrototypeOf(_this, ResourceAlreadyExistsException.prototype);
73
+ _this.Message = opts.Message;
74
+ return _this;
76
75
  }
77
- }
78
- export class ValidationException extends __BaseException {
79
- constructor(opts) {
80
- super({
81
- name: "ValidationException",
82
- $fault: "client",
83
- ...opts,
84
- });
85
- this.name = "ValidationException";
86
- this.$fault = "client";
87
- Object.setPrototypeOf(this, ValidationException.prototype);
88
- this.Message = opts.Message;
76
+ return ResourceAlreadyExistsException;
77
+ }(__BaseException));
78
+ export { ResourceAlreadyExistsException };
79
+ var ValidationException = (function (_super) {
80
+ __extends(ValidationException, _super);
81
+ function ValidationException(opts) {
82
+ var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
83
+ _this.name = "ValidationException";
84
+ _this.$fault = "client";
85
+ Object.setPrototypeOf(_this, ValidationException.prototype);
86
+ _this.Message = opts.Message;
87
+ return _this;
89
88
  }
90
- }
89
+ return ValidationException;
90
+ }(__BaseException));
91
+ export { ValidationException };
91
92
  export var TargetStatus;
92
93
  (function (TargetStatus) {
93
94
  TargetStatus["ACTIVE"] = "ACTIVE";
@@ -96,32 +97,32 @@ export var TargetStatus;
96
97
  TargetStatus["PENDING"] = "PENDING";
97
98
  TargetStatus["UNREACHABLE"] = "UNREACHABLE";
98
99
  })(TargetStatus || (TargetStatus = {}));
99
- export class ResourceNotFoundException extends __BaseException {
100
- constructor(opts) {
101
- super({
102
- name: "ResourceNotFoundException",
103
- $fault: "client",
104
- ...opts,
105
- });
106
- this.name = "ResourceNotFoundException";
107
- this.$fault = "client";
108
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
109
- this.Message = opts.Message;
100
+ var ResourceNotFoundException = (function (_super) {
101
+ __extends(ResourceNotFoundException, _super);
102
+ function ResourceNotFoundException(opts) {
103
+ var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
104
+ _this.name = "ResourceNotFoundException";
105
+ _this.$fault = "client";
106
+ Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
107
+ _this.Message = opts.Message;
108
+ return _this;
110
109
  }
111
- }
112
- export class InvalidNextTokenException extends __BaseException {
113
- constructor(opts) {
114
- super({
115
- name: "InvalidNextTokenException",
116
- $fault: "client",
117
- ...opts,
118
- });
119
- this.name = "InvalidNextTokenException";
120
- this.$fault = "client";
121
- Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
122
- this.Message = opts.Message;
110
+ return ResourceNotFoundException;
111
+ }(__BaseException));
112
+ export { ResourceNotFoundException };
113
+ var InvalidNextTokenException = (function (_super) {
114
+ __extends(InvalidNextTokenException, _super);
115
+ function InvalidNextTokenException(opts) {
116
+ var _this = _super.call(this, __assign({ name: "InvalidNextTokenException", $fault: "client" }, opts)) || this;
117
+ _this.name = "InvalidNextTokenException";
118
+ _this.$fault = "client";
119
+ Object.setPrototypeOf(_this, InvalidNextTokenException.prototype);
120
+ _this.Message = opts.Message;
121
+ return _this;
123
122
  }
124
- }
123
+ return InvalidNextTokenException;
124
+ }(__BaseException));
125
+ export { InvalidNextTokenException };
125
126
  export var ListEventTypesFilterName;
126
127
  (function (ListEventTypesFilterName) {
127
128
  ListEventTypesFilterName["RESOURCE_TYPE"] = "RESOURCE_TYPE";
@@ -140,114 +141,36 @@ export var ListTargetsFilterName;
140
141
  ListTargetsFilterName["TARGET_STATUS"] = "TARGET_STATUS";
141
142
  ListTargetsFilterName["TARGET_TYPE"] = "TARGET_TYPE";
142
143
  })(ListTargetsFilterName || (ListTargetsFilterName = {}));
143
- export const TargetFilterSensitiveLog = (obj) => ({
144
- ...obj,
145
- ...(obj.TargetAddress && { TargetAddress: SENSITIVE_STRING }),
146
- });
147
- export const CreateNotificationRuleRequestFilterSensitiveLog = (obj) => ({
148
- ...obj,
149
- ...(obj.Name && { Name: SENSITIVE_STRING }),
150
- ...(obj.Targets && { Targets: obj.Targets.map((item) => TargetFilterSensitiveLog(item)) }),
151
- });
152
- export const CreateNotificationRuleResultFilterSensitiveLog = (obj) => ({
153
- ...obj,
154
- });
155
- export const DeleteNotificationRuleRequestFilterSensitiveLog = (obj) => ({
156
- ...obj,
157
- });
158
- export const DeleteNotificationRuleResultFilterSensitiveLog = (obj) => ({
159
- ...obj,
160
- });
161
- export const DeleteTargetRequestFilterSensitiveLog = (obj) => ({
162
- ...obj,
163
- ...(obj.TargetAddress && { TargetAddress: SENSITIVE_STRING }),
164
- });
165
- export const DeleteTargetResultFilterSensitiveLog = (obj) => ({
166
- ...obj,
167
- });
168
- export const DescribeNotificationRuleRequestFilterSensitiveLog = (obj) => ({
169
- ...obj,
170
- });
171
- export const EventTypeSummaryFilterSensitiveLog = (obj) => ({
172
- ...obj,
173
- });
174
- export const TargetSummaryFilterSensitiveLog = (obj) => ({
175
- ...obj,
176
- ...(obj.TargetAddress && { TargetAddress: SENSITIVE_STRING }),
177
- });
178
- export const DescribeNotificationRuleResultFilterSensitiveLog = (obj) => ({
179
- ...obj,
180
- ...(obj.Name && { Name: SENSITIVE_STRING }),
181
- ...(obj.Targets && { Targets: obj.Targets.map((item) => TargetSummaryFilterSensitiveLog(item)) }),
182
- });
183
- export const ListEventTypesFilterFilterSensitiveLog = (obj) => ({
184
- ...obj,
185
- });
186
- export const ListEventTypesRequestFilterSensitiveLog = (obj) => ({
187
- ...obj,
188
- });
189
- export const ListEventTypesResultFilterSensitiveLog = (obj) => ({
190
- ...obj,
191
- });
192
- export const ListNotificationRulesFilterFilterSensitiveLog = (obj) => ({
193
- ...obj,
194
- });
195
- export const ListNotificationRulesRequestFilterSensitiveLog = (obj) => ({
196
- ...obj,
197
- });
198
- export const NotificationRuleSummaryFilterSensitiveLog = (obj) => ({
199
- ...obj,
200
- });
201
- export const ListNotificationRulesResultFilterSensitiveLog = (obj) => ({
202
- ...obj,
203
- });
204
- export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
205
- ...obj,
206
- });
207
- export const ListTagsForResourceResultFilterSensitiveLog = (obj) => ({
208
- ...obj,
209
- });
210
- export const ListTargetsFilterFilterSensitiveLog = (obj) => ({
211
- ...obj,
212
- });
213
- export const ListTargetsRequestFilterSensitiveLog = (obj) => ({
214
- ...obj,
215
- });
216
- export const ListTargetsResultFilterSensitiveLog = (obj) => ({
217
- ...obj,
218
- ...(obj.Targets && { Targets: obj.Targets.map((item) => TargetSummaryFilterSensitiveLog(item)) }),
219
- });
220
- export const SubscribeRequestFilterSensitiveLog = (obj) => ({
221
- ...obj,
222
- ...(obj.Target && { Target: TargetFilterSensitiveLog(obj.Target) }),
223
- });
224
- export const SubscribeResultFilterSensitiveLog = (obj) => ({
225
- ...obj,
226
- });
227
- export const TagResourceRequestFilterSensitiveLog = (obj) => ({
228
- ...obj,
229
- });
230
- export const TagResourceResultFilterSensitiveLog = (obj) => ({
231
- ...obj,
232
- });
233
- export const UnsubscribeRequestFilterSensitiveLog = (obj) => ({
234
- ...obj,
235
- ...(obj.TargetAddress && { TargetAddress: SENSITIVE_STRING }),
236
- });
237
- export const UnsubscribeResultFilterSensitiveLog = (obj) => ({
238
- ...obj,
239
- });
240
- export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
241
- ...obj,
242
- });
243
- export const UntagResourceResultFilterSensitiveLog = (obj) => ({
244
- ...obj,
245
- });
246
- export const UpdateNotificationRuleRequestFilterSensitiveLog = (obj) => ({
247
- ...obj,
248
- ...(obj.Name && { Name: SENSITIVE_STRING }),
249
- ...(obj.Targets && { Targets: obj.Targets.map((item) => TargetFilterSensitiveLog(item)) }),
250
- });
251
- export const UpdateNotificationRuleResultFilterSensitiveLog = (obj) => ({
252
- ...obj,
253
- });
144
+ export var TargetFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.TargetAddress && { TargetAddress: SENSITIVE_STRING }))); };
145
+ export var CreateNotificationRuleRequestFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Name && { Name: SENSITIVE_STRING })), (obj.Targets && { Targets: obj.Targets.map(function (item) { return TargetFilterSensitiveLog(item); }) }))); };
146
+ export var CreateNotificationRuleResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
147
+ export var DeleteNotificationRuleRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
148
+ export var DeleteNotificationRuleResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
149
+ export var DeleteTargetRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.TargetAddress && { TargetAddress: SENSITIVE_STRING }))); };
150
+ export var DeleteTargetResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
151
+ export var DescribeNotificationRuleRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
152
+ export var EventTypeSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
153
+ export var TargetSummaryFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.TargetAddress && { TargetAddress: SENSITIVE_STRING }))); };
154
+ export var DescribeNotificationRuleResultFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Name && { Name: SENSITIVE_STRING })), (obj.Targets && { Targets: obj.Targets.map(function (item) { return TargetSummaryFilterSensitiveLog(item); }) }))); };
155
+ export var ListEventTypesFilterFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
156
+ export var ListEventTypesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
157
+ export var ListEventTypesResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
158
+ export var ListNotificationRulesFilterFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
159
+ export var ListNotificationRulesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
160
+ export var NotificationRuleSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
161
+ export var ListNotificationRulesResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
162
+ export var ListTagsForResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
163
+ export var ListTagsForResourceResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
164
+ export var ListTargetsFilterFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
165
+ export var ListTargetsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
166
+ export var ListTargetsResultFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Targets && { Targets: obj.Targets.map(function (item) { return TargetSummaryFilterSensitiveLog(item); }) }))); };
167
+ export var SubscribeRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Target && { Target: TargetFilterSensitiveLog(obj.Target) }))); };
168
+ export var SubscribeResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
169
+ export var TagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
170
+ export var TagResourceResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
171
+ export var UnsubscribeRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.TargetAddress && { TargetAddress: SENSITIVE_STRING }))); };
172
+ export var UnsubscribeResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
173
+ export var UntagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
174
+ export var UntagResourceResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
175
+ export var UpdateNotificationRuleRequestFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Name && { Name: SENSITIVE_STRING })), (obj.Targets && { Targets: obj.Targets.map(function (item) { return TargetFilterSensitiveLog(item); }) }))); };
176
+ export var UpdateNotificationRuleResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { CodestarNotifications } from "../CodestarNotifications";
2
3
  import { CodestarNotificationsClient } from "../CodestarNotificationsClient";
3
4
  import { ListEventTypesCommand, } from "../commands/ListEventTypesCommand";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new ListEventTypesCommand(input), ...args);
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 ListEventTypesCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
6
18
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.listEventTypes(input, ...args);
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.listEventTypes.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateListEventTypes(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 CodestarNotifications) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof CodestarNotificationsClient) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected CodestarNotifications | CodestarNotificationsClient");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.NextToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateListEventTypes(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
30
37
  }
31
- return undefined;
38
+ return __asyncGenerator(this, arguments, function paginateListEventTypes_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 CodestarNotifications)) 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 CodestarNotificationsClient)) 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 CodestarNotifications | CodestarNotificationsClient");
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
+ });
32
75
  }
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { CodestarNotifications } from "../CodestarNotifications";
2
3
  import { CodestarNotificationsClient } from "../CodestarNotificationsClient";
3
4
  import { ListNotificationRulesCommand, } from "../commands/ListNotificationRulesCommand";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new ListNotificationRulesCommand(input), ...args);
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 ListNotificationRulesCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
6
18
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.listNotificationRules(input, ...args);
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.listNotificationRules.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateListNotificationRules(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 CodestarNotifications) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof CodestarNotificationsClient) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected CodestarNotifications | CodestarNotificationsClient");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.NextToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateListNotificationRules(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
30
37
  }
31
- return undefined;
38
+ return __asyncGenerator(this, arguments, function paginateListNotificationRules_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 CodestarNotifications)) 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 CodestarNotificationsClient)) 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 CodestarNotifications | CodestarNotificationsClient");
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
+ });
32
75
  }