@aws-sdk/client-signer 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.
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartSigningJobCommand = exports.de_SignPayloadCommand = exports.de_RevokeSigningProfileCommand = exports.de_RevokeSignatureCommand = exports.de_RemoveProfilePermissionCommand = exports.de_PutSigningProfileCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSigningProfilesCommand = exports.de_ListSigningPlatformsCommand = exports.de_ListSigningJobsCommand = exports.de_ListProfilePermissionsCommand = exports.de_GetSigningProfileCommand = exports.de_GetSigningPlatformCommand = exports.de_GetRevocationStatusCommand = exports.de_DescribeSigningJobCommand = exports.de_CancelSigningProfileCommand = exports.de_AddProfilePermissionCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartSigningJobCommand = exports.se_SignPayloadCommand = exports.se_RevokeSigningProfileCommand = exports.se_RevokeSignatureCommand = exports.se_RemoveProfilePermissionCommand = exports.se_PutSigningProfileCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSigningProfilesCommand = exports.se_ListSigningPlatformsCommand = exports.se_ListSigningJobsCommand = exports.se_ListProfilePermissionsCommand = exports.se_GetSigningProfileCommand = exports.se_GetSigningPlatformCommand = exports.se_GetRevocationStatusCommand = exports.se_DescribeSigningJobCommand = exports.se_CancelSigningProfileCommand = exports.se_AddProfilePermissionCommand = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const protocol_http_1 = require("@smithy/protocol-http");
5
6
  const smithy_client_1 = require("@smithy/smithy-client");
6
7
  const uuid_1 = require("uuid");
7
8
  const models_0_1 = require("../models/models_0");
8
9
  const SignerServiceException_1 = require("../models/SignerServiceException");
9
10
  const se_AddProfilePermissionCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const b = (0, core_1.requestBuilder)(input, context);
11
12
  const headers = {
12
13
  "content-type": "application/json",
13
14
  };
14
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
15
- "/signing-profiles/{profileName}/permissions";
16
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
15
+ b.bp("/signing-profiles/{profileName}/permissions");
16
+ b.p("profileName", () => input.profileName, "{profileName}", false);
17
17
  let body;
18
18
  body = JSON.stringify((0, smithy_client_1.take)(input, {
19
19
  action: [],
@@ -22,66 +22,45 @@ const se_AddProfilePermissionCommand = async (input, context) => {
22
22
  revisionId: [],
23
23
  statementId: [],
24
24
  }));
25
- return new protocol_http_1.HttpRequest({
26
- protocol,
27
- hostname,
28
- port,
29
- method: "POST",
30
- headers,
31
- path: resolvedPath,
32
- body,
33
- });
25
+ b.m("POST").h(headers).b(body);
26
+ return b.build();
34
27
  };
35
28
  exports.se_AddProfilePermissionCommand = se_AddProfilePermissionCommand;
36
29
  const se_CancelSigningProfileCommand = async (input, context) => {
37
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
30
+ const b = (0, core_1.requestBuilder)(input, context);
38
31
  const headers = {};
39
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}";
40
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
32
+ b.bp("/signing-profiles/{profileName}");
33
+ b.p("profileName", () => input.profileName, "{profileName}", false);
41
34
  let body;
42
- return new protocol_http_1.HttpRequest({
43
- protocol,
44
- hostname,
45
- port,
46
- method: "DELETE",
47
- headers,
48
- path: resolvedPath,
49
- body,
50
- });
35
+ b.m("DELETE").h(headers).b(body);
36
+ return b.build();
51
37
  };
52
38
  exports.se_CancelSigningProfileCommand = se_CancelSigningProfileCommand;
53
39
  const se_DescribeSigningJobCommand = async (input, context) => {
54
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = (0, core_1.requestBuilder)(input, context);
55
41
  const headers = {};
56
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs/{jobId}";
57
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
42
+ b.bp("/signing-jobs/{jobId}");
43
+ b.p("jobId", () => input.jobId, "{jobId}", false);
58
44
  let body;
59
- return new protocol_http_1.HttpRequest({
60
- protocol,
61
- hostname,
62
- port,
63
- method: "GET",
64
- headers,
65
- path: resolvedPath,
66
- body,
67
- });
45
+ b.m("GET").h(headers).b(body);
46
+ return b.build();
68
47
  };
69
48
  exports.se_DescribeSigningJobCommand = se_DescribeSigningJobCommand;
