@aws-sdk/client-serverlessapplicationrepository 3.928.0 → 3.929.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 (35) hide show
  1. package/dist-cjs/index.js +1908 -870
  2. package/dist-cjs/runtimeConfig.shared.js +3 -0
  3. package/dist-es/ServerlessApplicationRepositoryClient.js +2 -0
  4. package/dist-es/commands/CreateApplicationCommand.js +3 -9
  5. package/dist-es/commands/CreateApplicationVersionCommand.js +3 -9
  6. package/dist-es/commands/CreateCloudFormationChangeSetCommand.js +3 -9
  7. package/dist-es/commands/CreateCloudFormationTemplateCommand.js +3 -9
  8. package/dist-es/commands/DeleteApplicationCommand.js +3 -9
  9. package/dist-es/commands/GetApplicationCommand.js +3 -9
  10. package/dist-es/commands/GetApplicationPolicyCommand.js +3 -9
  11. package/dist-es/commands/GetCloudFormationTemplateCommand.js +3 -9
  12. package/dist-es/commands/ListApplicationDependenciesCommand.js +3 -9
  13. package/dist-es/commands/ListApplicationVersionsCommand.js +3 -9
  14. package/dist-es/commands/ListApplicationsCommand.js +3 -9
  15. package/dist-es/commands/PutApplicationPolicyCommand.js +3 -9
  16. package/dist-es/commands/UnshareApplicationCommand.js +3 -9
  17. package/dist-es/commands/UpdateApplicationCommand.js +3 -9
  18. package/dist-es/runtimeConfig.shared.js +3 -0
  19. package/dist-es/schemas/schemas_0.js +1868 -0
  20. package/dist-types/ServerlessApplicationRepositoryClient.d.ts +10 -1
  21. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  22. package/dist-types/runtimeConfig.d.ts +1 -0
  23. package/dist-types/runtimeConfig.native.d.ts +1 -0
  24. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  25. package/dist-types/schemas/schemas_0.d.ts +69 -0
  26. package/dist-types/ts3.4/ServerlessApplicationRepositoryClient.d.ts +4 -0
  27. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  28. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  29. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  30. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  31. package/dist-types/ts3.4/schemas/schemas_0.d.ts +74 -0
  32. package/package.json +2 -2
  33. package/dist-es/protocols/Aws_restJson1.js +0 -761
  34. package/dist-types/protocols/Aws_restJson1.d.ts +0 -128
  35. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -173
