@aws-sdk/client-serverlessapplicationrepository 3.476.0 → 3.478.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,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListApplicationDependencies = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListApplicationDependenciesCommand_1 = require("../commands/ListApplicationDependenciesCommand");
5
6
  const ServerlessApplicationRepositoryClient_1 = require("../ServerlessApplicationRepositoryClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListApplicationDependenciesCommand_1.ListApplicationDependenciesCommand(input), ...args);
8
- };
9
- async function* paginateListApplicationDependencies(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxItems"] = config.pageSize;
16
- if (config.client instanceof ServerlessApplicationRepositoryClient_1.ServerlessApplicationRepositoryClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ServerlessApplicationRepository | ServerlessApplicationRepositoryClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListApplicationDependencies = paginateListApplicationDependencies;
7
+ exports.paginateListApplicationDependencies = (0, core_1.createPaginator)(ServerlessApplicationRepositoryClient_1.ServerlessApplicationRepositoryClient, ListApplicationDependenciesCommand_1.ListApplicationDependenciesCommand, "NextToken", "NextToken", "MaxItems");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListApplicationVersions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListApplicationVersionsCommand_1 = require("../commands/ListApplicationVersionsCommand");
5
6
  const ServerlessApplicationRepositoryClient_1 = require("../ServerlessApplicationRepositoryClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListApplicationVersionsCommand_1.ListApplicationVersionsCommand(input), ...args);
8
- };
9
- async function* paginateListApplicationVersions(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxItems"] = config.pageSize;
16
- if (config.client instanceof ServerlessApplicationRepositoryClient_1.ServerlessApplicationRepositoryClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ServerlessApplicationRepository | ServerlessApplicationRepositoryClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListApplicationVersions = paginateListApplicationVersions;
7
+ exports.paginateListApplicationVersions = (0, core_1.createPaginator)(ServerlessApplicationRepositoryClient_1.ServerlessApplicationRepositoryClient, ListApplicationVersionsCommand_1.ListApplicationVersionsCommand, "NextToken", "NextToken", "MaxItems");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListApplications = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListApplicationsCommand_1 = require("../commands/ListApplicationsCommand");
5
6
  const ServerlessApplicationRepositoryClient_1 = require("../ServerlessApplicationRepositoryClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListApplicationsCommand_1.ListApplicationsCommand(input), ...args);
8
- };
9
- async function* paginateListApplications(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxItems"] = config.pageSize;
16
- if (config.client instanceof ServerlessApplicationRepositoryClient_1.ServerlessApplicationRepositoryClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ServerlessApplicationRepository | ServerlessApplicationRepositoryClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListApplications = paginateListApplications;
7
+ exports.paginateListApplications = (0, core_1.createPaginator)(ServerlessApplicationRepositoryClient_1.ServerlessApplicationRepositoryClient, ListApplicationsCommand_1.ListApplicationsCommand, "NextToken", "NextToken", "MaxItems");
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateApplicationCommand = exports.de_UnshareApplicationCommand = exports.de_PutApplicationPolicyCommand = exports.de_ListApplicationVersionsCommand = exports.de_ListApplicationsCommand = exports.de_ListApplicationDependenciesCommand = exports.de_GetCloudFormationTemplateCommand = exports.de_GetApplicationPolicyCommand = exports.de_GetApplicationCommand = exports.de_DeleteApplicationCommand = exports.de_CreateCloudFormationTemplateCommand = exports.de_CreateCloudFormationChangeSetCommand = exports.de_CreateApplicationVersionCommand = exports.de_CreateApplicationCommand = exports.se_UpdateApplicationCommand = exports.se_UnshareApplicationCommand = exports.se_PutApplicationPolicyCommand = exports.se_ListApplicationVersionsCommand = exports.se_ListApplicationsCommand = exports.se_ListApplicationDependenciesCommand = exports.se_GetCloudFormationTemplateCommand = exports.se_GetApplicationPolicyCommand = exports.se_GetApplicationCommand = exports.se_DeleteApplicationCommand = exports.se_CreateCloudFormationTemplateCommand = exports.se_CreateCloudFormationChangeSetCommand = exports.se_CreateApplicationVersionCommand = exports.se_CreateApplicationCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const ServerlessApplicationRepositoryServiceException_1 = require("../models/ServerlessApplicationRepositoryServiceException");
8
8
  const se_CreateApplicationCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
13
+ b.bp("/applications");
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
16
  author: [, , `Author`],
@@ -29,26 +29,18 @@ const se_CreateApplicationCommand = async (input, context) => {
29
29
  templateBody: [, , `TemplateBody`],
30
30
  templateUrl: [, , `TemplateUrl`],
31
31
  }));
32
- return new protocol_http_1.HttpRequest({
33
- protocol,
34
- hostname,
35
- port,
36
- method: "POST",
37
- headers,
38
- path: resolvedPath,
39
- body,
40
- });
32
+ b.m("POST").h(headers).b(body);
33
+ return b.build();
41
34
  };
42
35
  exports.se_CreateApplicationCommand = se_CreateApplicationCommand;
43
36
  const se_CreateApplicationVersionCommand = async (input, context) => {
44
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = (0, core_1.requestBuilder)(input, context);
45
38
  const headers = {
46
39
  "content-type": "application/json",
47
40
  };
48
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
49
- "/applications/{ApplicationId}/versions/{SemanticVersion}";
50
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
51
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SemanticVersion", () => input.SemanticVersion, "{SemanticVersion}", false);
41
+ b.bp("/applications/{ApplicationId}/versions/{SemanticVersion}");
42
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
43
+ b.p("SemanticVersion", () => input.SemanticVersion, "{SemanticVersion}", false);
52
44
  let body;
53
45
  body = JSON.stringify((0, smithy_client_1.take)(input, {
54
46
  sourceCodeArchiveUrl: [, , `SourceCodeArchiveUrl`],
@@ -56,24 +48,17 @@ const se_CreateApplicationVersionCommand = async (input, context) => {
56
48
  templateBody: [, , `TemplateBody`],
57
49
  templateUrl: [, , `TemplateUrl`],
58
50
  }));
59
- return new protocol_http_1.HttpRequest({
60
- protocol,
61
- hostname,
62
- port,
63
- method: "PUT",
64
- headers,
65
- path: resolvedPath,
66
- body,
67
- });
51
+ b.m("PUT").h(headers).b(body);
52
+ return b.build();
68
53
  };
69
54
  exports.se_CreateApplicationVersionCommand = se_CreateApplicationVersionCommand;
70
55
  const se_CreateCloudFormationChangeSetCommand = async (input, context) => {
71
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const b = (0, core_1.requestBuilder)(input, context);
72
57
  const headers = {
73
58
  "content-type": "application/json",
74
59
  };
75
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/changesets";
76
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
60
+ b.bp("/applications/{ApplicationId}/changesets");
61
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
77
62
  let body;
78
63
  body = JSON.stringify((0, smithy_client_1.take)(input, {
79
64
  capabilities: [, (_) => (0, smithy_client_1._json)(_), `Capabilities`],
@@ -89,231 +74,148 @@ const se_CreateCloudFormationChangeSetCommand = async (input, context) => {
89
74
  tags: [, (_) => se___listOfTag(_, context), `Tags`],
90
75
  templateId: [, , `TemplateId`],
91
76
  }));
92
- return new protocol_http_1.HttpRequest({
93
- protocol,
94
- hostname,
95
- port,
96
- method: "POST",
97
- headers,
98
- path: resolvedPath,
99
- body,
100
- });
77
+ b.m("POST").h(headers).b(body);
78
+ return b.build();
101
79
  };
102
80
  exports.se_CreateCloudFormationChangeSetCommand = se_CreateCloudFormationChangeSetCommand;
103
81
  const se_CreateCloudFormationTemplateCommand = async (input, context) => {
104
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const b = (0, core_1.requestBuilder)(input, context);
105
83
  const headers = {
106
84
  "content-type": "application/json",
107
85
  };
108
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/templates";
109
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
86
+ b.bp("/applications/{ApplicationId}/templates");
87
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
110
88
  let body;
111
89
  body = JSON.stringify((0, smithy_client_1.take)(input, {
112
90
  semanticVersion: [, , `SemanticVersion`],
113
91
  }));
114
- return new protocol_http_1.HttpRequest({
115
- protocol,
116
- hostname,
117
- port,
118
- method: "POST",
119
- headers,
120
- path: resolvedPath,
121
- body,
122
- });
92
+ b.m("POST").h(headers).b(body);
93
+ return b.build();
123
94
  };
124
95
  exports.se_CreateCloudFormationTemplateCommand = se_CreateCloudFormationTemplateCommand;
125
96
  const se_DeleteApplicationCommand = async (input, context) => {
126
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
97
+ const b = (0, core_1.requestBuilder)(input, context);
127
98
  const headers = {};
128
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
129
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
99
+ b.bp("/applications/{ApplicationId}");
100
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
130
101
  let body;
131
- return new protocol_http_1.HttpRequest({
132
- protocol,
133
- hostname,
134
- port,
135
- method: "DELETE",
136
- headers,
137
- path: resolvedPath,
138
- body,
139
- });
102
+ b.m("DELETE").h(headers).b(body);
103
+ return b.build();
140
104
  };
141
105
  exports.se_DeleteApplicationCommand = se_DeleteApplicationCommand;
142
106
  const se_GetApplicationCommand = async (input, context) => {
143
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const b = (0, core_1.requestBuilder)(input, context);
144
108
  const headers = {};
145
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
146
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
109
+ b.bp("/applications/{ApplicationId}");
110
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
147
111
  const query = (0, smithy_client_1.map)({
148
- semanticVersion: [, input.SemanticVersion],
112
+ [_sV]: [, input[_SV]],
149
113
  });
150
114
  let body;
151
- return new protocol_http_1.HttpRequest({
152
- protocol,
153
- hostname,
154
- port,
155
- method: "GET",
156
- headers,
157
- path: resolvedPath,
158
- query,
159
- body,
160
- });
115
+ b.m("GET").h(headers).q(query).b(body);
116
+ return b.build();
161
117
  };
162
118
  exports.se_GetApplicationCommand = se_GetApplicationCommand;
163
119
  const se_GetApplicationPolicyCommand = async (input, context) => {
164
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
120
+ const b = (0, core_1.requestBuilder)(input, context);
165
121
  const headers = {};
166
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/policy";
167
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
122
+ b.bp("/applications/{ApplicationId}/policy");
123
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
168
124
  let body;
169
- return new protocol_http_1.HttpRequest({
170
- protocol,
171
- hostname,
172
- port,
173
- method: "GET",
174
- headers,
175
- path: resolvedPath,
176
- body,
177
- });
125
+ b.m("GET").h(headers).b(body);
126
+ return b.build();
178
127
  };
179
128
  exports.se_GetApplicationPolicyCommand = se_GetApplicationPolicyCommand;
180
129
  const se_GetCloudFormationTemplateCommand = async (input, context) => {
181
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
130
+ const b = (0, core_1.requestBuilder)(input, context);
182
131
  const headers = {};
183
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
184
- "/applications/{ApplicationId}/templates/{TemplateId}";
185
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
186
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateId", () => input.TemplateId, "{TemplateId}", false);
132
+ b.bp("/applications/{ApplicationId}/templates/{TemplateId}");
133
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
134
+ b.p("TemplateId", () => input.TemplateId, "{TemplateId}", false);
187
135
  let body;
188
- return new protocol_http_1.HttpRequest({
189
- protocol,
190
- hostname,
191
- port,
192
- method: "GET",
193
- headers,
194
- path: resolvedPath,
195
- body,
196
- });
136
+ b.m("GET").h(headers).b(body);
137
+ return b.build();
197
138
  };
198
139
  exports.se_GetCloudFormationTemplateCommand = se_GetCloudFormationTemplateCommand;
199
140
  const se_ListApplicationDependenciesCommand = async (input, context) => {
200
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
141
+ const b = (0, core_1.requestBuilder)(input, context);
201
142
  const headers = {};
202
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
203
- "/applications/{ApplicationId}/dependencies";
204
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
143
+ b.bp("/applications/{ApplicationId}/dependencies");
144
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
205
145
  const query = (0, smithy_client_1.map)({
206
- maxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
207
- nextToken: [, input.NextToken],
208
- semanticVersion: [, input.SemanticVersion],
146
+ [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
147
+ [_nT]: [, input[_NT]],
148
+ [_sV]: [, input[_SV]],
209
149
  });
210
150
  let body;
211
- return new protocol_http_1.HttpRequest({
212
- protocol,
213
- hostname,
214
- port,
215
- method: "GET",
216
- headers,
217
- path: resolvedPath,
218
- query,
219
- body,
220
- });
151
+ b.m("GET").h(headers).q(query).b(body);
152
+ return b.build();
221
153
  };
222
154
  exports.se_ListApplicationDependenciesCommand = se_ListApplicationDependenciesCommand;
223
155
  const se_ListApplicationsCommand = async (input, context) => {
224
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
156
+ const b = (0, core_1.requestBuilder)(input, context);
225
157
  const headers = {};
226
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
158
+ b.bp("/applications");
227
159
  const query = (0, smithy_client_1.map)({
228
- maxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
229
- nextToken: [, input.NextToken],
160
+ [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
161
+ [_nT]: [, input[_NT]],
230
162
  });
231
163
  let body;
232
- return new protocol_http_1.HttpRequest({
233
- protocol,
234
- hostname,
235
- port,
236
- method: "GET",
237
- headers,
238
- path: resolvedPath,
239
- query,
240
- body,
241
- });
164
+ b.m("GET").h(headers).q(query).b(body);
165
+ return b.build();
242
166
  };
243
167
  exports.se_ListApplicationsCommand = se_ListApplicationsCommand;
244
168
  const se_ListApplicationVersionsCommand = async (input, context) => {
245
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const b = (0, core_1.requestBuilder)(input, context);
246
170
  const headers = {};
247
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/versions";
248
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
171
+ b.bp("/applications/{ApplicationId}/versions");
172
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
249
173
  const query = (0, smithy_client_1.map)({
250
- maxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
251
- nextToken: [, input.NextToken],
174
+ [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
175
+ [_nT]: [, input[_NT]],
252
176
  });
253
177
  let body;
254
- return new protocol_http_1.HttpRequest({
255
- protocol,
256
- hostname,
257
- port,
258
- method: "GET",
259
- headers,
260
- path: resolvedPath,
261
- query,
262
- body,
263
- });
178
+ b.m("GET").h(headers).q(query).b(body);
179
+ return b.build();
264
180
  };
265
181
  exports.se_ListApplicationVersionsCommand = se_ListApplicationVersionsCommand;
266
182
  const se_PutApplicationPolicyCommand = async (input, context) => {
267
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = (0, core_1.requestBuilder)(input, context);
268
184
  const headers = {
269
185
  "content-type": "application/json",
270
186
  };
271
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/policy";
272
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
187
+ b.bp("/applications/{ApplicationId}/policy");
188
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
273
189
  let body;
274
190
  body = JSON.stringify((0, smithy_client_1.take)(input, {
275
191
  statements: [, (_) => se___listOfApplicationPolicyStatement(_, context), `Statements`],
276
192
  }));
277
- return new protocol_http_1.HttpRequest({
278
- protocol,
279
- hostname,
280
- port,
281
- method: "PUT",
282
- headers,
283
- path: resolvedPath,
284
- body,
285
- });
193
+ b.m("PUT").h(headers).b(body);
194
+ return b.build();
286
195
  };
287
196
  exports.se_PutApplicationPolicyCommand = se_PutApplicationPolicyCommand;
288
197
  const se_UnshareApplicationCommand = async (input, context) => {
289
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
198
+ const b = (0, core_1.requestBuilder)(input, context);
290
199
  const headers = {
291
200
  "content-type": "application/json",
292
201
  };
293
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/unshare";
294
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
202
+ b.bp("/applications/{ApplicationId}/unshare");
203
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
295
204
  let body;
296
205
  body = JSON.stringify((0, smithy_client_1.take)(input, {
297
206
  organizationId: [, , `OrganizationId`],
298
207
  }));
299
- return new protocol_http_1.HttpRequest({
300
- protocol,
301
- hostname,
302
- port,
303
- method: "POST",
304
- headers,
305
- path: resolvedPath,
306
- body,
307
- });
208
+ b.m("POST").h(headers).b(body);
209
+ return b.build();
308
210
  };
309
211
  exports.se_UnshareApplicationCommand = se_UnshareApplicationCommand;
310
212
  const se_UpdateApplicationCommand = async (input, context) => {
311
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
+ const b = (0, core_1.requestBuilder)(input, context);
312
214
  const headers = {
313
215
  "content-type": "application/json",
314
216
  };
315
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
316
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
217
+ b.bp("/applications/{ApplicationId}");
218
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
317
219
  let body;
318
220
  body = JSON.stringify((0, smithy_client_1.take)(input, {
319
221
  author: [, , `Author`],
@@ -323,15 +225,8 @@ const se_UpdateApplicationCommand = async (input, context) => {
323
225
  readmeBody: [, , `ReadmeBody`],
324
226
  readmeUrl: [, , `ReadmeUrl`],
325
227
  }));
326
- return new protocol_http_1.HttpRequest({
327
- protocol,
328
- hostname,
329
- port,
330
- method: "PATCH",
331
- headers,
332
- path: resolvedPath,
333
- body,
334
- });
228
+ b.m("PATCH").h(headers).b(body);
229
+ return b.build();
335
230
  };
336
231
  exports.se_UpdateApplicationCommand = se_UpdateApplicationCommand;
337
232
  const de_CreateApplicationCommand = async (output, context) => {
@@ -1293,6 +1188,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1293
1188
  value !== "" &&
1294
1189
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1295
1190
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1191
+ const _MI = "MaxItems";
1192
+ const _NT = "NextToken";
1193
+ const _SV = "SemanticVersion";
1194
+ const _mI = "maxItems";
1195
+ const _nT = "nextToken";
1196
+ const _sV = "semanticVersion";
1296
1197
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1297
1198
  if (encoded.length) {
1298
1199
  return JSON.parse(encoded);
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListApplicationDependenciesCommand, } from "../commands/ListApplicationDependenciesCommand";
2
3
  import { ServerlessApplicationRepositoryClient } from "../ServerlessApplicationRepositoryClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListApplicationDependenciesCommand(input), ...args);
5
- };
6
- export async function* paginateListApplicationDependencies(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxItems"] = config.pageSize;
13
- if (config.client instanceof ServerlessApplicationRepositoryClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ServerlessApplicationRepository | ServerlessApplicationRepositoryClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListApplicationDependencies = createPaginator(ServerlessApplicationRepositoryClient, ListApplicationDependenciesCommand, "NextToken", "NextToken", "MaxItems");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListApplicationVersionsCommand, } from "../commands/ListApplicationVersionsCommand";
2
3
  import { ServerlessApplicationRepositoryClient } from "../ServerlessApplicationRepositoryClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListApplicationVersionsCommand(input), ...args);
5
- };
6
- export async function* paginateListApplicationVersions(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxItems"] = config.pageSize;
13
- if (config.client instanceof ServerlessApplicationRepositoryClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ServerlessApplicationRepository | ServerlessApplicationRepositoryClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListApplicationVersions = createPaginator(ServerlessApplicationRepositoryClient, ListApplicationVersionsCommand, "NextToken", "NextToken", "MaxItems");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListApplicationsCommand, } from "../commands/ListApplicationsCommand";
2
3
  import { ServerlessApplicationRepositoryClient } from "../ServerlessApplicationRepositoryClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListApplicationsCommand(input), ...args);
5
- };
6
- export async function* paginateListApplications(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxItems"] = config.pageSize;
13
- if (config.client instanceof ServerlessApplicationRepositoryClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ServerlessApplicationRepository | ServerlessApplicationRepositoryClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListApplications = createPaginator(ServerlessApplicationRepositoryClient, ListApplicationsCommand, "NextToken", "NextToken", "MaxItems");
@@ -1,13 +1,13 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { BadRequestException, ConflictException, ForbiddenException, InternalServerErrorException, NotFoundException, TooManyRequestsException, } from "../models/models_0";
4
4
  import { ServerlessApplicationRepositoryServiceException as __BaseException } from "../models/ServerlessApplicationRepositoryServiceException";
5
5
  export const se_CreateApplicationCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
10
+ b.bp("/applications");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  author: [, , `Author`],
@@ -26,25 +26,17 @@ export const se_CreateApplicationCommand = async (input, context) => {
26
26
  templateBody: [, , `TemplateBody`],
27
27
  templateUrl: [, , `TemplateUrl`],
28
28
  }));
29
- return new __HttpRequest({
30
- protocol,
31
- hostname,
32
- port,
33
- method: "POST",
34
- headers,
35
- path: resolvedPath,
36
- body,
37
- });
29
+ b.m("POST").h(headers).b(body);
30
+ return b.build();
38
31
  };
39
32
  export const se_CreateApplicationVersionCommand = async (input, context) => {
40
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
+ const b = rb(input, context);
41
34
  const headers = {
42
35
  "content-type": "application/json",
43
36
  };
44
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
45
- "/applications/{ApplicationId}/versions/{SemanticVersion}";
46
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
47
- resolvedPath = __resolvedPath(resolvedPath, input, "SemanticVersion", () => input.SemanticVersion, "{SemanticVersion}", false);
37
+ b.bp("/applications/{ApplicationId}/versions/{SemanticVersion}");
38
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
39
+ b.p("SemanticVersion", () => input.SemanticVersion, "{SemanticVersion}", false);
48
40
  let body;
49
41
  body = JSON.stringify(take(input, {
50
42
  sourceCodeArchiveUrl: [, , `SourceCodeArchiveUrl`],
@@ -52,23 +44,16 @@ export const se_CreateApplicationVersionCommand = async (input, context) => {
52
44
  templateBody: [, , `TemplateBody`],
53
45
  templateUrl: [, , `TemplateUrl`],
54
46
  }));
55
- return new __HttpRequest({
56
- protocol,
57
- hostname,
58
- port,
59
- method: "PUT",
60
- headers,
61
- path: resolvedPath,
62
- body,
63
- });
47
+ b.m("PUT").h(headers).b(body);
48
+ return b.build();
64
49
  };
65
50
  export const se_CreateCloudFormationChangeSetCommand = async (input, context) => {
66
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
51
+ const b = rb(input, context);
67
52
  const headers = {
68
53
  "content-type": "application/json",
69
54
  };
70
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/changesets";
71
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
55
+ b.bp("/applications/{ApplicationId}/changesets");
56
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
72
57
  let body;
73
58
  body = JSON.stringify(take(input, {
74
59
  capabilities: [, (_) => _json(_), `Capabilities`],
@@ -84,220 +69,137 @@ export const se_CreateCloudFormationChangeSetCommand = async (input, context) =>
84
69
  tags: [, (_) => se___listOfTag(_, context), `Tags`],
85
70
  templateId: [, , `TemplateId`],
86
71
  }));
87
- return new __HttpRequest({
88
- protocol,
89
- hostname,
90
- port,
91
- method: "POST",
92
- headers,
93
- path: resolvedPath,
94
- body,
95
- });
72
+ b.m("POST").h(headers).b(body);
73
+ return b.build();
96
74
  };
97
75
  export const se_CreateCloudFormationTemplateCommand = async (input, context) => {
98
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
76
+ const b = rb(input, context);
99
77
  const headers = {
100
78
  "content-type": "application/json",
101
79
  };
102
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/templates";
103
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
80
+ b.bp("/applications/{ApplicationId}/templates");
81
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
104
82
  let body;
105
83
  body = JSON.stringify(take(input, {
106
84
  semanticVersion: [, , `SemanticVersion`],
107
85
  }));
108
- return new __HttpRequest({
109
- protocol,
110
- hostname,
111
- port,
112
- method: "POST",
113
- headers,
114
- path: resolvedPath,
115
- body,
116
- });
86
+ b.m("POST").h(headers).b(body);
87
+ return b.build();
117
88
  };
118
89
  export const se_DeleteApplicationCommand = async (input, context) => {
119
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
90
+ const b = rb(input, context);
120
91
  const headers = {};
121
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
122
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
92
+ b.bp("/applications/{ApplicationId}");
93
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
123
94
  let body;
124
- return new __HttpRequest({
125
- protocol,
126
- hostname,
127
- port,
128
- method: "DELETE",
129
- headers,
130
- path: resolvedPath,
131
- body,
132
- });
95
+ b.m("DELETE").h(headers).b(body);
96
+ return b.build();
133
97
  };
134
98
  export const se_GetApplicationCommand = async (input, context) => {
135
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
+ const b = rb(input, context);
136
100
  const headers = {};
137
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
138
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
101
+ b.bp("/applications/{ApplicationId}");
102
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
139
103
  const query = map({
140
- semanticVersion: [, input.SemanticVersion],
104
+ [_sV]: [, input[_SV]],
141
105
  });
142
106
  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
- });
107
+ b.m("GET").h(headers).q(query).b(body);
108
+ return b.build();
153
109
  };
154
110
  export const se_GetApplicationPolicyCommand = async (input, context) => {
155
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
111
+ const b = rb(input, context);
156
112
  const headers = {};
157
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/policy";
158
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
113
+ b.bp("/applications/{ApplicationId}/policy");
114
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
159
115
  let body;
160
- return new __HttpRequest({
161
- protocol,
162
- hostname,
163
- port,
164
- method: "GET",
165
- headers,
166
- path: resolvedPath,
167
- body,
168
- });
116
+ b.m("GET").h(headers).b(body);
117
+ return b.build();
169
118
  };
170
119
  export const se_GetCloudFormationTemplateCommand = async (input, context) => {
171
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
120
+ const b = rb(input, context);
172
121
  const headers = {};
173
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
174
- "/applications/{ApplicationId}/templates/{TemplateId}";
175
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
176
- resolvedPath = __resolvedPath(resolvedPath, input, "TemplateId", () => input.TemplateId, "{TemplateId}", false);
122
+ b.bp("/applications/{ApplicationId}/templates/{TemplateId}");
123
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
124
+ b.p("TemplateId", () => input.TemplateId, "{TemplateId}", false);
177
125
  let body;
178
- return new __HttpRequest({
179
- protocol,
180
- hostname,
181
- port,
182
- method: "GET",
183
- headers,
184
- path: resolvedPath,
185
- body,
186
- });
126
+ b.m("GET").h(headers).b(body);
127
+ return b.build();
187
128
  };
188
129
  export const se_ListApplicationDependenciesCommand = async (input, context) => {
189
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
130
+ const b = rb(input, context);
190
131
  const headers = {};
191
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
192
- "/applications/{ApplicationId}/dependencies";
193
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
132
+ b.bp("/applications/{ApplicationId}/dependencies");
133
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
194
134
  const query = map({
195
- maxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
196
- nextToken: [, input.NextToken],
197
- semanticVersion: [, input.SemanticVersion],
135
+ [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
136
+ [_nT]: [, input[_NT]],
137
+ [_sV]: [, input[_SV]],
198
138
  });
199
139
  let body;
200
- return new __HttpRequest({
201
- protocol,
202
- hostname,
203
- port,
204
- method: "GET",
205
- headers,
206
- path: resolvedPath,
207
- query,
208
- body,
209
- });
140
+ b.m("GET").h(headers).q(query).b(body);
141
+ return b.build();
210
142
  };
211
143
  export const se_ListApplicationsCommand = async (input, context) => {
212
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
144
+ const b = rb(input, context);
213
145
  const headers = {};
214
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
146
+ b.bp("/applications");
215
147
  const query = map({
216
- maxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
217
- nextToken: [, input.NextToken],
148
+ [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
149
+ [_nT]: [, input[_NT]],
218
150
  });
219
151
  let body;
220
- return new __HttpRequest({
221
- protocol,
222
- hostname,
223
- port,
224
- method: "GET",
225
- headers,
226
- path: resolvedPath,
227
- query,
228
- body,
229
- });
152
+ b.m("GET").h(headers).q(query).b(body);
153
+ return b.build();
230
154
  };
231
155
  export const se_ListApplicationVersionsCommand = async (input, context) => {
232
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
156
+ const b = rb(input, context);
233
157
  const headers = {};
234
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/versions";
235
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
158
+ b.bp("/applications/{ApplicationId}/versions");
159
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
236
160
  const query = map({
237
- maxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
238
- nextToken: [, input.NextToken],
161
+ [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
162
+ [_nT]: [, input[_NT]],
239
163
  });
240
164
  let body;
241
- return new __HttpRequest({
242
- protocol,
243
- hostname,
244
- port,
245
- method: "GET",
246
- headers,
247
- path: resolvedPath,
248
- query,
249
- body,
250
- });
165
+ b.m("GET").h(headers).q(query).b(body);
166
+ return b.build();
251
167
  };
252
168
  export const se_PutApplicationPolicyCommand = async (input, context) => {
253
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const b = rb(input, context);
254
170
  const headers = {
255
171
  "content-type": "application/json",
256
172
  };
257
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/policy";
258
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
173
+ b.bp("/applications/{ApplicationId}/policy");
174
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
259
175
  let body;
260
176
  body = JSON.stringify(take(input, {
261
177
  statements: [, (_) => se___listOfApplicationPolicyStatement(_, context), `Statements`],
262
178
  }));
263
- return new __HttpRequest({
264
- protocol,
265
- hostname,
266
- port,
267
- method: "PUT",
268
- headers,
269
- path: resolvedPath,
270
- body,
271
- });
179
+ b.m("PUT").h(headers).b(body);
180
+ return b.build();
272
181
  };
273
182
  export const se_UnshareApplicationCommand = async (input, context) => {
274
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = rb(input, context);
275
184
  const headers = {
276
185
  "content-type": "application/json",
277
186
  };
278
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/unshare";
279
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
187
+ b.bp("/applications/{ApplicationId}/unshare");
188
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
280
189
  let body;
281
190
  body = JSON.stringify(take(input, {
282
191
  organizationId: [, , `OrganizationId`],
283
192
  }));
284
- return new __HttpRequest({
285
- protocol,
286
- hostname,
287
- port,
288
- method: "POST",
289
- headers,
290
- path: resolvedPath,
291
- body,
292
- });
193
+ b.m("POST").h(headers).b(body);
194
+ return b.build();
293
195
  };
294
196
  export const se_UpdateApplicationCommand = async (input, context) => {
295
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
197
+ const b = rb(input, context);
296
198
  const headers = {
297
199
  "content-type": "application/json",
298
200
  };
299
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
300
- resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
201
+ b.bp("/applications/{ApplicationId}");
202
+ b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
301
203
  let body;
302
204
  body = JSON.stringify(take(input, {
303
205
  author: [, , `Author`],
@@ -307,15 +209,8 @@ export const se_UpdateApplicationCommand = async (input, context) => {
307
209
  readmeBody: [, , `ReadmeBody`],
308
210
  readmeUrl: [, , `ReadmeUrl`],
309
211
  }));
310
- return new __HttpRequest({
311
- protocol,
312
- hostname,
313
- port,
314
- method: "PATCH",
315
- headers,
316
- path: resolvedPath,
317
- body,
318
- });
212
+ b.m("PATCH").h(headers).b(body);
213
+ return b.build();
319
214
  };
320
215
  export const de_CreateApplicationCommand = async (output, context) => {
321
216
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -1262,6 +1157,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1262
1157
  value !== "" &&
1263
1158
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1264
1159
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1160
+ const _MI = "MaxItems";
1161
+ const _NT = "NextToken";
1162
+ const _SV = "SemanticVersion";
1163
+ const _mI = "maxItems";
1164
+ const _nT = "nextToken";
1165
+ const _sV = "semanticVersion";
1265
1166
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1266
1167
  if (encoded.length) {
1267
1168
  return JSON.parse(encoded);
@@ -4,4 +4,4 @@ import { ServerlessApplicationRepositoryPaginationConfiguration } from "./Interf
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListApplicationDependencies(config: ServerlessApplicationRepositoryPaginationConfiguration, input: ListApplicationDependenciesCommandInput, ...additionalArguments: any): Paginator<ListApplicationDependenciesCommandOutput>;
7
+ export declare const paginateListApplicationDependencies: (config: ServerlessApplicationRepositoryPaginationConfiguration, input: ListApplicationDependenciesCommandInput, ...rest: any[]) => Paginator<ListApplicationDependenciesCommandOutput>;
@@ -4,4 +4,4 @@ import { ServerlessApplicationRepositoryPaginationConfiguration } from "./Interf
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListApplicationVersions(config: ServerlessApplicationRepositoryPaginationConfiguration, input: ListApplicationVersionsCommandInput, ...additionalArguments: any): Paginator<ListApplicationVersionsCommandOutput>;
7
+ export declare const paginateListApplicationVersions: (config: ServerlessApplicationRepositoryPaginationConfiguration, input: ListApplicationVersionsCommandInput, ...rest: any[]) => Paginator<ListApplicationVersionsCommandOutput>;
@@ -4,4 +4,4 @@ import { ServerlessApplicationRepositoryPaginationConfiguration } from "./Interf
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListApplications(config: ServerlessApplicationRepositoryPaginationConfiguration, input: ListApplicationsCommandInput, ...additionalArguments: any): Paginator<ListApplicationsCommandOutput>;
7
+ export declare const paginateListApplications: (config: ServerlessApplicationRepositoryPaginationConfiguration, input: ListApplicationsCommandInput, ...rest: any[]) => Paginator<ListApplicationsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListApplicationDependenciesCommandOutput,
5
5
  } from "../commands/ListApplicationDependenciesCommand";
6
6
  import { ServerlessApplicationRepositoryPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListApplicationDependencies(
7
+ export declare const paginateListApplicationDependencies: (
8
8
  config: ServerlessApplicationRepositoryPaginationConfiguration,
9
9
  input: ListApplicationDependenciesCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListApplicationDependenciesCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListApplicationDependenciesCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListApplicationVersionsCommandOutput,
5
5
  } from "../commands/ListApplicationVersionsCommand";
6
6
  import { ServerlessApplicationRepositoryPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListApplicationVersions(
7
+ export declare const paginateListApplicationVersions: (
8
8
  config: ServerlessApplicationRepositoryPaginationConfiguration,
9
9
  input: ListApplicationVersionsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListApplicationVersionsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListApplicationVersionsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListApplicationsCommandOutput,
5
5
  } from "../commands/ListApplicationsCommand";
6
6
  import { ServerlessApplicationRepositoryPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListApplications(
7
+ export declare const paginateListApplications: (
8
8
  config: ServerlessApplicationRepositoryPaginationConfiguration,
9
9
  input: ListApplicationsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListApplicationsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListApplicationsCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-serverlessapplicationrepository",
3
3
  "description": "AWS SDK for JavaScript Serverlessapplicationrepository Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.478.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,20 +20,21 @@
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.478.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.478.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",
29
29
  "@aws-sdk/middleware-signing": "3.468.0",
30
- "@aws-sdk/middleware-user-agent": "3.470.0",
30
+ "@aws-sdk/middleware-user-agent": "3.478.0",
31
31
  "@aws-sdk/region-config-resolver": "3.470.0",
32
32
  "@aws-sdk/types": "3.468.0",
33
- "@aws-sdk/util-endpoints": "3.470.0",
33
+ "@aws-sdk/util-endpoints": "3.478.0",
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",