70
49
  const se_GetRevocationStatusCommand = async (input, context) => {
71
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
50
+ const b = (0, core_1.requestBuilder)(input, context);
72
51
  const headers = {};
73
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/revocations";
52
+ b.bp("/revocations");
74
53
  const query = (0, smithy_client_1.map)({
75
- signatureTimestamp: [
54
+ [_sT]: [
76
55
  (0, smithy_client_1.expectNonNull)(input.signatureTimestamp, `signatureTimestamp`) != null,
77
- () => (input.signatureTimestamp.toISOString().split(".")[0] + "Z").toString(),
56
+ () => (input[_sT].toISOString().split(".")[0] + "Z").toString(),
78
57
  ],
79
- platformId: [, (0, smithy_client_1.expectNonNull)(input.platformId, `platformId`)],
80
- profileVersionArn: [, (0, smithy_client_1.expectNonNull)(input.profileVersionArn, `profileVersionArn`)],
81
- jobArn: [, (0, smithy_client_1.expectNonNull)(input.jobArn, `jobArn`)],
82
- certificateHashes: [
58
+ [_pI]: [, (0, smithy_client_1.expectNonNull)(input[_pI], `platformId`)],
59
+ [_pVA]: [, (0, smithy_client_1.expectNonNull)(input[_pVA], `profileVersionArn`)],
60
+ [_jA]: [, (0, smithy_client_1.expectNonNull)(input[_jA], `jobArn`)],
61
+ [_cH]: [
83
62
  (0, smithy_client_1.expectNonNull)(input.certificateHashes, `certificateHashes`) != null,
84
- () => (input.certificateHashes || []).map((_entry) => _entry),
63
+ () => (input[_cH] || []).map((_entry) => _entry),
85
64
  ],
86
65
  });
87
66
  let body;
@@ -92,184 +71,122 @@ const se_GetRevocationStatusCommand = async (input, context) => {
92
71
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
93
72
  }
94
73
  }
95
- return new protocol_http_1.HttpRequest({
96
- protocol,
97
- hostname: resolvedHostname,
98
- port,
99
- method: "GET",
100
- headers,
101
- path: resolvedPath,
102
- query,
103
- body,
104
- });
74
+ b.hn(resolvedHostname);
75
+ b.m("GET").h(headers).q(query).b(body);
76
+ return b.build();
105
77
  };
106
78
  exports.se_GetRevocationStatusCommand = se_GetRevocationStatusCommand;
107
79
  const se_GetSigningPlatformCommand = async (input, context) => {
108
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
+ const b = (0, core_1.requestBuilder)(input, context);
109
81
  const headers = {};
110
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-platforms/{platformId}";
111
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "platformId", () => input.platformId, "{platformId}", false);
82
+ b.bp("/signing-platforms/{platformId}");
83
+ b.p("platformId", () => input.platformId, "{platformId}", false);
112
84
  let body;
113
- return new protocol_http_1.HttpRequest({
114
- protocol,
115
- hostname,
116
- port,
117
- method: "GET",
118
- headers,
119
- path: resolvedPath,
120
- body,
121
- });
85
+ b.m("GET").h(headers).b(body);
86
+ return b.build();
122
87
  };
123
88
  exports.se_GetSigningPlatformCommand = se_GetSigningPlatformCommand;
124
89
  const se_GetSigningProfileCommand = async (input, context) => {
125
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
90
+ const b = (0, core_1.requestBuilder)(input, context);
126
91
  const headers = {};
127
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}";
128
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
92
+ b.bp("/signing-profiles/{profileName}");
93
+ b.p("profileName", () => input.profileName, "{profileName}", false);
129
94
  const query = (0, smithy_client_1.map)({
130
- profileOwner: [, input.profileOwner],
95
+ [_pO]: [, input[_pO]],
131
96
  });
132
97
  let body;
133
- return new protocol_http_1.HttpRequest({
134
- protocol,
135
- hostname,
136
- port,
137
- method: "GET",
138
- headers,
139
- path: resolvedPath,
140
- query,
141
- body,
142
- });
98
+ b.m("GET").h(headers).q(query).b(body);
99
+ return b.build();
143
100
  };
144
101
  exports.se_GetSigningProfileCommand = se_GetSigningProfileCommand;
145
102
  const se_ListProfilePermissionsCommand = async (input, context) => {
146
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
103
+ const b = (0, core_1.requestBuilder)(input, context);
147
104
  const headers = {};
148
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
149
- "/signing-profiles/{profileName}/permissions";
150
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
105
+ b.bp("/signing-profiles/{profileName}/permissions");
106
+ b.p("profileName", () => input.profileName, "{profileName}", false);
151
107
  const query = (0, smithy_client_1.map)({
152
- nextToken: [, input.nextToken],
108
+ [_nT]: [, input[_nT]],
153
109
  });
154
110
  let body;
155
- return new protocol_http_1.HttpRequest({
156
- protocol,
157
- hostname,
158
- port,
159
- method: "GET",
160
- headers,
161
- path: resolvedPath,
162
- query,
163
- body,
164
- });
111
+ b.m("GET").h(headers).q(query).b(body);
112
+ return b.build();
165
113
  };
166
114
  exports.se_ListProfilePermissionsCommand = se_ListProfilePermissionsCommand;
