@aws-sdk/client-serverlessapplicationrepository 3.490.0 → 3.495.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.
Files changed (31) hide show
  1. package/dist-cjs/ServerlessApplicationRepository.js +1 -39
  2. package/dist-cjs/ServerlessApplicationRepositoryClient.js +1 -43
  3. package/dist-cjs/commands/CreateApplicationCommand.js +1 -28
  4. package/dist-cjs/commands/CreateApplicationVersionCommand.js +1 -28
  5. package/dist-cjs/commands/CreateCloudFormationChangeSetCommand.js +1 -28
  6. package/dist-cjs/commands/CreateCloudFormationTemplateCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteApplicationCommand.js +1 -28
  8. package/dist-cjs/commands/GetApplicationCommand.js +1 -28
  9. package/dist-cjs/commands/GetApplicationPolicyCommand.js +1 -28
  10. package/dist-cjs/commands/GetCloudFormationTemplateCommand.js +1 -28
  11. package/dist-cjs/commands/ListApplicationDependenciesCommand.js +1 -28
  12. package/dist-cjs/commands/ListApplicationVersionsCommand.js +1 -28
  13. package/dist-cjs/commands/ListApplicationsCommand.js +1 -28
  14. package/dist-cjs/commands/PutApplicationPolicyCommand.js +1 -28
  15. package/dist-cjs/commands/UnshareApplicationCommand.js +1 -28
  16. package/dist-cjs/commands/UpdateApplicationCommand.js +1 -28
  17. package/dist-cjs/commands/index.js +1 -17
  18. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  19. package/dist-cjs/extensionConfiguration.js +1 -2
  20. package/dist-cjs/index.js +1790 -11
  21. package/dist-cjs/models/ServerlessApplicationRepositoryServiceException.js +1 -12
  22. package/dist-cjs/models/index.js +1 -4
  23. package/dist-cjs/models/models_0.js +1 -105
  24. package/dist-cjs/pagination/Interfaces.js +1 -2
  25. package/dist-cjs/pagination/ListApplicationDependenciesPaginator.js +1 -7
  26. package/dist-cjs/pagination/ListApplicationVersionsPaginator.js +1 -7
  27. package/dist-cjs/pagination/ListApplicationsPaginator.js +1 -7
  28. package/dist-cjs/pagination/index.js +1 -7
  29. package/dist-cjs/protocols/Aws_restJson1.js +1 -1236
  30. package/dist-cjs/runtimeExtensions.js +1 -22
  31. package/package.json +40 -40
