@aws-sdk/client-codestar-notifications 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.
- package/CHANGELOG.md +20 -0
- package/dist-cjs/protocols/Aws_restJson1.js +19 -13
- package/dist-es/CodestarNotifications.js +54 -61
- package/dist-es/CodestarNotificationsClient.js +22 -28
- package/dist-es/commands/CreateNotificationRuleCommand.js +21 -28
- package/dist-es/commands/DeleteNotificationRuleCommand.js +21 -28
- package/dist-es/commands/DeleteTargetCommand.js +21 -28
- package/dist-es/commands/DescribeNotificationRuleCommand.js +21 -28
- package/dist-es/commands/ListEventTypesCommand.js +21 -28
- package/dist-es/commands/ListNotificationRulesCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ListTargetsCommand.js +21 -28
- package/dist-es/commands/SubscribeCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UnsubscribeCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateNotificationRuleCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/CodestarNotificationsServiceException.js +5 -10
- package/dist-es/models/models_0.js +207 -130
- package/dist-es/pagination/ListEventTypesPaginator.js +25 -68
- package/dist-es/pagination/ListNotificationRulesPaginator.js +25 -68
- package/dist-es/pagination/ListTargetsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +954 -1293
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,39 +1,32 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { UpdateNotificationRuleRequestFilterSensitiveLog, UpdateNotificationRuleResultFilterSensitiveLog, } from "../models/models_0";
|
|
5
4
|
import { deserializeAws_restJson1UpdateNotificationRuleCommand, serializeAws_restJson1UpdateNotificationRuleCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
_this.input = input;
|
|
11
|
-
return _this;
|
|
5
|
+
export class UpdateNotificationRuleCommand extends $Command {
|
|
6
|
+
constructor(input) {
|
|
7
|
+
super();
|
|
8
|
+
this.input = input;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
11
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
logger
|
|
21
|
-
clientName
|
|
22
|
-
commandName
|
|
12
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
13
|
+
const { logger } = configuration;
|
|
14
|
+
const clientName = "CodestarNotificationsClient";
|
|
15
|
+
const commandName = "UpdateNotificationRuleCommand";
|
|
16
|
+
const handlerExecutionContext = {
|
|
17
|
+
logger,
|
|
18
|
+
clientName,
|
|
19
|
+
commandName,
|
|
23
20
|
inputFilterSensitiveLog: UpdateNotificationRuleRequestFilterSensitiveLog,
|
|
24
21
|
outputFilterSensitiveLog: UpdateNotificationRuleResultFilterSensitiveLog,
|
|
25
22
|
};
|
|
26
|
-
|
|
27
|
-
return stack.resolve(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
UpdateNotificationRuleCommand.prototype.serialize = function (input, context) {
|
|
23
|
+
const { requestHandler } = configuration;
|
|
24
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
25
|
+
}
|
|
26
|
+
serialize(input, context) {
|
|
32
27
|
return serializeAws_restJson1UpdateNotificationRuleCommand(input, context);
|
|
33
|
-
}
|
|
34
|
-
|
|
28
|
+
}
|
|
29
|
+
deserialize(output, context) {
|
|
35
30
|
return deserializeAws_restJson1UpdateNotificationRuleCommand(output, context);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}($Command));
|
|
39
|
-
export { UpdateNotificationRuleCommand };
|
|
31
|
+
}
|
|
32
|
+
}
|
package/dist-es/endpoints.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const regionHash = {};
|
|
3
|
+
const partitionHash = {
|
|
5
4
|
aws: {
|
|
6
5
|
regions: [
|
|
7
6
|
"af-south-1",
|
|
@@ -121,8 +120,9 @@ var partitionHash = {
|
|
|
121
120
|
],
|
|
122
121
|
},
|
|
123
122
|
};
|
|
124
|
-
export
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
|
|
124
|
+
...options,
|
|
125
|
+
signingService: "codestar-notifications",
|
|
126
|
+
regionHash,
|
|
127
|
+
partitionHash,
|
|
128
|
+
});
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.setPrototypeOf(_this, CodestarNotificationsServiceException.prototype);
|
|
8
|
-
return _this;
|
|
2
|
+
export class CodestarNotificationsServiceException extends __ServiceException {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
super(options);
|
|
5
|
+
Object.setPrototypeOf(this, CodestarNotificationsServiceException.prototype);
|
|
9
6
|
}
|
|
10
|
-
|
|
11
|
-
}(__ServiceException));
|
|
12
|
-
export { CodestarNotificationsServiceException };
|
|
7
|
+
}
|
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
|
|
3
2
|
import { CodestarNotificationsServiceException as __BaseException } from "./CodestarNotificationsServiceException";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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;
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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;
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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;
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
}(__BaseException));
|
|
42
|
-
export { ConfigurationException };
|
|
41
|
+
}
|
|
43
42
|
export var DetailType;
|
|
44
43
|
(function (DetailType) {
|
|
45
44
|
DetailType["BASIC"] = "BASIC";
|
|
@@ -50,45 +49,45 @@ export var NotificationRuleStatus;
|
|
|
50
49
|
NotificationRuleStatus["DISABLED"] = "DISABLED";
|
|
51
50
|
NotificationRuleStatus["ENABLED"] = "ENABLED";
|
|
52
51
|
})(NotificationRuleStatus || (NotificationRuleStatus = {}));
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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;
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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;
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
-
}(__BaseException));
|
|
91
|
-
export { ValidationException };
|
|
90
|
+
}
|
|
92
91
|
export var TargetStatus;
|
|
93
92
|
(function (TargetStatus) {
|
|
94
93
|
TargetStatus["ACTIVE"] = "ACTIVE";
|
|
@@ -97,32 +96,32 @@ export var TargetStatus;
|
|
|
97
96
|
TargetStatus["PENDING"] = "PENDING";
|
|
98
97
|
TargetStatus["UNREACHABLE"] = "UNREACHABLE";
|
|
99
98
|
})(TargetStatus || (TargetStatus = {}));
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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;
|
|
109
110
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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;
|
|
122
123
|
}
|
|
123
|
-
|
|
124
|
-
}(__BaseException));
|
|
125
|
-
export { InvalidNextTokenException };
|
|
124
|
+
}
|
|
126
125
|
export var ListEventTypesFilterName;
|
|
127
126
|
(function (ListEventTypesFilterName) {
|
|
128
127
|
ListEventTypesFilterName["RESOURCE_TYPE"] = "RESOURCE_TYPE";
|
|
@@ -141,36 +140,114 @@ export var ListTargetsFilterName;
|
|
|
141
140
|
ListTargetsFilterName["TARGET_STATUS"] = "TARGET_STATUS";
|
|
142
141
|
ListTargetsFilterName["TARGET_TYPE"] = "TARGET_TYPE";
|
|
143
142
|
})(ListTargetsFilterName || (ListTargetsFilterName = {}));
|
|
144
|
-
export
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
export
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
export
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
export
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
export
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
export
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
export
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
export
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
export
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
export
|
|
176
|
-
|
|
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
|
+
});
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { CodestarNotifications } from "../CodestarNotifications";
|
|
3
2
|
import { CodestarNotificationsClient } from "../CodestarNotificationsClient";
|
|
4
3
|
import { ListEventTypesCommand, } from "../commands/ListEventTypesCommand";
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
});
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new ListEventTypesCommand(input), ...args);
|
|
18
6
|
};
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
});
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.listEventTypes(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateListEventTypes(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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));
|
|
37
30
|
}
|
|
38
|
-
return
|
|
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
|
-
});
|
|
31
|
+
return undefined;
|
|
75
32
|
}
|