167
115
  const se_ListSigningJobsCommand = async (input, context) => {
168
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = (0, core_1.requestBuilder)(input, context);
169
117
  const headers = {};
170
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs";
118
+ b.bp("/signing-jobs");
171
119
  const query = (0, smithy_client_1.map)({
172
- status: [, input.status],
173
- platformId: [, input.platformId],
174
- requestedBy: [, input.requestedBy],
175
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
176
- nextToken: [, input.nextToken],
177
- isRevoked: [() => input.isRevoked !== void 0, () => input.isRevoked.toString()],
178
- signatureExpiresBefore: [
120
+ [_s]: [, input[_s]],
121
+ [_pI]: [, input[_pI]],
122
+ [_rB]: [, input[_rB]],
123
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
124
+ [_nT]: [, input[_nT]],
125
+ [_iR]: [() => input.isRevoked !== void 0, () => input[_iR].toString()],
126
+ [_sEB]: [
179
127
  () => input.signatureExpiresBefore !== void 0,
180
- () => (input.signatureExpiresBefore.toISOString().split(".")[0] + "Z").toString(),
128
+ () => (input[_sEB].toISOString().split(".")[0] + "Z").toString(),
181
129
  ],
182
- signatureExpiresAfter: [
130
+ [_sEA]: [
183
131
  () => input.signatureExpiresAfter !== void 0,
184
- () => (input.signatureExpiresAfter.toISOString().split(".")[0] + "Z").toString(),
132
+ () => (input[_sEA].toISOString().split(".")[0] + "Z").toString(),
185
133
  ],
186
- jobInvoker: [, input.jobInvoker],
134
+ [_jI]: [, input[_jI]],
187
135
  });
188
136
  let body;
189
- return new protocol_http_1.HttpRequest({
190
- protocol,
191
- hostname,
192
- port,
193
- method: "GET",
194
- headers,
195
- path: resolvedPath,
196
- query,
197
- body,
198
- });
137
+ b.m("GET").h(headers).q(query).b(body);
138
+ return b.build();
199
139
  };
200
140
  exports.se_ListSigningJobsCommand = se_ListSigningJobsCommand;
201
141
  const se_ListSigningPlatformsCommand = async (input, context) => {
202
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
142
+ const b = (0, core_1.requestBuilder)(input, context);
203
143
  const headers = {};
204
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-platforms";
144
+ b.bp("/signing-platforms");
205
145
  const query = (0, smithy_client_1.map)({
206
- category: [, input.category],
207
- partner: [, input.partner],
208
- target: [, input.target],
209
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
210
- nextToken: [, input.nextToken],
146
+ [_c]: [, input[_c]],
147
+ [_p]: [, input[_p]],
148
+ [_t]: [, input[_t]],
149
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
150
+ [_nT]: [, input[_nT]],
211
151
  });
212
152
  let body;
213
- return new protocol_http_1.HttpRequest({
214
- protocol,
215
- hostname,
216
- port,
217
- method: "GET",
218
- headers,
219
- path: resolvedPath,
220
- query,
221
- body,
222
- });
153
+ b.m("GET").h(headers).q(query).b(body);
154
+ return b.build();
223
155
  };
224
156
  exports.se_ListSigningPlatformsCommand = se_ListSigningPlatformsCommand;
225
157
  const se_ListSigningProfilesCommand = async (input, context) => {
226
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
158
+ const b = (0, core_1.requestBuilder)(input, context);
227
159
  const headers = {};
228
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles";
160
+ b.bp("/signing-profiles");
229
161
  const query = (0, smithy_client_1.map)({
230
- includeCanceled: [() => input.includeCanceled !== void 0, () => input.includeCanceled.toString()],
231
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
232
- nextToken: [, input.nextToken],
233
- platformId: [, input.platformId],
234
- statuses: [() => input.statuses !== void 0, () => (input.statuses || []).map((_entry) => _entry)],
162
+ [_iC]: [() => input.includeCanceled !== void 0, () => input[_iC].toString()],
163
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
164
+ [_nT]: [, input[_nT]],
165
+ [_pI]: [, input[_pI]],
166
+ [_st]: [() => input.statuses !== void 0, () => (input[_st] || []).map((_entry) => _entry)],
235
167
  });
236
168
  let body;
237
- return new protocol_http_1.HttpRequest({
238
- protocol,
239
- hostname,
240
- port,
241
- method: "GET",
242
- headers,
243
- path: resolvedPath,
244
- query,
245
- body,
246
- });
169
+ b.m("GET").h(headers).q(query).b(body);
170
+ return b.build();
247
171
  };
248
172
  exports.se_ListSigningProfilesCommand = se_ListSigningProfilesCommand;
249
173
  const se_ListTagsForResourceCommand = async (input, context) => {
250
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
+ const b = (0, core_1.requestBuilder)(input, context);
251
175
  const headers = {};
252
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
253
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
176
+ b.bp("/tags/{resourceArn}");
177
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
254
178
  let body;
255
- return new protocol_http_1.HttpRequest({
256
- protocol,
257
- hostname,
258
- port,
259
- method: "GET",
260
- headers,
261
- path: resolvedPath,
262
- body,
263
- });
179
+ b.m("GET").h(headers).b(body);
180
+ return b.build();
264
181
  };
265
182
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
266
183
  const se_PutSigningProfileCommand = async (input, context) => {
267
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
184
+ const b = (0, core_1.requestBuilder)(input, context);
268
185
  const headers = {
269
186
  "content-type": "application/json",
270
187
  };
271
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}";
272
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
188
+ b.bp("/signing-profiles/{profileName}");
189
+ b.p("profileName", () => input.profileName, "{profileName}", false);
273
190
  let body;
274
191
  body = JSON.stringify((0, smithy_client_1.take)(input, {
275
192
  overrides: (_) => (0, smithy_client_1._json)(_),
@@ -279,93 +196,63 @@ const se_PutSigningProfileCommand = async (input, context) => {
279
196
  signingParameters: (_) => (0, smithy_client_1._json)(_),
280
197
  tags: (_) => (0, smithy_client_1._json)(_),
281
198
  }));
282
- return new protocol_http_1.HttpRequest({
283
- protocol,
284
- hostname,
285
- port,
286
- method: "PUT",
287
- headers,
288
- path: resolvedPath,
289
- body,
290
- });
199
+ b.m("PUT").h(headers).b(body);
200
+ return b.build();
291
201
  };
292
202
  exports.se_PutSigningProfileCommand = se_PutSigningProfileCommand;
293
203
  const se_RemoveProfilePermissionCommand = async (input, context) => {
294
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
204
+ const b = (0, core_1.requestBuilder)(input, context);
295
205
  const headers = {};
296
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
297
- "/signing-profiles/{profileName}/permissions/{statementId}";
298
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
299
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "statementId", () => input.statementId, "{statementId}", false);
206
+ b.bp("/signing-profiles/{profileName}/permissions/{statementId}");
207
+ b.p("profileName", () => input.profileName, "{profileName}", false);
208
+ b.p("statementId", () => input.statementId, "{statementId}", false);
300
209
  const query = (0, smithy_client_1.map)({
301
- revisionId: [, (0, smithy_client_1.expectNonNull)(input.revisionId, `revisionId`)],
210
+ [_rI]: [, (0, smithy_client_1.expectNonNull)(input[_rI], `revisionId`)],
302
211
  });
303
212
  let body;
304
- return new protocol_http_1.HttpRequest({
305
- protocol,
306
- hostname,
307
- port,
308
- method: "DELETE",
309
- headers,
310
- path: resolvedPath,
311
- query,
312
- body,
313
- });
213
+ b.m("DELETE").h(headers).q(query).b(body);
214
+ return b.build();
314
215
  };
315
216
  exports.se_RemoveProfilePermissionCommand = se_RemoveProfilePermissionCommand;
316
217
  const se_RevokeSignatureCommand = async (input, context) => {
317
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
218
+ const b = (0, core_1.requestBuilder)(input, context);
318
219
  const headers = {
319
220
  "content-type": "application/json",
320
221
  };
321
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs/{jobId}/revoke";
322
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
222
+ b.bp("/signing-jobs/{jobId}/revoke");
223
+ b.p("jobId", () => input.jobId, "{jobId}", false);
323
224
  let body;
324
225
  body = JSON.stringify((0, smithy_client_1.take)(input, {
325
226
  jobOwner: [],
326
227
  reason: [],
327
228
  }));
328
- return new protocol_http_1.HttpRequest({
329
- protocol,
330
- hostname,
331
- port,
332
- method: "PUT",
333
- headers,
334
- path: resolvedPath,
335
- body,
336
- });
229
+ b.m("PUT").h(headers).b(body);
230
+ return b.build();
337
231
  };
338
232
  exports.se_RevokeSignatureCommand = se_RevokeSignatureCommand;
339
233
  const se_RevokeSigningProfileCommand = async (input, context) => {
340
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
234
+ const b = (0, core_1.requestBuilder)(input, context);
341
235
  const headers = {
342
236
  "content-type": "application/json",
343
237
  };
344
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}/revoke";
345
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
238
+ b.bp("/signing-profiles/{profileName}/revoke");
239
+ b.p("profileName", () => input.profileName, "{profileName}", false);
346
240
  let body;
347
241
  body = JSON.stringify((0, smithy_client_1.take)(input, {
348
242
  effectiveTime: (_) => Math.round(_.getTime() / 1000),
349
243
  profileVersion: [],
350
244
  reason: [],
351
245
  }));
352
- return new protocol_http_1.HttpRequest({
353
- protocol,
354
- hostname,
355
- port,
356
- method: "PUT",
357
- headers,
358
- path: resolvedPath,
359
- body,
360
- });
246
+ b.m("PUT").h(headers).b(body);
247
+ return b.build();
361
248
  };
