@aws-sdk/client-amplifyuibuilder 3.350.0 → 3.352.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 (41) hide show
  1. package/README.md +24 -0
  2. package/dist-cjs/AmplifyUIBuilder.js +6 -0
  3. package/dist-cjs/commands/GetCodegenJobCommand.js +46 -0
  4. package/dist-cjs/commands/ListCodegenJobsCommand.js +46 -0
  5. package/dist-cjs/commands/StartCodegenJobCommand.js +46 -0
  6. package/dist-cjs/commands/index.js +3 -0
  7. package/dist-cjs/models/models_0.js +80 -14
  8. package/dist-cjs/pagination/ListCodegenJobsPaginator.js +29 -0
  9. package/dist-cjs/pagination/index.js +1 -0
  10. package/dist-cjs/protocols/Aws_restJson1.js +242 -1
  11. package/dist-es/AmplifyUIBuilder.js +6 -0
  12. package/dist-es/commands/GetCodegenJobCommand.js +42 -0
  13. package/dist-es/commands/ListCodegenJobsCommand.js +42 -0
  14. package/dist-es/commands/StartCodegenJobCommand.js +42 -0
  15. package/dist-es/commands/index.js +3 -0
  16. package/dist-es/models/models_0.js +77 -12
  17. package/dist-es/pagination/ListCodegenJobsPaginator.js +25 -0
  18. package/dist-es/pagination/index.js +1 -0
  19. package/dist-es/protocols/Aws_restJson1.js +236 -1
  20. package/dist-types/AmplifyUIBuilder.d.ts +21 -0
  21. package/dist-types/AmplifyUIBuilderClient.d.ts +5 -2
  22. package/dist-types/commands/CreateFormCommand.d.ts +1 -1
  23. package/dist-types/commands/GetCodegenJobCommand.d.ts +185 -0
  24. package/dist-types/commands/ListCodegenJobsCommand.d.ts +94 -0
  25. package/dist-types/commands/StartCodegenJobCommand.d.ts +271 -0
  26. package/dist-types/commands/index.d.ts +3 -0
  27. package/dist-types/models/models_0.d.ts +549 -28
  28. package/dist-types/pagination/ListCodegenJobsPaginator.d.ts +7 -0
  29. package/dist-types/pagination/index.d.ts +1 -0
  30. package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
  31. package/dist-types/ts3.4/AmplifyUIBuilder.d.ts +51 -0
  32. package/dist-types/ts3.4/AmplifyUIBuilderClient.d.ts +18 -0
  33. package/dist-types/ts3.4/commands/GetCodegenJobCommand.d.ts +38 -0
  34. package/dist-types/ts3.4/commands/ListCodegenJobsCommand.d.ts +38 -0
  35. package/dist-types/ts3.4/commands/StartCodegenJobCommand.d.ts +38 -0
  36. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  37. package/dist-types/ts3.4/models/models_0.d.ts +201 -14
  38. package/dist-types/ts3.4/pagination/ListCodegenJobsPaginator.d.ts +11 -0
  39. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  40. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
  41. package/package.json +5 -5
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateThemeCommand = exports.de_UpdateFormCommand = exports.de_UpdateComponentCommand = exports.de_RefreshTokenCommand = exports.de_PutMetadataFlagCommand = exports.de_ListThemesCommand = exports.de_ListFormsCommand = exports.de_ListComponentsCommand = exports.de_GetThemeCommand = exports.de_GetMetadataCommand = exports.de_GetFormCommand = exports.de_GetComponentCommand = exports.de_ExportThemesCommand = exports.de_ExportFormsCommand = exports.de_ExportComponentsCommand = exports.de_ExchangeCodeForTokenCommand = exports.de_DeleteThemeCommand = exports.de_DeleteFormCommand = exports.de_DeleteComponentCommand = exports.de_CreateThemeCommand = exports.de_CreateFormCommand = exports.de_CreateComponentCommand = exports.se_UpdateThemeCommand = exports.se_UpdateFormCommand = exports.se_UpdateComponentCommand = exports.se_RefreshTokenCommand = exports.se_PutMetadataFlagCommand = exports.se_ListThemesCommand = exports.se_ListFormsCommand = exports.se_ListComponentsCommand = exports.se_GetThemeCommand = exports.se_GetMetadataCommand = exports.se_GetFormCommand = exports.se_GetComponentCommand = exports.se_ExportThemesCommand = exports.se_ExportFormsCommand = exports.se_ExportComponentsCommand = exports.se_ExchangeCodeForTokenCommand = exports.se_DeleteThemeCommand = exports.se_DeleteFormCommand = exports.se_DeleteComponentCommand = exports.se_CreateThemeCommand = exports.se_CreateFormCommand = exports.se_CreateComponentCommand = void 0;
3
+ exports.de_UpdateThemeCommand = exports.de_UpdateFormCommand = exports.de_UpdateComponentCommand = exports.de_StartCodegenJobCommand = exports.de_RefreshTokenCommand = exports.de_PutMetadataFlagCommand = exports.de_ListThemesCommand = exports.de_ListFormsCommand = exports.de_ListComponentsCommand = exports.de_ListCodegenJobsCommand = exports.de_GetThemeCommand = exports.de_GetMetadataCommand = exports.de_GetFormCommand = exports.de_GetComponentCommand = exports.de_GetCodegenJobCommand = exports.de_ExportThemesCommand = exports.de_ExportFormsCommand = exports.de_ExportComponentsCommand = exports.de_ExchangeCodeForTokenCommand = exports.de_DeleteThemeCommand = exports.de_DeleteFormCommand = exports.de_DeleteComponentCommand = exports.de_CreateThemeCommand = exports.de_CreateFormCommand = exports.de_CreateComponentCommand = exports.se_UpdateThemeCommand = exports.se_UpdateFormCommand = exports.se_UpdateComponentCommand = exports.se_StartCodegenJobCommand = exports.se_RefreshTokenCommand = exports.se_PutMetadataFlagCommand = exports.se_ListThemesCommand = exports.se_ListFormsCommand = exports.se_ListComponentsCommand = exports.se_ListCodegenJobsCommand = exports.se_GetThemeCommand = exports.se_GetMetadataCommand = exports.se_GetFormCommand = exports.se_GetComponentCommand = exports.se_GetCodegenJobCommand = exports.se_ExportThemesCommand = exports.se_ExportFormsCommand = exports.se_ExportComponentsCommand = exports.se_ExchangeCodeForTokenCommand = exports.se_DeleteThemeCommand = exports.se_DeleteFormCommand = exports.se_DeleteComponentCommand = exports.se_CreateThemeCommand = exports.se_CreateFormCommand = exports.se_CreateComponentCommand = void 0;
4
4
  const smithy_client_1 = require("@aws-sdk/smithy-client");
