@aws-sdk/client-codeguru-security 3.476.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.
@@ -2,38 +2,31 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateAccountConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListScansCommand = exports.de_ListFindingsMetricsCommand = exports.de_GetScanCommand = exports.de_GetMetricsSummaryCommand = exports.de_GetFindingsCommand = exports.de_GetAccountConfigurationCommand = exports.de_CreateUploadUrlCommand = exports.de_CreateScanCommand = exports.de_BatchGetFindingsCommand = exports.se_UpdateAccountConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListScansCommand = exports.se_ListFindingsMetricsCommand = exports.se_GetScanCommand = exports.se_GetMetricsSummaryCommand = exports.se_GetFindingsCommand = exports.se_GetAccountConfigurationCommand = exports.se_CreateUploadUrlCommand = exports.se_CreateScanCommand = exports.se_BatchGetFindingsCommand = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_2 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const uuid_1 = require("uuid");
8
8
  const CodeGuruSecurityServiceException_1 = require("../models/CodeGuruSecurityServiceException");
9
9
  const models_0_1 = require("../models/models_0");
10
10
  const se_BatchGetFindingsCommand = async (input, context) => {
11
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const b = (0, core_2.requestBuilder)(input, context);
12
12
  const headers = {
13
13
  "content-type": "application/json",
14
14
  };
15
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/batchGetFindings";
15
+ b.bp("/batchGetFindings");
16
16
  let body;
17
17
  body = JSON.stringify((0, smithy_client_1.take)(input, {
18
18
  findingIdentifiers: (_) => (0, smithy_client_1._json)(_),
19
19
  }));
20
- return new protocol_http_1.HttpRequest({
21
- protocol,
22
- hostname,
23
- port,
24
- method: "POST",
25
- headers,
26
- path: resolvedPath,
27
- body,
28
- });
20
+ b.m("POST").h(headers).b(body);
21
+ return b.build();
29
22
  };
30
23
  exports.se_BatchGetFindingsCommand = se_BatchGetFindingsCommand;
