@aws-sdk/client-amplifyuibuilder 3.180.0 → 3.183.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/CHANGELOG.md +20 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +28 -22
  3. package/dist-es/AmplifyUIBuilder.js +90 -97
  4. package/dist-es/AmplifyUIBuilderClient.js +22 -28
  5. package/dist-es/commands/CreateComponentCommand.js +21 -28
  6. package/dist-es/commands/CreateFormCommand.js +21 -28
  7. package/dist-es/commands/CreateThemeCommand.js +21 -28
  8. package/dist-es/commands/DeleteComponentCommand.js +22 -29
  9. package/dist-es/commands/DeleteFormCommand.js +22 -29
  10. package/dist-es/commands/DeleteThemeCommand.js +22 -29
  11. package/dist-es/commands/ExchangeCodeForTokenCommand.js +21 -28
  12. package/dist-es/commands/ExportComponentsCommand.js +21 -28
  13. package/dist-es/commands/ExportFormsCommand.js +21 -28
  14. package/dist-es/commands/ExportThemesCommand.js +21 -28
  15. package/dist-es/commands/GetComponentCommand.js +21 -28
  16. package/dist-es/commands/GetFormCommand.js +21 -28
  17. package/dist-es/commands/GetMetadataCommand.js +21 -28
  18. package/dist-es/commands/GetThemeCommand.js +21 -28
  19. package/dist-es/commands/ListComponentsCommand.js +21 -28
  20. package/dist-es/commands/ListFormsCommand.js +21 -28
  21. package/dist-es/commands/ListThemesCommand.js +21 -28
  22. package/dist-es/commands/PutMetadataFlagCommand.js +22 -29
  23. package/dist-es/commands/RefreshTokenCommand.js +21 -28
  24. package/dist-es/commands/UpdateComponentCommand.js +21 -28
  25. package/dist-es/commands/UpdateFormCommand.js +21 -28
  26. package/dist-es/commands/UpdateThemeCommand.js +21 -28
  27. package/dist-es/endpoints.js +8 -8
  28. package/dist-es/models/AmplifyUIBuilderServiceException.js +5 -10
  29. package/dist-es/models/models_0.js +382 -193
  30. package/dist-es/pagination/ExportComponentsPaginator.js +24 -67
  31. package/dist-es/pagination/ExportFormsPaginator.js +24 -67
  32. package/dist-es/pagination/ExportThemesPaginator.js +24 -67
  33. package/dist-es/pagination/ListComponentsPaginator.js +25 -68
  34. package/dist-es/pagination/ListFormsPaginator.js +25 -68
  35. package/dist-es/pagination/ListThemesPaginator.js +25 -68
  36. package/dist-es/protocols/Aws_restJson1.js +2045 -2476
  37. package/dist-es/runtimeConfig.browser.js +26 -12
  38. package/dist-es/runtimeConfig.js +30 -12
  39. package/dist-es/runtimeConfig.native.js +8 -5
  40. package/dist-es/runtimeConfig.shared.js +8 -11
  41. package/package.json +33 -33
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-amplifyuibuilder
9
+
10
+
11
+
12
+
13
+
14
+ # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
20
+ * **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-amplifyuibuilder
@@ -576,7 +576,7 @@ exports.deserializeAws_restJson1CreateComponentCommand = deserializeAws_restJson
576
576
  const deserializeAws_restJson1CreateComponentCommandError = async (output, context) => {
577
577
  const parsedOutput = {
578
578
  ...output,
579
- body: await parseBody(output.body, context),
579
+ body: await parseErrorBody(output.body, context),
580
580
  };
581
581
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
582
582
  switch (errorCode) {
@@ -617,7 +617,7 @@ exports.deserializeAws_restJson1CreateFormCommand = deserializeAws_restJson1Crea
617
617
  const deserializeAws_restJson1CreateFormCommandError = async (output, context) => {
618
618
  const parsedOutput = {
619
619
  ...output,
620
- body: await parseBody(output.body, context),
620
+ body: await parseErrorBody(output.body, context),
621
621
  };
622
622
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
623
623
  switch (errorCode) {
@@ -658,7 +658,7 @@ exports.deserializeAws_restJson1CreateThemeCommand = deserializeAws_restJson1Cre
658
658
  const deserializeAws_restJson1CreateThemeCommandError = async (output, context) => {
659
659
  const parsedOutput = {
660
660
  ...output,
661
- body: await parseBody(output.body, context),
661
+ body: await parseErrorBody(output.body, context),
662
662
  };
663
663
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
664
664
  switch (errorCode) {
@@ -698,7 +698,7 @@ exports.deserializeAws_restJson1DeleteComponentCommand = deserializeAws_restJson
698
698
  const deserializeAws_restJson1DeleteComponentCommandError = async (output, context) => {
699
699
  const parsedOutput = {
700
700
  ...output,
701
- body: await parseBody(output.body, context),
701
+ body: await parseErrorBody(output.body, context),
702
702
  };
703
703
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
704
704
  switch (errorCode) {
@@ -735,7 +735,7 @@ exports.deserializeAws_restJson1DeleteFormCommand = deserializeAws_restJson1Dele
735
735
  const deserializeAws_restJson1DeleteFormCommandError = async (output, context) => {
736
736
  const parsedOutput = {
737
737
  ...output,
738
- body: await parseBody(output.body, context),
738
+ body: await parseErrorBody(output.body, context),
739
739
  };
740
740
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
741
741
  switch (errorCode) {
@@ -772,7 +772,7 @@ exports.deserializeAws_restJson1DeleteThemeCommand = deserializeAws_restJson1Del
772
772
  const deserializeAws_restJson1DeleteThemeCommandError = async (output, context) => {
773
773
  const parsedOutput = {
774
774
  ...output,
775
- body: await parseBody(output.body, context),
775
+ body: await parseErrorBody(output.body, context),
776
776
  };
777
777
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
778
778
  switch (errorCode) {
@@ -818,7 +818,7 @@ exports.deserializeAws_restJson1ExchangeCodeForTokenCommand = deserializeAws_res
818
818
  const deserializeAws_restJson1ExchangeCodeForTokenCommandError = async (output, context) => {
819
819
  const parsedOutput = {
820
820
  ...output,
821
- body: await parseBody(output.body, context),
821
+ body: await parseErrorBody(output.body, context),
822
822
  };
823
823
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
824
824
  switch (errorCode) {
@@ -855,7 +855,7 @@ exports.deserializeAws_restJson1ExportComponentsCommand = deserializeAws_restJso
855
855
  const deserializeAws_restJson1ExportComponentsCommandError = async (output, context) => {
856
856
  const parsedOutput = {
857
857
  ...output,
858
- body: await parseBody(output.body, context),
858
+ body: await parseErrorBody(output.body, context),
859
859
  };
860
860
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
861
861
  switch (errorCode) {
@@ -895,7 +895,7 @@ exports.deserializeAws_restJson1ExportFormsCommand = deserializeAws_restJson1Exp
895
895
  const deserializeAws_restJson1ExportFormsCommandError = async (output, context) => {
896
896
  const parsedOutput = {
897
897
  ...output,
898
- body: await parseBody(output.body, context),
898
+ body: await parseErrorBody(output.body, context),
899
899
  };
900
900
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
901
901
  switch (errorCode) {
@@ -935,7 +935,7 @@ exports.deserializeAws_restJson1ExportThemesCommand = deserializeAws_restJson1Ex
935
935
  const deserializeAws_restJson1ExportThemesCommandError = async (output, context) => {
936
936
  const parsedOutput = {
937
937
  ...output,
938
- body: await parseBody(output.body, context),
938
+ body: await parseErrorBody(output.body, context),
939
939
  };
940
940
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
941
941
  switch (errorCode) {
@@ -970,7 +970,7 @@ exports.deserializeAws_restJson1GetComponentCommand = deserializeAws_restJson1Ge
970
970
  const deserializeAws_restJson1GetComponentCommandError = async (output, context) => {
971
971
  const parsedOutput = {
972
972
  ...output,
973
- body: await parseBody(output.body, context),
973
+ body: await parseErrorBody(output.body, context),
974
974
  };
975
975
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
976
976
  switch (errorCode) {
@@ -1008,7 +1008,7 @@ exports.deserializeAws_restJson1GetFormCommand = deserializeAws_restJson1GetForm
1008
1008
  const deserializeAws_restJson1GetFormCommandError = async (output, context) => {
1009
1009
  const parsedOutput = {
1010
1010
  ...output,
1011
- body: await parseBody(output.body, context),
1011
+ body: await parseErrorBody(output.body, context),
1012
1012
  };
1013
1013
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1014
1014
  switch (errorCode) {
@@ -1048,7 +1048,7 @@ exports.deserializeAws_restJson1GetMetadataCommand = deserializeAws_restJson1Get
1048
1048
  const deserializeAws_restJson1GetMetadataCommandError = async (output, context) => {
1049
1049
  const parsedOutput = {
1050
1050
  ...output,
1051
- body: await parseBody(output.body, context),
1051
+ body: await parseErrorBody(output.body, context),
1052
1052
  };
1053
1053
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1054
1054
  switch (errorCode) {
@@ -1083,7 +1083,7 @@ exports.deserializeAws_restJson1GetThemeCommand = deserializeAws_restJson1GetThe
1083
1083
  const deserializeAws_restJson1GetThemeCommandError = async (output, context) => {
1084
1084
  const parsedOutput = {
1085
1085
  ...output,
1086
- body: await parseBody(output.body, context),
1086
+ body: await parseErrorBody(output.body, context),
1087
1087
  };
1088
1088
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1089
1089
  switch (errorCode) {
@@ -1126,7 +1126,7 @@ exports.deserializeAws_restJson1ListComponentsCommand = deserializeAws_restJson1
1126
1126
  const deserializeAws_restJson1ListComponentsCommandError = async (output, context) => {
1127
1127
  const parsedOutput = {
1128
1128
  ...output,
1129
- body: await parseBody(output.body, context),
1129
+ body: await parseErrorBody(output.body, context),
1130
1130
  };
1131
1131
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1132
1132
  switch (errorCode) {
@@ -1166,7 +1166,7 @@ exports.deserializeAws_restJson1ListFormsCommand = deserializeAws_restJson1ListF
1166
1166
  const deserializeAws_restJson1ListFormsCommandError = async (output, context) => {
1167
1167
  const parsedOutput = {
1168
1168
  ...output,
1169
- body: await parseBody(output.body, context),
1169
+ body: await parseErrorBody(output.body, context),
1170
1170
  };
1171
1171
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1172
1172
  switch (errorCode) {
@@ -1206,7 +1206,7 @@ exports.deserializeAws_restJson1ListThemesCommand = deserializeAws_restJson1List
1206
1206
  const deserializeAws_restJson1ListThemesCommandError = async (output, context) => {
1207
1207
  const parsedOutput = {
1208
1208
  ...output,
1209
- body: await parseBody(output.body, context),
1209
+ body: await parseErrorBody(output.body, context),
1210
1210
  };
1211
1211
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1212
1212
  switch (errorCode) {
@@ -1240,7 +1240,7 @@ exports.deserializeAws_restJson1PutMetadataFlagCommand = deserializeAws_restJson
1240
1240
  const deserializeAws_restJson1PutMetadataFlagCommandError = async (output, context) => {
1241
1241
  const parsedOutput = {
1242
1242
  ...output,
1243
- body: await parseBody(output.body, context),
1243
+ body: await parseErrorBody(output.body, context),
1244
1244
  };
1245
1245
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1246
1246
  switch (errorCode) {
@@ -1280,7 +1280,7 @@ exports.deserializeAws_restJson1RefreshTokenCommand = deserializeAws_restJson1Re
1280
1280
  const deserializeAws_restJson1RefreshTokenCommandError = async (output, context) => {
1281
1281
  const parsedOutput = {
1282
1282
  ...output,
1283
- body: await parseBody(output.body, context),
1283
+ body: await parseErrorBody(output.body, context),
1284
1284
  };
1285
1285
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1286
1286
  switch (errorCode) {
@@ -1312,7 +1312,7 @@ exports.deserializeAws_restJson1UpdateComponentCommand = deserializeAws_restJson
1312
1312
  const deserializeAws_restJson1UpdateComponentCommandError = async (output, context) => {
1313
1313
  const parsedOutput = {
1314
1314
  ...output,
1315
- body: await parseBody(output.body, context),
1315
+ body: await parseErrorBody(output.body, context),
1316
1316
  };
1317
1317
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1318
1318
  switch (errorCode) {
@@ -1350,7 +1350,7 @@ exports.deserializeAws_restJson1UpdateFormCommand = deserializeAws_restJson1Upda
1350
1350
  const deserializeAws_restJson1UpdateFormCommandError = async (output, context) => {
1351
1351
  const parsedOutput = {
1352
1352
  ...output,
1353
- body: await parseBody(output.body, context),
1353
+ body: await parseErrorBody(output.body, context),
1354
1354
  };
1355
1355
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1356
1356
  switch (errorCode) {
@@ -1388,7 +1388,7 @@ exports.deserializeAws_restJson1UpdateThemeCommand = deserializeAws_restJson1Upd
1388
1388
  const deserializeAws_restJson1UpdateThemeCommandError = async (output, context) => {
1389
1389
  const parsedOutput = {
1390
1390
  ...output,
1391
- body: await parseBody(output.body, context),
1391
+ body: await parseErrorBody(output.body, context),
1392
1392
  };
1393
1393
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1394
1394
  switch (errorCode) {
@@ -2754,6 +2754,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
2754
2754
  }
2755
2755
  return {};
2756
2756
  });
2757
+ const parseErrorBody = async (errorBody, context) => {
2758
+ var _a;
2759
+ const value = await parseBody(errorBody, context);
2760
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2761
+ return value;
2762
+ };
2757
2763
  const loadRestJsonErrorCode = (output, data) => {
2758
2764
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2759
2765
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { AmplifyUIBuilderClient } from "./AmplifyUIBuilderClient";
3
2
  import { CreateComponentCommand, } from "./commands/CreateComponentCommand";
4
3
  import { CreateFormCommand } from "./commands/CreateFormCommand";
@@ -22,319 +21,313 @@ import { RefreshTokenCommand, } from "./commands/RefreshTokenCommand";
22
21
  import { UpdateComponentCommand, } from "./commands/UpdateComponentCommand";
23
22
  import { UpdateFormCommand } from "./commands/UpdateFormCommand";
24
23
  import { UpdateThemeCommand } from "./commands/UpdateThemeCommand";
25
- var AmplifyUIBuilder = (function (_super) {
26
- __extends(AmplifyUIBuilder, _super);
27
- function AmplifyUIBuilder() {
28
- return _super !== null && _super.apply(this, arguments) || this;
29
- }
30
- AmplifyUIBuilder.prototype.createComponent = function (args, optionsOrCb, cb) {
31
- var command = new CreateComponentCommand(args);
24
+ export class AmplifyUIBuilder extends AmplifyUIBuilderClient {
25
+ createComponent(args, optionsOrCb, cb) {
26
+ const command = new CreateComponentCommand(args);
32
27
  if (typeof optionsOrCb === "function") {
33
28
  this.send(command, optionsOrCb);
34
29
  }
35
30
  else if (typeof cb === "function") {
36
31
  if (typeof optionsOrCb !== "object")
37
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
32
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
38
33
  this.send(command, optionsOrCb || {}, cb);
39
34
  }
40
35
  else {
41
36
  return this.send(command, optionsOrCb);
42
37
  }
43
- };
44
- AmplifyUIBuilder.prototype.createForm = function (args, optionsOrCb, cb) {
45
- var command = new CreateFormCommand(args);
38
+ }
39
+ createForm(args, optionsOrCb, cb) {
40
+ const command = new CreateFormCommand(args);
46
41
  if (typeof optionsOrCb === "function") {
47
42
  this.send(command, optionsOrCb);
48
43
  }
49
44
  else if (typeof cb === "function") {
50
45
  if (typeof optionsOrCb !== "object")
51
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
46
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
52
47
  this.send(command, optionsOrCb || {}, cb);
53
48
  }
54
49
  else {
55
50
  return this.send(command, optionsOrCb);
56
51
  }
57
- };
58
- AmplifyUIBuilder.prototype.createTheme = function (args, optionsOrCb, cb) {
59
- var command = new CreateThemeCommand(args);
52
+ }
53
+ createTheme(args, optionsOrCb, cb) {
54
+ const command = new CreateThemeCommand(args);
60
55
  if (typeof optionsOrCb === "function") {
61
56
  this.send(command, optionsOrCb);
62
57
  }
63
58
  else if (typeof cb === "function") {
64
59
  if (typeof optionsOrCb !== "object")
65
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
60
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
66
61
  this.send(command, optionsOrCb || {}, cb);
67
62
  }
68
63
  else {
69
64
  return this.send(command, optionsOrCb);
70
65
  }
71
- };
72
- AmplifyUIBuilder.prototype.deleteComponent = function (args, optionsOrCb, cb) {
73
- var command = new DeleteComponentCommand(args);
66
+ }
67
+ deleteComponent(args, optionsOrCb, cb) {
68
+ const command = new DeleteComponentCommand(args);
74
69
  if (typeof optionsOrCb === "function") {
75
70
  this.send(command, optionsOrCb);
76
71
  }
77
72
  else if (typeof cb === "function") {
78
73
  if (typeof optionsOrCb !== "object")
79
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
74
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
80
75
  this.send(command, optionsOrCb || {}, cb);
81
76
  }
82
77
  else {
83
78
  return this.send(command, optionsOrCb);
84
79
  }
85
- };
86
- AmplifyUIBuilder.prototype.deleteForm = function (args, optionsOrCb, cb) {
87
- var command = new DeleteFormCommand(args);
80
+ }
81
+ deleteForm(args, optionsOrCb, cb) {
82
+ const command = new DeleteFormCommand(args);
88
83
  if (typeof optionsOrCb === "function") {
89
84
  this.send(command, optionsOrCb);
90
85
  }
91
86
  else if (typeof cb === "function") {
92
87
  if (typeof optionsOrCb !== "object")
93
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
88
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
94
89
  this.send(command, optionsOrCb || {}, cb);
95
90
  }
96
91
  else {
97
92
  return this.send(command, optionsOrCb);
98
93
  }
99
- };
100
- AmplifyUIBuilder.prototype.deleteTheme = function (args, optionsOrCb, cb) {
101
- var command = new DeleteThemeCommand(args);
94
+ }
95
+ deleteTheme(args, optionsOrCb, cb) {
96
+ const command = new DeleteThemeCommand(args);
102
97
  if (typeof optionsOrCb === "function") {
103
98
  this.send(command, optionsOrCb);
104
99
  }
105
100
  else if (typeof cb === "function") {
106
101
  if (typeof optionsOrCb !== "object")
107
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
102
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
108
103
  this.send(command, optionsOrCb || {}, cb);
109
104
  }
110
105
  else {
111
106
  return this.send(command, optionsOrCb);
112
107
  }
113
- };
114
- AmplifyUIBuilder.prototype.exchangeCodeForToken = function (args, optionsOrCb, cb) {
115
- var command = new ExchangeCodeForTokenCommand(args);
108
+ }
109
+ exchangeCodeForToken(args, optionsOrCb, cb) {
110
+ const command = new ExchangeCodeForTokenCommand(args);
116
111
  if (typeof optionsOrCb === "function") {
117
112
  this.send(command, optionsOrCb);
118
113
  }
119
114
  else if (typeof cb === "function") {
120
115
  if (typeof optionsOrCb !== "object")
121
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
116
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
122
117
  this.send(command, optionsOrCb || {}, cb);
123
118
  }
124
119
  else {
125
120
  return this.send(command, optionsOrCb);
126
121
  }
127
- };
128
- AmplifyUIBuilder.prototype.exportComponents = function (args, optionsOrCb, cb) {
129
- var command = new ExportComponentsCommand(args);
122
+ }
123
+ exportComponents(args, optionsOrCb, cb) {
124
+ const command = new ExportComponentsCommand(args);
130
125
  if (typeof optionsOrCb === "function") {
131
126
  this.send(command, optionsOrCb);
132
127
  }
133
128
  else if (typeof cb === "function") {
134
129
  if (typeof optionsOrCb !== "object")
135
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
130
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
136
131
  this.send(command, optionsOrCb || {}, cb);
137
132
  }
138
133
  else {
139
134
  return this.send(command, optionsOrCb);
140
135
  }
141
- };
142
- AmplifyUIBuilder.prototype.exportForms = function (args, optionsOrCb, cb) {
143
- var command = new ExportFormsCommand(args);
136
+ }
137
+ exportForms(args, optionsOrCb, cb) {
138
+ const command = new ExportFormsCommand(args);
144
139
  if (typeof optionsOrCb === "function") {
145
140
  this.send(command, optionsOrCb);
146
141
  }
147
142
  else if (typeof cb === "function") {
148
143
  if (typeof optionsOrCb !== "object")
149
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
144
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
150
145
  this.send(command, optionsOrCb || {}, cb);
151
146
  }
152
147
  else {
153
148
  return this.send(command, optionsOrCb);
154
149
  }
155
- };
156
- AmplifyUIBuilder.prototype.exportThemes = function (args, optionsOrCb, cb) {
157
- var command = new ExportThemesCommand(args);
150
+ }
151
+ exportThemes(args, optionsOrCb, cb) {
152
+ const command = new ExportThemesCommand(args);
158
153
  if (typeof optionsOrCb === "function") {
159
154
  this.send(command, optionsOrCb);
160
155
  }
161
156
  else if (typeof cb === "function") {
162
157
  if (typeof optionsOrCb !== "object")
163
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
158
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
164
159
  this.send(command, optionsOrCb || {}, cb);
165
160
  }
166
161
  else {
167
162
  return this.send(command, optionsOrCb);
168
163
  }
169
- };
170
- AmplifyUIBuilder.prototype.getComponent = function (args, optionsOrCb, cb) {
171
- var command = new GetComponentCommand(args);
164
+ }
165
+ getComponent(args, optionsOrCb, cb) {
166
+ const command = new GetComponentCommand(args);
172
167
  if (typeof optionsOrCb === "function") {
173
168
  this.send(command, optionsOrCb);
174
169
  }
175
170
  else if (typeof cb === "function") {
176
171
  if (typeof optionsOrCb !== "object")
177
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
172
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
178
173
  this.send(command, optionsOrCb || {}, cb);
179
174
  }
180
175
  else {
181
176
  return this.send(command, optionsOrCb);
182
177
  }
183
- };
184
- AmplifyUIBuilder.prototype.getForm = function (args, optionsOrCb, cb) {
185
- var command = new GetFormCommand(args);
178
+ }
179
+ getForm(args, optionsOrCb, cb) {
180
+ const command = new GetFormCommand(args);
186
181
  if (typeof optionsOrCb === "function") {
187
182
  this.send(command, optionsOrCb);
188
183
  }
189
184
  else if (typeof cb === "function") {
190
185
  if (typeof optionsOrCb !== "object")
191
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
186
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
192
187
  this.send(command, optionsOrCb || {}, cb);
193
188
  }
194
189
  else {
195
190
  return this.send(command, optionsOrCb);
196
191
  }
197
- };
198
- AmplifyUIBuilder.prototype.getMetadata = function (args, optionsOrCb, cb) {
199
- var command = new GetMetadataCommand(args);
192
+ }
193
+ getMetadata(args, optionsOrCb, cb) {
194
+ const command = new GetMetadataCommand(args);
200
195
  if (typeof optionsOrCb === "function") {
201
196
  this.send(command, optionsOrCb);
202
197
  }
203
198
  else if (typeof cb === "function") {
204
199
  if (typeof optionsOrCb !== "object")
205
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
200
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
206
201
  this.send(command, optionsOrCb || {}, cb);
207
202
  }
208
203
  else {
209
204
  return this.send(command, optionsOrCb);
210
205
  }
211
- };
212
- AmplifyUIBuilder.prototype.getTheme = function (args, optionsOrCb, cb) {
213
- var command = new GetThemeCommand(args);
206
+ }
207
+ getTheme(args, optionsOrCb, cb) {
208
+ const command = new GetThemeCommand(args);
214
209
  if (typeof optionsOrCb === "function") {
215
210
  this.send(command, optionsOrCb);
216
211
  }
217
212
  else if (typeof cb === "function") {
218
213
  if (typeof optionsOrCb !== "object")
219
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
214
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
220
215
  this.send(command, optionsOrCb || {}, cb);
221
216
  }
222
217
  else {
223
218
  return this.send(command, optionsOrCb);
224
219
  }
225
- };
226
- AmplifyUIBuilder.prototype.listComponents = function (args, optionsOrCb, cb) {
227
- var command = new ListComponentsCommand(args);
220
+ }
221
+ listComponents(args, optionsOrCb, cb) {
222
+ const command = new ListComponentsCommand(args);
228
223
  if (typeof optionsOrCb === "function") {
229
224
  this.send(command, optionsOrCb);
230
225
  }
231
226
  else if (typeof cb === "function") {
232
227
  if (typeof optionsOrCb !== "object")
233
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
228
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
234
229
  this.send(command, optionsOrCb || {}, cb);
235
230
  }
236
231
  else {
237
232
  return this.send(command, optionsOrCb);
238
233
  }
239
- };
240
- AmplifyUIBuilder.prototype.listForms = function (args, optionsOrCb, cb) {
241
- var command = new ListFormsCommand(args);
234
+ }
235
+ listForms(args, optionsOrCb, cb) {
236
+ const command = new ListFormsCommand(args);
242
237
  if (typeof optionsOrCb === "function") {
243
238
  this.send(command, optionsOrCb);
244
239
  }
245
240
  else if (typeof cb === "function") {
246
241
  if (typeof optionsOrCb !== "object")
247
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
242
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
248
243
  this.send(command, optionsOrCb || {}, cb);
249
244
  }
250
245
  else {
251
246
  return this.send(command, optionsOrCb);
252
247
  }
253
- };
254
- AmplifyUIBuilder.prototype.listThemes = function (args, optionsOrCb, cb) {
255
- var command = new ListThemesCommand(args);
248
+ }
249
+ listThemes(args, optionsOrCb, cb) {
250
+ const command = new ListThemesCommand(args);
256
251
  if (typeof optionsOrCb === "function") {
257
252
  this.send(command, optionsOrCb);
258
253
  }
259
254
  else if (typeof cb === "function") {
260
255
  if (typeof optionsOrCb !== "object")
261
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
256
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
262
257
  this.send(command, optionsOrCb || {}, cb);
263
258
  }
264
259
  else {
265
260
  return this.send(command, optionsOrCb);
266
261
  }
267
- };
268
- AmplifyUIBuilder.prototype.putMetadataFlag = function (args, optionsOrCb, cb) {
269
- var command = new PutMetadataFlagCommand(args);
262
+ }
263
+ putMetadataFlag(args, optionsOrCb, cb) {
264
+ const command = new PutMetadataFlagCommand(args);
270
265
  if (typeof optionsOrCb === "function") {
271
266
  this.send(command, optionsOrCb);
272
267
  }
273
268
  else if (typeof cb === "function") {
274
269
  if (typeof optionsOrCb !== "object")
275
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
270
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
276
271
  this.send(command, optionsOrCb || {}, cb);
277
272
  }
278
273
  else {
279
274
  return this.send(command, optionsOrCb);
280
275
  }
281
- };
282
- AmplifyUIBuilder.prototype.refreshToken = function (args, optionsOrCb, cb) {
283
- var command = new RefreshTokenCommand(args);
276
+ }
277
+ refreshToken(args, optionsOrCb, cb) {
278
+ const command = new RefreshTokenCommand(args);
284
279
  if (typeof optionsOrCb === "function") {
285
280
  this.send(command, optionsOrCb);
286
281
  }
287
282
  else if (typeof cb === "function") {
288
283
  if (typeof optionsOrCb !== "object")
289
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
284
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
290
285
  this.send(command, optionsOrCb || {}, cb);
291
286
  }
292
287
  else {
293
288
  return this.send(command, optionsOrCb);
294
289
  }
295
- };
296
- AmplifyUIBuilder.prototype.updateComponent = function (args, optionsOrCb, cb) {
297
- var command = new UpdateComponentCommand(args);
290
+ }
291
+ updateComponent(args, optionsOrCb, cb) {
292
+ const command = new UpdateComponentCommand(args);
298
293
  if (typeof optionsOrCb === "function") {
299
294
  this.send(command, optionsOrCb);
300
295
  }
301
296
  else if (typeof cb === "function") {
302
297
  if (typeof optionsOrCb !== "object")
303
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
298
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
304
299
  this.send(command, optionsOrCb || {}, cb);
305
300
  }
306
301
  else {
307
302
  return this.send(command, optionsOrCb);
308
303
  }
309
- };
310
- AmplifyUIBuilder.prototype.updateForm = function (args, optionsOrCb, cb) {
311
- var command = new UpdateFormCommand(args);
304
+ }
305
+ updateForm(args, optionsOrCb, cb) {
306
+ const command = new UpdateFormCommand(args);
312
307
  if (typeof optionsOrCb === "function") {
313
308
  this.send(command, optionsOrCb);
314
309
  }
315
310
  else if (typeof cb === "function") {
316
311
  if (typeof optionsOrCb !== "object")
317
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
312
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
318
313
  this.send(command, optionsOrCb || {}, cb);
319
314
  }
320
315
  else {
321
316
  return this.send(command, optionsOrCb);
322
317
  }
323
- };
324
- AmplifyUIBuilder.prototype.updateTheme = function (args, optionsOrCb, cb) {
325
- var command = new UpdateThemeCommand(args);
318
+ }
319
+ updateTheme(args, optionsOrCb, cb) {
320
+ const command = new UpdateThemeCommand(args);
326
321
  if (typeof optionsOrCb === "function") {
327
322
  this.send(command, optionsOrCb);
328
323
  }
329
324
  else if (typeof cb === "function") {
330
325
  if (typeof optionsOrCb !== "object")
331
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
326
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
332
327
  this.send(command, optionsOrCb || {}, cb);
333
328
  }
334
329
  else {
335
330
  return this.send(command, optionsOrCb);
336
331
  }
337
- };
338
- return AmplifyUIBuilder;
339
- }(AmplifyUIBuilderClient));
340
- export { AmplifyUIBuilder };
332
+ }
333
+ }