5
5
  const protocol_http_1 = require("@smithy/protocol-http");
6
6
  const uuid_1 = require("uuid");
@@ -257,6 +257,26 @@ const se_ExportThemesCommand = async (input, context) => {
257
257
  });
258
258
  };
259
259
  exports.se_ExportThemesCommand = se_ExportThemesCommand;
260
+ const se_GetCodegenJobCommand = async (input, context) => {
261
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
262
+ const headers = {};
263
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
264
+ "/app/{appId}/environment/{environmentName}/codegen-jobs/{id}";
265
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
266
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
267
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
268
+ let body;
269
+ return new protocol_http_1.HttpRequest({
270
+ protocol,
271
+ hostname,
272
+ port,
273
+ method: "GET",
274
+ headers,
275
+ path: resolvedPath,
276
+ body,
277
+ });
278
+ };
279
+ exports.se_GetCodegenJobCommand = se_GetCodegenJobCommand;
260
280
  const se_GetComponentCommand = async (input, context) => {
261
281
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
262
282
  const headers = {};
@@ -336,6 +356,30 @@ const se_GetThemeCommand = async (input, context) => {
336
356
  });
337
357
  };
338
358
  exports.se_GetThemeCommand = se_GetThemeCommand;
359
+ const se_ListCodegenJobsCommand = async (input, context) => {
360
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
361
+ const headers = {};
362
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
363
+ "/app/{appId}/environment/{environmentName}/codegen-jobs";
364
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
365
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
366
+ const query = (0, smithy_client_1.map)({
367
+ nextToken: [, input.nextToken],
368
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
369
+ });
370
+ let body;
371
+ return new protocol_http_1.HttpRequest({
372
+ protocol,
373
+ hostname,
374
+ port,
375
+ method: "GET",
376
+ headers,
377
+ path: resolvedPath,
378
+ query,
379
+ body,
380
+ });
381
+ };
382
+ exports.se_ListCodegenJobsCommand = se_ListCodegenJobsCommand;
339
383
  const se_ListComponentsCommand = async (input, context) => {
340
384
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
341
385
  const headers = {};
@@ -463,6 +507,38 @@ const se_RefreshTokenCommand = async (input, context) => {
463
507
  });
