@aws-sdk/client-codeguru-reviewer 3.474.0 → 3.477.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/dist-cjs/protocols/Aws_restJson1.js +106 -206
- package/dist-es/protocols/Aws_restJson1.js +107 -207
- package/package.json +5 -4
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_PutRecommendationFeedbackCommand = exports.de_ListTagsForResourceCommand = exports.de_ListRepositoryAssociationsCommand = exports.de_ListRecommendationsCommand = exports.de_ListRecommendationFeedbackCommand = exports.de_ListCodeReviewsCommand = exports.de_DisassociateRepositoryCommand = exports.de_DescribeRepositoryAssociationCommand = exports.de_DescribeRecommendationFeedbackCommand = exports.de_DescribeCodeReviewCommand = exports.de_CreateCodeReviewCommand = exports.de_AssociateRepositoryCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_PutRecommendationFeedbackCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRepositoryAssociationsCommand = exports.se_ListRecommendationsCommand = exports.se_ListRecommendationFeedbackCommand = exports.se_ListCodeReviewsCommand = exports.se_DisassociateRepositoryCommand = exports.se_DescribeRepositoryAssociationCommand = exports.se_DescribeRecommendationFeedbackCommand = exports.se_DescribeCodeReviewCommand = exports.se_CreateCodeReviewCommand = exports.se_AssociateRepositoryCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
7
7
|
const CodeGuruReviewerServiceException_1 = require("../models/CodeGuruReviewerServiceException");
|
|
8
8
|
const models_0_1 = require("../models/models_0");
|
|
9
9
|
const se_AssociateRepositoryCommand = async (input, context) => {
|
|
10
|
-
const
|
|
10
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
11
11
|
const headers = {
|
|
12
12
|
"content-type": "application/json",
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
b.bp("/associations");
|
|
15
15
|
let body;
|
|
16
16
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
17
|
ClientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
@@ -19,23 +19,16 @@ const se_AssociateRepositoryCommand = async (input, context) => {
|
|
|
19
19
|
Repository: (_) => (0, smithy_client_1._json)(_),
|
|
20
20
|
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
21
21
|
}));
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
hostname,
|
|
25
|
-
port,
|
|
26
|
-
method: "POST",
|
|
27
|
-
headers,
|
|
28
|
-
path: resolvedPath,
|
|
29
|
-
body,
|
|
30
|
-
});
|
|
22
|
+
b.m("POST").h(headers).b(body);
|
|
23
|
+
return b.build();
|
|
31
24
|
};
|
|
32
25
|
exports.se_AssociateRepositoryCommand = se_AssociateRepositoryCommand;
|
|
33
26
|
const se_CreateCodeReviewCommand = async (input, context) => {
|
|
34
|
-
const
|
|
27
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
35
28
|
const headers = {
|
|
36
29
|
"content-type": "application/json",
|
|
37
30
|
};
|
|
38
|
-
|
|
31
|
+
b.bp("/codereviews");
|
|
39
32
|
let body;
|
|
40
33
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
41
34
|
ClientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
@@ -43,284 +36,173 @@ const se_CreateCodeReviewCommand = async (input, context) => {
|
|
|
43
36
|
RepositoryAssociationArn: [],
|
|
44
37
|
Type: (_) => (0, smithy_client_1._json)(_),
|
|
45
38
|
}));
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
hostname,
|
|
49
|
-
port,
|
|
50
|
-
method: "POST",
|
|
51
|
-
headers,
|
|
52
|
-
path: resolvedPath,
|
|
53
|
-
body,
|
|
54
|
-
});
|
|
39
|
+
b.m("POST").h(headers).b(body);
|
|
40
|
+
return b.build();
|
|
55
41
|
};
|
|
56
42
|
exports.se_CreateCodeReviewCommand = se_CreateCodeReviewCommand;
|
|
57
43
|
const se_DescribeCodeReviewCommand = async (input, context) => {
|
|
58
|
-
const
|
|
44
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
59
45
|
const headers = {};
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
b.bp("/codereviews/{CodeReviewArn}");
|
|
47
|
+
b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
62
48
|
let body;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
hostname,
|
|
66
|
-
port,
|
|
67
|
-
method: "GET",
|
|
68
|
-
headers,
|
|
69
|
-
path: resolvedPath,
|
|
70
|
-
body,
|
|
71
|
-
});
|
|
49
|
+
b.m("GET").h(headers).b(body);
|
|
50
|
+
return b.build();
|
|
72
51
|
};
|
|
73
52
|
exports.se_DescribeCodeReviewCommand = se_DescribeCodeReviewCommand;
|
|
74
53
|
const se_DescribeRecommendationFeedbackCommand = async (input, context) => {
|
|
75
|
-
const
|
|
54
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
76
55
|
const headers = {};
|
|
77
|
-
|
|
78
|
-
|
|
56
|
+
b.bp("/feedback/{CodeReviewArn}");
|
|
57
|
+
b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
79
58
|
const query = (0, smithy_client_1.map)({
|
|
80
|
-
|
|
81
|
-
|
|
59
|
+
[_RI]: [, (0, smithy_client_1.expectNonNull)(input[_RI], `RecommendationId`)],
|
|
60
|
+
[_UI]: [, input[_UI]],
|
|
82
61
|
});
|
|
83
62
|
let body;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
hostname,
|
|
87
|
-
port,
|
|
88
|
-
method: "GET",
|
|
89
|
-
headers,
|
|
90
|
-
path: resolvedPath,
|
|
91
|
-
query,
|
|
92
|
-
body,
|
|
93
|
-
});
|
|
63
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
64
|
+
return b.build();
|
|
94
65
|
};
|
|
95
66
|
exports.se_DescribeRecommendationFeedbackCommand = se_DescribeRecommendationFeedbackCommand;
|
|
96
67
|
const se_DescribeRepositoryAssociationCommand = async (input, context) => {
|
|
97
|
-
const
|
|
68
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
98
69
|
const headers = {};
|
|
99
|
-
|
|
100
|
-
|
|
70
|
+
b.bp("/associations/{AssociationArn}");
|
|
71
|
+
b.p("AssociationArn", () => input.AssociationArn, "{AssociationArn}", false);
|
|
101
72
|
let body;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
hostname,
|
|
105
|
-
port,
|
|
106
|
-
method: "GET",
|
|
107
|
-
headers,
|
|
108
|
-
path: resolvedPath,
|
|
109
|
-
body,
|
|
110
|
-
});
|
|
73
|
+
b.m("GET").h(headers).b(body);
|
|
74
|
+
return b.build();
|
|
111
75
|
};
|
|
112
76
|
exports.se_DescribeRepositoryAssociationCommand = se_DescribeRepositoryAssociationCommand;
|
|
113
77
|
const se_DisassociateRepositoryCommand = async (input, context) => {
|
|
114
|
-
const
|
|
78
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
115
79
|
const headers = {};
|
|
116
|
-
|
|
117
|
-
|
|
80
|
+
b.bp("/associations/{AssociationArn}");
|
|
81
|
+
b.p("AssociationArn", () => input.AssociationArn, "{AssociationArn}", false);
|
|
118
82
|
let body;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
hostname,
|
|
122
|
-
port,
|
|
123
|
-
method: "DELETE",
|
|
124
|
-
headers,
|
|
125
|
-
path: resolvedPath,
|
|
126
|
-
body,
|
|
127
|
-
});
|
|
83
|
+
b.m("DELETE").h(headers).b(body);
|
|
84
|
+
return b.build();
|
|
128
85
|
};
|
|
129
86
|
exports.se_DisassociateRepositoryCommand = se_DisassociateRepositoryCommand;
|
|
130
87
|
const se_ListCodeReviewsCommand = async (input, context) => {
|
|
131
|
-
const
|
|
88
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
132
89
|
const headers = {};
|
|
133
|
-
|
|
90
|
+
b.bp("/codereviews");
|
|
134
91
|
const query = (0, smithy_client_1.map)({
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
],
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
() => input.RepositoryNames !== void 0,
|
|
142
|
-
() => (input.RepositoryNames || []).map((_entry) => _entry),
|
|
143
|
-
],
|
|
144
|
-
Type: [, (0, smithy_client_1.expectNonNull)(input.Type, `Type`)],
|
|
145
|
-
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
146
|
-
NextToken: [, input.NextToken],
|
|
92
|
+
[_PT]: [() => input.ProviderTypes !== void 0, () => (input[_PT] || []).map((_entry) => _entry)],
|
|
93
|
+
[_S]: [() => input.States !== void 0, () => (input[_S] || []).map((_entry) => _entry)],
|
|
94
|
+
[_RN]: [() => input.RepositoryNames !== void 0, () => (input[_RN] || []).map((_entry) => _entry)],
|
|
95
|
+
[_T]: [, (0, smithy_client_1.expectNonNull)(input[_T], `Type`)],
|
|
96
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
97
|
+
[_NT]: [, input[_NT]],
|
|
147
98
|
});
|
|
148
99
|
let body;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
hostname,
|
|
152
|
-
port,
|
|
153
|
-
method: "GET",
|
|
154
|
-
headers,
|
|
155
|
-
path: resolvedPath,
|
|
156
|
-
query,
|
|
157
|
-
body,
|
|
158
|
-
});
|
|
100
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
101
|
+
return b.build();
|
|
159
102
|
};
|
|
160
103
|
exports.se_ListCodeReviewsCommand = se_ListCodeReviewsCommand;
|
|
161
104
|
const se_ListRecommendationFeedbackCommand = async (input, context) => {
|
|
162
|
-
const
|
|
105
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
163
106
|
const headers = {};
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
107
|
+
b.bp("/feedback/{CodeReviewArn}/RecommendationFeedback");
|
|
108
|
+
b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
167
109
|
const query = (0, smithy_client_1.map)({
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
() => input.RecommendationIds !== void 0,
|
|
173
|
-
() => (input.RecommendationIds || []).map((_entry) => _entry),
|
|
174
|
-
],
|
|
110
|
+
[_NT]: [, input[_NT]],
|
|
111
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
112
|
+
[_UIs]: [() => input.UserIds !== void 0, () => (input[_UIs] || []).map((_entry) => _entry)],
|
|
113
|
+
[_RIe]: [() => input.RecommendationIds !== void 0, () => (input[_RIe] || []).map((_entry) => _entry)],
|
|
175
114
|
});
|
|
176
115
|
let body;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
hostname,
|
|
180
|
-
port,
|
|
181
|
-
method: "GET",
|
|
182
|
-
headers,
|
|
183
|
-
path: resolvedPath,
|
|
184
|
-
query,
|
|
185
|
-
body,
|
|
186
|
-
});
|
|
116
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
117
|
+
return b.build();
|
|
187
118
|
};
|
|
188
119
|
exports.se_ListRecommendationFeedbackCommand = se_ListRecommendationFeedbackCommand;
|
|
189
120
|
const se_ListRecommendationsCommand = async (input, context) => {
|
|
190
|
-
const
|
|
121
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
191
122
|
const headers = {};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
123
|
+
b.bp("/codereviews/{CodeReviewArn}/Recommendations");
|
|
124
|
+
b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
195
125
|
const query = (0, smithy_client_1.map)({
|
|
196
|
-
|
|
197
|
-
|
|
126
|
+
[_NT]: [, input[_NT]],
|
|
127
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
198
128
|
});
|
|
199
129
|
let body;
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
hostname,
|
|
203
|
-
port,
|
|
204
|
-
method: "GET",
|
|
205
|
-
headers,
|
|
206
|
-
path: resolvedPath,
|
|
207
|
-
query,
|
|
208
|
-
body,
|
|
209
|
-
});
|
|
130
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
131
|
+
return b.build();
|
|
210
132
|
};
|
|
211
133
|
exports.se_ListRecommendationsCommand = se_ListRecommendationsCommand;
|
|
212
134
|
const se_ListRepositoryAssociationsCommand = async (input, context) => {
|
|
213
|
-
const
|
|
135
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
214
136
|
const headers = {};
|
|
215
|
-
|
|
137
|
+
b.bp("/associations");
|
|
216
138
|
const query = (0, smithy_client_1.map)({
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
],
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
Owner: [() => input.Owners !== void 0, () => (input.Owners || []).map((_entry) => _entry)],
|
|
224
|
-
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
225
|
-
NextToken: [, input.NextToken],
|
|
139
|
+
[_PTr]: [() => input.ProviderTypes !== void 0, () => (input[_PT] || []).map((_entry) => _entry)],
|
|
140
|
+
[_St]: [() => input.States !== void 0, () => (input[_S] || []).map((_entry) => _entry)],
|
|
141
|
+
[_Na]: [() => input.Names !== void 0, () => (input[_N] || []).map((_entry) => _entry)],
|
|
142
|
+
[_Ow]: [() => input.Owners !== void 0, () => (input[_O] || []).map((_entry) => _entry)],
|
|
143
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
144
|
+
[_NT]: [, input[_NT]],
|
|
226
145
|
});
|
|
227
146
|
let body;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
hostname,
|
|
231
|
-
port,
|
|
232
|
-
method: "GET",
|
|
233
|
-
headers,
|
|
234
|
-
path: resolvedPath,
|
|
235
|
-
query,
|
|
236
|
-
body,
|
|
237
|
-
});
|
|
147
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
148
|
+
return b.build();
|
|
238
149
|
};
|
|
239
150
|
exports.se_ListRepositoryAssociationsCommand = se_ListRepositoryAssociationsCommand;
|
|
240
151
|
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
241
|
-
const
|
|
152
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
242
153
|
const headers = {};
|
|
243
|
-
|
|
244
|
-
|
|
154
|
+
b.bp("/tags/{resourceArn}");
|
|
155
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
245
156
|
let body;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
hostname,
|
|
249
|
-
port,
|
|
250
|
-
method: "GET",
|
|
251
|
-
headers,
|
|
252
|
-
path: resolvedPath,
|
|
253
|
-
body,
|
|
254
|
-
});
|
|
157
|
+
b.m("GET").h(headers).b(body);
|
|
158
|
+
return b.build();
|
|
255
159
|
};
|
|
256
160
|
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
257
161
|
const se_PutRecommendationFeedbackCommand = async (input, context) => {
|
|
258
|
-
const
|
|
162
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
259
163
|
const headers = {
|
|
260
164
|
"content-type": "application/json",
|
|
261
165
|
};
|
|
262
|
-
|
|
166
|
+
b.bp("/feedback");
|
|
263
167
|
let body;
|
|
264
168
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
265
169
|
CodeReviewArn: [],
|
|
266
170
|
Reactions: (_) => (0, smithy_client_1._json)(_),
|
|
267
171
|
RecommendationId: [],
|
|
268
172
|
}));
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
hostname,
|
|
272
|
-
port,
|
|
273
|
-
method: "PUT",
|
|
274
|
-
headers,
|
|
275
|
-
path: resolvedPath,
|
|
276
|
-
body,
|
|
277
|
-
});
|
|
173
|
+
b.m("PUT").h(headers).b(body);
|
|
174
|
+
return b.build();
|
|
278
175
|
};
|
|
279
176
|
exports.se_PutRecommendationFeedbackCommand = se_PutRecommendationFeedbackCommand;
|
|
280
177
|
const se_TagResourceCommand = async (input, context) => {
|
|
281
|
-
const
|
|
178
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
282
179
|
const headers = {
|
|
283
180
|
"content-type": "application/json",
|
|
284
181
|
};
|
|
285
|
-
|
|
286
|
-
|
|
182
|
+
b.bp("/tags/{resourceArn}");
|
|
183
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
287
184
|
let body;
|
|
288
185
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
289
186
|
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
290
187
|
}));
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
hostname,
|
|
294
|
-
port,
|
|
295
|
-
method: "POST",
|
|
296
|
-
headers,
|
|
297
|
-
path: resolvedPath,
|
|
298
|
-
body,
|
|
299
|
-
});
|
|
188
|
+
b.m("POST").h(headers).b(body);
|
|
189
|
+
return b.build();
|
|
300
190
|
};
|
|
301
191
|
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
302
192
|
const se_UntagResourceCommand = async (input, context) => {
|
|
303
|
-
const
|
|
193
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
304
194
|
const headers = {};
|
|
305
|
-
|
|
306
|
-
|
|
195
|
+
b.bp("/tags/{resourceArn}");
|
|
196
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
307
197
|
const query = (0, smithy_client_1.map)({
|
|
308
|
-
|
|
198
|
+
[_tK]: [
|
|
309
199
|
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
310
|
-
() => (input
|
|
200
|
+
() => (input[_TK] || []).map((_entry) => _entry),
|
|
311
201
|
],
|
|
312
202
|
});
|
|
313
203
|
let body;
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
hostname,
|
|
317
|
-
port,
|
|
318
|
-
method: "DELETE",
|
|
319
|
-
headers,
|
|
320
|
-
path: resolvedPath,
|
|
321
|
-
query,
|
|
322
|
-
body,
|
|
323
|
-
});
|
|
204
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
205
|
+
return b.build();
|
|
324
206
|
};
|
|
325
207
|
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
326
208
|
const de_AssociateRepositoryCommand = async (output, context) => {
|
|
@@ -1135,6 +1017,24 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1135
1017
|
value !== "" &&
|
|
1136
1018
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1137
1019
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1020
|
+
const _MR = "MaxResults";
|
|
1021
|
+
const _N = "Names";
|
|
1022
|
+
const _NT = "NextToken";
|
|
1023
|
+
const _Na = "Name";
|
|
1024
|
+
const _O = "Owners";
|
|
1025
|
+
const _Ow = "Owner";
|
|
1026
|
+
const _PT = "ProviderTypes";
|
|
1027
|
+
const _PTr = "ProviderType";
|
|
1028
|
+
const _RI = "RecommendationId";
|
|
1029
|
+
const _RIe = "RecommendationIds";
|
|
1030
|
+
const _RN = "RepositoryNames";
|
|
1031
|
+
const _S = "States";
|
|
1032
|
+
const _St = "State";
|
|
1033
|
+
const _T = "Type";
|
|
1034
|
+
const _TK = "TagKeys";
|
|
1035
|
+
const _UI = "UserId";
|
|
1036
|
+
const _UIs = "UserIds";
|
|
1037
|
+
const _tK = "tagKeys";
|
|
1138
1038
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1139
1039
|
if (encoded.length) {
|
|
1140
1040
|
return JSON.parse(encoded);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp,
|
|
1
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
2
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { CodeGuruReviewerServiceException as __BaseException } from "../models/CodeGuruReviewerServiceException";
|
|
5
5
|
import { AccessDeniedException, ConflictException, InternalServerException, NotFoundException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
6
|
export const se_AssociateRepositoryCommand = async (input, context) => {
|
|
7
|
-
const
|
|
7
|
+
const b = rb(input, context);
|
|
8
8
|
const headers = {
|
|
9
9
|
"content-type": "application/json",
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
b.bp("/associations");
|
|
12
12
|
let body;
|
|
13
13
|
body = JSON.stringify(take(input, {
|
|
14
14
|
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
@@ -16,22 +16,15 @@ export const se_AssociateRepositoryCommand = async (input, context) => {
|
|
|
16
16
|
Repository: (_) => _json(_),
|
|
17
17
|
Tags: (_) => _json(_),
|
|
18
18
|
}));
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
hostname,
|
|
22
|
-
port,
|
|
23
|
-
method: "POST",
|
|
24
|
-
headers,
|
|
25
|
-
path: resolvedPath,
|
|
26
|
-
body,
|
|
27
|
-
});
|
|
19
|
+
b.m("POST").h(headers).b(body);
|
|
20
|
+
return b.build();
|
|
28
21
|
};
|
|
29
22
|
export const se_CreateCodeReviewCommand = async (input, context) => {
|
|
30
|
-
const
|
|
23
|
+
const b = rb(input, context);
|
|
31
24
|
const headers = {
|
|
32
25
|
"content-type": "application/json",
|
|
33
26
|
};
|
|
34
|
-
|
|
27
|
+
b.bp("/codereviews");
|
|
35
28
|
let body;
|
|
36
29
|
body = JSON.stringify(take(input, {
|
|
37
30
|
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
@@ -39,272 +32,161 @@ export const se_CreateCodeReviewCommand = async (input, context) => {
|
|
|
39
32
|
RepositoryAssociationArn: [],
|
|
40
33
|
Type: (_) => _json(_),
|
|
41
34
|
}));
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
hostname,
|
|
45
|
-
port,
|
|
46
|
-
method: "POST",
|
|
47
|
-
headers,
|
|
48
|
-
path: resolvedPath,
|
|
49
|
-
body,
|
|
50
|
-
});
|
|
35
|
+
b.m("POST").h(headers).b(body);
|
|
36
|
+
return b.build();
|
|
51
37
|
};
|
|
52
38
|
export const se_DescribeCodeReviewCommand = async (input, context) => {
|
|
53
|
-
const
|
|
39
|
+
const b = rb(input, context);
|
|
54
40
|
const headers = {};
|
|
55
|
-
|
|
56
|
-
|
|
41
|
+
b.bp("/codereviews/{CodeReviewArn}");
|
|
42
|
+
b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
57
43
|
let body;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
hostname,
|
|
61
|
-
port,
|
|
62
|
-
method: "GET",
|
|
63
|
-
headers,
|
|
64
|
-
path: resolvedPath,
|
|
65
|
-
body,
|
|
66
|
-
});
|
|
44
|
+
b.m("GET").h(headers).b(body);
|
|
45
|
+
return b.build();
|
|
67
46
|
};
|
|
68
47
|
export const se_DescribeRecommendationFeedbackCommand = async (input, context) => {
|
|
69
|
-
const
|
|
48
|
+
const b = rb(input, context);
|
|
70
49
|
const headers = {};
|
|
71
|
-
|
|
72
|
-
|
|
50
|
+
b.bp("/feedback/{CodeReviewArn}");
|
|
51
|
+
b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
73
52
|
const query = map({
|
|
74
|
-
|
|
75
|
-
|
|
53
|
+
[_RI]: [, __expectNonNull(input[_RI], `RecommendationId`)],
|
|
54
|
+
[_UI]: [, input[_UI]],
|
|
76
55
|
});
|
|
77
56
|
let body;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
hostname,
|
|
81
|
-
port,
|
|
82
|
-
method: "GET",
|
|
83
|
-
headers,
|
|
84
|
-
path: resolvedPath,
|
|
85
|
-
query,
|
|
86
|
-
body,
|
|
87
|
-
});
|
|
57
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
58
|
+
return b.build();
|
|
88
59
|
};
|
|
89
60
|
export const se_DescribeRepositoryAssociationCommand = async (input, context) => {
|
|
90
|
-
const
|
|
61
|
+
const b = rb(input, context);
|
|
91
62
|
const headers = {};
|
|
92
|
-
|
|
93
|
-
|
|
63
|
+
b.bp("/associations/{AssociationArn}");
|
|
64
|
+
b.p("AssociationArn", () => input.AssociationArn, "{AssociationArn}", false);
|
|
94
65
|
let body;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
hostname,
|
|
98
|
-
port,
|
|
99
|
-
method: "GET",
|
|
100
|
-
headers,
|
|
101
|
-
path: resolvedPath,
|
|
102
|
-
body,
|
|
103
|
-
});
|
|
66
|
+
b.m("GET").h(headers).b(body);
|
|
67
|
+
return b.build();
|
|
104
68
|
};
|
|
105
69
|
export const se_DisassociateRepositoryCommand = async (input, context) => {
|
|
106
|
-
const
|
|
70
|
+
const b = rb(input, context);
|
|
107
71
|
const headers = {};
|
|
108
|
-
|
|
109
|
-
|
|
72
|
+
b.bp("/associations/{AssociationArn}");
|
|
73
|
+
b.p("AssociationArn", () => input.AssociationArn, "{AssociationArn}", false);
|
|
110
74
|
let body;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
hostname,
|
|
114
|
-
port,
|
|
115
|
-
method: "DELETE",
|
|
116
|
-
headers,
|
|
117
|
-
path: resolvedPath,
|
|
118
|
-
body,
|
|
119
|
-
});
|
|
75
|
+
b.m("DELETE").h(headers).b(body);
|
|
76
|
+
return b.build();
|
|
120
77
|
};
|
|
121
78
|
export const se_ListCodeReviewsCommand = async (input, context) => {
|
|
122
|
-
const
|
|
79
|
+
const b = rb(input, context);
|
|
123
80
|
const headers = {};
|
|
124
|
-
|
|
81
|
+
b.bp("/codereviews");
|
|
125
82
|
const query = map({
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
],
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
() => input.RepositoryNames !== void 0,
|
|
133
|
-
() => (input.RepositoryNames || []).map((_entry) => _entry),
|
|
134
|
-
],
|
|
135
|
-
Type: [, __expectNonNull(input.Type, `Type`)],
|
|
136
|
-
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
137
|
-
NextToken: [, input.NextToken],
|
|
83
|
+
[_PT]: [() => input.ProviderTypes !== void 0, () => (input[_PT] || []).map((_entry) => _entry)],
|
|
84
|
+
[_S]: [() => input.States !== void 0, () => (input[_S] || []).map((_entry) => _entry)],
|
|
85
|
+
[_RN]: [() => input.RepositoryNames !== void 0, () => (input[_RN] || []).map((_entry) => _entry)],
|
|
86
|
+
[_T]: [, __expectNonNull(input[_T], `Type`)],
|
|
87
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
88
|
+
[_NT]: [, input[_NT]],
|
|
138
89
|
});
|
|
139
90
|
let body;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
hostname,
|
|
143
|
-
port,
|
|
144
|
-
method: "GET",
|
|
145
|
-
headers,
|
|
146
|
-
path: resolvedPath,
|
|
147
|
-
query,
|
|
148
|
-
body,
|
|
149
|
-
});
|
|
91
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
92
|
+
return b.build();
|
|
150
93
|
};
|
|
151
94
|
export const se_ListRecommendationFeedbackCommand = async (input, context) => {
|
|
152
|
-
const
|
|
95
|
+
const b = rb(input, context);
|
|
153
96
|
const headers = {};
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
97
|
+
b.bp("/feedback/{CodeReviewArn}/RecommendationFeedback");
|
|
98
|
+
b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
157
99
|
const query = map({
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
() => input.RecommendationIds !== void 0,
|
|
163
|
-
() => (input.RecommendationIds || []).map((_entry) => _entry),
|
|
164
|
-
],
|
|
100
|
+
[_NT]: [, input[_NT]],
|
|
101
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
102
|
+
[_UIs]: [() => input.UserIds !== void 0, () => (input[_UIs] || []).map((_entry) => _entry)],
|
|
103
|
+
[_RIe]: [() => input.RecommendationIds !== void 0, () => (input[_RIe] || []).map((_entry) => _entry)],
|
|
165
104
|
});
|
|
166
105
|
let body;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
hostname,
|
|
170
|
-
port,
|
|
171
|
-
method: "GET",
|
|
172
|
-
headers,
|
|
173
|
-
path: resolvedPath,
|
|
174
|
-
query,
|
|
175
|
-
body,
|
|
176
|
-
});
|
|
106
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
107
|
+
return b.build();
|
|
177
108
|
};
|
|
178
109
|
export const se_ListRecommendationsCommand = async (input, context) => {
|
|
179
|
-
const
|
|
110
|
+
const b = rb(input, context);
|
|
180
111
|
const headers = {};
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
112
|
+
b.bp("/codereviews/{CodeReviewArn}/Recommendations");
|
|
113
|
+
b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
|
|
184
114
|
const query = map({
|
|
185
|
-
|
|
186
|
-
|
|
115
|
+
[_NT]: [, input[_NT]],
|
|
116
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
187
117
|
});
|
|
188
118
|
let body;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
hostname,
|
|
192
|
-
port,
|
|
193
|
-
method: "GET",
|
|
194
|
-
headers,
|
|
195
|
-
path: resolvedPath,
|
|
196
|
-
query,
|
|
197
|
-
body,
|
|
198
|
-
});
|
|
119
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
120
|
+
return b.build();
|
|
199
121
|
};
|
|
200
122
|
export const se_ListRepositoryAssociationsCommand = async (input, context) => {
|
|
201
|
-
const
|
|
123
|
+
const b = rb(input, context);
|
|
202
124
|
const headers = {};
|
|
203
|
-
|
|
125
|
+
b.bp("/associations");
|
|
204
126
|
const query = map({
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
],
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
Owner: [() => input.Owners !== void 0, () => (input.Owners || []).map((_entry) => _entry)],
|
|
212
|
-
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
213
|
-
NextToken: [, input.NextToken],
|
|
127
|
+
[_PTr]: [() => input.ProviderTypes !== void 0, () => (input[_PT] || []).map((_entry) => _entry)],
|
|
128
|
+
[_St]: [() => input.States !== void 0, () => (input[_S] || []).map((_entry) => _entry)],
|
|
129
|
+
[_Na]: [() => input.Names !== void 0, () => (input[_N] || []).map((_entry) => _entry)],
|
|
130
|
+
[_Ow]: [() => input.Owners !== void 0, () => (input[_O] || []).map((_entry) => _entry)],
|
|
131
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
132
|
+
[_NT]: [, input[_NT]],
|
|
214
133
|
});
|
|
215
134
|
let body;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
hostname,
|
|
219
|
-
port,
|
|
220
|
-
method: "GET",
|
|
221
|
-
headers,
|
|
222
|
-
path: resolvedPath,
|
|
223
|
-
query,
|
|
224
|
-
body,
|
|
225
|
-
});
|
|
135
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
136
|
+
return b.build();
|
|
226
137
|
};
|
|
227
138
|
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
228
|
-
const
|
|
139
|
+
const b = rb(input, context);
|
|
229
140
|
const headers = {};
|
|
230
|
-
|
|
231
|
-
|
|
141
|
+
b.bp("/tags/{resourceArn}");
|
|
142
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
232
143
|
let body;
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
hostname,
|
|
236
|
-
port,
|
|
237
|
-
method: "GET",
|
|
238
|
-
headers,
|
|
239
|
-
path: resolvedPath,
|
|
240
|
-
body,
|
|
241
|
-
});
|
|
144
|
+
b.m("GET").h(headers).b(body);
|
|
145
|
+
return b.build();
|
|
242
146
|
};
|
|
243
147
|
export const se_PutRecommendationFeedbackCommand = async (input, context) => {
|
|
244
|
-
const
|
|
148
|
+
const b = rb(input, context);
|
|
245
149
|
const headers = {
|
|
246
150
|
"content-type": "application/json",
|
|
247
151
|
};
|
|
248
|
-
|
|
152
|
+
b.bp("/feedback");
|
|
249
153
|
let body;
|
|
250
154
|
body = JSON.stringify(take(input, {
|
|
251
155
|
CodeReviewArn: [],
|
|
252
156
|
Reactions: (_) => _json(_),
|
|
253
157
|
RecommendationId: [],
|
|
254
158
|
}));
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
hostname,
|
|
258
|
-
port,
|
|
259
|
-
method: "PUT",
|
|
260
|
-
headers,
|
|
261
|
-
path: resolvedPath,
|
|
262
|
-
body,
|
|
263
|
-
});
|
|
159
|
+
b.m("PUT").h(headers).b(body);
|
|
160
|
+
return b.build();
|
|
264
161
|
};
|
|
265
162
|
export const se_TagResourceCommand = async (input, context) => {
|
|
266
|
-
const
|
|
163
|
+
const b = rb(input, context);
|
|
267
164
|
const headers = {
|
|
268
165
|
"content-type": "application/json",
|
|
269
166
|
};
|
|
270
|
-
|
|
271
|
-
|
|
167
|
+
b.bp("/tags/{resourceArn}");
|
|
168
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
272
169
|
let body;
|
|
273
170
|
body = JSON.stringify(take(input, {
|
|
274
171
|
Tags: (_) => _json(_),
|
|
275
172
|
}));
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
hostname,
|
|
279
|
-
port,
|
|
280
|
-
method: "POST",
|
|
281
|
-
headers,
|
|
282
|
-
path: resolvedPath,
|
|
283
|
-
body,
|
|
284
|
-
});
|
|
173
|
+
b.m("POST").h(headers).b(body);
|
|
174
|
+
return b.build();
|
|
285
175
|
};
|
|
286
176
|
export const se_UntagResourceCommand = async (input, context) => {
|
|
287
|
-
const
|
|
177
|
+
const b = rb(input, context);
|
|
288
178
|
const headers = {};
|
|
289
|
-
|
|
290
|
-
|
|
179
|
+
b.bp("/tags/{resourceArn}");
|
|
180
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
291
181
|
const query = map({
|
|
292
|
-
|
|
182
|
+
[_tK]: [
|
|
293
183
|
__expectNonNull(input.TagKeys, `TagKeys`) != null,
|
|
294
|
-
() => (input
|
|
184
|
+
() => (input[_TK] || []).map((_entry) => _entry),
|
|
295
185
|
],
|
|
296
186
|
});
|
|
297
187
|
let body;
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
hostname,
|
|
301
|
-
port,
|
|
302
|
-
method: "DELETE",
|
|
303
|
-
headers,
|
|
304
|
-
path: resolvedPath,
|
|
305
|
-
query,
|
|
306
|
-
body,
|
|
307
|
-
});
|
|
188
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
189
|
+
return b.build();
|
|
308
190
|
};
|
|
309
191
|
export const de_AssociateRepositoryCommand = async (output, context) => {
|
|
310
192
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1104,6 +986,24 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1104
986
|
value !== "" &&
|
|
1105
987
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1106
988
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
989
|
+
const _MR = "MaxResults";
|
|
990
|
+
const _N = "Names";
|
|
991
|
+
const _NT = "NextToken";
|
|
992
|
+
const _Na = "Name";
|
|
993
|
+
const _O = "Owners";
|
|
994
|
+
const _Ow = "Owner";
|
|
995
|
+
const _PT = "ProviderTypes";
|
|
996
|
+
const _PTr = "ProviderType";
|
|
997
|
+
const _RI = "RecommendationId";
|
|
998
|
+
const _RIe = "RecommendationIds";
|
|
999
|
+
const _RN = "RepositoryNames";
|
|
1000
|
+
const _S = "States";
|
|
1001
|
+
const _St = "State";
|
|
1002
|
+
const _T = "Type";
|
|
1003
|
+
const _TK = "TagKeys";
|
|
1004
|
+
const _UI = "UserId";
|
|
1005
|
+
const _UIs = "UserIds";
|
|
1006
|
+
const _tK = "tagKeys";
|
|
1107
1007
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1108
1008
|
if (encoded.length) {
|
|
1109
1009
|
return JSON.parse(encoded);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-codeguru-reviewer",
|
|
3
3
|
"description": "AWS SDK for JavaScript Codeguru Reviewer Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.477.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.477.0",
|
|
24
|
+
"@aws-sdk/core": "3.477.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.477.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.468.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.468.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.468.0",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@aws-sdk/util-user-agent-browser": "3.468.0",
|
|
35
35
|
"@aws-sdk/util-user-agent-node": "3.470.0",
|
|
36
36
|
"@smithy/config-resolver": "^2.0.21",
|
|
37
|
+
"@smithy/core": "^1.2.0",
|
|
37
38
|
"@smithy/fetch-http-handler": "^2.3.1",
|
|
38
39
|
"@smithy/hash-node": "^2.0.17",
|
|
39
40
|
"@smithy/invalid-dependency": "^2.0.15",
|