@aws-sdk/client-codeguru-reviewer 3.187.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.
- package/CHANGELOG.md +8 -0
- package/dist-es/CodeGuruReviewer.js +58 -65
- package/dist-es/CodeGuruReviewerClient.js +22 -28
- package/dist-es/commands/AssociateRepositoryCommand.js +21 -28
- package/dist-es/commands/CreateCodeReviewCommand.js +21 -28
- package/dist-es/commands/DescribeCodeReviewCommand.js +21 -28
- package/dist-es/commands/DescribeRecommendationFeedbackCommand.js +21 -28
- package/dist-es/commands/DescribeRepositoryAssociationCommand.js +21 -28
- package/dist-es/commands/DisassociateRepositoryCommand.js +21 -28
- package/dist-es/commands/ListCodeReviewsCommand.js +21 -28
- package/dist-es/commands/ListRecommendationFeedbackCommand.js +21 -28
- package/dist-es/commands/ListRecommendationsCommand.js +21 -28
- package/dist-es/commands/ListRepositoryAssociationsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/PutRecommendationFeedbackCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/CodeGuruReviewerServiceException.js +5 -10
- package/dist-es/models/models_0.js +246 -139
- package/dist-es/pagination/ListCodeReviewsPaginator.js +25 -68
- package/dist-es/pagination/ListRecommendationFeedbackPaginator.js +25 -68
- package/dist-es/pagination/ListRecommendationsPaginator.js +25 -68
- package/dist-es/pagination/ListRepositoryAssociationsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1180 -1577
- 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/dist-es/waiters/waitForCodeReviewCompleted.js +45 -65
- package/dist-es/waiters/waitForRepositoryAssociationSucceeded.js +45 -65
- package/package.json +34 -34
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: "codeguru-reviewer",
|
|
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, CodeGuruReviewerServiceException.prototype);
|
|
8
|
-
return _this;
|
|
2
|
+
export class CodeGuruReviewerServiceException extends __ServiceException {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
super(options);
|
|
5
|
+
Object.setPrototypeOf(this, CodeGuruReviewerServiceException.prototype);
|
|
9
6
|
}
|
|
10
|
-
|
|
11
|
-
}(__ServiceException));
|
|
12
|
-
export { CodeGuruReviewerServiceException };
|
|
7
|
+
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import { CodeGuruReviewerServiceException as __BaseException } from "./CodeGuruReviewerServiceException";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "AccessDeniedException",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "AccessDeniedException";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
this.Message = opts.Message;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
}(__BaseException));
|
|
15
|
-
export { AccessDeniedException };
|
|
14
|
+
}
|
|
16
15
|
export var AnalysisType;
|
|
17
16
|
(function (AnalysisType) {
|
|
18
17
|
AnalysisType["CODE_QUALITY"] = "CodeQuality";
|
|
@@ -39,58 +38,58 @@ export var RepositoryAssociationState;
|
|
|
39
38
|
RepositoryAssociationState["DISASSOCIATING"] = "Disassociating";
|
|
40
39
|
RepositoryAssociationState["FAILED"] = "Failed";
|
|
41
40
|
})(RepositoryAssociationState || (RepositoryAssociationState = {}));
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
export class ConflictException extends __BaseException {
|
|
42
|
+
constructor(opts) {
|
|
43
|
+
super({
|
|
44
|
+
name: "ConflictException",
|
|
45
|
+
$fault: "client",
|
|
46
|
+
...opts,
|
|
47
|
+
});
|
|
48
|
+
this.name = "ConflictException";
|
|
49
|
+
this.$fault = "client";
|
|
50
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
51
|
+
this.Message = opts.Message;
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
}
|
|
54
|
+
export class InternalServerException extends __BaseException {
|
|
55
|
+
constructor(opts) {
|
|
56
|
+
super({
|
|
57
|
+
name: "InternalServerException",
|
|
58
|
+
$fault: "server",
|
|
59
|
+
...opts,
|
|
60
|
+
});
|
|
61
|
+
this.name = "InternalServerException";
|
|
62
|
+
this.$fault = "server";
|
|
63
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
64
|
+
this.Message = opts.Message;
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
}
|
|
67
|
+
export class ThrottlingException extends __BaseException {
|
|
68
|
+
constructor(opts) {
|
|
69
|
+
super({
|
|
70
|
+
name: "ThrottlingException",
|
|
71
|
+
$fault: "client",
|
|
72
|
+
...opts,
|
|
73
|
+
});
|
|
74
|
+
this.name = "ThrottlingException";
|
|
75
|
+
this.$fault = "client";
|
|
76
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
77
|
+
this.Message = opts.Message;
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
79
|
+
}
|
|
80
|
+
export class ValidationException extends __BaseException {
|
|
81
|
+
constructor(opts) {
|
|
82
|
+
super({
|
|
83
|
+
name: "ValidationException",
|
|
84
|
+
$fault: "client",
|
|
85
|
+
...opts,
|
|
86
|
+
});
|
|
87
|
+
this.name = "ValidationException";
|
|
88
|
+
this.$fault = "client";
|
|
89
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
90
|
+
this.Message = opts.Message;
|
|
90
91
|
}
|
|
91
|
-
|
|
92
|
-
}(__BaseException));
|
|
93
|
-
export { ValidationException };
|
|
92
|
+
}
|
|
94
93
|
export var VendorName;
|
|
95
94
|
(function (VendorName) {
|
|
96
95
|
VendorName["GITHUB"] = "GitHub";
|
|
@@ -115,37 +114,37 @@ export var Type;
|
|
|
115
114
|
Type["PULL_REQUEST"] = "PullRequest";
|
|
116
115
|
Type["REPOSITORY_ANALYSIS"] = "RepositoryAnalysis";
|
|
117
116
|
})(Type || (Type = {}));
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
117
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
118
|
+
constructor(opts) {
|
|
119
|
+
super({
|
|
120
|
+
name: "ResourceNotFoundException",
|
|
121
|
+
$fault: "client",
|
|
122
|
+
...opts,
|
|
123
|
+
});
|
|
124
|
+
this.name = "ResourceNotFoundException";
|
|
125
|
+
this.$fault = "client";
|
|
126
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
127
|
+
this.Message = opts.Message;
|
|
127
128
|
}
|
|
128
|
-
|
|
129
|
-
}(__BaseException));
|
|
130
|
-
export { ResourceNotFoundException };
|
|
129
|
+
}
|
|
131
130
|
export var Reaction;
|
|
132
131
|
(function (Reaction) {
|
|
133
132
|
Reaction["THUMBS_DOWN"] = "ThumbsDown";
|
|
134
133
|
Reaction["THUMBS_UP"] = "ThumbsUp";
|
|
135
134
|
})(Reaction || (Reaction = {}));
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
135
|
+
export class NotFoundException extends __BaseException {
|
|
136
|
+
constructor(opts) {
|
|
137
|
+
super({
|
|
138
|
+
name: "NotFoundException",
|
|
139
|
+
$fault: "client",
|
|
140
|
+
...opts,
|
|
141
|
+
});
|
|
142
|
+
this.name = "NotFoundException";
|
|
143
|
+
this.$fault = "client";
|
|
144
|
+
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
145
|
+
this.Message = opts.Message;
|
|
145
146
|
}
|
|
146
|
-
|
|
147
|
-
}(__BaseException));
|
|
148
|
-
export { NotFoundException };
|
|
147
|
+
}
|
|
149
148
|
export var RecommendationCategory;
|
|
150
149
|
(function (RecommendationCategory) {
|
|
151
150
|
RecommendationCategory["AWS_BEST_PRACTICES"] = "AWSBestPractices";
|
|
@@ -168,57 +167,165 @@ export var Severity;
|
|
|
168
167
|
Severity["LOW"] = "Low";
|
|
169
168
|
Severity["MEDIUM"] = "Medium";
|
|
170
169
|
})(Severity || (Severity = {}));
|
|
171
|
-
export
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
export
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
export
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
export
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
export
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
export
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
export
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
export
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
export
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
export
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
export
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
export
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
export
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
export
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
export
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
export
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
export
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
export
|
|
223
|
-
|
|
224
|
-
|
|
170
|
+
export const KMSKeyDetailsFilterSensitiveLog = (obj) => ({
|
|
171
|
+
...obj,
|
|
172
|
+
});
|
|
173
|
+
export const ThirdPartySourceRepositoryFilterSensitiveLog = (obj) => ({
|
|
174
|
+
...obj,
|
|
175
|
+
});
|
|
176
|
+
export const CodeCommitRepositoryFilterSensitiveLog = (obj) => ({
|
|
177
|
+
...obj,
|
|
178
|
+
});
|
|
179
|
+
export const S3RepositoryFilterSensitiveLog = (obj) => ({
|
|
180
|
+
...obj,
|
|
181
|
+
});
|
|
182
|
+
export const RepositoryFilterSensitiveLog = (obj) => ({
|
|
183
|
+
...obj,
|
|
184
|
+
});
|
|
185
|
+
export const AssociateRepositoryRequestFilterSensitiveLog = (obj) => ({
|
|
186
|
+
...obj,
|
|
187
|
+
});
|
|
188
|
+
export const CodeArtifactsFilterSensitiveLog = (obj) => ({
|
|
189
|
+
...obj,
|
|
190
|
+
});
|
|
191
|
+
export const S3RepositoryDetailsFilterSensitiveLog = (obj) => ({
|
|
192
|
+
...obj,
|
|
193
|
+
});
|
|
194
|
+
export const RepositoryAssociationFilterSensitiveLog = (obj) => ({
|
|
195
|
+
...obj,
|
|
196
|
+
});
|
|
197
|
+
export const AssociateRepositoryResponseFilterSensitiveLog = (obj) => ({
|
|
198
|
+
...obj,
|
|
199
|
+
});
|
|
200
|
+
export const RepositoryHeadSourceCodeTypeFilterSensitiveLog = (obj) => ({
|
|
201
|
+
...obj,
|
|
202
|
+
});
|
|
203
|
+
export const BranchDiffSourceCodeTypeFilterSensitiveLog = (obj) => ({
|
|
204
|
+
...obj,
|
|
205
|
+
});
|
|
206
|
+
export const CommitDiffSourceCodeTypeFilterSensitiveLog = (obj) => ({
|
|
207
|
+
...obj,
|
|
208
|
+
});
|
|
209
|
+
export const EventInfoFilterSensitiveLog = (obj) => ({
|
|
210
|
+
...obj,
|
|
211
|
+
});
|
|
212
|
+
export const RequestMetadataFilterSensitiveLog = (obj) => ({
|
|
213
|
+
...obj,
|
|
214
|
+
});
|
|
215
|
+
export const S3BucketRepositoryFilterSensitiveLog = (obj) => ({
|
|
216
|
+
...obj,
|
|
217
|
+
});
|
|
218
|
+
export const SourceCodeTypeFilterSensitiveLog = (obj) => ({
|
|
219
|
+
...obj,
|
|
220
|
+
});
|
|
221
|
+
export const RepositoryAnalysisFilterSensitiveLog = (obj) => ({
|
|
222
|
+
...obj,
|
|
223
|
+
});
|
|
224
|
+
export const CodeReviewTypeFilterSensitiveLog = (obj) => ({
|
|
225
|
+
...obj,
|
|
226
|
+
});
|
|
227
|
+
export const CreateCodeReviewRequestFilterSensitiveLog = (obj) => ({
|
|
228
|
+
...obj,
|
|
229
|
+
});
|
|
230
|
+
export const MetricsFilterSensitiveLog = (obj) => ({
|
|
231
|
+
...obj,
|
|
232
|
+
});
|
|
233
|
+
export const CodeReviewFilterSensitiveLog = (obj) => ({
|
|
234
|
+
...obj,
|
|
235
|
+
});
|
|
236
|
+
export const CreateCodeReviewResponseFilterSensitiveLog = (obj) => ({
|
|
237
|
+
...obj,
|
|
238
|
+
});
|
|
239
|
+
export const DescribeCodeReviewRequestFilterSensitiveLog = (obj) => ({
|
|
240
|
+
...obj,
|
|
241
|
+
});
|
|
242
|
+
export const DescribeCodeReviewResponseFilterSensitiveLog = (obj) => ({
|
|
243
|
+
...obj,
|
|
244
|
+
});
|
|
245
|
+
export const DescribeRecommendationFeedbackRequestFilterSensitiveLog = (obj) => ({
|
|
246
|
+
...obj,
|
|
247
|
+
});
|
|
248
|
+
export const RecommendationFeedbackFilterSensitiveLog = (obj) => ({
|
|
249
|
+
...obj,
|
|
250
|
+
});
|
|
251
|
+
export const DescribeRecommendationFeedbackResponseFilterSensitiveLog = (obj) => ({
|
|
252
|
+
...obj,
|
|
253
|
+
});
|
|
254
|
+
export const DescribeRepositoryAssociationRequestFilterSensitiveLog = (obj) => ({
|
|
255
|
+
...obj,
|
|
256
|
+
});
|
|
257
|
+
export const DescribeRepositoryAssociationResponseFilterSensitiveLog = (obj) => ({
|
|
258
|
+
...obj,
|
|
259
|
+
});
|
|
260
|
+
export const DisassociateRepositoryRequestFilterSensitiveLog = (obj) => ({
|
|
261
|
+
...obj,
|
|
262
|
+
});
|
|
263
|
+
export const DisassociateRepositoryResponseFilterSensitiveLog = (obj) => ({
|
|
264
|
+
...obj,
|
|
265
|
+
});
|
|
266
|
+
export const ListCodeReviewsRequestFilterSensitiveLog = (obj) => ({
|
|
267
|
+
...obj,
|
|
268
|
+
});
|
|
269
|
+
export const MetricsSummaryFilterSensitiveLog = (obj) => ({
|
|
270
|
+
...obj,
|
|
271
|
+
});
|
|
272
|
+
export const CodeReviewSummaryFilterSensitiveLog = (obj) => ({
|
|
273
|
+
...obj,
|
|
274
|
+
});
|
|
275
|
+
export const ListCodeReviewsResponseFilterSensitiveLog = (obj) => ({
|
|
276
|
+
...obj,
|
|
277
|
+
});
|
|
278
|
+
export const ListRecommendationFeedbackRequestFilterSensitiveLog = (obj) => ({
|
|
279
|
+
...obj,
|
|
280
|
+
});
|
|
281
|
+
export const RecommendationFeedbackSummaryFilterSensitiveLog = (obj) => ({
|
|
282
|
+
...obj,
|
|
283
|
+
});
|
|
284
|
+
export const ListRecommendationFeedbackResponseFilterSensitiveLog = (obj) => ({
|
|
285
|
+
...obj,
|
|
286
|
+
});
|
|
287
|
+
export const ListRecommendationsRequestFilterSensitiveLog = (obj) => ({
|
|
288
|
+
...obj,
|
|
289
|
+
});
|
|
290
|
+
export const RuleMetadataFilterSensitiveLog = (obj) => ({
|
|
291
|
+
...obj,
|
|
292
|
+
});
|
|
293
|
+
export const RecommendationSummaryFilterSensitiveLog = (obj) => ({
|
|
294
|
+
...obj,
|
|
295
|
+
});
|
|
296
|
+
export const ListRecommendationsResponseFilterSensitiveLog = (obj) => ({
|
|
297
|
+
...obj,
|
|
298
|
+
});
|
|
299
|
+
export const ListRepositoryAssociationsRequestFilterSensitiveLog = (obj) => ({
|
|
300
|
+
...obj,
|
|
301
|
+
});
|
|
302
|
+
export const RepositoryAssociationSummaryFilterSensitiveLog = (obj) => ({
|
|
303
|
+
...obj,
|
|
304
|
+
});
|
|
305
|
+
export const ListRepositoryAssociationsResponseFilterSensitiveLog = (obj) => ({
|
|
306
|
+
...obj,
|
|
307
|
+
});
|
|
308
|
+
export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
|
|
309
|
+
...obj,
|
|
310
|
+
});
|
|
311
|
+
export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
|
|
312
|
+
...obj,
|
|
313
|
+
});
|
|
314
|
+
export const PutRecommendationFeedbackRequestFilterSensitiveLog = (obj) => ({
|
|
315
|
+
...obj,
|
|
316
|
+
});
|
|
317
|
+
export const PutRecommendationFeedbackResponseFilterSensitiveLog = (obj) => ({
|
|
318
|
+
...obj,
|
|
319
|
+
});
|
|
320
|
+
export const TagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
321
|
+
...obj,
|
|
322
|
+
});
|
|
323
|
+
export const TagResourceResponseFilterSensitiveLog = (obj) => ({
|
|
324
|
+
...obj,
|
|
325
|
+
});
|
|
326
|
+
export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
327
|
+
...obj,
|
|
328
|
+
});
|
|
329
|
+
export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
|
|
330
|
+
...obj,
|
|
331
|
+
});
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { CodeGuruReviewer } from "../CodeGuruReviewer";
|
|
3
2
|
import { CodeGuruReviewerClient } from "../CodeGuruReviewerClient";
|
|
4
3
|
import { ListCodeReviewsCommand, } from "../commands/ListCodeReviewsCommand";
|
|
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 ListCodeReviewsCommand(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 ListCodeReviewsCommand(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.listCodeReviews.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.listCodeReviews(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateListCodeReviews(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateListCodeReviews(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 CodeGuruReviewer) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof CodeGuruReviewerClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected CodeGuruReviewer | CodeGuruReviewerClient");
|
|
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 CodeGuruReviewer)) 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 CodeGuruReviewerClient)) 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 CodeGuruReviewer | CodeGuruReviewerClient");
|
|
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
|
}
|