464
508
  };
465
509
  exports.se_RefreshTokenCommand = se_RefreshTokenCommand;
510
+ const se_StartCodegenJobCommand = async (input, context) => {
511
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
512
+ const headers = {
513
+ "content-type": "application/json",
514
+ };
515
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
516
+ "/app/{appId}/environment/{environmentName}/codegen-jobs";
517
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
518
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
519
+ const query = (0, smithy_client_1.map)({
520
+ clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
521
+ });
522
+ let body;
523
+ if (input.codegenJobToCreate !== undefined) {
524
+ body = (0, smithy_client_1._json)(input.codegenJobToCreate);
525
+ }
526
+ if (body === undefined) {
527
+ body = {};
528
+ }
529
+ body = JSON.stringify(body);
530
+ return new protocol_http_1.HttpRequest({
531
+ protocol,
532
+ hostname,
533
+ port,
534
+ method: "POST",
535
+ headers,
536
+ path: resolvedPath,
537
+ query,
538
+ body,
539
+ });
540
+ };
541
+ exports.se_StartCodegenJobCommand = se_StartCodegenJobCommand;
466
542
  const se_UpdateComponentCommand = async (input, context) => {
467
543
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
468
544
  const headers = {
@@ -940,6 +1016,46 @@ const de_ExportThemesCommandError = async (output, context) => {
940
1016
  });
941
1017
  }
942
1018
  };
1019
+ const de_GetCodegenJobCommand = async (output, context) => {
1020
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1021
+ return de_GetCodegenJobCommandError(output, context);
1022
+ }
1023
+ const contents = (0, smithy_client_1.map)({
1024
+ $metadata: deserializeMetadata(output),
1025
+ });
1026
+ const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
1027
+ contents.job = de_CodegenJob(data, context);
1028
+ return contents;
1029
+ };
1030
+ exports.de_GetCodegenJobCommand = de_GetCodegenJobCommand;
1031
+ const de_GetCodegenJobCommandError = async (output, context) => {
1032
+ const parsedOutput = {
1033
+ ...output,
1034
+ body: await parseErrorBody(output.body, context),
1035
+ };
1036
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1037
+ switch (errorCode) {
1038
+ case "InternalServerException":
1039
+ case "com.amazonaws.amplifyuibuilder#InternalServerException":
1040
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1041
+ case "InvalidParameterException":
1042
+ case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1043
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1044
+ case "ResourceNotFoundException":
1045
+ case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException":
1046
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1047
+ case "ThrottlingException":
1048
+ case "com.amazonaws.amplifyuibuilder#ThrottlingException":
1049
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1050
+ default:
1051
+ const parsedBody = parsedOutput.body;
1052
+ return throwDefaultError({
1053
+ output,
1054
+ parsedBody,
1055
+ errorCode,
1056
+ });
1057
+ }
1058
+ };
943
1059
  const de_GetComponentCommand = async (output, context) => {
944
1060
  if (output.statusCode !== 200 && output.statusCode >= 300) {
945
1061
  return de_GetComponentCommandError(output, context);
@@ -1088,6 +1204,47 @@ const de_GetThemeCommandError = async (output, context) => {
1088
1204
  });
1089
1205
  }
1090
1206
  };