31
24
  const se_CreateScanCommand = async (input, context) => {
32
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
25
+ const b = (0, core_2.requestBuilder)(input, context);
33
26
  const headers = {
34
27
  "content-type": "application/json",
35
28
  };
36
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scans";
29
+ b.bp("/scans");
37
30
  let body;
38
31
  body = JSON.stringify((0, smithy_client_1.take)(input, {
39
32
  analysisType: [],
@@ -43,256 +36,166 @@ const se_CreateScanCommand = async (input, context) => {
43
36
  scanType: [],
44
37
  tags: (_) => (0, smithy_client_1._json)(_),
45
38
  }));
46
- return new protocol_http_1.HttpRequest({
47
- protocol,
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_CreateScanCommand = se_CreateScanCommand;
57
43
  const se_CreateUploadUrlCommand = async (input, context) => {
58
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
44
+ const b = (0, core_2.requestBuilder)(input, context);
59
45
  const headers = {
60
46
  "content-type": "application/json",
61
47
  };
62
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/uploadUrl";
48
+ b.bp("/uploadUrl");
63
49
  let body;
64
50
  body = JSON.stringify((0, smithy_client_1.take)(input, {
65
51
  scanName: [],
66
52
  }));
67
- return new protocol_http_1.HttpRequest({
68
- protocol,
69
- hostname,
70
- port,
71
- method: "POST",
72
- headers,
73
- path: resolvedPath,
74
- body,
75
- });
53
+ b.m("POST").h(headers).b(body);
54
+ return b.build();
76
55
  };
77
56
  exports.se_CreateUploadUrlCommand = se_CreateUploadUrlCommand;
78
57
  const se_GetAccountConfigurationCommand = async (input, context) => {
79
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
58
+ const b = (0, core_2.requestBuilder)(input, context);
80
59
  const headers = {
81
60
  "content-type": "application/json",
82
61
  };
83
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accountConfiguration/get";
62
+ b.bp("/accountConfiguration/get");
84
63
  let body;
85
64
  body = "";
86
- return new protocol_http_1.HttpRequest({
87
- protocol,
88
- hostname,
89
- port,
90
- method: "GET",
91
- headers,
92
- path: resolvedPath,
93
- body,
94
- });
65
+ b.m("GET").h(headers).b(body);
66
+ return b.build();
95
67
  };
96
68
  exports.se_GetAccountConfigurationCommand = se_GetAccountConfigurationCommand;
97
69
  const se_GetFindingsCommand = async (input, context) => {
98
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
70
+ const b = (0, core_2.requestBuilder)(input, context);
99
71
  const headers = {};
100
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/{scanName}";
101
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "scanName", () => input.scanName, "{scanName}", false);
72
+ b.bp("/findings/{scanName}");
73
+ b.p("scanName", () => input.scanName, "{scanName}", false);
102
74
  const query = (0, smithy_client_1.map)({
103
- nextToken: [, input.nextToken],
104
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
105
- status: [, input.status],
75
+ [_nT]: [, input[_nT]],
76
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
77
+ [_s]: [, input[_s]],
106
78
  });
107
79
  let body;
108
- return new protocol_http_1.HttpRequest({
109
- protocol,
110
- hostname,
111
- port,
112
- method: "GET",
113
- headers,
114
- path: resolvedPath,
115
- query,
116
- body,
117
- });
80
+ b.m("GET").h(headers).q(query).b(body);
81
+ return b.build();
118
82
  };
119
83
  exports.se_GetFindingsCommand = se_GetFindingsCommand;
120
84
  const se_GetMetricsSummaryCommand = async (input, context) => {
121
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
+ const b = (0, core_2.requestBuilder)(input, context);
122
86
  const headers = {};
123
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/summary";
87
+ b.bp("/metrics/summary");
124
88
  const query = (0, smithy_client_1.map)({
125
- date: [
89
+ [_d]: [
126
90
  (0, smithy_client_1.expectNonNull)(input.date, `date`) != null,
127
- () => (input.date.toISOString().split(".")[0] + "Z").toString(),
91
+ () => (input[_d].toISOString().split(".")[0] + "Z").toString(),
128
92
  ],
129
93
  });
130
94
  let body;
131
- return new protocol_http_1.HttpRequest({
132
- protocol,
133
- hostname,
134
- port,
135
- method: "GET",
136
- headers,
137
- path: resolvedPath,
138
- query,
139
- body,
140
- });
95
+ b.m("GET").h(headers).q(query).b(body);
96
+ return b.build();
141
97
  };
142
98
  exports.se_GetMetricsSummaryCommand = se_GetMetricsSummaryCommand;
143
99
  const se_GetScanCommand = async (input, context) => {
144
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = (0, core_2.requestBuilder)(input, context);
145
101
  const headers = {};
146
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scans/{scanName}";
147
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "scanName", () => input.scanName, "{scanName}", false);
102
+ b.bp("/scans/{scanName}");
103
+ b.p("scanName", () => input.scanName, "{scanName}", false);
148
104
  const query = (0, smithy_client_1.map)({
149
- runId: [, input.runId],
105
+ [_rI]: [, input[_rI]],
150
106
  });
151
107
  let body;
152
- return new protocol_http_1.HttpRequest({
153
- protocol,
154
- hostname,
155
- port,
156
- method: "GET",
157
- headers,
158
- path: resolvedPath,
159
- query,
160
- body,
161
- });
108
+ b.m("GET").h(headers).q(query).b(body);
109
+ return b.build();
162
110
  };
163
111
  exports.se_GetScanCommand = se_GetScanCommand;
164
112
  const se_ListFindingsMetricsCommand = async (input, context) => {
165
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const b = (0, core_2.requestBuilder)(input, context);
166
114
  const headers = {};
167
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/findings";
115
+ b.bp("/metrics/findings");
168
116
  const query = (0, smithy_client_1.map)({
169
- nextToken: [, input.nextToken],
170
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
171
- startDate: [
117
+ [_nT]: [, input[_nT]],
118
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
119
+ [_sD]: [
172
120
  (0, smithy_client_1.expectNonNull)(input.startDate, `startDate`) != null,
173
- () => (input.startDate.toISOString().split(".")[0] + "Z").toString(),
121
+ () => (input[_sD].toISOString().split(".")[0] + "Z").toString(),
174
122
  ],
175
- endDate: [
123
+ [_eD]: [
176
124
  (0, smithy_client_1.expectNonNull)(input.endDate, `endDate`) != null,
177
- () => (input.endDate.toISOString().split(".")[0] + "Z").toString(),
125
+ () => (input[_eD].toISOString().split(".")[0] + "Z").toString(),
178
126
  ],
179
127
  });
180
128
  let body;
181
- return new protocol_http_1.HttpRequest({
182
- protocol,
183
- hostname,
184
- port,
185
- method: "GET",
186
- headers,
187
- path: resolvedPath,
188
- query,
189
- body,
190
- });
129
+ b.m("GET").h(headers).q(query).b(body);
130
+ return b.build();
191
131
  };
192
132
  exports.se_ListFindingsMetricsCommand = se_ListFindingsMetricsCommand;
193
133
  const se_ListScansCommand = async (input, context) => {
194
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
134
+ const b = (0, core_2.requestBuilder)(input, context);
195
135
  const headers = {};
196
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scans";
136
+ b.bp("/scans");
197
137
  const query = (0, smithy_client_1.map)({
198
- nextToken: [, input.nextToken],
199
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
138
+ [_nT]: [, input[_nT]],
139
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
200
140
  });
201
141
  let body;
202
- return new protocol_http_1.HttpRequest({
203
- protocol,
204
- hostname,
205
- port,
206
- method: "GET",
207
- headers,
208
- path: resolvedPath,
209
- query,
210
- body,
211
- });
142
+ b.m("GET").h(headers).q(query).b(body);
143
+ return b.build();
212
144
  };
213
145
  exports.se_ListScansCommand = se_ListScansCommand;
214
146
  const se_ListTagsForResourceCommand = async (input, context) => {
215
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
147
+ const b = (0, core_2.requestBuilder)(input, context);
216
148
  const headers = {};
217
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
218
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
149
+ b.bp("/tags/{resourceArn}");
150
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
219
151
  let body;
220
- return new protocol_http_1.HttpRequest({
221
- protocol,
222
- hostname,
223
- port,
224
- method: "GET",
225
- headers,
226
- path: resolvedPath,
227
- body,
228
- });
152
+ b.m("GET").h(headers).b(body);
153
+ return b.build();
229
154
  };
230
155
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
231
156
  const se_TagResourceCommand = async (input, context) => {
232
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const b = (0, core_2.requestBuilder)(input, context);
233
158
  const headers = {
234
159
  "content-type": "application/json",
235
160
  };
236
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
237
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
161
+ b.bp("/tags/{resourceArn}");
162
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
238
163
  let body;
239
164
  body = JSON.stringify((0, smithy_client_1.take)(input, {
240
165
  tags: (_) => (0, smithy_client_1._json)(_),
241
166
  }));
242
- return new protocol_http_1.HttpRequest({
243
- protocol,
244
- hostname,
245
- port,
246
- method: "POST",
247
- headers,
248
- path: resolvedPath,
249
- body,
250
- });
167
+ b.m("POST").h(headers).b(body);
168
+ return b.build();
251
169
  };
252
170
  exports.se_TagResourceCommand = se_TagResourceCommand;
253
171
  const se_UntagResourceCommand = async (input, context) => {
254
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
172
+ const b = (0, core_2.requestBuilder)(input, context);
255
173
  const headers = {};
256
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
257
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
174
+ b.bp("/tags/{resourceArn}");
175
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
258
176
  const query = (0, smithy_client_1.map)({
259
- tagKeys: [
177
+ [_tK]: [
260
178
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
261
- () => (input.tagKeys || []).map((_entry) => _entry),
179
+ () => (input[_tK] || []).map((_entry) => _entry),
262
180
  ],
263
181
  });
264
182
  let body;
265
- return new protocol_http_1.HttpRequest({
266
- protocol,
267
- hostname,
268
- port,
269
- method: "DELETE",
270
- headers,
271
- path: resolvedPath,
272
- query,
273
- body,
274
- });
183
+ b.m("DELETE").h(headers).q(query).b(body);
184
+ return b.build();
275
185
  };
276
186
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
277
187
  const se_UpdateAccountConfigurationCommand = async (input, context) => {
278
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
188
+ const b = (0, core_2.requestBuilder)(input, context);
279
189
  const headers = {
280
190
  "content-type": "application/json",
281
191
  };
282
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateAccountConfiguration";
192
+ b.bp("/updateAccountConfiguration");
283
193
  let body;
284
194
  body = JSON.stringify((0, smithy_client_1.take)(input, {
285
195
  encryptionConfig: (_) => (0, smithy_client_1._json)(_),
286
196
  }));
287
- return new protocol_http_1.HttpRequest({
288
- protocol,
289
- hostname,
290
- port,
291
- method: "PUT",
292
- headers,
293
- path: resolvedPath,
294
- body,
295
- });
197
+ b.m("PUT").h(headers).b(body);
198
+ return b.build();
296
199
  };
297
200
  exports.se_UpdateAccountConfigurationCommand = se_UpdateAccountConfigurationCommand;
298
201
  const de_BatchGetFindingsCommand = async (output, context) => {
@@ -1084,6 +987,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1084
987
  value !== "" &&
1085
988
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1086
989
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
990
+ const _d = "date";
991
+ const _eD = "endDate";
992
+ const _mR = "maxResults";
993
+ const _nT = "nextToken";
994
+ const _rI = "runId";
995
+ const _s = "status";
996
+ const _sD = "startDate";
997
+ const _tK = "tagKeys";
1087
998
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1088
999
  if (encoded.length) {
1089
1000
  return JSON.parse(encoded);
@@ -1,35 +1,28 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
2
+ import { requestBuilder as rb } from "@smithy/core";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { CodeGuruSecurityServiceException as __BaseException } from "../models/CodeGuruSecurityServiceException";
6
6
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
7
7
  export const se_BatchGetFindingsCommand = async (input, context) => {
8
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const b = rb(input, context);
9
9
  const headers = {
10
10
  "content-type": "application/json",
11
11
  };
12
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/batchGetFindings";
12
+ b.bp("/batchGetFindings");
13
13
  let body;
14
14
  body = JSON.stringify(take(input, {
15
15
  findingIdentifiers: (_) => _json(_),
16
16
  }));
17
- return new __HttpRequest({
18
- protocol,
19
- hostname,
20
- port,
21
- method: "POST",
22
- headers,
23
- path: resolvedPath,
24
- body,
25
- });
17
+ b.m("POST").h(headers).b(body);
18
+ return b.build();
26
19
  };
27
20
  export const se_CreateScanCommand = async (input, context) => {
28
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
21
+ const b = rb(input, context);
29
22
  const headers = {
30
23
  "content-type": "application/json",
31
24
  };
32
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scans";
25
+ b.bp("/scans");
33
26
  let body;
34
27
  body = JSON.stringify(take(input, {
35
28
  analysisType: [],
@@ -39,245 +32,155 @@ export const se_CreateScanCommand = async (input, context) => {
39
32
  scanType: [],
40
33
  tags: (_) => _json(_),
41
34
  }));
42
- return new __HttpRequest({
43
- protocol,
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_CreateUploadUrlCommand = async (input, context) => {
53
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
+ const b = rb(input, context);
54
40
  const headers = {
55
41
  "content-type": "application/json",
56
42
  };
57
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/uploadUrl";
43
+ b.bp("/uploadUrl");
58
44
  let body;
59
45
  body = JSON.stringify(take(input, {
60
46
  scanName: [],
61
47
  }));
62
- return new __HttpRequest({
63
- protocol,
64
- hostname,
65
- port,
66
- method: "POST",
67
- headers,
68
- path: resolvedPath,
69
- body,
70
- });
48
+ b.m("POST").h(headers).b(body);
49
+ return b.build();
71
50
  };
72
51
  export const se_GetAccountConfigurationCommand = async (input, context) => {
73
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
+ const b = rb(input, context);
74
53
  const headers = {
75
54
  "content-type": "application/json",
76
55
  };
77
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accountConfiguration/get";
56
+ b.bp("/accountConfiguration/get");
78
57
  let body;
79
58
  body = "";
80
- return new __HttpRequest({
81
- protocol,
82
- hostname,
83
- port,
84
- method: "GET",
85
- headers,
86
- path: resolvedPath,
87
- body,
88
- });
59
+ b.m("GET").h(headers).b(body);
60
+ return b.build();
89
61
  };
90
62
  export const se_GetFindingsCommand = async (input, context) => {
91
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
63
+ const b = rb(input, context);
92
64
  const headers = {};
93
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/{scanName}";
94
- resolvedPath = __resolvedPath(resolvedPath, input, "scanName", () => input.scanName, "{scanName}", false);
65
+ b.bp("/findings/{scanName}");
66
+ b.p("scanName", () => input.scanName, "{scanName}", false);
95
67
  const query = map({
96
- nextToken: [, input.nextToken],
97
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
98
- status: [, input.status],
68
+ [_nT]: [, input[_nT]],
69
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
70
+ [_s]: [, input[_s]],
99
71
  });
100
72
  let body;
101
- return new __HttpRequest({
102
- protocol,
103
- hostname,
104
- port,
105
- method: "GET",
106
- headers,
107
- path: resolvedPath,
108
- query,
109
- body,
110
- });
73
+ b.m("GET").h(headers).q(query).b(body);
74
+ return b.build();
111
75
  };
112
76
  export const se_GetMetricsSummaryCommand = async (input, context) => {
113
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
+ const b = rb(input, context);
114
78
  const headers = {};
115
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/summary";
79
+ b.bp("/metrics/summary");
116
80
  const query = map({
117
- date: [
81
+ [_d]: [
118
82
  __expectNonNull(input.date, `date`) != null,
119
- () => (input.date.toISOString().split(".")[0] + "Z").toString(),
83
+ () => (input[_d].toISOString().split(".")[0] + "Z").toString(),
120
84
  ],
121
85
  });
122
86
  let body;
123
- return new __HttpRequest({
124
- protocol,
125
- hostname,
126
- port,
127
- method: "GET",
128
- headers,
129
- path: resolvedPath,
130
- query,
131
- body,
132
- });
87
+ b.m("GET").h(headers).q(query).b(body);
88
+ return b.build();
133
89
  };
134
90
  export const se_GetScanCommand = async (input, context) => {
135
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
91
+ const b = rb(input, context);
136
92
  const headers = {};
137
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scans/{scanName}";
138
- resolvedPath = __resolvedPath(resolvedPath, input, "scanName", () => input.scanName, "{scanName}", false);
93
+ b.bp("/scans/{scanName}");
94
+ b.p("scanName", () => input.scanName, "{scanName}", false);
139
95
  const query = map({
140
- runId: [, input.runId],
96
+ [_rI]: [, input[_rI]],
141
97
  });
142
98
  let body;
143
- return new __HttpRequest({
144
- protocol,
145
- hostname,
146
- port,
147
- method: "GET",
148
- headers,
149
- path: resolvedPath,
150
- query,
151
- body,
152
- });
99
+ b.m("GET").h(headers).q(query).b(body);
100
+ return b.build();
153
101
  };
154
102
  export const se_ListFindingsMetricsCommand = async (input, context) => {
155
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
103
+ const b = rb(input, context);
156
104
  const headers = {};
157
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/findings";
105
+ b.bp("/metrics/findings");
158
106
  const query = map({
159
- nextToken: [, input.nextToken],
160
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
161
- startDate: [
107
+ [_nT]: [, input[_nT]],
108
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
109
+ [_sD]: [
162
110
  __expectNonNull(input.startDate, `startDate`) != null,
163
- () => (input.startDate.toISOString().split(".")[0] + "Z").toString(),
111
+ () => (input[_sD].toISOString().split(".")[0] + "Z").toString(),
164
112
  ],
165
- endDate: [
113
+ [_eD]: [
166
114
  __expectNonNull(input.endDate, `endDate`) != null,
167
- () => (input.endDate.toISOString().split(".")[0] + "Z").toString(),
115
+ () => (input[_eD].toISOString().split(".")[0] + "Z").toString(),
168
116
  ],
169
117
  });
170
118
  let body;
171
- return new __HttpRequest({
172
- protocol,
173
- hostname,
174
- port,
175
- method: "GET",
176
- headers,
177
- path: resolvedPath,
178
- query,
179
- body,
180
- });
119
+ b.m("GET").h(headers).q(query).b(body);
120
+ return b.build();
181
121
  };
182
122
  export const se_ListScansCommand = async (input, context) => {
183
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
123
+ const b = rb(input, context);
184
124
  const headers = {};
185
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scans";
125
+ b.bp("/scans");
186
126
  const query = map({
187
- nextToken: [, input.nextToken],
188
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
127
+ [_nT]: [, input[_nT]],
128
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
189
129
  });
190
130
  let body;
191
- return new __HttpRequest({
192
- protocol,
193
- hostname,
194
- port,
195
- method: "GET",
196
- headers,
197
- path: resolvedPath,
198
- query,
199
- body,
200
- });
131
+ b.m("GET").h(headers).q(query).b(body);
132
+ return b.build();
201
133
  };
202
134
  export const se_ListTagsForResourceCommand = async (input, context) => {
203
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
135
+ const b = rb(input, context);
204
136
  const headers = {};
205
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
206
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
137
+ b.bp("/tags/{resourceArn}");
138
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
207
139
  let body;
208
- return new __HttpRequest({
209
- protocol,
210
- hostname,
211
- port,
212
- method: "GET",
213
- headers,
214
- path: resolvedPath,
215
- body,
216
- });
140
+ b.m("GET").h(headers).b(body);
141
+ return b.build();
217
142
  };
218
143
  export const se_TagResourceCommand = async (input, context) => {
219
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
144
+ const b = rb(input, context);
220
145
  const headers = {
221
146
  "content-type": "application/json",
222
147
  };
223
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
224
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
148
+ b.bp("/tags/{resourceArn}");
149
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
225
150
  let body;
226
151
  body = JSON.stringify(take(input, {
227
152
  tags: (_) => _json(_),
228
153
  }));
229
- return new __HttpRequest({
230
- protocol,
231
- hostname,
232
- port,
233
- method: "POST",
234
- headers,
235
- path: resolvedPath,
236
- body,
237
- });
154
+ b.m("POST").h(headers).b(body);
155
+ return b.build();
238
156
  };
239
157
  export const se_UntagResourceCommand = async (input, context) => {
240
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
158
+ const b = rb(input, context);
241
159
  const headers = {};
242
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
243
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
160
+ b.bp("/tags/{resourceArn}");
161
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
244
162
  const query = map({
245
- tagKeys: [
163
+ [_tK]: [
246
164
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
247
- () => (input.tagKeys || []).map((_entry) => _entry),
165
+ () => (input[_tK] || []).map((_entry) => _entry),
248
166
  ],
249
167
  });
250
168
  let body;
251
- return new __HttpRequest({
252
- protocol,
253
- hostname,
254
- port,
255
- method: "DELETE",
256
- headers,
257
- path: resolvedPath,
258
- query,
259
- body,
260
- });
169
+ b.m("DELETE").h(headers).q(query).b(body);
170
+ return b.build();
261
171
  };
262
172
  export const se_UpdateAccountConfigurationCommand = async (input, context) => {
263
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
173
+ const b = rb(input, context);
264
174
  const headers = {
265
175
  "content-type": "application/json",
266
176
  };
267
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateAccountConfiguration";
177
+ b.bp("/updateAccountConfiguration");
268
178
  let body;
269
179
  body = JSON.stringify(take(input, {
270
180
  encryptionConfig: (_) => _json(_),
271
181
  }));
272
- return new __HttpRequest({
273
- protocol,
274
- hostname,
275
- port,
276
- method: "PUT",
277
- headers,
278
- path: resolvedPath,
279
- body,
280
- });
182
+ b.m("PUT").h(headers).b(body);
183
+ return b.build();
281
184
  };
282
185
  export const de_BatchGetFindingsCommand = async (output, context) => {
283
186
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1055,6 +958,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1055
958
  value !== "" &&
1056
959
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1057
960
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
961
+ const _d = "date";
962
+ const _eD = "endDate";
963
+ const _mR = "maxResults";
964
+ const _nT = "nextToken";
965
+ const _rI = "runId";
966
+ const _s = "status";
967
+ const _sD = "startDate";
968
+ const _tK = "tagKeys";
1058
969
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1059
970
  if (encoded.length) {
1060
971
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-codeguru-security",
3
3
  "description": "AWS SDK for JavaScript Codeguru Security Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
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.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
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",