@@ -1,761 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- 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";
4
- import { BadRequestException, ConflictException, ForbiddenException, InternalServerErrorException, NotFoundException, TooManyRequestsException, } from "../models/models_0";
5
- import { ServerlessApplicationRepositoryServiceException as __BaseException } from "../models/ServerlessApplicationRepositoryServiceException";
6
- export const se_CreateApplicationCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = {
9
- "content-type": "application/json",
10
- };
11
- b.bp("/applications");
12
- let body;
13
- body = JSON.stringify(take(input, {
14
- author: [, , `Author`],
15
- description: [, , `Description`],
16
- homePageUrl: [, , `HomePageUrl`],
17
- labels: [, (_) => _json(_), `Labels`],
18
- licenseBody: [, , `LicenseBody`],
19
- licenseUrl: [, , `LicenseUrl`],
20
- name: [, , `Name`],
21
- readmeBody: [, , `ReadmeBody`],
22
- readmeUrl: [, , `ReadmeUrl`],
23
- semanticVersion: [, , `SemanticVersion`],
24
- sourceCodeArchiveUrl: [, , `SourceCodeArchiveUrl`],
25
- sourceCodeUrl: [, , `SourceCodeUrl`],
26
- spdxLicenseId: [, , `SpdxLicenseId`],
27
- templateBody: [, , `TemplateBody`],
28
- templateUrl: [, , `TemplateUrl`],
29
- }));
30
- b.m("POST").h(headers).b(body);
31
- return b.build();
32
- };
33
- export const se_CreateApplicationVersionCommand = async (input, context) => {
34
- const b = rb(input, context);
35
- const headers = {
36
- "content-type": "application/json",
37
- };
38
- b.bp("/applications/{ApplicationId}/versions/{SemanticVersion}");
39
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
40
- b.p("SemanticVersion", () => input.SemanticVersion, "{SemanticVersion}", false);
41
- let body;
42
- body = JSON.stringify(take(input, {
43
- sourceCodeArchiveUrl: [, , `SourceCodeArchiveUrl`],
44
- sourceCodeUrl: [, , `SourceCodeUrl`],
45
- templateBody: [, , `TemplateBody`],
46
- templateUrl: [, , `TemplateUrl`],
47
- }));
48
- b.m("PUT").h(headers).b(body);
49
- return b.build();
50
- };
51
- export const se_CreateCloudFormationChangeSetCommand = async (input, context) => {
52
- const b = rb(input, context);
53
- const headers = {
54
- "content-type": "application/json",
55
- };
56
- b.bp("/applications/{ApplicationId}/changesets");
57
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
58
- let body;
59
- body = JSON.stringify(take(input, {
60
- capabilities: [, (_) => _json(_), `Capabilities`],
61
- changeSetName: [, , `ChangeSetName`],
62
- clientToken: [, , `ClientToken`],
63
- description: [, , `Description`],
64
- notificationArns: [, (_) => _json(_), `NotificationArns`],
65
- parameterOverrides: [, (_) => se___listOfParameterValue(_, context), `ParameterOverrides`],
66
- resourceTypes: [, (_) => _json(_), `ResourceTypes`],
67
- rollbackConfiguration: [, (_) => se_RollbackConfiguration(_, context), `RollbackConfiguration`],
68
- semanticVersion: [, , `SemanticVersion`],
69
- stackName: [, , `StackName`],
70
- tags: [, (_) => se___listOfTag(_, context), `Tags`],
71
- templateId: [, , `TemplateId`],
72
- }));
73
- b.m("POST").h(headers).b(body);
74
- return b.build();
75
- };
76
- export const se_CreateCloudFormationTemplateCommand = async (input, context) => {
77
- const b = rb(input, context);
78
- const headers = {
79
- "content-type": "application/json",
80
- };
81
- b.bp("/applications/{ApplicationId}/templates");
82
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
83
- let body;
84
- body = JSON.stringify(take(input, {
85
- semanticVersion: [, , `SemanticVersion`],
86
- }));
87
- b.m("POST").h(headers).b(body);
88
- return b.build();
89
- };
90
- export const se_DeleteApplicationCommand = async (input, context) => {
91
- const b = rb(input, context);
92
- const headers = {};
93
- b.bp("/applications/{ApplicationId}");
94
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
95
- let body;
96
- b.m("DELETE").h(headers).b(body);
97
- return b.build();
98
- };
99
- export const se_GetApplicationCommand = async (input, context) => {
100
- const b = rb(input, context);
101
- const headers = {};
102
- b.bp("/applications/{ApplicationId}");
103
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
104
- const query = map({
105
- [_sV]: [, input[_SV]],
106
- });
107
- let body;
108
- b.m("GET").h(headers).q(query).b(body);
109
- return b.build();
110
- };
111
- export const se_GetApplicationPolicyCommand = async (input, context) => {
112
- const b = rb(input, context);
113
- const headers = {};
114
- b.bp("/applications/{ApplicationId}/policy");
115
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
116
- let body;
117
- b.m("GET").h(headers).b(body);
118
- return b.build();
119
- };
120
- export const se_GetCloudFormationTemplateCommand = async (input, context) => {
121
- const b = rb(input, context);
122
- const headers = {};
123
- b.bp("/applications/{ApplicationId}/templates/{TemplateId}");
124
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
125
- b.p("TemplateId", () => input.TemplateId, "{TemplateId}", false);
126
- let body;
127
- b.m("GET").h(headers).b(body);
128
- return b.build();
129
- };
130
- export const se_ListApplicationDependenciesCommand = async (input, context) => {
131
- const b = rb(input, context);
132
- const headers = {};
133
- b.bp("/applications/{ApplicationId}/dependencies");
134
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
135
- const query = map({
136
- [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
137
- [_nT]: [, input[_NT]],
138
- [_sV]: [, input[_SV]],
139
- });
140
- let body;
141
- b.m("GET").h(headers).q(query).b(body);
142
- return b.build();
143
- };
144
- export const se_ListApplicationsCommand = async (input, context) => {
145
- const b = rb(input, context);
146
- const headers = {};
147
- b.bp("/applications");
148
- const query = map({
149
- [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
150
- [_nT]: [, input[_NT]],
151
- });
152
- let body;
153
- b.m("GET").h(headers).q(query).b(body);
154
- return b.build();
155
- };
156
- export const se_ListApplicationVersionsCommand = async (input, context) => {
157
- const b = rb(input, context);
158
- const headers = {};
159
- b.bp("/applications/{ApplicationId}/versions");
160
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
161
- const query = map({
162
- [_mI]: [() => input.MaxItems !== void 0, () => input[_MI].toString()],
163
- [_nT]: [, input[_NT]],
164
- });
165
- let body;
166
- b.m("GET").h(headers).q(query).b(body);
167
- return b.build();
168
- };
169
- export const se_PutApplicationPolicyCommand = async (input, context) => {
170
- const b = rb(input, context);
171
- const headers = {
172
- "content-type": "application/json",
173
- };
174
- b.bp("/applications/{ApplicationId}/policy");
175
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
176
- let body;
177
- body = JSON.stringify(take(input, {
178
- statements: [, (_) => se___listOfApplicationPolicyStatement(_, context), `Statements`],
179
- }));
180
- b.m("PUT").h(headers).b(body);
181
- return b.build();
182
- };
183
- export const se_UnshareApplicationCommand = async (input, context) => {
184
- const b = rb(input, context);
185
- const headers = {
186
- "content-type": "application/json",
187
- };
188
- b.bp("/applications/{ApplicationId}/unshare");
189
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
190
- let body;
191
- body = JSON.stringify(take(input, {
192
- organizationId: [, , `OrganizationId`],
193
- }));
194
- b.m("POST").h(headers).b(body);
195
- return b.build();
196
- };
197
- export const se_UpdateApplicationCommand = async (input, context) => {
198
- const b = rb(input, context);
199
- const headers = {
200
- "content-type": "application/json",
201
- };
202
- b.bp("/applications/{ApplicationId}");
203
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
204
- let body;
205
- body = JSON.stringify(take(input, {
206
- author: [, , `Author`],
207
- description: [, , `Description`],
208
- homePageUrl: [, , `HomePageUrl`],
209
- labels: [, (_) => _json(_), `Labels`],
210
- readmeBody: [, , `ReadmeBody`],
211
- readmeUrl: [, , `ReadmeUrl`],
212
- }));
213
- b.m("PATCH").h(headers).b(body);
214
- return b.build();
215
- };
216
- export const de_CreateApplicationCommand = async (output, context) => {
217
- if (output.statusCode !== 201 && output.statusCode >= 300) {
218
- return de_CommandError(output, context);
219
- }
220
- const contents = map({
221
- $metadata: deserializeMetadata(output),
222
- });
223
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
224
- const doc = take(data, {
225
- ApplicationId: [, __expectString, `applicationId`],
226
- Author: [, __expectString, `author`],
227
- CreationTime: [, __expectString, `creationTime`],
228
- Description: [, __expectString, `description`],
229
- HomePageUrl: [, __expectString, `homePageUrl`],
230
- IsVerifiedAuthor: [, __expectBoolean, `isVerifiedAuthor`],
231
- Labels: [, _json, `labels`],
232
- LicenseUrl: [, __expectString, `licenseUrl`],
233
- Name: [, __expectString, `name`],
234
- ReadmeUrl: [, __expectString, `readmeUrl`],
235
- SpdxLicenseId: [, __expectString, `spdxLicenseId`],
236
- VerifiedAuthorUrl: [, __expectString, `verifiedAuthorUrl`],
237
- Version: [, (_) => de_Version(_, context), `version`],
238
- });
239
- Object.assign(contents, doc);
240
- return contents;
241
- };
242
- export const de_CreateApplicationVersionCommand = async (output, context) => {
243
- if (output.statusCode !== 201 && output.statusCode >= 300) {
244
- return de_CommandError(output, context);
245
- }
246
- const contents = map({
247
- $metadata: deserializeMetadata(output),
248
- });
249
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
250
- const doc = take(data, {
251
- ApplicationId: [, __expectString, `applicationId`],
252
- CreationTime: [, __expectString, `creationTime`],
253
- ParameterDefinitions: [, (_) => de___listOfParameterDefinition(_, context), `parameterDefinitions`],
254
- RequiredCapabilities: [, _json, `requiredCapabilities`],
255
- ResourcesSupported: [, __expectBoolean, `resourcesSupported`],
256
- SemanticVersion: [, __expectString, `semanticVersion`],
257
- SourceCodeArchiveUrl: [, __expectString, `sourceCodeArchiveUrl`],
258
- SourceCodeUrl: [, __expectString, `sourceCodeUrl`],
259
- TemplateUrl: [, __expectString, `templateUrl`],
260
- });
261
- Object.assign(contents, doc);
262
- return contents;
263
- };
264
- export const de_CreateCloudFormationChangeSetCommand = async (output, context) => {
265
- if (output.statusCode !== 201 && output.statusCode >= 300) {
266
- return de_CommandError(output, context);
267
- }
268
- const contents = map({
269
- $metadata: deserializeMetadata(output),
270
- });
271
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
272
- const doc = take(data, {
273
- ApplicationId: [, __expectString, `applicationId`],
274
- ChangeSetId: [, __expectString, `changeSetId`],
275
- SemanticVersion: [, __expectString, `semanticVersion`],
276
- StackId: [, __expectString, `stackId`],
277
- });
278
- Object.assign(contents, doc);
279
- return contents;
280
- };
281
- export const de_CreateCloudFormationTemplateCommand = async (output, context) => {
282
- if (output.statusCode !== 201 && output.statusCode >= 300) {
283
- return de_CommandError(output, context);
284
- }
285
- const contents = map({
286
- $metadata: deserializeMetadata(output),
287
- });
288
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
289
- const doc = take(data, {
290
- ApplicationId: [, __expectString, `applicationId`],
291
- CreationTime: [, __expectString, `creationTime`],
292
- ExpirationTime: [, __expectString, `expirationTime`],
293
- SemanticVersion: [, __expectString, `semanticVersion`],
294
- Status: [, __expectString, `status`],
295
- TemplateId: [, __expectString, `templateId`],
296
- TemplateUrl: [, __expectString, `templateUrl`],
297
- });
298
- Object.assign(contents, doc);
299
- return contents;
300
- };
301
- export const de_DeleteApplicationCommand = async (output, context) => {
302
- if (output.statusCode !== 204 && output.statusCode >= 300) {
303
- return de_CommandError(output, context);
304
- }
305
- const contents = map({
306
- $metadata: deserializeMetadata(output),
307
- });
308
- await collectBody(output.body, context);
309
- return contents;
310
- };
311
- export const de_GetApplicationCommand = async (output, context) => {
312
- if (output.statusCode !== 200 && output.statusCode >= 300) {
313
- return de_CommandError(output, context);
314
- }
315
- const contents = map({
316
- $metadata: deserializeMetadata(output),
317
- });
318
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
319
- const doc = take(data, {
320
- ApplicationId: [, __expectString, `applicationId`],
321
- Author: [, __expectString, `author`],
322
- CreationTime: [, __expectString, `creationTime`],
323
- Description: [, __expectString, `description`],
324
- HomePageUrl: [, __expectString, `homePageUrl`],
325
- IsVerifiedAuthor: [, __expectBoolean, `isVerifiedAuthor`],
326
- Labels: [, _json, `labels`],
327
- LicenseUrl: [, __expectString, `licenseUrl`],
328
- Name: [, __expectString, `name`],
329
- ReadmeUrl: [, __expectString, `readmeUrl`],
330
- SpdxLicenseId: [, __expectString, `spdxLicenseId`],
331
- VerifiedAuthorUrl: [, __expectString, `verifiedAuthorUrl`],
332
- Version: [, (_) => de_Version(_, context), `version`],
333
- });
334
- Object.assign(contents, doc);
335
- return contents;
336
- };
337
- export const de_GetApplicationPolicyCommand = async (output, context) => {
338
- if (output.statusCode !== 200 && output.statusCode >= 300) {
339
- return de_CommandError(output, context);
340
- }
341
- const contents = map({
342
- $metadata: deserializeMetadata(output),
343
- });
344
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
345
- const doc = take(data, {
346
- Statements: [, (_) => de___listOfApplicationPolicyStatement(_, context), `statements`],
347
- });
348
- Object.assign(contents, doc);
349
- return contents;
350
- };
351
- export const de_GetCloudFormationTemplateCommand = async (output, context) => {
352
- if (output.statusCode !== 200 && output.statusCode >= 300) {
353
- return de_CommandError(output, context);
354
- }
355
- const contents = map({
356
- $metadata: deserializeMetadata(output),
357
- });
358
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
359
- const doc = take(data, {
360
- ApplicationId: [, __expectString, `applicationId`],
361
- CreationTime: [, __expectString, `creationTime`],
362
- ExpirationTime: [, __expectString, `expirationTime`],
363
- SemanticVersion: [, __expectString, `semanticVersion`],
364
- Status: [, __expectString, `status`],
365
- TemplateId: [, __expectString, `templateId`],
366
- TemplateUrl: [, __expectString, `templateUrl`],
367
- });
368
- Object.assign(contents, doc);
369
- return contents;
370
- };
371
- export const de_ListApplicationDependenciesCommand = async (output, context) => {
372
- if (output.statusCode !== 200 && output.statusCode >= 300) {
373
- return de_CommandError(output, context);
374
- }
375
- const contents = map({
376
- $metadata: deserializeMetadata(output),
377
- });
378
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
379
- const doc = take(data, {
380
- Dependencies: [, (_) => de___listOfApplicationDependencySummary(_, context), `dependencies`],
381
- NextToken: [, __expectString, `nextToken`],
382
- });
383
- Object.assign(contents, doc);
384
- return contents;
385
- };
386
- export const de_ListApplicationsCommand = async (output, context) => {
387
- if (output.statusCode !== 200 && output.statusCode >= 300) {
388
- return de_CommandError(output, context);
389
- }
390
- const contents = map({
391
- $metadata: deserializeMetadata(output),
392
- });
393
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
394
- const doc = take(data, {
395
- Applications: [, (_) => de___listOfApplicationSummary(_, context), `applications`],
396
- NextToken: [, __expectString, `nextToken`],
397
- });
398
- Object.assign(contents, doc);
399
- return contents;
400
- };
401
- export const de_ListApplicationVersionsCommand = async (output, context) => {
402
- if (output.statusCode !== 200 && output.statusCode >= 300) {
403
- return de_CommandError(output, context);
404
- }
405
- const contents = map({
406
- $metadata: deserializeMetadata(output),
407
- });
408
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
409
- const doc = take(data, {
410
- NextToken: [, __expectString, `nextToken`],
411
- Versions: [, (_) => de___listOfVersionSummary(_, context), `versions`],
412
- });
413
- Object.assign(contents, doc);
414
- return contents;
415
- };
416
- export const de_PutApplicationPolicyCommand = async (output, context) => {
417
- if (output.statusCode !== 200 && output.statusCode >= 300) {
418
- return de_CommandError(output, context);
419
- }
420
- const contents = map({
421
- $metadata: deserializeMetadata(output),
422
- });
423
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
424
- const doc = take(data, {
425
- Statements: [, (_) => de___listOfApplicationPolicyStatement(_, context), `statements`],
426
- });
427
- Object.assign(contents, doc);
428
- return contents;
429
- };
430
- export const de_UnshareApplicationCommand = async (output, context) => {
431
- if (output.statusCode !== 204 && output.statusCode >= 300) {
432
- return de_CommandError(output, context);
433
- }
434
- const contents = map({
435
- $metadata: deserializeMetadata(output),
436
- });
437
- await collectBody(output.body, context);
438
- return contents;
439
- };
440
- export const de_UpdateApplicationCommand = async (output, context) => {
441
- if (output.statusCode !== 200 && output.statusCode >= 300) {
442
- return de_CommandError(output, context);
443
- }
444
- const contents = map({
445
- $metadata: deserializeMetadata(output),
446
- });
447
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
448
- const doc = take(data, {
449
- ApplicationId: [, __expectString, `applicationId`],
450
- Author: [, __expectString, `author`],
451
- CreationTime: [, __expectString, `creationTime`],
452
- Description: [, __expectString, `description`],
453
- HomePageUrl: [, __expectString, `homePageUrl`],
454
- IsVerifiedAuthor: [, __expectBoolean, `isVerifiedAuthor`],
455
- Labels: [, _json, `labels`],
456
- LicenseUrl: [, __expectString, `licenseUrl`],
457
- Name: [, __expectString, `name`],
458
- ReadmeUrl: [, __expectString, `readmeUrl`],
459
- SpdxLicenseId: [, __expectString, `spdxLicenseId`],
460
- VerifiedAuthorUrl: [, __expectString, `verifiedAuthorUrl`],
461
- Version: [, (_) => de_Version(_, context), `version`],
462
- });
463
- Object.assign(contents, doc);
464
- return contents;
465
- };
466
- const de_CommandError = async (output, context) => {
467
- const parsedOutput = {
468
- ...output,
469
- body: await parseErrorBody(output.body, context),
470
- };
471
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
472
- switch (errorCode) {
473
- case "BadRequestException":
474
- case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
475
- throw await de_BadRequestExceptionRes(parsedOutput, context);
476
- case "ConflictException":
477
- case "com.amazonaws.serverlessapplicationrepository#ConflictException":
478
- throw await de_ConflictExceptionRes(parsedOutput, context);
479
- case "ForbiddenException":
480
- case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
481
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
482
- case "InternalServerErrorException":
483
- case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
484
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
485
- case "TooManyRequestsException":
486
- case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
487
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
488
- case "NotFoundException":
489
- case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
490
- throw await de_NotFoundExceptionRes(parsedOutput, context);
491
- default:
492
- const parsedBody = parsedOutput.body;
493
- return throwDefaultError({
494
- output,
495
- parsedBody,
496
- errorCode,
497
- });
498
- }
499
- };
500
- const throwDefaultError = withBaseException(__BaseException);
501
- const de_BadRequestExceptionRes = async (parsedOutput, context) => {
502
- const contents = map({});
503
- const data = parsedOutput.body;
504
- const doc = take(data, {
505
- ErrorCode: [, __expectString, `errorCode`],
506
- Message: [, __expectString, `message`],
507
- });
508
- Object.assign(contents, doc);
509
- const exception = new BadRequestException({
510
- $metadata: deserializeMetadata(parsedOutput),
511
- ...contents,
512
- });
513
- return __decorateServiceException(exception, parsedOutput.body);
514
- };
515
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
516
- const contents = map({});
517
- const data = parsedOutput.body;
518
- const doc = take(data, {
519
- ErrorCode: [, __expectString, `errorCode`],
520
- Message: [, __expectString, `message`],
521
- });
522
- Object.assign(contents, doc);
523
- const exception = new ConflictException({
524
- $metadata: deserializeMetadata(parsedOutput),
525
- ...contents,
526
- });
527
- return __decorateServiceException(exception, parsedOutput.body);
528
- };
529
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
530
- const contents = map({});
531
- const data = parsedOutput.body;
532
- const doc = take(data, {
533
- ErrorCode: [, __expectString, `errorCode`],
534
- Message: [, __expectString, `message`],
535
- });
536
- Object.assign(contents, doc);
537
- const exception = new ForbiddenException({
538
- $metadata: deserializeMetadata(parsedOutput),
539
- ...contents,
540
- });
541
- return __decorateServiceException(exception, parsedOutput.body);
542
- };
543
- const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
544
- const contents = map({});
545
- const data = parsedOutput.body;
546
- const doc = take(data, {
547
- ErrorCode: [, __expectString, `errorCode`],
548
- Message: [, __expectString, `message`],
549
- });
550
- Object.assign(contents, doc);
551
- const exception = new InternalServerErrorException({
552
- $metadata: deserializeMetadata(parsedOutput),
553
- ...contents,
554
- });
555
- return __decorateServiceException(exception, parsedOutput.body);
556
- };
557
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
558
- const contents = map({});
559
- const data = parsedOutput.body;
560
- const doc = take(data, {
561
- ErrorCode: [, __expectString, `errorCode`],
562
- Message: [, __expectString, `message`],
563
- });
564
- Object.assign(contents, doc);
565
- const exception = new NotFoundException({
566
- $metadata: deserializeMetadata(parsedOutput),
567
- ...contents,
568
- });
569
- return __decorateServiceException(exception, parsedOutput.body);
570
- };
571
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
572
- const contents = map({});
573
- const data = parsedOutput.body;
574
- const doc = take(data, {
575
- ErrorCode: [, __expectString, `errorCode`],
576
- Message: [, __expectString, `message`],
577
- });
578
- Object.assign(contents, doc);
579
- const exception = new TooManyRequestsException({
580
- $metadata: deserializeMetadata(parsedOutput),
581
- ...contents,
582
- });
583
- return __decorateServiceException(exception, parsedOutput.body);
584
- };
585
- const se___listOfApplicationPolicyStatement = (input, context) => {
586
- return input
587
- .filter((e) => e != null)
588
- .map((entry) => {
589
- return se_ApplicationPolicyStatement(entry, context);
590
- });
591
- };
592
- const se___listOfParameterValue = (input, context) => {
593
- return input
594
- .filter((e) => e != null)
595
- .map((entry) => {
596
- return se_ParameterValue(entry, context);
597
- });
598
- };
599
- const se___listOfRollbackTrigger = (input, context) => {
600
- return input
601
- .filter((e) => e != null)
602
- .map((entry) => {
603
- return se_RollbackTrigger(entry, context);
604
- });
605
- };
606
- const se___listOfTag = (input, context) => {
607
- return input
608
- .filter((e) => e != null)
609
- .map((entry) => {
610
- return se_Tag(entry, context);
611
- });
612
- };
613
- const se_ApplicationPolicyStatement = (input, context) => {
614
- return take(input, {
615
- actions: [, _json, `Actions`],
616
- principalOrgIDs: [, _json, `PrincipalOrgIDs`],
617
- principals: [, _json, `Principals`],
618
- statementId: [, , `StatementId`],
619
- });
620
- };
621
- const se_ParameterValue = (input, context) => {
622
- return take(input, {
623
- name: [, , `Name`],
624
- value: [, , `Value`],
625
- });
626
- };
627
- const se_RollbackConfiguration = (input, context) => {
628
- return take(input, {
629
- monitoringTimeInMinutes: [, , `MonitoringTimeInMinutes`],
630
- rollbackTriggers: [, (_) => se___listOfRollbackTrigger(_, context), `RollbackTriggers`],
631
- });
632
- };
633
- const se_RollbackTrigger = (input, context) => {
634
- return take(input, {
635
- arn: [, , `Arn`],
636
- type: [, , `Type`],
637
- });
638
- };
639
- const se_Tag = (input, context) => {
640
- return take(input, {
641
- key: [, , `Key`],
642
- value: [, , `Value`],
643
- });
644
- };
645
- const de___listOfApplicationDependencySummary = (output, context) => {
646
- const retVal = (output || [])
647
- .filter((e) => e != null)
648
- .map((entry) => {
649
- return de_ApplicationDependencySummary(entry, context);
650
- });
651
- return retVal;
652
- };
653
- const de___listOfApplicationPolicyStatement = (output, context) => {
654
- const retVal = (output || [])
655
- .filter((e) => e != null)
656
- .map((entry) => {
657
- return de_ApplicationPolicyStatement(entry, context);
658
- });
659
- return retVal;
660
- };
661
- const de___listOfApplicationSummary = (output, context) => {
662
- const retVal = (output || [])
663
- .filter((e) => e != null)
664
- .map((entry) => {
665
- return de_ApplicationSummary(entry, context);
666
- });
667
- return retVal;
668
- };
669
- const de___listOfParameterDefinition = (output, context) => {
670
- const retVal = (output || [])
671
- .filter((e) => e != null)
672
- .map((entry) => {
673
- return de_ParameterDefinition(entry, context);
674
- });
675
- return retVal;
676
- };
677
- const de___listOfVersionSummary = (output, context) => {
678
- const retVal = (output || [])
679
- .filter((e) => e != null)
680
- .map((entry) => {
681
- return de_VersionSummary(entry, context);
682
- });
683
- return retVal;
684
- };
685
- const de_ApplicationDependencySummary = (output, context) => {
686
- return take(output, {
687
- ApplicationId: [, __expectString, `applicationId`],
688
- SemanticVersion: [, __expectString, `semanticVersion`],
689
- });
690
- };
691
- const de_ApplicationPolicyStatement = (output, context) => {
692
- return take(output, {
693
- Actions: [, _json, `actions`],
694
- PrincipalOrgIDs: [, _json, `principalOrgIDs`],
695
- Principals: [, _json, `principals`],
696
- StatementId: [, __expectString, `statementId`],
697
- });
698
- };
699
- const de_ApplicationSummary = (output, context) => {
700
- return take(output, {
701
- ApplicationId: [, __expectString, `applicationId`],
702
- Author: [, __expectString, `author`],
703
- CreationTime: [, __expectString, `creationTime`],
704
- Description: [, __expectString, `description`],
705
- HomePageUrl: [, __expectString, `homePageUrl`],
706
- Labels: [, _json, `labels`],
707
- Name: [, __expectString, `name`],
708
- SpdxLicenseId: [, __expectString, `spdxLicenseId`],
709
- });
710
- };
711
- const de_ParameterDefinition = (output, context) => {
712
- return take(output, {
713
- AllowedPattern: [, __expectString, `allowedPattern`],
714
- AllowedValues: [, _json, `allowedValues`],
715
- ConstraintDescription: [, __expectString, `constraintDescription`],
716
- DefaultValue: [, __expectString, `defaultValue`],
717
- Description: [, __expectString, `description`],
718
- MaxLength: [, __expectInt32, `maxLength`],
719
- MaxValue: [, __expectInt32, `maxValue`],
720
- MinLength: [, __expectInt32, `minLength`],
721
- MinValue: [, __expectInt32, `minValue`],
722
- Name: [, __expectString, `name`],
723
- NoEcho: [, __expectBoolean, `noEcho`],
724
- ReferencedByResources: [, _json, `referencedByResources`],
725
- Type: [, __expectString, `type`],
726
- });
727
- };
728
- const de_Version = (output, context) => {
729
- return take(output, {
730
- ApplicationId: [, __expectString, `applicationId`],
731
- CreationTime: [, __expectString, `creationTime`],
732
- ParameterDefinitions: [, (_) => de___listOfParameterDefinition(_, context), `parameterDefinitions`],
733
- RequiredCapabilities: [, _json, `requiredCapabilities`],
734
- ResourcesSupported: [, __expectBoolean, `resourcesSupported`],
735
- SemanticVersion: [, __expectString, `semanticVersion`],
736
- SourceCodeArchiveUrl: [, __expectString, `sourceCodeArchiveUrl`],
737
- SourceCodeUrl: [, __expectString, `sourceCodeUrl`],
738
- TemplateUrl: [, __expectString, `templateUrl`],
739
- });
740
- };
741
- const de_VersionSummary = (output, context) => {
742
- return take(output, {
743
- ApplicationId: [, __expectString, `applicationId`],
744
- CreationTime: [, __expectString, `creationTime`],
745
- SemanticVersion: [, __expectString, `semanticVersion`],
746
- SourceCodeUrl: [, __expectString, `sourceCodeUrl`],
747
- });
748
- };
749
- const deserializeMetadata = (output) => ({
750
- httpStatusCode: output.statusCode,
751
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
752
- extendedRequestId: output.headers["x-amz-id-2"],
753
- cfId: output.headers["x-amz-cf-id"],
754
- });
755
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
756
- const _MI = "MaxItems";
757
- const _NT = "NextToken";
758
- const _SV = "SemanticVersion";
759
- const _mI = "maxItems";
760
- const _nT = "nextToken";
761
- const _sV = "semanticVersion";