1207
+ const de_ListCodegenJobsCommand = async (output, context) => {
1208
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1209
+ return de_ListCodegenJobsCommandError(output, context);
1210
+ }
1211
+ const contents = (0, smithy_client_1.map)({
1212
+ $metadata: deserializeMetadata(output),
1213
+ });
1214
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1215
+ const doc = (0, smithy_client_1.take)(data, {
1216
+ entities: (_) => de_CodegenJobSummaryList(_, context),
1217
+ nextToken: smithy_client_1.expectString,
1218
+ });
1219
+ Object.assign(contents, doc);
1220
+ return contents;
1221
+ };
1222
+ exports.de_ListCodegenJobsCommand = de_ListCodegenJobsCommand;
1223
+ const de_ListCodegenJobsCommandError = async (output, context) => {
1224
+ const parsedOutput = {
1225
+ ...output,
1226
+ body: await parseErrorBody(output.body, context),
1227
+ };
1228
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1229
+ switch (errorCode) {
1230
+ case "InternalServerException":
1231
+ case "com.amazonaws.amplifyuibuilder#InternalServerException":
1232
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1233
+ case "InvalidParameterException":
1234
+ case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1235
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1236
+ case "ThrottlingException":
1237
+ case "com.amazonaws.amplifyuibuilder#ThrottlingException":
1238
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1239
+ default:
1240
+ const parsedBody = parsedOutput.body;
1241
+ return throwDefaultError({
1242
+ output,
1243
+ parsedBody,
1244
+ errorCode,
1245
+ });
1246
+ }
1247
+ };
1091
1248
  const de_ListComponentsCommand = async (output, context) => {
1092
1249
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1093
1250
  return de_ListComponentsCommandError(output, context);
@@ -1270,6 +1427,43 @@ const de_RefreshTokenCommandError = async (output, context) => {
1270
1427
  });
1271
1428
  }
1272
1429
  };
1430
+ const de_StartCodegenJobCommand = async (output, context) => {
1431
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1432
+ return de_StartCodegenJobCommandError(output, context);
1433
+ }
1434
+ const contents = (0, smithy_client_1.map)({
1435
+ $metadata: deserializeMetadata(output),
1436
+ });
1437
+ const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
1438
+ contents.entity = de_CodegenJob(data, context);
1439
+ return contents;
1440
+ };
1441
+ exports.de_StartCodegenJobCommand = de_StartCodegenJobCommand;
1442
+ const de_StartCodegenJobCommandError = async (output, context) => {
1443
+ const parsedOutput = {
1444
+ ...output,
1445
+ body: await parseErrorBody(output.body, context),
1446
+ };
1447
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1448
+ switch (errorCode) {
1449
+ case "InternalServerException":
1450
+ case "com.amazonaws.amplifyuibuilder#InternalServerException":
1451
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1452
+ case "InvalidParameterException":
1453
+ case "com.amazonaws.amplifyuibuilder#InvalidParameterException":
1454
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1455
+ case "ThrottlingException":
1456
+ case "com.amazonaws.amplifyuibuilder#ThrottlingException":
1457
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1458
+ default:
1459
+ const parsedBody = parsedOutput.body;
1460
+ return throwDefaultError({
1461
+ output,
1462
+ parsedBody,
1463
+ errorCode,
1464
+ });
1465
+ }
1466
+ };
1273
1467
  const de_UpdateComponentCommand = async (output, context) => {
1274
1468
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1275
1469
  return de_UpdateComponentCommandError(output, context);
@@ -1447,6 +1641,19 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1447
1641
  });
1448
1642
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1449
1643
  };
1644
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1645
+ const contents = (0, smithy_client_1.map)({});
1646
+ const data = parsedOutput.body;
1647
+ const doc = (0, smithy_client_1.take)(data, {
1648
+ message: smithy_client_1.expectString,
1649
+ });
1650
+ Object.assign(contents, doc);
1651
+ const exception = new models_0_1.ThrottlingException({
1652
+ $metadata: deserializeMetadata(parsedOutput),
1653
+ ...contents,
1654
+ });
1655
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1656
+ };
1450
1657
  const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
1451
1658
  const contents = (0, smithy_client_1.map)({});
1452
1659
  const data = parsedOutput.body;