362
249
  exports.se_RevokeSigningProfileCommand = se_RevokeSigningProfileCommand;
363
250
  const se_SignPayloadCommand = async (input, context) => {
364
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
251
+ const b = (0, core_1.requestBuilder)(input, context);
365
252
  const headers = {
366
253
  "content-type": "application/json",
367
254
  };
368
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs/with-payload";
255
+ b.bp("/signing-jobs/with-payload");
369
256
  let body;
370
257
  body = JSON.stringify((0, smithy_client_1.take)(input, {
371
258
  payload: (_) => context.base64Encoder(_),
@@ -373,23 +260,16 @@ const se_SignPayloadCommand = async (input, context) => {
373
260
  profileName: [],
374
261
  profileOwner: [],
375
262
  }));
376
- return new protocol_http_1.HttpRequest({
377
- protocol,
378
- hostname,
379
- port,
380
- method: "POST",
381
- headers,
382
- path: resolvedPath,
383
- body,
384
- });
263
+ b.m("POST").h(headers).b(body);
264
+ return b.build();
385
265
  };
386
266
  exports.se_SignPayloadCommand = se_SignPayloadCommand;
387
267
  const se_StartSigningJobCommand = async (input, context) => {
388
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
268
+ const b = (0, core_1.requestBuilder)(input, context);
389
269
  const headers = {
390
270
  "content-type": "application/json",
391
271
  };
392
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs";
272
+ b.bp("/signing-jobs");
393
273
  let body;
394
274
  body = JSON.stringify((0, smithy_client_1.take)(input, {
395
275
  clientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -398,61 +278,39 @@ const se_StartSigningJobCommand = async (input, context) => {
398
278
  profileOwner: [],
399
279
  source: (_) => (0, smithy_client_1._json)(_),
400
280
  }));
401
- return new protocol_http_1.HttpRequest({
402
- protocol,
403
- hostname,
404
- port,
405
- method: "POST",
406
- headers,
407
- path: resolvedPath,
408
- body,
409
- });
281
+ b.m("POST").h(headers).b(body);
282
+ return b.build();
410
283
  };
411
284
  exports.se_StartSigningJobCommand = se_StartSigningJobCommand;
412
285
  const se_TagResourceCommand = async (input, context) => {
413
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
286
+ const b = (0, core_1.requestBuilder)(input, context);
414
287
  const headers = {
415
288
  "content-type": "application/json",
416
289
  };
417
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
418
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
290
+ b.bp("/tags/{resourceArn}");
291
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
419
292
  let body;
420
293
  body = JSON.stringify((0, smithy_client_1.take)(input, {
421
294
  tags: (_) => (0, smithy_client_1._json)(_),
422
295
  }));
423
- return new protocol_http_1.HttpRequest({
424
- protocol,
425
- hostname,
426
- port,
427
- method: "POST",
428
- headers,
429
- path: resolvedPath,
430
- body,
431
- });
296
+ b.m("POST").h(headers).b(body);
297
+ return b.build();
432
298
  };
433
299
  exports.se_TagResourceCommand = se_TagResourceCommand;
434
300
  const se_UntagResourceCommand = async (input, context) => {
435
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
301
+ const b = (0, core_1.requestBuilder)(input, context);
436
302
  const headers = {};
437
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
438
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
303
+ b.bp("/tags/{resourceArn}");
304
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
439
305
  const query = (0, smithy_client_1.map)({
440
- tagKeys: [
306
+ [_tK]: [
441
307
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
442
- () => (input.tagKeys || []).map((_entry) => _entry),
308
+ () => (input[_tK] || []).map((_entry) => _entry),
443
309
  ],
444
310
  });
445
311
  let body;
446
- return new protocol_http_1.HttpRequest({
447
- protocol,
448
- hostname,
449
- port,
450
- method: "DELETE",
451
- headers,
452
- path: resolvedPath,
453
- query,
454
- body,
455
- });
312
+ b.m("DELETE").h(headers).q(query).b(body);
313
+ return b.build();
456
314
  };
457
315
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
458
316
  const de_AddProfilePermissionCommand = async (output, context) => {
@@ -1529,6 +1387,27 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1529
1387
  value !== "" &&
1530
1388
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1531
1389
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1390
+ const _c = "category";
1391
+ const _cH = "certificateHashes";
1392
+ const _iC = "includeCanceled";
1393
+ const _iR = "isRevoked";
1394
+ const _jA = "jobArn";
1395
+ const _jI = "jobInvoker";
1396
+ const _mR = "maxResults";
1397
+ const _nT = "nextToken";
1398
+ const _p = "partner";
1399
+ const _pI = "platformId";
1400
+ const _pO = "profileOwner";
1401
+ const _pVA = "profileVersionArn";
1402
+ const _rB = "requestedBy";
1403
+ const _rI = "revisionId";
1404
+ const _s = "status";
1405
+ const _sEA = "signatureExpiresAfter";
1406
+ const _sEB = "signatureExpiresBefore";
1407
+ const _sT = "signatureTimestamp";
1408
+ const _st = "statuses";
1409
+ const _t = "target";
1410
+ const _tK = "tagKeys";
1532
1411
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1533
1412
  if (encoded.length) {
1534
1413
  return JSON.parse(encoded);
@@ -1,16 +1,16 @@
1
- import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { v4 as generateIdempotencyToken } from "uuid";
4
5
  import { AccessDeniedException, BadRequestException, ConflictException, InternalServiceErrorException, NotFoundException, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, TooManyRequestsException, ValidationException, } from "../models/models_0";
5
6
  import { SignerServiceException as __BaseException } from "../models/SignerServiceException";
6
7
  export const se_AddProfilePermissionCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const b = rb(input, context);
8
9
  const headers = {
9
10
  "content-type": "application/json",
10
11
  };
11
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
12
- "/signing-profiles/{profileName}/permissions";
13
- resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
12
+ b.bp("/signing-profiles/{profileName}/permissions");
13
+ b.p("profileName", () => input.profileName, "{profileName}", false);
14
14
  let body;
15
15
  body = JSON.stringify(take(input, {
16
16
  action: [],
@@ -19,63 +19,42 @@ export const se_AddProfilePermissionCommand = async (input, context) => {
19
19
  revisionId: [],
20
20
  statementId: [],
21
21
  }));
22
- return new __HttpRequest({
23
- protocol,
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
  export const se_CancelSigningProfileCommand = async (input, context) => {
33
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
26
+ const b = rb(input, context);
34
27
  const headers = {};
35
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}";
36
- resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
28
+ b.bp("/signing-profiles/{profileName}");
29
+ b.p("profileName", () => input.profileName, "{profileName}", false);
37
30
  let body;
38
- return new __HttpRequest({
39
- protocol,
40
- hostname,
41
- port,
42
- method: "DELETE",
43
- headers,
44
- path: resolvedPath,
45
- body,
46
- });
31
+ b.m("DELETE").h(headers).b(body);
32
+ return b.build();
47
33
  };
48
34
  export const se_DescribeSigningJobCommand = async (input, context) => {
49
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
35
+ const b = rb(input, context);
50
36
  const headers = {};
51
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs/{jobId}";
52
- resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
37
+ b.bp("/signing-jobs/{jobId}");
38
+ b.p("jobId", () => input.jobId, "{jobId}", false);
53
39
  let body;
54
- return new __HttpRequest({
55
- protocol,
56
- hostname,
57
- port,
58
- method: "GET",
59
- headers,
60
- path: resolvedPath,
61
- body,
62
- });
40
+ b.m("GET").h(headers).b(body);
41
+ return b.build();
63
42
  };
64
43
  export const se_GetRevocationStatusCommand = async (input, context) => {
65
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
44
+ const b = rb(input, context);
66
45
  const headers = {};
67
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/revocations";
46
+ b.bp("/revocations");
68
47
  const query = map({
69
- signatureTimestamp: [
48
+ [_sT]: [
70
49
  __expectNonNull(input.signatureTimestamp, `signatureTimestamp`) != null,
71
- () => (input.signatureTimestamp.toISOString().split(".")[0] + "Z").toString(),
50
+ () => (input[_sT].toISOString().split(".")[0] + "Z").toString(),
72
51
  ],
73
- platformId: [, __expectNonNull(input.platformId, `platformId`)],
74
- profileVersionArn: [, __expectNonNull(input.profileVersionArn, `profileVersionArn`)],
75
- jobArn: [, __expectNonNull(input.jobArn, `jobArn`)],
76
- certificateHashes: [
52
+ [_pI]: [, __expectNonNull(input[_pI], `platformId`)],
53
+ [_pVA]: [, __expectNonNull(input[_pVA], `profileVersionArn`)],
54
+ [_jA]: [, __expectNonNull(input[_jA], `jobArn`)],
55
+ [_cH]: [
77
56
  __expectNonNull(input.certificateHashes, `certificateHashes`) != null,
78
- () => (input.certificateHashes || []).map((_entry) => _entry),
57
+ () => (input[_cH] || []).map((_entry) => _entry),
79
58
  ],
80
59
  });
81
60
  let body;
@@ -86,176 +65,114 @@ export const se_GetRevocationStatusCommand = async (input, context) => {
86
65
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
87
66
  }
88
67
  }
89
- return new __HttpRequest({
90
- protocol,
91
- hostname: resolvedHostname,
92
- port,
93
- method: "GET",
94
- headers,
95
- path: resolvedPath,
96
- query,
97
- body,
98
- });
68
+ b.hn(resolvedHostname);
69
+ b.m("GET").h(headers).q(query).b(body);
70
+ return b.build();
99
71
  };
100
72
  export const se_GetSigningPlatformCommand = async (input, context) => {
101
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = rb(input, context);
102
74
  const headers = {};
103
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-platforms/{platformId}";
104
- resolvedPath = __resolvedPath(resolvedPath, input, "platformId", () => input.platformId, "{platformId}", false);
75
+ b.bp("/signing-platforms/{platformId}");
76
+ b.p("platformId", () => input.platformId, "{platformId}", false);
105
77
  let body;
106
- return new __HttpRequest({
107
- protocol,
108
- hostname,
109
- port,
110
- method: "GET",
111
- headers,
112
- path: resolvedPath,
113
- body,
114
- });
78
+ b.m("GET").h(headers).b(body);
79
+ return b.build();
115
80
  };
116
81
  export const se_GetSigningProfileCommand = async (input, context) => {
117
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const b = rb(input, context);
118
83
  const headers = {};
119
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}";
120
- resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
84
+ b.bp("/signing-profiles/{profileName}");
85
+ b.p("profileName", () => input.profileName, "{profileName}", false);
121
86
  const query = map({
122
- profileOwner: [, input.profileOwner],
87
+ [_pO]: [, input[_pO]],
123
88
  });
124
89
  let body;
125
- return new __HttpRequest({
126
- protocol,
127
- hostname,
128
- port,
129
- method: "GET",
130
- headers,
131
- path: resolvedPath,
132
- query,
133
- body,
134
- });
90
+ b.m("GET").h(headers).q(query).b(body);
91
+ return b.build();
135
92
  };
136
93
  export const se_ListProfilePermissionsCommand = async (input, context) => {
137
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
+ const b = rb(input, context);
138
95
  const headers = {};
139
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
140
- "/signing-profiles/{profileName}/permissions";
141
- resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
96
+ b.bp("/signing-profiles/{profileName}/permissions");
97
+ b.p("profileName", () => input.profileName, "{profileName}", false);
142
98
  const query = map({
143
- nextToken: [, input.nextToken],
99
+ [_nT]: [, input[_nT]],
144
100
  });
145
101
  let body;
146
- return new __HttpRequest({
147
- protocol,
148
- hostname,
149
- port,
150
- method: "GET",
151
- headers,
152
- path: resolvedPath,
153
- query,
154
- body,
155
- });
102
+ b.m("GET").h(headers).q(query).b(body);
103
+ return b.build();
156
104
  };
157
105
  export const se_ListSigningJobsCommand = async (input, context) => {
158
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
106
+ const b = rb(input, context);
159
107
  const headers = {};
160
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs";
108
+ b.bp("/signing-jobs");
161
109
  const query = map({
162
- status: [, input.status],
163
- platformId: [, input.platformId],
164
- requestedBy: [, input.requestedBy],
165
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
166
- nextToken: [, input.nextToken],
167
- isRevoked: [() => input.isRevoked !== void 0, () => input.isRevoked.toString()],
168
- signatureExpiresBefore: [
110
+ [_s]: [, input[_s]],
111
+ [_pI]: [, input[_pI]],
112
+ [_rB]: [, input[_rB]],
113
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
114
+ [_nT]: [, input[_nT]],
115
+ [_iR]: [() => input.isRevoked !== void 0, () => input[_iR].toString()],
116
+ [_sEB]: [
169
117
  () => input.signatureExpiresBefore !== void 0,
170
- () => (input.signatureExpiresBefore.toISOString().split(".")[0] + "Z").toString(),
118
+ () => (input[_sEB].toISOString().split(".")[0] + "Z").toString(),
171
119
  ],
172
- signatureExpiresAfter: [
120
+ [_sEA]: [
173
121
  () => input.signatureExpiresAfter !== void 0,
174
- () => (input.signatureExpiresAfter.toISOString().split(".")[0] + "Z").toString(),
122
+ () => (input[_sEA].toISOString().split(".")[0] + "Z").toString(),
175
123
  ],
176
- jobInvoker: [, input.jobInvoker],
124
+ [_jI]: [, input[_jI]],
177
125
  });
178
126
  let body;
179
- return new __HttpRequest({
180
- protocol,
181
- hostname,
182
- port,
183
- method: "GET",
184
- headers,
185
- path: resolvedPath,
186
- query,
187
- body,
188
- });
127
+ b.m("GET").h(headers).q(query).b(body);
128
+ return b.build();
189
129
  };
190
130
  export const se_ListSigningPlatformsCommand = async (input, context) => {
191
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
131
+ const b = rb(input, context);
192
132
  const headers = {};
193
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-platforms";
133
+ b.bp("/signing-platforms");
194
134
  const query = map({
195
- category: [, input.category],
196
- partner: [, input.partner],
197
- target: [, input.target],
198
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
199
- nextToken: [, input.nextToken],
135
+ [_c]: [, input[_c]],
136
+ [_p]: [, input[_p]],
137
+ [_t]: [, input[_t]],
138
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
139
+ [_nT]: [, input[_nT]],
200
140
  });
201
141
  let body;
202
- return new __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
  export const se_ListSigningProfilesCommand = async (input, context) => {
214
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
146
+ const b = rb(input, context);
215
147
  const headers = {};
216
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles";
148
+ b.bp("/signing-profiles");
217
149
  const query = map({
218
- includeCanceled: [() => input.includeCanceled !== void 0, () => input.includeCanceled.toString()],
219
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
220
- nextToken: [, input.nextToken],
221
- platformId: [, input.platformId],
222
- statuses: [() => input.statuses !== void 0, () => (input.statuses || []).map((_entry) => _entry)],
150
+ [_iC]: [() => input.includeCanceled !== void 0, () => input[_iC].toString()],
151
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
152
+ [_nT]: [, input[_nT]],
153
+ [_pI]: [, input[_pI]],
154
+ [_st]: [() => input.statuses !== void 0, () => (input[_st] || []).map((_entry) => _entry)],
223
155
  });
224
156
  let body;
225
- return new __HttpRequest({
226
- protocol,
227
- hostname,
228
- port,
229
- method: "GET",
230
- headers,
231
- path: resolvedPath,
232
- query,
233
- body,
234
- });
157
+ b.m("GET").h(headers).q(query).b(body);
158
+ return b.build();
235
159
  };
236
160
  export const se_ListTagsForResourceCommand = async (input, context) => {
237
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
161
+ const b = rb(input, context);
238
162
  const headers = {};
239
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
240
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
163
+ b.bp("/tags/{resourceArn}");
164
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
241
165
  let body;
242
- return new __HttpRequest({
243
- protocol,
244
- hostname,
245
- port,
246
- method: "GET",
247
- headers,
248
- path: resolvedPath,
249
- body,
250
- });
166
+ b.m("GET").h(headers).b(body);
167
+ return b.build();
251
168
  };
252
169
  export const se_PutSigningProfileCommand = async (input, context) => {
253
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
170
+ const b = rb(input, context);
254
171
  const headers = {
255
172
  "content-type": "application/json",
256
173
  };
257
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}";
258
- resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
174
+ b.bp("/signing-profiles/{profileName}");
175
+ b.p("profileName", () => input.profileName, "{profileName}", false);
259
176
  let body;
260
177
  body = JSON.stringify(take(input, {
261
178
  overrides: (_) => _json(_),
@@ -265,89 +182,59 @@ export const se_PutSigningProfileCommand = async (input, context) => {
265
182
  signingParameters: (_) => _json(_),
266
183
  tags: (_) => _json(_),
267
184
  }));
268
- return new __HttpRequest({
269
- protocol,
270
- hostname,
271
- port,
272
- method: "PUT",
273
- headers,
274
- path: resolvedPath,
275
- body,
276
- });
185
+ b.m("PUT").h(headers).b(body);
186
+ return b.build();
277
187
  };
278
188
  export const se_RemoveProfilePermissionCommand = async (input, context) => {
279
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
189
+ const b = rb(input, context);
280
190
  const headers = {};
281
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
282
- "/signing-profiles/{profileName}/permissions/{statementId}";
283
- resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
284
- resolvedPath = __resolvedPath(resolvedPath, input, "statementId", () => input.statementId, "{statementId}", false);
191
+ b.bp("/signing-profiles/{profileName}/permissions/{statementId}");
192
+ b.p("profileName", () => input.profileName, "{profileName}", false);
193
+ b.p("statementId", () => input.statementId, "{statementId}", false);
285
194
  const query = map({
286
- revisionId: [, __expectNonNull(input.revisionId, `revisionId`)],
195
+ [_rI]: [, __expectNonNull(input[_rI], `revisionId`)],
287
196
  });
288
197
  let body;
289
- return new __HttpRequest({
290
- protocol,
291
- hostname,
292
- port,
293
- method: "DELETE",
294
- headers,
295
- path: resolvedPath,
296
- query,
297
- body,
298
- });
198
+ b.m("DELETE").h(headers).q(query).b(body);
199
+ return b.build();
299
200
  };
300
201
  export const se_RevokeSignatureCommand = async (input, context) => {
301
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
202
+ const b = rb(input, context);
302
203
  const headers = {
303
204
  "content-type": "application/json",
304
205
  };
305
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs/{jobId}/revoke";
306
- resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
206
+ b.bp("/signing-jobs/{jobId}/revoke");
207
+ b.p("jobId", () => input.jobId, "{jobId}", false);
307
208
  let body;
308
209
  body = JSON.stringify(take(input, {
309
210
  jobOwner: [],
310
211
  reason: [],
311
212
  }));
312
- return new __HttpRequest({
313
- protocol,
314
- hostname,
315
- port,
316
- method: "PUT",
317
- headers,
318
- path: resolvedPath,
319
- body,
320
- });
213
+ b.m("PUT").h(headers).b(body);
214
+ return b.build();
321
215
  };
322
216
  export const se_RevokeSigningProfileCommand = async (input, context) => {
323
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
217
+ const b = rb(input, context);
324
218
  const headers = {
325
219
  "content-type": "application/json",
326
220
  };
327
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}/revoke";
328
- resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
221
+ b.bp("/signing-profiles/{profileName}/revoke");
222
+ b.p("profileName", () => input.profileName, "{profileName}", false);
329
223
  let body;
330
224
  body = JSON.stringify(take(input, {
331
225
  effectiveTime: (_) => Math.round(_.getTime() / 1000),
332
226
  profileVersion: [],
333
227
  reason: [],
334
228
  }));
335
- return new __HttpRequest({
336
- protocol,
337
- hostname,
338
- port,
339
- method: "PUT",
340
- headers,
341
- path: resolvedPath,
342
- body,
343
- });
229
+ b.m("PUT").h(headers).b(body);
230
+ return b.build();
344
231
  };
345
232
  export const se_SignPayloadCommand = async (input, context) => {
346
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
233
+ const b = rb(input, context);
347
234
  const headers = {
348
235
  "content-type": "application/json",
349
236
  };
350
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs/with-payload";
237
+ b.bp("/signing-jobs/with-payload");
351
238
  let body;
352
239
  body = JSON.stringify(take(input, {
353
240
  payload: (_) => context.base64Encoder(_),
@@ -355,22 +242,15 @@ export const se_SignPayloadCommand = async (input, context) => {
355
242
  profileName: [],
356
243
  profileOwner: [],
357
244
  }));
358
- return new __HttpRequest({
359
- protocol,
360
- hostname,
361
- port,
362
- method: "POST",
363
- headers,
364
- path: resolvedPath,
365
- body,
366
- });
245
+ b.m("POST").h(headers).b(body);
246
+ return b.build();
367
247
  };
368
248
  export const se_StartSigningJobCommand = async (input, context) => {
369
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
249
+ const b = rb(input, context);
370
250
  const headers = {
371
251
  "content-type": "application/json",
372
252
  };
373
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs";
253
+ b.bp("/signing-jobs");
374
254
  let body;
375
255
  body = JSON.stringify(take(input, {
376
256
  clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -379,59 +259,37 @@ export const se_StartSigningJobCommand = async (input, context) => {
379
259
  profileOwner: [],
380
260
  source: (_) => _json(_),
381
261
  }));
382
- return new __HttpRequest({
383
- protocol,
384
- hostname,
385
- port,
386
- method: "POST",
387
- headers,
388
- path: resolvedPath,
389
- body,
390
- });
262
+ b.m("POST").h(headers).b(body);
263
+ return b.build();
391
264
  };
392
265
  export const se_TagResourceCommand = async (input, context) => {
393
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
266
+ const b = rb(input, context);
394
267
  const headers = {
395
268
  "content-type": "application/json",
396
269
  };
397
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
398
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
270
+ b.bp("/tags/{resourceArn}");
271
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
399
272
  let body;
400
273
  body = JSON.stringify(take(input, {
401
274
  tags: (_) => _json(_),
402
275
  }));
403
- return new __HttpRequest({
404
- protocol,
405
- hostname,
406
- port,
407
- method: "POST",
408
- headers,
409
- path: resolvedPath,
410
- body,
411
- });
276
+ b.m("POST").h(headers).b(body);
277
+ return b.build();
412
278
  };
413
279
  export const se_UntagResourceCommand = async (input, context) => {
414
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
280
+ const b = rb(input, context);
415
281
  const headers = {};
416
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
417
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
282
+ b.bp("/tags/{resourceArn}");
283
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
418
284
  const query = map({
419
- tagKeys: [
285
+ [_tK]: [
420
286
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
421
- () => (input.tagKeys || []).map((_entry) => _entry),
287
+ () => (input[_tK] || []).map((_entry) => _entry),
422
288
  ],
423
289
  });
424
290
  let body;
425
- return new __HttpRequest({
426
- protocol,
427
- hostname,
428
- port,
429
- method: "DELETE",
430
- headers,
431
- path: resolvedPath,
432
- query,
433
- body,
434
- });
291
+ b.m("DELETE").h(headers).q(query).b(body);
292
+ return b.build();
435
293
  };
436
294
  export const de_AddProfilePermissionCommand = async (output, context) => {
437
295
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1488,6 +1346,27 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1488
1346
  value !== "" &&
1489
1347
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1490
1348
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1349
+ const _c = "category";
1350
+ const _cH = "certificateHashes";
1351
+ const _iC = "includeCanceled";
1352
+ const _iR = "isRevoked";
1353
+ const _jA = "jobArn";
1354
+ const _jI = "jobInvoker";
1355
+ const _mR = "maxResults";
1356
+ const _nT = "nextToken";
1357
+ const _p = "partner";
1358
+ const _pI = "platformId";
1359
+ const _pO = "profileOwner";
1360
+ const _pVA = "profileVersionArn";
1361
+ const _rB = "requestedBy";
1362
+ const _rI = "revisionId";
1363
+ const _s = "status";
1364
+ const _sEA = "signatureExpiresAfter";
1365
+ const _sEB = "signatureExpiresBefore";
1366
+ const _sT = "signatureTimestamp";
1367
+ const _st = "statuses";
1368
+ const _t = "target";
1369
+ const _tK = "tagKeys";
1491
1370
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1492
1371
  if (encoded.length) {
1493
1372
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-signer",
3
3
  "description": "AWS SDK for JavaScript Signer 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",