@@ -1,1236 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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 core_1 = require("@smithy/core");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const models_0_1 = require("../models/models_0");
7
- const ServerlessApplicationRepositoryServiceException_1 = require("../models/ServerlessApplicationRepositoryServiceException");
8
- const se_CreateApplicationCommand = async (input, context) => {
9
- const b = (0, core_1.requestBuilder)(input, context);
10
- const headers = {
11
- "content-type": "application/json",
12
- };
13
- b.bp("/applications");
14
- let body;
15
- body = JSON.stringify((0, smithy_client_1.take)(input, {
16
- author: [, , `Author`],
17
- description: [, , `Description`],
18
- homePageUrl: [, , `HomePageUrl`],
19
- labels: [, (_) => (0, smithy_client_1._json)(_), `Labels`],
20
- licenseBody: [, , `LicenseBody`],
21
- licenseUrl: [, , `LicenseUrl`],
22
- name: [, , `Name`],
23
- readmeBody: [, , `ReadmeBody`],
24
- readmeUrl: [, , `ReadmeUrl`],
25
- semanticVersion: [, , `SemanticVersion`],
26
- sourceCodeArchiveUrl: [, , `SourceCodeArchiveUrl`],
27
- sourceCodeUrl: [, , `SourceCodeUrl`],
28
- spdxLicenseId: [, , `SpdxLicenseId`],
29
- templateBody: [, , `TemplateBody`],
30
- templateUrl: [, , `TemplateUrl`],
31
- }));
32
- b.m("POST").h(headers).b(body);
33
- return b.build();
34
- };
35
- exports.se_CreateApplicationCommand = se_CreateApplicationCommand;
36
- const se_CreateApplicationVersionCommand = async (input, context) => {
37
- const b = (0, core_1.requestBuilder)(input, context);
38
- const headers = {
39
- "content-type": "application/json",
40
- };
41
- b.bp("/applications/{ApplicationId}/versions/{SemanticVersion}");
42
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
43
- b.p("SemanticVersion", () => input.SemanticVersion, "{SemanticVersion}", false);
44
- let body;
45
- body = JSON.stringify((0, smithy_client_1.take)(input, {
46
- sourceCodeArchiveUrl: [, , `SourceCodeArchiveUrl`],
47
- sourceCodeUrl: [, , `SourceCodeUrl`],
48
- templateBody: [, , `TemplateBody`],
49
- templateUrl: [, , `TemplateUrl`],
50
- }));
51
- b.m("PUT").h(headers).b(body);
52
- return b.build();
53
- };
54
- exports.se_CreateApplicationVersionCommand = se_CreateApplicationVersionCommand;
55
- const se_CreateCloudFormationChangeSetCommand = async (input, context) => {
56
- const b = (0, core_1.requestBuilder)(input, context);
57
- const headers = {
58
- "content-type": "application/json",
59
- };
60
- b.bp("/applications/{ApplicationId}/changesets");
61
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
62
- let body;
63
- body = JSON.stringify((0, smithy_client_1.take)(input, {
64
- capabilities: [, (_) => (0, smithy_client_1._json)(_), `Capabilities`],
65
- changeSetName: [, , `ChangeSetName`],
66
- clientToken: [, , `ClientToken`],
67
- description: [, , `Description`],
68
- notificationArns: [, (_) => (0, smithy_client_1._json)(_), `NotificationArns`],
69
- parameterOverrides: [, (_) => se___listOfParameterValue(_, context), `ParameterOverrides`],
70
- resourceTypes: [, (_) => (0, smithy_client_1._json)(_), `ResourceTypes`],
71
- rollbackConfiguration: [, (_) => se_RollbackConfiguration(_, context), `RollbackConfiguration`],
72
- semanticVersion: [, , `SemanticVersion`],
73
- stackName: [, , `StackName`],
74
- tags: [, (_) => se___listOfTag(_, context), `Tags`],
75
- templateId: [, , `TemplateId`],
76
- }));
77
- b.m("POST").h(headers).b(body);
78
- return b.build();
79
- };
80
- exports.se_CreateCloudFormationChangeSetCommand = se_CreateCloudFormationChangeSetCommand;
81
- const se_CreateCloudFormationTemplateCommand = async (input, context) => {
82
- const b = (0, core_1.requestBuilder)(input, context);
83
- const headers = {
84
- "content-type": "application/json",
85
- };
86
- b.bp("/applications/{ApplicationId}/templates");
87
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
88
- let body;
89
- body = JSON.stringify((0, smithy_client_1.take)(input, {
90
- semanticVersion: [, , `SemanticVersion`],
91
- }));
92
- b.m("POST").h(headers).b(body);
93
- return b.build();
94
- };
95
- exports.se_CreateCloudFormationTemplateCommand = se_CreateCloudFormationTemplateCommand;
96
- const se_DeleteApplicationCommand = async (input, context) => {
97
- const b = (0, core_1.requestBuilder)(input, context);
98
- const headers = {};
99
- b.bp("/applications/{ApplicationId}");
100
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
101
- let body;
102
- b.m("DELETE").h(headers).b(body);
103
- return b.build();
104
- };
105
- exports.se_DeleteApplicationCommand = se_DeleteApplicationCommand;
106
- const se_GetApplicationCommand = async (input, context) => {
107
- const b = (0, core_1.requestBuilder)(input, context);
108
- const headers = {};
109
- b.bp("/applications/{ApplicationId}");
110
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
111
- const query = (0, smithy_client_1.map)({
112
- [_sV]: [, input[_SV]],
113
- });
114
- let body;
115
- b.m("GET").h(headers).q(query).b(body);
116
- return b.build();
117
- };
118
- exports.se_GetApplicationCommand = se_GetApplicationCommand;
119
- const se_GetApplicationPolicyCommand = async (input, context) => {
120
- const b = (0, core_1.requestBuilder)(input, context);
121
- const headers = {};
122
- b.bp("/applications/{ApplicationId}/policy");
123
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
124
- let body;
125
- b.m("GET").h(headers).b(body);
126
- return b.build();
127
- };
128
- exports.se_GetApplicationPolicyCommand = se_GetApplicationPolicyCommand;
129
- const se_GetCloudFormationTemplateCommand = async (input, context) => {
130
- const b = (0, core_1.requestBuilder)(input, context);
131
- const headers = {};
132
- b.bp("/applications/{ApplicationId}/templates/{TemplateId}");
133
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
134
- b.p("TemplateId", () => input.TemplateId, "{TemplateId}", false);
135
- let body;
136
- b.m("GET").h(headers).b(body);
137
- return b.build();
138
- };
139
- exports.se_GetCloudFormationTemplateCommand = se_GetCloudFormationTemplateCommand;
140
- const se_ListApplicationDependenciesCommand = async (input, context) => {
141
- const b = (0, core_1.requestBuilder)(input, context);
142
- const headers = {};
143
- b.bp("/applications/{ApplicationId}/dependencies");
144
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
145
- const query = (0, smithy_client_1.map)({
146
- [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
147
- [_nT]: [, input[_NT]],
148
- [_sV]: [, input[_SV]],
149
- });
150
- let body;
151
- b.m("GET").h(headers).q(query).b(body);
152
- return b.build();
153
- };
154
- exports.se_ListApplicationDependenciesCommand = se_ListApplicationDependenciesCommand;
155
- const se_ListApplicationsCommand = async (input, context) => {
156
- const b = (0, core_1.requestBuilder)(input, context);
157
- const headers = {};
158
- b.bp("/applications");
159
- const query = (0, smithy_client_1.map)({
160
- [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
161
- [_nT]: [, input[_NT]],
162
- });
163
- let body;
164
- b.m("GET").h(headers).q(query).b(body);
165
- return b.build();
166
- };
167
- exports.se_ListApplicationsCommand = se_ListApplicationsCommand;
168
- const se_ListApplicationVersionsCommand = async (input, context) => {
169
- const b = (0, core_1.requestBuilder)(input, context);
170
- const headers = {};
171
- b.bp("/applications/{ApplicationId}/versions");
172
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
173
- const query = (0, smithy_client_1.map)({
174
- [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
175
- [_nT]: [, input[_NT]],
176
- });
177
- let body;
178
- b.m("GET").h(headers).q(query).b(body);
179
- return b.build();
180
- };
181
- exports.se_ListApplicationVersionsCommand = se_ListApplicationVersionsCommand;
182
- const se_PutApplicationPolicyCommand = async (input, context) => {
183
- const b = (0, core_1.requestBuilder)(input, context);
184
- const headers = {
185
- "content-type": "application/json",
186
- };
187
- b.bp("/applications/{ApplicationId}/policy");
188
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
189
- let body;
190
- body = JSON.stringify((0, smithy_client_1.take)(input, {
191
- statements: [, (_) => se___listOfApplicationPolicyStatement(_, context), `Statements`],
192
- }));
193
- b.m("PUT").h(headers).b(body);
194
- return b.build();
195
- };
196
- exports.se_PutApplicationPolicyCommand = se_PutApplicationPolicyCommand;
197
- const se_UnshareApplicationCommand = async (input, context) => {
198
- const b = (0, core_1.requestBuilder)(input, context);
199
- const headers = {
200
- "content-type": "application/json",
201
- };
202
- b.bp("/applications/{ApplicationId}/unshare");
203
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
204
- let body;
205
- body = JSON.stringify((0, smithy_client_1.take)(input, {
206
- organizationId: [, , `OrganizationId`],
207
- }));
208
- b.m("POST").h(headers).b(body);
209
- return b.build();
210
- };
211
- exports.se_UnshareApplicationCommand = se_UnshareApplicationCommand;
212
- const se_UpdateApplicationCommand = async (input, context) => {
213
- const b = (0, core_1.requestBuilder)(input, context);
214
- const headers = {
215
- "content-type": "application/json",
216
- };
217
- b.bp("/applications/{ApplicationId}");
218
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
219
- let body;
220
- body = JSON.stringify((0, smithy_client_1.take)(input, {
221
- author: [, , `Author`],
222
- description: [, , `Description`],
223
- homePageUrl: [, , `HomePageUrl`],
224
- labels: [, (_) => (0, smithy_client_1._json)(_), `Labels`],
225
- readmeBody: [, , `ReadmeBody`],
226
- readmeUrl: [, , `ReadmeUrl`],
227
- }));
228
- b.m("PATCH").h(headers).b(body);
229
- return b.build();
230
- };
231
- exports.se_UpdateApplicationCommand = se_UpdateApplicationCommand;
232
- const de_CreateApplicationCommand = async (output, context) => {
233
- if (output.statusCode !== 201 && output.statusCode >= 300) {
234
- return de_CreateApplicationCommandError(output, context);
235
- }
236
- const contents = (0, smithy_client_1.map)({
237
- $metadata: deserializeMetadata(output),
238
- });
239
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
240
- const doc = (0, smithy_client_1.take)(data, {
241
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
242
- Author: [, smithy_client_1.expectString, `author`],
243
- CreationTime: [, smithy_client_1.expectString, `creationTime`],
244
- Description: [, smithy_client_1.expectString, `description`],
245
- HomePageUrl: [, smithy_client_1.expectString, `homePageUrl`],
246
- IsVerifiedAuthor: [, smithy_client_1.expectBoolean, `isVerifiedAuthor`],
247
- Labels: [, smithy_client_1._json, `labels`],
248
- LicenseUrl: [, smithy_client_1.expectString, `licenseUrl`],
249
- Name: [, smithy_client_1.expectString, `name`],
250
- ReadmeUrl: [, smithy_client_1.expectString, `readmeUrl`],
251
- SpdxLicenseId: [, smithy_client_1.expectString, `spdxLicenseId`],
252
- VerifiedAuthorUrl: [, smithy_client_1.expectString, `verifiedAuthorUrl`],
253
- Version: [, (_) => de_Version(_, context), `version`],
254
- });
255
- Object.assign(contents, doc);
256
- return contents;
257
- };
258
- exports.de_CreateApplicationCommand = de_CreateApplicationCommand;
259
- const de_CreateApplicationCommandError = async (output, context) => {
260
- const parsedOutput = {
261
- ...output,
262
- body: await parseErrorBody(output.body, context),
263
- };
264
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
265
- switch (errorCode) {
266
- case "BadRequestException":
267
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
268
- throw await de_BadRequestExceptionRes(parsedOutput, context);
269
- case "ConflictException":
270
- case "com.amazonaws.serverlessapplicationrepository#ConflictException":
271
- throw await de_ConflictExceptionRes(parsedOutput, context);
272
- case "ForbiddenException":
273
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
274
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
275
- case "InternalServerErrorException":
276
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
277
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
278
- case "TooManyRequestsException":
279
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
280
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
281
- default:
282
- const parsedBody = parsedOutput.body;
283
- return throwDefaultError({
284
- output,
285
- parsedBody,
286
- errorCode,
287
- });
288
- }
289
- };
290
- const de_CreateApplicationVersionCommand = async (output, context) => {
291
- if (output.statusCode !== 201 && output.statusCode >= 300) {
292
- return de_CreateApplicationVersionCommandError(output, context);
293
- }
294
- const contents = (0, smithy_client_1.map)({
295
- $metadata: deserializeMetadata(output),
296
- });
297
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
298
- const doc = (0, smithy_client_1.take)(data, {
299
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
300
- CreationTime: [, smithy_client_1.expectString, `creationTime`],
301
- ParameterDefinitions: [, (_) => de___listOfParameterDefinition(_, context), `parameterDefinitions`],
302
- RequiredCapabilities: [, smithy_client_1._json, `requiredCapabilities`],
303
- ResourcesSupported: [, smithy_client_1.expectBoolean, `resourcesSupported`],
304
- SemanticVersion: [, smithy_client_1.expectString, `semanticVersion`],
305
- SourceCodeArchiveUrl: [, smithy_client_1.expectString, `sourceCodeArchiveUrl`],
306
- SourceCodeUrl: [, smithy_client_1.expectString, `sourceCodeUrl`],
307
- TemplateUrl: [, smithy_client_1.expectString, `templateUrl`],
308
- });
309
- Object.assign(contents, doc);
310
- return contents;
311
- };
312
- exports.de_CreateApplicationVersionCommand = de_CreateApplicationVersionCommand;
313
- const de_CreateApplicationVersionCommandError = async (output, context) => {
314
- const parsedOutput = {
315
- ...output,
316
- body: await parseErrorBody(output.body, context),
317
- };
318
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
319
- switch (errorCode) {
320
- case "BadRequestException":
321
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
322
- throw await de_BadRequestExceptionRes(parsedOutput, context);
323
- case "ConflictException":
324
- case "com.amazonaws.serverlessapplicationrepository#ConflictException":
325
- throw await de_ConflictExceptionRes(parsedOutput, context);
326
- case "ForbiddenException":
327
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
328
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
329
- case "InternalServerErrorException":
330
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
331
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
332
- case "TooManyRequestsException":
333
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
334
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
335
- default:
336
- const parsedBody = parsedOutput.body;
337
- return throwDefaultError({
338
- output,
339
- parsedBody,
340
- errorCode,
341
- });
342
- }
343
- };
344
- const de_CreateCloudFormationChangeSetCommand = async (output, context) => {
345
- if (output.statusCode !== 201 && output.statusCode >= 300) {
346
- return de_CreateCloudFormationChangeSetCommandError(output, context);
347
- }
348
- const contents = (0, smithy_client_1.map)({
349
- $metadata: deserializeMetadata(output),
350
- });
351
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
352
- const doc = (0, smithy_client_1.take)(data, {
353
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
354
- ChangeSetId: [, smithy_client_1.expectString, `changeSetId`],
355
- SemanticVersion: [, smithy_client_1.expectString, `semanticVersion`],
356
- StackId: [, smithy_client_1.expectString, `stackId`],
357
- });
358
- Object.assign(contents, doc);
359
- return contents;
360
- };
361
- exports.de_CreateCloudFormationChangeSetCommand = de_CreateCloudFormationChangeSetCommand;
362
- const de_CreateCloudFormationChangeSetCommandError = async (output, context) => {
363
- const parsedOutput = {
364
- ...output,
365
- body: await parseErrorBody(output.body, context),
366
- };
367
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
368
- switch (errorCode) {
369
- case "BadRequestException":
370
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
371
- throw await de_BadRequestExceptionRes(parsedOutput, context);
372
- case "ForbiddenException":
373
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
374
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
375
- case "InternalServerErrorException":
376
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
377
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
378
- case "TooManyRequestsException":
379
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
380
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
381
- default:
382
- const parsedBody = parsedOutput.body;
383
- return throwDefaultError({
384
- output,
385
- parsedBody,
386
- errorCode,
387
- });
388
- }
389
- };
390
- const de_CreateCloudFormationTemplateCommand = async (output, context) => {
391
- if (output.statusCode !== 201 && output.statusCode >= 300) {
392
- return de_CreateCloudFormationTemplateCommandError(output, context);
393
- }
394
- const contents = (0, smithy_client_1.map)({
395
- $metadata: deserializeMetadata(output),
396
- });
397
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
398
- const doc = (0, smithy_client_1.take)(data, {
399
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
400
- CreationTime: [, smithy_client_1.expectString, `creationTime`],
401
- ExpirationTime: [, smithy_client_1.expectString, `expirationTime`],
402
- SemanticVersion: [, smithy_client_1.expectString, `semanticVersion`],
403
- Status: [, smithy_client_1.expectString, `status`],
404
- TemplateId: [, smithy_client_1.expectString, `templateId`],
405
- TemplateUrl: [, smithy_client_1.expectString, `templateUrl`],
406
- });
407
- Object.assign(contents, doc);
408
- return contents;
409
- };
410
- exports.de_CreateCloudFormationTemplateCommand = de_CreateCloudFormationTemplateCommand;
411
- const de_CreateCloudFormationTemplateCommandError = async (output, context) => {
412
- const parsedOutput = {
413
- ...output,
414
- body: await parseErrorBody(output.body, context),
415
- };
416
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
417
- switch (errorCode) {
418
- case "BadRequestException":
419
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
420
- throw await de_BadRequestExceptionRes(parsedOutput, context);
421
- case "ForbiddenException":
422
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
423
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
424
- case "InternalServerErrorException":
425
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
426
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
427
- case "NotFoundException":
428
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
429
- throw await de_NotFoundExceptionRes(parsedOutput, context);
430
- case "TooManyRequestsException":
431
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
432
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
433
- default:
434
- const parsedBody = parsedOutput.body;
435
- return throwDefaultError({
436
- output,
437
- parsedBody,
438
- errorCode,
439
- });
440
- }
441
- };
442
- const de_DeleteApplicationCommand = async (output, context) => {
443
- if (output.statusCode !== 204 && output.statusCode >= 300) {
444
- return de_DeleteApplicationCommandError(output, context);
445
- }
446
- const contents = (0, smithy_client_1.map)({
447
- $metadata: deserializeMetadata(output),
448
- });
449
- await (0, smithy_client_1.collectBody)(output.body, context);
450
- return contents;
451
- };
452
- exports.de_DeleteApplicationCommand = de_DeleteApplicationCommand;
453
- const de_DeleteApplicationCommandError = async (output, context) => {
454
- const parsedOutput = {
455
- ...output,
456
- body: await parseErrorBody(output.body, context),
457
- };
458
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
459
- switch (errorCode) {
460
- case "BadRequestException":
461
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
462
- throw await de_BadRequestExceptionRes(parsedOutput, context);
463
- case "ConflictException":
464
- case "com.amazonaws.serverlessapplicationrepository#ConflictException":
465
- throw await de_ConflictExceptionRes(parsedOutput, context);
466
- case "ForbiddenException":
467
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
468
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
469
- case "InternalServerErrorException":
470
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
471
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
472
- case "NotFoundException":
473
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
474
- throw await de_NotFoundExceptionRes(parsedOutput, context);
475
- case "TooManyRequestsException":
476
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
477
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
478
- default:
479
- const parsedBody = parsedOutput.body;
480
- return throwDefaultError({
481
- output,
482
- parsedBody,
483
- errorCode,
484
- });
485
- }
486
- };
487
- const de_GetApplicationCommand = async (output, context) => {
488
- if (output.statusCode !== 200 && output.statusCode >= 300) {
489
- return de_GetApplicationCommandError(output, context);
490
- }
491
- const contents = (0, smithy_client_1.map)({
492
- $metadata: deserializeMetadata(output),
493
- });
494
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
495
- const doc = (0, smithy_client_1.take)(data, {
496
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
497
- Author: [, smithy_client_1.expectString, `author`],
498
- CreationTime: [, smithy_client_1.expectString, `creationTime`],
499
- Description: [, smithy_client_1.expectString, `description`],
500
- HomePageUrl: [, smithy_client_1.expectString, `homePageUrl`],
501
- IsVerifiedAuthor: [, smithy_client_1.expectBoolean, `isVerifiedAuthor`],
502
- Labels: [, smithy_client_1._json, `labels`],
503
- LicenseUrl: [, smithy_client_1.expectString, `licenseUrl`],
504
- Name: [, smithy_client_1.expectString, `name`],
505
- ReadmeUrl: [, smithy_client_1.expectString, `readmeUrl`],
506
- SpdxLicenseId: [, smithy_client_1.expectString, `spdxLicenseId`],
507
- VerifiedAuthorUrl: [, smithy_client_1.expectString, `verifiedAuthorUrl`],
508
- Version: [, (_) => de_Version(_, context), `version`],
509
- });
510
- Object.assign(contents, doc);
511
- return contents;
512
- };
513
- exports.de_GetApplicationCommand = de_GetApplicationCommand;
514
- const de_GetApplicationCommandError = async (output, context) => {
515
- const parsedOutput = {
516
- ...output,
517
- body: await parseErrorBody(output.body, context),
518
- };
519
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
520
- switch (errorCode) {
521
- case "BadRequestException":
522
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
523
- throw await de_BadRequestExceptionRes(parsedOutput, context);
524
- case "ForbiddenException":
525
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
526
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
527
- case "InternalServerErrorException":
528
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
529
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
530
- case "NotFoundException":
531
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
532
- throw await de_NotFoundExceptionRes(parsedOutput, context);
533
- case "TooManyRequestsException":
534
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
535
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
536
- default:
537
- const parsedBody = parsedOutput.body;
538
- return throwDefaultError({
539
- output,
540
- parsedBody,
541
- errorCode,
542
- });
543
- }
544
- };
545
- const de_GetApplicationPolicyCommand = async (output, context) => {
546
- if (output.statusCode !== 200 && output.statusCode >= 300) {
547
- return de_GetApplicationPolicyCommandError(output, context);
548
- }
549
- const contents = (0, smithy_client_1.map)({
550
- $metadata: deserializeMetadata(output),
551
- });
552
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
553
- const doc = (0, smithy_client_1.take)(data, {
554
- Statements: [, (_) => de___listOfApplicationPolicyStatement(_, context), `statements`],
555
- });
556
- Object.assign(contents, doc);
557
- return contents;
558
- };
559
- exports.de_GetApplicationPolicyCommand = de_GetApplicationPolicyCommand;
560
- const de_GetApplicationPolicyCommandError = async (output, context) => {
561
- const parsedOutput = {
562
- ...output,
563
- body: await parseErrorBody(output.body, context),
564
- };
565
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
566
- switch (errorCode) {
567
- case "BadRequestException":
568
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
569
- throw await de_BadRequestExceptionRes(parsedOutput, context);
570
- case "ForbiddenException":
571
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
572
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
573
- case "InternalServerErrorException":
574
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
575
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
576
- case "NotFoundException":
577
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
578
- throw await de_NotFoundExceptionRes(parsedOutput, context);
579
- case "TooManyRequestsException":
580
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
581
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
582
- default:
583
- const parsedBody = parsedOutput.body;
584
- return throwDefaultError({
585
- output,
586
- parsedBody,
587
- errorCode,
588
- });
589
- }
590
- };
591
- const de_GetCloudFormationTemplateCommand = async (output, context) => {
592
- if (output.statusCode !== 200 && output.statusCode >= 300) {
593
- return de_GetCloudFormationTemplateCommandError(output, context);
594
- }
595
- const contents = (0, smithy_client_1.map)({
596
- $metadata: deserializeMetadata(output),
597
- });
598
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
599
- const doc = (0, smithy_client_1.take)(data, {
600
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
601
- CreationTime: [, smithy_client_1.expectString, `creationTime`],
602
- ExpirationTime: [, smithy_client_1.expectString, `expirationTime`],
603
- SemanticVersion: [, smithy_client_1.expectString, `semanticVersion`],
604
- Status: [, smithy_client_1.expectString, `status`],
605
- TemplateId: [, smithy_client_1.expectString, `templateId`],
606
- TemplateUrl: [, smithy_client_1.expectString, `templateUrl`],
607
- });
608
- Object.assign(contents, doc);
609
- return contents;
610
- };
611
- exports.de_GetCloudFormationTemplateCommand = de_GetCloudFormationTemplateCommand;
612
- const de_GetCloudFormationTemplateCommandError = async (output, context) => {
613
- const parsedOutput = {
614
- ...output,
615
- body: await parseErrorBody(output.body, context),
616
- };
617
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
618
- switch (errorCode) {
619
- case "BadRequestException":
620
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
621
- throw await de_BadRequestExceptionRes(parsedOutput, context);
622
- case "ForbiddenException":
623
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
624
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
625
- case "InternalServerErrorException":
626
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
627
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
628
- case "NotFoundException":
629
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
630
- throw await de_NotFoundExceptionRes(parsedOutput, context);
631
- case "TooManyRequestsException":
632
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
633
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
634
- default:
635
- const parsedBody = parsedOutput.body;
636
- return throwDefaultError({
637
- output,
638
- parsedBody,
639
- errorCode,
640
- });
641
- }
642
- };
643
- const de_ListApplicationDependenciesCommand = async (output, context) => {
644
- if (output.statusCode !== 200 && output.statusCode >= 300) {
645
- return de_ListApplicationDependenciesCommandError(output, context);
646
- }
647
- const contents = (0, smithy_client_1.map)({
648
- $metadata: deserializeMetadata(output),
649
- });
650
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
651
- const doc = (0, smithy_client_1.take)(data, {
652
- Dependencies: [, (_) => de___listOfApplicationDependencySummary(_, context), `dependencies`],
653
- NextToken: [, smithy_client_1.expectString, `nextToken`],
654
- });
655
- Object.assign(contents, doc);
656
- return contents;
657
- };
658
- exports.de_ListApplicationDependenciesCommand = de_ListApplicationDependenciesCommand;
659
- const de_ListApplicationDependenciesCommandError = async (output, context) => {
660
- const parsedOutput = {
661
- ...output,
662
- body: await parseErrorBody(output.body, context),
663
- };
664
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
665
- switch (errorCode) {
666
- case "BadRequestException":
667
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
668
- throw await de_BadRequestExceptionRes(parsedOutput, context);
669
- case "ForbiddenException":
670
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
671
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
672
- case "InternalServerErrorException":
673
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
674
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
675
- case "NotFoundException":
676
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
677
- throw await de_NotFoundExceptionRes(parsedOutput, context);
678
- case "TooManyRequestsException":
679
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
680
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
681
- default:
682
- const parsedBody = parsedOutput.body;
683
- return throwDefaultError({
684
- output,
685
- parsedBody,
686
- errorCode,
687
- });
688
- }
689
- };
690
- const de_ListApplicationsCommand = async (output, context) => {
691
- if (output.statusCode !== 200 && output.statusCode >= 300) {
692
- return de_ListApplicationsCommandError(output, context);
693
- }
694
- const contents = (0, smithy_client_1.map)({
695
- $metadata: deserializeMetadata(output),
696
- });
697
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
698
- const doc = (0, smithy_client_1.take)(data, {
699
- Applications: [, (_) => de___listOfApplicationSummary(_, context), `applications`],
700
- NextToken: [, smithy_client_1.expectString, `nextToken`],
701
- });
702
- Object.assign(contents, doc);
703
- return contents;
704
- };
705
- exports.de_ListApplicationsCommand = de_ListApplicationsCommand;
706
- const de_ListApplicationsCommandError = async (output, context) => {
707
- const parsedOutput = {
708
- ...output,
709
- body: await parseErrorBody(output.body, context),
710
- };
711
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
712
- switch (errorCode) {
713
- case "BadRequestException":
714
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
715
- throw await de_BadRequestExceptionRes(parsedOutput, context);
716
- case "ForbiddenException":
717
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
718
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
719
- case "InternalServerErrorException":
720
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
721
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
722
- case "NotFoundException":
723
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
724
- throw await de_NotFoundExceptionRes(parsedOutput, context);
725
- default:
726
- const parsedBody = parsedOutput.body;
727
- return throwDefaultError({
728
- output,
729
- parsedBody,
730
- errorCode,
731
- });
732
- }
733
- };
734
- const de_ListApplicationVersionsCommand = async (output, context) => {
735
- if (output.statusCode !== 200 && output.statusCode >= 300) {
736
- return de_ListApplicationVersionsCommandError(output, context);
737
- }
738
- const contents = (0, smithy_client_1.map)({
739
- $metadata: deserializeMetadata(output),
740
- });
741
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
742
- const doc = (0, smithy_client_1.take)(data, {
743
- NextToken: [, smithy_client_1.expectString, `nextToken`],
744
- Versions: [, (_) => de___listOfVersionSummary(_, context), `versions`],
745
- });
746
- Object.assign(contents, doc);
747
- return contents;
748
- };
749
- exports.de_ListApplicationVersionsCommand = de_ListApplicationVersionsCommand;
750
- const de_ListApplicationVersionsCommandError = async (output, context) => {
751
- const parsedOutput = {
752
- ...output,
753
- body: await parseErrorBody(output.body, context),
754
- };
755
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
756
- switch (errorCode) {
757
- case "BadRequestException":
758
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
759
- throw await de_BadRequestExceptionRes(parsedOutput, context);
760
- case "ForbiddenException":
761
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
762
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
763
- case "InternalServerErrorException":
764
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
765
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
766
- case "NotFoundException":
767
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
768
- throw await de_NotFoundExceptionRes(parsedOutput, context);
769
- case "TooManyRequestsException":
770
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
771
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
772
- default:
773
- const parsedBody = parsedOutput.body;
774
- return throwDefaultError({
775
- output,
776
- parsedBody,
777
- errorCode,
778
- });
779
- }
780
- };
781
- const de_PutApplicationPolicyCommand = async (output, context) => {
782
- if (output.statusCode !== 200 && output.statusCode >= 300) {
783
- return de_PutApplicationPolicyCommandError(output, context);
784
- }
785
- const contents = (0, smithy_client_1.map)({
786
- $metadata: deserializeMetadata(output),
787
- });
788
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
789
- const doc = (0, smithy_client_1.take)(data, {
790
- Statements: [, (_) => de___listOfApplicationPolicyStatement(_, context), `statements`],
791
- });
792
- Object.assign(contents, doc);
793
- return contents;
794
- };
795
- exports.de_PutApplicationPolicyCommand = de_PutApplicationPolicyCommand;
796
- const de_PutApplicationPolicyCommandError = async (output, context) => {
797
- const parsedOutput = {
798
- ...output,
799
- body: await parseErrorBody(output.body, context),
800
- };
801
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
802
- switch (errorCode) {
803
- case "BadRequestException":
804
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
805
- throw await de_BadRequestExceptionRes(parsedOutput, context);
806
- case "ForbiddenException":
807
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
808
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
809
- case "InternalServerErrorException":
810
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
811
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
812
- case "NotFoundException":
813
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
814
- throw await de_NotFoundExceptionRes(parsedOutput, context);
815
- case "TooManyRequestsException":
816
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
817
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
818
- default:
819
- const parsedBody = parsedOutput.body;
820
- return throwDefaultError({
821
- output,
822
- parsedBody,
823
- errorCode,
824
- });
825
- }
826
- };
827
- const de_UnshareApplicationCommand = async (output, context) => {
828
- if (output.statusCode !== 204 && output.statusCode >= 300) {
829
- return de_UnshareApplicationCommandError(output, context);
830
- }
831
- const contents = (0, smithy_client_1.map)({
832
- $metadata: deserializeMetadata(output),
833
- });
834
- await (0, smithy_client_1.collectBody)(output.body, context);
835
- return contents;
836
- };
837
- exports.de_UnshareApplicationCommand = de_UnshareApplicationCommand;
838
- const de_UnshareApplicationCommandError = async (output, context) => {
839
- const parsedOutput = {
840
- ...output,
841
- body: await parseErrorBody(output.body, context),
842
- };
843
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
844
- switch (errorCode) {
845
- case "BadRequestException":
846
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
847
- throw await de_BadRequestExceptionRes(parsedOutput, context);
848
- case "ForbiddenException":
849
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
850
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
851
- case "InternalServerErrorException":
852
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
853
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
854
- case "NotFoundException":
855
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
856
- throw await de_NotFoundExceptionRes(parsedOutput, context);
857
- case "TooManyRequestsException":
858
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
859
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
860
- default:
861
- const parsedBody = parsedOutput.body;
862
- return throwDefaultError({
863
- output,
864
- parsedBody,
865
- errorCode,
866
- });
867
- }
868
- };
869
- const de_UpdateApplicationCommand = async (output, context) => {
870
- if (output.statusCode !== 200 && output.statusCode >= 300) {
871
- return de_UpdateApplicationCommandError(output, context);
872
- }
873
- const contents = (0, smithy_client_1.map)({
874
- $metadata: deserializeMetadata(output),
875
- });
876
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
877
- const doc = (0, smithy_client_1.take)(data, {
878
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
879
- Author: [, smithy_client_1.expectString, `author`],
880
- CreationTime: [, smithy_client_1.expectString, `creationTime`],
881
- Description: [, smithy_client_1.expectString, `description`],
882
- HomePageUrl: [, smithy_client_1.expectString, `homePageUrl`],
883
- IsVerifiedAuthor: [, smithy_client_1.expectBoolean, `isVerifiedAuthor`],
884
- Labels: [, smithy_client_1._json, `labels`],
885
- LicenseUrl: [, smithy_client_1.expectString, `licenseUrl`],
886
- Name: [, smithy_client_1.expectString, `name`],
887
- ReadmeUrl: [, smithy_client_1.expectString, `readmeUrl`],
888
- SpdxLicenseId: [, smithy_client_1.expectString, `spdxLicenseId`],
889
- VerifiedAuthorUrl: [, smithy_client_1.expectString, `verifiedAuthorUrl`],
890
- Version: [, (_) => de_Version(_, context), `version`],
891
- });
892
- Object.assign(contents, doc);
893
- return contents;
894
- };
895
- exports.de_UpdateApplicationCommand = de_UpdateApplicationCommand;
896
- const de_UpdateApplicationCommandError = async (output, context) => {
897
- const parsedOutput = {
898
- ...output,
899
- body: await parseErrorBody(output.body, context),
900
- };
901
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
902
- switch (errorCode) {
903
- case "BadRequestException":
904
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
905
- throw await de_BadRequestExceptionRes(parsedOutput, context);
906
- case "ConflictException":
907
- case "com.amazonaws.serverlessapplicationrepository#ConflictException":
908
- throw await de_ConflictExceptionRes(parsedOutput, context);
909
- case "ForbiddenException":
910
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
911
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
912
- case "InternalServerErrorException":
913
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
914
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
915
- case "NotFoundException":
916
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
917
- throw await de_NotFoundExceptionRes(parsedOutput, context);
918
- case "TooManyRequestsException":
919
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
920
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
921
- default:
922
- const parsedBody = parsedOutput.body;
923
- return throwDefaultError({
924
- output,
925
- parsedBody,
926
- errorCode,
927
- });
928
- }
929
- };
930
- const throwDefaultError = (0, smithy_client_1.withBaseException)(ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException);
931
- const de_BadRequestExceptionRes = async (parsedOutput, context) => {
932
- const contents = (0, smithy_client_1.map)({});
933
- const data = parsedOutput.body;
934
- const doc = (0, smithy_client_1.take)(data, {
935
- ErrorCode: [, smithy_client_1.expectString, `errorCode`],
936
- Message: [, smithy_client_1.expectString, `message`],
937
- });
938
- Object.assign(contents, doc);
939
- const exception = new models_0_1.BadRequestException({
940
- $metadata: deserializeMetadata(parsedOutput),
941
- ...contents,
942
- });
943
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
944
- };
945
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
946
- const contents = (0, smithy_client_1.map)({});
947
- const data = parsedOutput.body;
948
- const doc = (0, smithy_client_1.take)(data, {
949
- ErrorCode: [, smithy_client_1.expectString, `errorCode`],
950
- Message: [, smithy_client_1.expectString, `message`],
951
- });
952
- Object.assign(contents, doc);
953
- const exception = new models_0_1.ConflictException({
954
- $metadata: deserializeMetadata(parsedOutput),
955
- ...contents,
956
- });
957
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
958
- };
959
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
960
- const contents = (0, smithy_client_1.map)({});
961
- const data = parsedOutput.body;
962
- const doc = (0, smithy_client_1.take)(data, {
963
- ErrorCode: [, smithy_client_1.expectString, `errorCode`],
964
- Message: [, smithy_client_1.expectString, `message`],
965
- });
966
- Object.assign(contents, doc);
967
- const exception = new models_0_1.ForbiddenException({
968
- $metadata: deserializeMetadata(parsedOutput),
969
- ...contents,
970
- });
971
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
972
- };
973
- const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
974
- const contents = (0, smithy_client_1.map)({});
975
- const data = parsedOutput.body;
976
- const doc = (0, smithy_client_1.take)(data, {
977
- ErrorCode: [, smithy_client_1.expectString, `errorCode`],
978
- Message: [, smithy_client_1.expectString, `message`],
979
- });
980
- Object.assign(contents, doc);
981
- const exception = new models_0_1.InternalServerErrorException({
982
- $metadata: deserializeMetadata(parsedOutput),
983
- ...contents,
984
- });
985
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
986
- };
987
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
988
- const contents = (0, smithy_client_1.map)({});
989
- const data = parsedOutput.body;
990
- const doc = (0, smithy_client_1.take)(data, {
991
- ErrorCode: [, smithy_client_1.expectString, `errorCode`],
992
- Message: [, smithy_client_1.expectString, `message`],
993
- });
994
- Object.assign(contents, doc);
995
- const exception = new models_0_1.NotFoundException({
996
- $metadata: deserializeMetadata(parsedOutput),
997
- ...contents,
998
- });
999
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1000
- };
1001
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1002
- const contents = (0, smithy_client_1.map)({});
1003
- const data = parsedOutput.body;
1004
- const doc = (0, smithy_client_1.take)(data, {
1005
- ErrorCode: [, smithy_client_1.expectString, `errorCode`],
1006
- Message: [, smithy_client_1.expectString, `message`],
1007
- });
1008
- Object.assign(contents, doc);
1009
- const exception = new models_0_1.TooManyRequestsException({
1010
- $metadata: deserializeMetadata(parsedOutput),
1011
- ...contents,
1012
- });
1013
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1014
- };
1015
- const se___listOfApplicationPolicyStatement = (input, context) => {
1016
- return input
1017
- .filter((e) => e != null)
1018
- .map((entry) => {
1019
- return se_ApplicationPolicyStatement(entry, context);
1020
- });
1021
- };
1022
- const se___listOfParameterValue = (input, context) => {
1023
- return input
1024
- .filter((e) => e != null)
1025
- .map((entry) => {
1026
- return se_ParameterValue(entry, context);
1027
- });
1028
- };
1029
- const se___listOfRollbackTrigger = (input, context) => {
1030
- return input
1031
- .filter((e) => e != null)
1032
- .map((entry) => {
1033
- return se_RollbackTrigger(entry, context);
1034
- });
1035
- };
1036
- const se___listOfTag = (input, context) => {
1037
- return input
1038
- .filter((e) => e != null)
1039
- .map((entry) => {
1040
- return se_Tag(entry, context);
1041
- });
1042
- };
1043
- const se_ApplicationPolicyStatement = (input, context) => {
1044
- return (0, smithy_client_1.take)(input, {
1045
- actions: [, smithy_client_1._json, `Actions`],
1046
- principalOrgIDs: [, smithy_client_1._json, `PrincipalOrgIDs`],
1047
- principals: [, smithy_client_1._json, `Principals`],
1048
- statementId: [, , `StatementId`],
1049
- });
1050
- };
1051
- const se_ParameterValue = (input, context) => {
1052
- return (0, smithy_client_1.take)(input, {
1053
- name: [, , `Name`],
1054
- value: [, , `Value`],
1055
- });
1056
- };
1057
- const se_RollbackConfiguration = (input, context) => {
1058
- return (0, smithy_client_1.take)(input, {
1059
- monitoringTimeInMinutes: [, , `MonitoringTimeInMinutes`],
1060
- rollbackTriggers: [, (_) => se___listOfRollbackTrigger(_, context), `RollbackTriggers`],
1061
- });
1062
- };
1063
- const se_RollbackTrigger = (input, context) => {
1064
- return (0, smithy_client_1.take)(input, {
1065
- arn: [, , `Arn`],
1066
- type: [, , `Type`],
1067
- });
1068
- };
1069
- const se_Tag = (input, context) => {
1070
- return (0, smithy_client_1.take)(input, {
1071
- key: [, , `Key`],
1072
- value: [, , `Value`],
1073
- });
1074
- };
1075
- const de___listOfApplicationDependencySummary = (output, context) => {
1076
- const retVal = (output || [])
1077
- .filter((e) => e != null)
1078
- .map((entry) => {
1079
- return de_ApplicationDependencySummary(entry, context);
1080
- });
1081
- return retVal;
1082
- };
1083
- const de___listOfApplicationPolicyStatement = (output, context) => {
1084
- const retVal = (output || [])
1085
- .filter((e) => e != null)
1086
- .map((entry) => {
1087
- return de_ApplicationPolicyStatement(entry, context);
1088
- });
1089
- return retVal;
1090
- };
1091
- const de___listOfApplicationSummary = (output, context) => {
1092
- const retVal = (output || [])
1093
- .filter((e) => e != null)
1094
- .map((entry) => {
1095
- return de_ApplicationSummary(entry, context);
1096
- });
1097
- return retVal;
1098
- };
1099
- const de___listOfParameterDefinition = (output, context) => {
1100
- const retVal = (output || [])
1101
- .filter((e) => e != null)
1102
- .map((entry) => {
1103
- return de_ParameterDefinition(entry, context);
1104
- });
1105
- return retVal;
1106
- };
1107
- const de___listOfVersionSummary = (output, context) => {
1108
- const retVal = (output || [])
1109
- .filter((e) => e != null)
1110
- .map((entry) => {
1111
- return de_VersionSummary(entry, context);
1112
- });
1113
- return retVal;
1114
- };
1115
- const de_ApplicationDependencySummary = (output, context) => {
1116
- return (0, smithy_client_1.take)(output, {
1117
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
1118
- SemanticVersion: [, smithy_client_1.expectString, `semanticVersion`],
1119
- });
1120
- };
1121
- const de_ApplicationPolicyStatement = (output, context) => {
1122
- return (0, smithy_client_1.take)(output, {
1123
- Actions: [, smithy_client_1._json, `actions`],
1124
- PrincipalOrgIDs: [, smithy_client_1._json, `principalOrgIDs`],
1125
- Principals: [, smithy_client_1._json, `principals`],
1126
- StatementId: [, smithy_client_1.expectString, `statementId`],
1127
- });
1128
- };
1129
- const de_ApplicationSummary = (output, context) => {
1130
- return (0, smithy_client_1.take)(output, {
1131
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
1132
- Author: [, smithy_client_1.expectString, `author`],
1133
- CreationTime: [, smithy_client_1.expectString, `creationTime`],
1134
- Description: [, smithy_client_1.expectString, `description`],
1135
- HomePageUrl: [, smithy_client_1.expectString, `homePageUrl`],
1136
- Labels: [, smithy_client_1._json, `labels`],
1137
- Name: [, smithy_client_1.expectString, `name`],
1138
- SpdxLicenseId: [, smithy_client_1.expectString, `spdxLicenseId`],
1139
- });
1140
- };
1141
- const de_ParameterDefinition = (output, context) => {
1142
- return (0, smithy_client_1.take)(output, {
1143
- AllowedPattern: [, smithy_client_1.expectString, `allowedPattern`],
1144
- AllowedValues: [, smithy_client_1._json, `allowedValues`],
1145
- ConstraintDescription: [, smithy_client_1.expectString, `constraintDescription`],
1146
- DefaultValue: [, smithy_client_1.expectString, `defaultValue`],
1147
- Description: [, smithy_client_1.expectString, `description`],
1148
- MaxLength: [, smithy_client_1.expectInt32, `maxLength`],
1149
- MaxValue: [, smithy_client_1.expectInt32, `maxValue`],
1150
- MinLength: [, smithy_client_1.expectInt32, `minLength`],
1151
- MinValue: [, smithy_client_1.expectInt32, `minValue`],
1152
- Name: [, smithy_client_1.expectString, `name`],
1153
- NoEcho: [, smithy_client_1.expectBoolean, `noEcho`],
1154
- ReferencedByResources: [, smithy_client_1._json, `referencedByResources`],
1155
- Type: [, smithy_client_1.expectString, `type`],
1156
- });
1157
- };
1158
- const de_Version = (output, context) => {
1159
- return (0, smithy_client_1.take)(output, {
1160
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
1161
- CreationTime: [, smithy_client_1.expectString, `creationTime`],
1162
- ParameterDefinitions: [, (_) => de___listOfParameterDefinition(_, context), `parameterDefinitions`],
1163
- RequiredCapabilities: [, smithy_client_1._json, `requiredCapabilities`],
1164
- ResourcesSupported: [, smithy_client_1.expectBoolean, `resourcesSupported`],
1165
- SemanticVersion: [, smithy_client_1.expectString, `semanticVersion`],
1166
- SourceCodeArchiveUrl: [, smithy_client_1.expectString, `sourceCodeArchiveUrl`],
1167
- SourceCodeUrl: [, smithy_client_1.expectString, `sourceCodeUrl`],
1168
- TemplateUrl: [, smithy_client_1.expectString, `templateUrl`],
1169
- });
1170
- };
1171
- const de_VersionSummary = (output, context) => {
1172
- return (0, smithy_client_1.take)(output, {
1173
- ApplicationId: [, smithy_client_1.expectString, `applicationId`],
1174
- CreationTime: [, smithy_client_1.expectString, `creationTime`],
1175
- SemanticVersion: [, smithy_client_1.expectString, `semanticVersion`],
1176
- SourceCodeUrl: [, smithy_client_1.expectString, `sourceCodeUrl`],
1177
- });
1178
- };
1179
- const deserializeMetadata = (output) => ({
1180
- httpStatusCode: output.statusCode,
1181
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1182
- extendedRequestId: output.headers["x-amz-id-2"],
1183
- cfId: output.headers["x-amz-cf-id"],
1184
- });
1185
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1186
- const isSerializableHeaderValue = (value) => value !== undefined &&
1187
- value !== null &&
1188
- value !== "" &&
1189
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
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";
1197
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1198
- if (encoded.length) {
1199
- return JSON.parse(encoded);
1200
- }
1201
- return {};
1202
- });
1203
- const parseErrorBody = async (errorBody, context) => {
1204
- const value = await parseBody(errorBody, context);
1205
- value.message = value.message ?? value.Message;
1206
- return value;
1207
- };
1208
- const loadRestJsonErrorCode = (output, data) => {
1209
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1210
- const sanitizeErrorCode = (rawValue) => {
1211
- let cleanValue = rawValue;
1212
- if (typeof cleanValue === "number") {
1213
- cleanValue = cleanValue.toString();
1214
- }
1215
- if (cleanValue.indexOf(",") >= 0) {
1216
- cleanValue = cleanValue.split(",")[0];
1217
- }
1218
- if (cleanValue.indexOf(":") >= 0) {
1219
- cleanValue = cleanValue.split(":")[0];
1220
- }
1221
- if (cleanValue.indexOf("#") >= 0) {
1222
- cleanValue = cleanValue.split("#")[1];
1223
- }
1224
- return cleanValue;
1225
- };
1226
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1227
- if (headerKey !== undefined) {
1228
- return sanitizeErrorCode(output.headers[headerKey]);
1229
- }
1230
- if (data.code !== undefined) {
1231
- return sanitizeErrorCode(data.code);
1232
- }
1233
- if (data["__type"] !== undefined) {
1234
- return sanitizeErrorCode(data["__type"]);
1235
- }
1236
- };
1
+ module.exports = require("../index.js");