@@ -1799,6 +2006,40 @@ const de_ActionParameters = (output, context) => {
1799
2006
  url: (_) => de_ComponentProperty(_, context),
1800
2007
  });
1801
2008
  };
2009
+ const de_CodegenJob = (output, context) => {
2010
+ return (0, smithy_client_1.take)(output, {
2011
+ appId: smithy_client_1.expectString,
2012
+ asset: smithy_client_1._json,
2013
+ autoGenerateForms: smithy_client_1.expectBoolean,
2014
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2015
+ environmentName: smithy_client_1.expectString,
2016
+ features: smithy_client_1._json,
2017
+ genericDataSchema: smithy_client_1._json,
2018
+ id: smithy_client_1.expectString,
2019
+ modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2020
+ renderConfig: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
2021
+ status: smithy_client_1.expectString,
2022
+ statusMessage: smithy_client_1.expectString,
2023
+ tags: smithy_client_1._json,
2024
+ });
2025
+ };
2026
+ const de_CodegenJobSummary = (output, context) => {
2027
+ return (0, smithy_client_1.take)(output, {
2028
+ appId: smithy_client_1.expectString,
2029
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2030
+ environmentName: smithy_client_1.expectString,
2031
+ id: smithy_client_1.expectString,
2032
+ modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2033
+ });
2034
+ };
2035
+ const de_CodegenJobSummaryList = (output, context) => {
2036
+ const retVal = (output || [])
2037
+ .filter((e) => e != null)
2038
+ .map((entry) => {
2039
+ return de_CodegenJobSummary(entry, context);
2040
+ });
2041
+ return retVal;
2042
+ };
1802
2043
  const de_Component = (output, context) => {
1803
2044
  return (0, smithy_client_1.take)(output, {
1804
2045
  appId: smithy_client_1.expectString,
@@ -10,15 +10,18 @@ import { ExchangeCodeForTokenCommand, } from "./commands/ExchangeCodeForTokenCom
10
10
  import { ExportComponentsCommand, } from "./commands/ExportComponentsCommand";
11
11
  import { ExportFormsCommand } from "./commands/ExportFormsCommand";
12
12
  import { ExportThemesCommand, } from "./commands/ExportThemesCommand";
13
+ import { GetCodegenJobCommand, } from "./commands/GetCodegenJobCommand";
13
14
  import { GetComponentCommand, } from "./commands/GetComponentCommand";
14
15
  import { GetFormCommand } from "./commands/GetFormCommand";
15
16
  import { GetMetadataCommand } from "./commands/GetMetadataCommand";
16
17
  import { GetThemeCommand } from "./commands/GetThemeCommand";
18
+ import { ListCodegenJobsCommand, } from "./commands/ListCodegenJobsCommand";
17
19
  import { ListComponentsCommand, } from "./commands/ListComponentsCommand";
18
20
  import { ListFormsCommand } from "./commands/ListFormsCommand";
19
21
  import { ListThemesCommand } from "./commands/ListThemesCommand";
20
22
  import { PutMetadataFlagCommand, } from "./commands/PutMetadataFlagCommand";
21
23
  import { RefreshTokenCommand, } from "./commands/RefreshTokenCommand";
24
+ import { StartCodegenJobCommand, } from "./commands/StartCodegenJobCommand";
22
25
  import { UpdateComponentCommand, } from "./commands/UpdateComponentCommand";
23
26
  import { UpdateFormCommand } from "./commands/UpdateFormCommand";
24
27
  import { UpdateThemeCommand } from "./commands/UpdateThemeCommand";
@@ -33,15 +36,18 @@ const commands = {
33
36
  ExportComponentsCommand,
34
37
  ExportFormsCommand,
35
38
  ExportThemesCommand,
39
+ GetCodegenJobCommand,
36
40
  GetComponentCommand,
37
41
  GetFormCommand,
38
42
  GetMetadataCommand,
39
43
  GetThemeCommand,
44
+ ListCodegenJobsCommand,
40
45
  ListComponentsCommand,
41
46
  ListFormsCommand,
42
47
  ListThemesCommand,
43
48
  PutMetadataFlagCommand,
44
49
  RefreshTokenCommand,
50
+ StartCodegenJobCommand,
45
51
  UpdateComponentCommand,
46
52
  UpdateFormCommand,
47
53
  UpdateThemeCommand,
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { de_GetCodegenJobCommand, se_GetCodegenJobCommand } from "../protocols/Aws_restJson1";
5
+ export { $Command };
6
+ export class GetCodegenJobCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, GetCodegenJobCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "AmplifyUIBuilderClient";
25
+ const commandName = "GetCodegenJobCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_GetCodegenJobCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_GetCodegenJobCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { de_ListCodegenJobsCommand, se_ListCodegenJobsCommand } from "../protocols/Aws_restJson1";
5
+ export { $Command };
6
+ export class ListCodegenJobsCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListCodegenJobsCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "AmplifyUIBuilderClient";
25
+ const commandName = "ListCodegenJobsCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_ListCodegenJobsCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_ListCodegenJobsCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { de_StartCodegenJobCommand, se_StartCodegenJobCommand } from "../protocols/Aws_restJson1";
5
+ export { $Command };
6
+ export class StartCodegenJobCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, StartCodegenJobCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "AmplifyUIBuilderClient";
25
+ const commandName = "StartCodegenJobCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_StartCodegenJobCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_StartCodegenJobCommand(output, context);
41
+ }
42
+ }
@@ -8,15 +8,18 @@ export * from "./ExchangeCodeForTokenCommand";
8
8
  export * from "./ExportComponentsCommand";
9
9
  export * from "./ExportFormsCommand";
10
10
  export * from "./ExportThemesCommand";
11
+ export * from "./GetCodegenJobCommand";
11
12
  export * from "./GetComponentCommand";
12
13
  export * from "./GetFormCommand";
13
14
  export * from "./GetMetadataCommand";
14
15
  export * from "./GetThemeCommand";
16
+ export * from "./ListCodegenJobsCommand";
15
17
  export * from "./ListComponentsCommand";
16
18
  export * from "./ListFormsCommand";
17
19
  export * from "./ListThemesCommand";
18
20
  export * from "./PutMetadataFlagCommand";
19
21
  export * from "./RefreshTokenCommand";
22
+ export * from "./StartCodegenJobCommand";
20
23
  export * from "./UpdateComponentCommand";
21
24
  export * from "./UpdateFormCommand";
22
25
  export * from "./UpdateThemeCommand";
@@ -1,5 +1,58 @@
1
1
  import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
2
2
  import { AmplifyUIBuilderServiceException as __BaseException } from "./AmplifyUIBuilderServiceException";
3
+ export const CodegenJobGenericDataSourceType = {
4
+ DATA_STORE: "DataStore",
5
+ };
6
+ export const CodegenGenericDataFieldDataType = {
7
+ AWS_DATE: "AWSDate",
8
+ AWS_DATE_TIME: "AWSDateTime",
9
+ AWS_EMAIL: "AWSEmail",
10
+ AWS_IP_ADDRESS: "AWSIPAddress",
11
+ AWS_JSON: "AWSJSON",
12
+ AWS_PHONE: "AWSPhone",
13
+ AWS_TIME: "AWSTime",
14
+ AWS_TIMESTAMP: "AWSTimestamp",
15
+ AWS_URL: "AWSURL",
16
+ BOOLEAN: "Boolean",
17
+ ENUM: "Enum",
18
+ FLOAT: "Float",
19
+ ID: "ID",
20
+ INT: "Int",
21
+ MODEL: "Model",
22
+ NON_MODEL: "NonModel",
23
+ STRING: "String",
24
+ };
25
+ export const GenericDataRelationshipType = {
26
+ BELONGS_TO: "BELONGS_TO",
27
+ HAS_MANY: "HAS_MANY",
28
+ HAS_ONE: "HAS_ONE",
29
+ };
30
+ export const JSModule = {
31
+ ES2020: "es2020",
32
+ ESNEXT: "esnext",
33
+ };
34
+ export const JSScript = {
35
+ JS: "js",
36
+ JSX: "jsx",
37
+ TSX: "tsx",
38
+ };
39
+ export const JSTarget = {
40
+ ES2015: "es2015",
41
+ ES2020: "es2020",
42
+ };
43
+ export var CodegenJobRenderConfig;
44
+ (function (CodegenJobRenderConfig) {
45
+ CodegenJobRenderConfig.visit = (value, visitor) => {
46
+ if (value.react !== undefined)
47
+ return visitor.react(value.react);
48
+ return visitor._(value.$unknown[0], value.$unknown[1]);
49
+ };
50
+ })(CodegenJobRenderConfig || (CodegenJobRenderConfig = {}));
51
+ export const CodegenJobStatus = {
52
+ FAILED: "failed",
53
+ IN_PROGRESS: "in_progress",
54
+ SUCCEEDED: "succeeded",
55
+ };
3
56
  export class InternalServerException extends __BaseException {
4
57
  constructor(opts) {
5
58
  super({
@@ -24,40 +77,52 @@ export class InvalidParameterException extends __BaseException {
24
77
  Object.setPrototypeOf(this, InvalidParameterException.prototype);
25
78
  }
26
79
  }
27
- export class ResourceConflictException extends __BaseException {
80
+ export class ResourceNotFoundException extends __BaseException {
28
81
  constructor(opts) {
29
82
  super({
30
- name: "ResourceConflictException",
83
+ name: "ResourceNotFoundException",
31
84
  $fault: "client",
32
85
  ...opts,
33
86
  });
34
- this.name = "ResourceConflictException";
87
+ this.name = "ResourceNotFoundException";
35
88
  this.$fault = "client";
36
- Object.setPrototypeOf(this, ResourceConflictException.prototype);
89
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
37
90
  }
38
91
  }
39
- export class ServiceQuotaExceededException extends __BaseException {
92
+ export class ThrottlingException extends __BaseException {
40
93
  constructor(opts) {
41
94
  super({
42
- name: "ServiceQuotaExceededException",
95
+ name: "ThrottlingException",
43
96
  $fault: "client",
44
97
  ...opts,
45
98
  });
46
- this.name = "ServiceQuotaExceededException";
99
+ this.name = "ThrottlingException";
47
100
  this.$fault = "client";
48
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
101
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
49
102
  }
50
103
  }
51
- export class ResourceNotFoundException extends __BaseException {
104
+ export class ResourceConflictException extends __BaseException {
52
105
  constructor(opts) {
53
106
  super({
54
- name: "ResourceNotFoundException",
107
+ name: "ResourceConflictException",
55
108
  $fault: "client",
56
109
  ...opts,
57
110
  });
58
- this.name = "ResourceNotFoundException";
111
+ this.name = "ResourceConflictException";
59
112
  this.$fault = "client";
60
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
113
+ Object.setPrototypeOf(this, ResourceConflictException.prototype);
114
+ }
115
+ }
116
+ export class ServiceQuotaExceededException extends __BaseException {
117
+ constructor(opts) {
118
+ super({
119
+ name: "ServiceQuotaExceededException",
120
+ $fault: "client",
121
+ ...opts,
122
+ });
123
+ this.name = "ServiceQuotaExceededException";
124
+ this.$fault = "client";
125
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
61
126
  }
62
127
  }
63
128
  export const TokenProviders = {
@@ -0,0 +1,25 @@
1
+ import { AmplifyUIBuilderClient } from "../AmplifyUIBuilderClient";
2
+ import { ListCodegenJobsCommand, } from "../commands/ListCodegenJobsCommand";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListCodegenJobsCommand(input), ...args);
5
+ };
6
+ export async function* paginateListCodegenJobs(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof AmplifyUIBuilderClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected AmplifyUIBuilder | AmplifyUIBuilderClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -2,6 +2,7 @@ export * from "./ExportComponentsPaginator";
2
2
  export * from "./ExportFormsPaginator";
3
3
  export * from "./ExportThemesPaginator";
4
4
  export * from "./Interfaces";
5
+ export * from "./ListCodegenJobsPaginator";
5
6
  export * from "./ListComponentsPaginator";
6
7
  export * from "./ListFormsPaginator";
7
8
  export * from "./ListThemesPaginator";