@aws-sdk/client-amplifyuibuilder 3.53.0 → 3.54.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.
- package/CHANGELOG.md +11 -0
- package/README.md +8 -9
- package/dist-cjs/models/models_0.js +20 -2
- package/dist-cjs/pagination/ExportComponentsPaginator.js +34 -0
- package/dist-cjs/pagination/ExportThemesPaginator.js +34 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +141 -0
- package/dist-es/models/models_0.js +12 -0
- package/dist-es/pagination/ExportComponentsPaginator.js +73 -0
- package/dist-es/pagination/ExportThemesPaginator.js +73 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +125 -15
- package/dist-types/AmplifyUIBuilder.d.ts +14 -15
- package/dist-types/AmplifyUIBuilderClient.d.ts +10 -11
- package/dist-types/commands/ExportComponentsCommand.d.ts +1 -2
- package/dist-types/commands/ExportThemesCommand.d.ts +1 -2
- package/dist-types/commands/ListComponentsCommand.d.ts +2 -1
- package/dist-types/commands/ListThemesCommand.d.ts +2 -1
- package/dist-types/models/models_0.d.ts +233 -42
- package/dist-types/pagination/ExportComponentsPaginator.d.ts +4 -0
- package/dist-types/pagination/ExportThemesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/AmplifyUIBuilderClient.d.ts +2 -2
- package/dist-types/ts3.4/models/models_0.d.ts +87 -0
- package/dist-types/ts3.4/pagination/ExportComponentsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ExportThemesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/package.json +27 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.54.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.53.1...v3.54.0) (2022-03-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** update clients as of 2022/03/10 ([#3411](https://github.com/aws/aws-sdk-js-v3/issues/3411)) ([8fa517a](https://github.com/aws/aws-sdk-js-v3/commit/8fa517a2c56d2f98a2e4a9c4ea6fd99b6ce61a71))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.53.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.52.0...v3.53.0) (2022-02-24)
|
|
7
18
|
|
|
8
19
|
|
package/README.md
CHANGED
|
@@ -7,16 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
AWS SDK for JavaScript AmplifyUIBuilder Client for Node.js, Browser and React Native.
|
|
9
9
|
|
|
10
|
-
<p>The Amplify UI Builder API provides a programmatic interface for creating
|
|
11
|
-
user interface (UI) component libraries and themes for use in your Amplify applications. You
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
for an app. For more information, see <a href="https://docs.amplify.aws/console/adminui/intro">Introduction</a> in the
|
|
10
|
+
<p>The Amplify UI Builder API provides a programmatic interface for creating
|
|
11
|
+
and configuring user interface (UI) component libraries and themes for use in your Amplify applications. You can then connect these UI components to an application's
|
|
12
|
+
backend Amazon Web Services resources.</p>
|
|
13
|
+
<p>You can also use the Amplify Studio visual designer to create UI components
|
|
14
|
+
and model data for an app. For more information, see <a href="https://docs.amplify.aws/console/adminui/intro">Introduction</a> in the
|
|
16
15
|
<i>Amplify Docs</i>.</p>
|
|
17
|
-
<p>The Amplify Framework is a comprehensive set of SDKs, libraries, tools, and
|
|
18
|
-
for client app development. For more information, see the <a href="https://docs.amplify.aws/">Amplify Framework</a>. For more information about
|
|
19
|
-
deploying an Amplify application to Amazon Web Services, see the <a href="https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html">Amplify
|
|
16
|
+
<p>The Amplify Framework is a comprehensive set of SDKs, libraries, tools, and
|
|
17
|
+
documentation for client app development. For more information, see the <a href="https://docs.amplify.aws/">Amplify Framework</a>. For more information about
|
|
18
|
+
deploying an Amplify application to Amazon Web Services, see the <a href="https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html">Amplify User Guide</a>.</p>
|
|
20
19
|
|
|
21
20
|
## Installing
|
|
22
21
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.ExportComponentsResponse = exports.UpdateComponentResponse = exports.UpdateComponentRequest = exports.GetComponentResponse = exports.CreateComponentResponse = void 0;
|
|
3
|
+
exports.Component = exports.ComponentChild = exports.ComponentEvent = exports.ActionParameters = exports.ExportThemesResponse = exports.UpdateThemeResponse = exports.UpdateThemeRequest = exports.GetThemeResponse = exports.CreateThemeResponse = exports.CreateThemeRequest = exports.ComponentConditionProperty = exports.MutationActionSetStateParameter = exports.UpdateThemeData = exports.Theme = exports.CreateThemeData = exports.ComponentBindingPropertiesValue = exports.ComponentProperty = exports.ComponentDataConfiguration = exports.ComponentBindingPropertiesValueProperties = exports.Predicate = exports.ThemeValues = exports.ThemeValue = exports.ListThemesResponse = exports.ThemeSummary = exports.ListThemesRequest = exports.GetThemeRequest = exports.ExportThemesRequest = exports.DeleteThemeRequest = exports.RefreshTokenResponse = exports.RefreshTokenRequest = exports.RefreshTokenRequestBody = exports.ExchangeCodeForTokenResponse = exports.ExchangeCodeForTokenRequest = exports.ExchangeCodeForTokenRequestBody = exports.TokenProviders = exports.ListComponentsResponse = exports.ComponentSummary = exports.ListComponentsRequest = exports.GetComponentRequest = exports.ExportComponentsRequest = exports.ResourceNotFoundException = exports.DeleteComponentRequest = exports.ServiceQuotaExceededException = exports.ResourceConflictException = exports.InvalidParameterException = exports.InternalServerException = exports.ComponentVariant = exports.SortProperty = exports.FormBindingElement = exports.ComponentPropertyBindingProperties = void 0;
|
|
4
|
+
exports.ExportComponentsResponse = exports.UpdateComponentResponse = exports.UpdateComponentRequest = exports.GetComponentResponse = exports.CreateComponentResponse = exports.CreateComponentRequest = exports.UpdateComponentData = exports.CreateComponentData = void 0;
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const AmplifyUIBuilderServiceException_1 = require("./AmplifyUIBuilderServiceException");
|
|
7
7
|
var ComponentPropertyBindingProperties;
|
|
@@ -272,6 +272,12 @@ var UpdateThemeData;
|
|
|
272
272
|
...obj,
|
|
273
273
|
});
|
|
274
274
|
})(UpdateThemeData = exports.UpdateThemeData || (exports.UpdateThemeData = {}));
|
|
275
|
+
var MutationActionSetStateParameter;
|
|
276
|
+
(function (MutationActionSetStateParameter) {
|
|
277
|
+
MutationActionSetStateParameter.filterSensitiveLog = (obj) => ({
|
|
278
|
+
...obj,
|
|
279
|
+
});
|
|
280
|
+
})(MutationActionSetStateParameter = exports.MutationActionSetStateParameter || (exports.MutationActionSetStateParameter = {}));
|
|
275
281
|
var ComponentConditionProperty;
|
|
276
282
|
(function (ComponentConditionProperty) {
|
|
277
283
|
ComponentConditionProperty.filterSensitiveLog = (obj) => ({
|
|
@@ -314,6 +320,18 @@ var ExportThemesResponse;
|
|
|
314
320
|
...obj,
|
|
315
321
|
});
|
|
316
322
|
})(ExportThemesResponse = exports.ExportThemesResponse || (exports.ExportThemesResponse = {}));
|
|
323
|
+
var ActionParameters;
|
|
324
|
+
(function (ActionParameters) {
|
|
325
|
+
ActionParameters.filterSensitiveLog = (obj) => ({
|
|
326
|
+
...obj,
|
|
327
|
+
});
|
|
328
|
+
})(ActionParameters = exports.ActionParameters || (exports.ActionParameters = {}));
|
|
329
|
+
var ComponentEvent;
|
|
330
|
+
(function (ComponentEvent) {
|
|
331
|
+
ComponentEvent.filterSensitiveLog = (obj) => ({
|
|
332
|
+
...obj,
|
|
333
|
+
});
|
|
334
|
+
})(ComponentEvent = exports.ComponentEvent || (exports.ComponentEvent = {}));
|
|
317
335
|
var ComponentChild;
|
|
318
336
|
(function (ComponentChild) {
|
|
319
337
|
ComponentChild.filterSensitiveLog = (obj) => ({
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateExportComponents = void 0;
|
|
4
|
+
const AmplifyUIBuilder_1 = require("../AmplifyUIBuilder");
|
|
5
|
+
const AmplifyUIBuilderClient_1 = require("../AmplifyUIBuilderClient");
|
|
6
|
+
const ExportComponentsCommand_1 = require("../commands/ExportComponentsCommand");
|
|
7
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.send(new ExportComponentsCommand_1.ExportComponentsCommand(input), ...args);
|
|
9
|
+
};
|
|
10
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
+
return await client.exportComponents(input, ...args);
|
|
12
|
+
};
|
|
13
|
+
async function* paginateExportComponents(config, input, ...additionalArguments) {
|
|
14
|
+
let token = config.startingToken || undefined;
|
|
15
|
+
let hasNext = true;
|
|
16
|
+
let page;
|
|
17
|
+
while (hasNext) {
|
|
18
|
+
input.nextToken = token;
|
|
19
|
+
if (config.client instanceof AmplifyUIBuilder_1.AmplifyUIBuilder) {
|
|
20
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
21
|
+
}
|
|
22
|
+
else if (config.client instanceof AmplifyUIBuilderClient_1.AmplifyUIBuilderClient) {
|
|
23
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
throw new Error("Invalid client, expected AmplifyUIBuilder | AmplifyUIBuilderClient");
|
|
27
|
+
}
|
|
28
|
+
yield page;
|
|
29
|
+
token = page.nextToken;
|
|
30
|
+
hasNext = !!token;
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
exports.paginateExportComponents = paginateExportComponents;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateExportThemes = void 0;
|
|
4
|
+
const AmplifyUIBuilder_1 = require("../AmplifyUIBuilder");
|
|
5
|
+
const AmplifyUIBuilderClient_1 = require("../AmplifyUIBuilderClient");
|
|
6
|
+
const ExportThemesCommand_1 = require("../commands/ExportThemesCommand");
|
|
7
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.send(new ExportThemesCommand_1.ExportThemesCommand(input), ...args);
|
|
9
|
+
};
|
|
10
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
+
return await client.exportThemes(input, ...args);
|
|
12
|
+
};
|
|
13
|
+
async function* paginateExportThemes(config, input, ...additionalArguments) {
|
|
14
|
+
let token = config.startingToken || undefined;
|
|
15
|
+
let hasNext = true;
|
|
16
|
+
let page;
|
|
17
|
+
while (hasNext) {
|
|
18
|
+
input.nextToken = token;
|
|
19
|
+
if (config.client instanceof AmplifyUIBuilder_1.AmplifyUIBuilder) {
|
|
20
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
21
|
+
}
|
|
22
|
+
else if (config.client instanceof AmplifyUIBuilderClient_1.AmplifyUIBuilderClient) {
|
|
23
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
throw new Error("Invalid client, expected AmplifyUIBuilder | AmplifyUIBuilderClient");
|
|
27
|
+
}
|
|
28
|
+
yield page;
|
|
29
|
+
token = page.nextToken;
|
|
30
|
+
hasNext = !!token;
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
exports.paginateExportThemes = paginateExportThemes;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./ExportComponentsPaginator"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./ExportThemesPaginator"), exports);
|
|
4
6
|
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
5
7
|
tslib_1.__exportStar(require("./ListComponentsPaginator"), exports);
|
|
6
8
|
tslib_1.__exportStar(require("./ListThemesPaginator"), exports);
|
|
@@ -259,6 +259,9 @@ const serializeAws_restJson1ExportComponentsCommand = async (input, context) =>
|
|
|
259
259
|
else {
|
|
260
260
|
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
261
261
|
}
|
|
262
|
+
const query = {
|
|
263
|
+
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
|
|
264
|
+
};
|
|
262
265
|
let body;
|
|
263
266
|
return new protocol_http_1.HttpRequest({
|
|
264
267
|
protocol,
|
|
@@ -267,6 +270,7 @@ const serializeAws_restJson1ExportComponentsCommand = async (input, context) =>
|
|
|
267
270
|
method: "GET",
|
|
268
271
|
headers,
|
|
269
272
|
path: resolvedPath,
|
|
273
|
+
query,
|
|
270
274
|
body,
|
|
271
275
|
});
|
|
272
276
|
};
|
|
@@ -296,6 +300,9 @@ const serializeAws_restJson1ExportThemesCommand = async (input, context) => {
|
|
|
296
300
|
else {
|
|
297
301
|
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
298
302
|
}
|
|
303
|
+
const query = {
|
|
304
|
+
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
|
|
305
|
+
};
|
|
299
306
|
let body;
|
|
300
307
|
return new protocol_http_1.HttpRequest({
|
|
301
308
|
protocol,
|
|
@@ -304,6 +311,7 @@ const serializeAws_restJson1ExportThemesCommand = async (input, context) => {
|
|
|
304
311
|
method: "GET",
|
|
305
312
|
headers,
|
|
306
313
|
path: resolvedPath,
|
|
314
|
+
query,
|
|
307
315
|
body,
|
|
308
316
|
});
|
|
309
317
|
};
|
|
@@ -859,11 +867,15 @@ const deserializeAws_restJson1ExportComponentsCommand = async (output, context)
|
|
|
859
867
|
const contents = {
|
|
860
868
|
$metadata: deserializeMetadata(output),
|
|
861
869
|
entities: undefined,
|
|
870
|
+
nextToken: undefined,
|
|
862
871
|
};
|
|
863
872
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
864
873
|
if (data.entities !== undefined && data.entities !== null) {
|
|
865
874
|
contents.entities = deserializeAws_restJson1ComponentList(data.entities, context);
|
|
866
875
|
}
|
|
876
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
877
|
+
contents.nextToken = smithy_client_1.expectString(data.nextToken);
|
|
878
|
+
}
|
|
867
879
|
return Promise.resolve(contents);
|
|
868
880
|
};
|
|
869
881
|
exports.deserializeAws_restJson1ExportComponentsCommand = deserializeAws_restJson1ExportComponentsCommand;
|
|
@@ -899,11 +911,15 @@ const deserializeAws_restJson1ExportThemesCommand = async (output, context) => {
|
|
|
899
911
|
const contents = {
|
|
900
912
|
$metadata: deserializeMetadata(output),
|
|
901
913
|
entities: undefined,
|
|
914
|
+
nextToken: undefined,
|
|
902
915
|
};
|
|
903
916
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
904
917
|
if (data.entities !== undefined && data.entities !== null) {
|
|
905
918
|
contents.entities = deserializeAws_restJson1ThemeList(data.entities, context);
|
|
906
919
|
}
|
|
920
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
921
|
+
contents.nextToken = smithy_client_1.expectString(data.nextToken);
|
|
922
|
+
}
|
|
907
923
|
return Promise.resolve(contents);
|
|
908
924
|
};
|
|
909
925
|
exports.deserializeAws_restJson1ExportThemesCommand = deserializeAws_restJson1ExportThemesCommand;
|
|
@@ -1285,6 +1301,27 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
1285
1301
|
});
|
|
1286
1302
|
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
1287
1303
|
};
|
|
1304
|
+
const serializeAws_restJson1ActionParameters = (input, context) => {
|
|
1305
|
+
return {
|
|
1306
|
+
...(input.anchor !== undefined &&
|
|
1307
|
+
input.anchor !== null && { anchor: serializeAws_restJson1ComponentProperty(input.anchor, context) }),
|
|
1308
|
+
...(input.fields !== undefined &&
|
|
1309
|
+
input.fields !== null && { fields: serializeAws_restJson1ComponentProperties(input.fields, context) }),
|
|
1310
|
+
...(input.global !== undefined &&
|
|
1311
|
+
input.global !== null && { global: serializeAws_restJson1ComponentProperty(input.global, context) }),
|
|
1312
|
+
...(input.id !== undefined &&
|
|
1313
|
+
input.id !== null && { id: serializeAws_restJson1ComponentProperty(input.id, context) }),
|
|
1314
|
+
...(input.model !== undefined && input.model !== null && { model: input.model }),
|
|
1315
|
+
...(input.state !== undefined &&
|
|
1316
|
+
input.state !== null && { state: serializeAws_restJson1MutationActionSetStateParameter(input.state, context) }),
|
|
1317
|
+
...(input.target !== undefined &&
|
|
1318
|
+
input.target !== null && { target: serializeAws_restJson1ComponentProperty(input.target, context) }),
|
|
1319
|
+
...(input.type !== undefined &&
|
|
1320
|
+
input.type !== null && { type: serializeAws_restJson1ComponentProperty(input.type, context) }),
|
|
1321
|
+
...(input.url !== undefined &&
|
|
1322
|
+
input.url !== null && { url: serializeAws_restJson1ComponentProperty(input.url, context) }),
|
|
1323
|
+
};
|
|
1324
|
+
};
|
|
1288
1325
|
const serializeAws_restJson1ComponentBindingProperties = (input, context) => {
|
|
1289
1326
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1290
1327
|
if (value === null) {
|
|
@@ -1323,6 +1360,8 @@ const serializeAws_restJson1ComponentChild = (input, context) => {
|
|
|
1323
1360
|
...(input.children !== undefined &&
|
|
1324
1361
|
input.children !== null && { children: serializeAws_restJson1ComponentChildList(input.children, context) }),
|
|
1325
1362
|
...(input.componentType !== undefined && input.componentType !== null && { componentType: input.componentType }),
|
|
1363
|
+
...(input.events !== undefined &&
|
|
1364
|
+
input.events !== null && { events: serializeAws_restJson1ComponentEvents(input.events, context) }),
|
|
1326
1365
|
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
1327
1366
|
...(input.properties !== undefined &&
|
|
1328
1367
|
input.properties !== null && {
|
|
@@ -1357,6 +1396,7 @@ const serializeAws_restJson1ComponentConditionProperty = (input, context) => {
|
|
|
1357
1396
|
input.else !== null && { else: serializeAws_restJson1ComponentProperty(input.else, context) }),
|
|
1358
1397
|
...(input.field !== undefined && input.field !== null && { field: input.field }),
|
|
1359
1398
|
...(input.operand !== undefined && input.operand !== null && { operand: input.operand }),
|
|
1399
|
+
...(input.operandType !== undefined && input.operandType !== null && { operandType: input.operandType }),
|
|
1360
1400
|
...(input.operator !== undefined && input.operator !== null && { operator: input.operator }),
|
|
1361
1401
|
...(input.property !== undefined && input.property !== null && { property: input.property }),
|
|
1362
1402
|
...(input.then !== undefined &&
|
|
@@ -1374,6 +1414,24 @@ const serializeAws_restJson1ComponentDataConfiguration = (input, context) => {
|
|
|
1374
1414
|
input.sort !== null && { sort: serializeAws_restJson1SortPropertyList(input.sort, context) }),
|
|
1375
1415
|
};
|
|
1376
1416
|
};
|
|
1417
|
+
const serializeAws_restJson1ComponentEvent = (input, context) => {
|
|
1418
|
+
return {
|
|
1419
|
+
...(input.action !== undefined && input.action !== null && { action: input.action }),
|
|
1420
|
+
...(input.parameters !== undefined &&
|
|
1421
|
+
input.parameters !== null && { parameters: serializeAws_restJson1ActionParameters(input.parameters, context) }),
|
|
1422
|
+
};
|
|
1423
|
+
};
|
|
1424
|
+
const serializeAws_restJson1ComponentEvents = (input, context) => {
|
|
1425
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1426
|
+
if (value === null) {
|
|
1427
|
+
return acc;
|
|
1428
|
+
}
|
|
1429
|
+
return {
|
|
1430
|
+
...acc,
|
|
1431
|
+
[key]: serializeAws_restJson1ComponentEvent(value, context),
|
|
1432
|
+
};
|
|
1433
|
+
}, {});
|
|
1434
|
+
};
|
|
1377
1435
|
const serializeAws_restJson1ComponentOverrides = (input, context) => {
|
|
1378
1436
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1379
1437
|
if (value === null) {
|
|
@@ -1419,6 +1477,7 @@ const serializeAws_restJson1ComponentProperty = (input, context) => {
|
|
|
1419
1477
|
input.collectionBindingProperties !== null && {
|
|
1420
1478
|
collectionBindingProperties: serializeAws_restJson1ComponentPropertyBindingProperties(input.collectionBindingProperties, context),
|
|
1421
1479
|
}),
|
|
1480
|
+
...(input.componentName !== undefined && input.componentName !== null && { componentName: input.componentName }),
|
|
1422
1481
|
...(input.concat !== undefined &&
|
|
1423
1482
|
input.concat !== null && { concat: serializeAws_restJson1ComponentPropertyList(input.concat, context) }),
|
|
1424
1483
|
...(input.condition !== undefined &&
|
|
@@ -1430,6 +1489,7 @@ const serializeAws_restJson1ComponentProperty = (input, context) => {
|
|
|
1430
1489
|
...(input.event !== undefined && input.event !== null && { event: input.event }),
|
|
1431
1490
|
...(input.importedValue !== undefined && input.importedValue !== null && { importedValue: input.importedValue }),
|
|
1432
1491
|
...(input.model !== undefined && input.model !== null && { model: input.model }),
|
|
1492
|
+
...(input.property !== undefined && input.property !== null && { property: input.property }),
|
|
1433
1493
|
...(input.type !== undefined && input.type !== null && { type: input.type }),
|
|
1434
1494
|
...(input.userAttribute !== undefined && input.userAttribute !== null && { userAttribute: input.userAttribute }),
|
|
1435
1495
|
...(input.value !== undefined && input.value !== null && { value: input.value }),
|
|
@@ -1495,6 +1555,8 @@ const serializeAws_restJson1CreateComponentData = (input, context) => {
|
|
|
1495
1555
|
collectionProperties: serializeAws_restJson1ComponentCollectionProperties(input.collectionProperties, context),
|
|
1496
1556
|
}),
|
|
1497
1557
|
...(input.componentType !== undefined && input.componentType !== null && { componentType: input.componentType }),
|
|
1558
|
+
...(input.events !== undefined &&
|
|
1559
|
+
input.events !== null && { events: serializeAws_restJson1ComponentEvents(input.events, context) }),
|
|
1498
1560
|
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
1499
1561
|
...(input.overrides !== undefined &&
|
|
1500
1562
|
input.overrides !== null && { overrides: serializeAws_restJson1ComponentOverrides(input.overrides, context) }),
|
|
@@ -1502,6 +1564,7 @@ const serializeAws_restJson1CreateComponentData = (input, context) => {
|
|
|
1502
1564
|
input.properties !== null && {
|
|
1503
1565
|
properties: serializeAws_restJson1ComponentProperties(input.properties, context),
|
|
1504
1566
|
}),
|
|
1567
|
+
...(input.schemaVersion !== undefined && input.schemaVersion !== null && { schemaVersion: input.schemaVersion }),
|
|
1505
1568
|
...(input.sourceId !== undefined && input.sourceId !== null && { sourceId: input.sourceId }),
|
|
1506
1569
|
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
|
|
1507
1570
|
...(input.variants !== undefined &&
|
|
@@ -1551,6 +1614,14 @@ const serializeAws_restJson1IdentifierList = (input, context) => {
|
|
|
1551
1614
|
return entry;
|
|
1552
1615
|
});
|
|
1553
1616
|
};
|
|
1617
|
+
const serializeAws_restJson1MutationActionSetStateParameter = (input, context) => {
|
|
1618
|
+
return {
|
|
1619
|
+
...(input.componentName !== undefined && input.componentName !== null && { componentName: input.componentName }),
|
|
1620
|
+
...(input.property !== undefined && input.property !== null && { property: input.property }),
|
|
1621
|
+
...(input.set !== undefined &&
|
|
1622
|
+
input.set !== null && { set: serializeAws_restJson1ComponentProperty(input.set, context) }),
|
|
1623
|
+
};
|
|
1624
|
+
};
|
|
1554
1625
|
const serializeAws_restJson1Predicate = (input, context) => {
|
|
1555
1626
|
return {
|
|
1556
1627
|
...(input.and !== undefined &&
|
|
@@ -1640,6 +1711,8 @@ const serializeAws_restJson1UpdateComponentData = (input, context) => {
|
|
|
1640
1711
|
collectionProperties: serializeAws_restJson1ComponentCollectionProperties(input.collectionProperties, context),
|
|
1641
1712
|
}),
|
|
1642
1713
|
...(input.componentType !== undefined && input.componentType !== null && { componentType: input.componentType }),
|
|
1714
|
+
...(input.events !== undefined &&
|
|
1715
|
+
input.events !== null && { events: serializeAws_restJson1ComponentEvents(input.events, context) }),
|
|
1643
1716
|
...(input.id !== undefined && input.id !== null && { id: input.id }),
|
|
1644
1717
|
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
1645
1718
|
...(input.overrides !== undefined &&
|
|
@@ -1648,6 +1721,7 @@ const serializeAws_restJson1UpdateComponentData = (input, context) => {
|
|
|
1648
1721
|
input.properties !== null && {
|
|
1649
1722
|
properties: serializeAws_restJson1ComponentProperties(input.properties, context),
|
|
1650
1723
|
}),
|
|
1724
|
+
...(input.schemaVersion !== undefined && input.schemaVersion !== null && { schemaVersion: input.schemaVersion }),
|
|
1651
1725
|
...(input.sourceId !== undefined && input.sourceId !== null && { sourceId: input.sourceId }),
|
|
1652
1726
|
...(input.variants !== undefined &&
|
|
1653
1727
|
input.variants !== null && { variants: serializeAws_restJson1ComponentVariants(input.variants, context) }),
|
|
@@ -1663,6 +1737,35 @@ const serializeAws_restJson1UpdateThemeData = (input, context) => {
|
|
|
1663
1737
|
input.values !== null && { values: serializeAws_restJson1ThemeValuesList(input.values, context) }),
|
|
1664
1738
|
};
|
|
1665
1739
|
};
|
|
1740
|
+
const deserializeAws_restJson1ActionParameters = (output, context) => {
|
|
1741
|
+
return {
|
|
1742
|
+
anchor: output.anchor !== undefined && output.anchor !== null
|
|
1743
|
+
? deserializeAws_restJson1ComponentProperty(output.anchor, context)
|
|
1744
|
+
: undefined,
|
|
1745
|
+
fields: output.fields !== undefined && output.fields !== null
|
|
1746
|
+
? deserializeAws_restJson1ComponentProperties(output.fields, context)
|
|
1747
|
+
: undefined,
|
|
1748
|
+
global: output.global !== undefined && output.global !== null
|
|
1749
|
+
? deserializeAws_restJson1ComponentProperty(output.global, context)
|
|
1750
|
+
: undefined,
|
|
1751
|
+
id: output.id !== undefined && output.id !== null
|
|
1752
|
+
? deserializeAws_restJson1ComponentProperty(output.id, context)
|
|
1753
|
+
: undefined,
|
|
1754
|
+
model: smithy_client_1.expectString(output.model),
|
|
1755
|
+
state: output.state !== undefined && output.state !== null
|
|
1756
|
+
? deserializeAws_restJson1MutationActionSetStateParameter(output.state, context)
|
|
1757
|
+
: undefined,
|
|
1758
|
+
target: output.target !== undefined && output.target !== null
|
|
1759
|
+
? deserializeAws_restJson1ComponentProperty(output.target, context)
|
|
1760
|
+
: undefined,
|
|
1761
|
+
type: output.type !== undefined && output.type !== null
|
|
1762
|
+
? deserializeAws_restJson1ComponentProperty(output.type, context)
|
|
1763
|
+
: undefined,
|
|
1764
|
+
url: output.url !== undefined && output.url !== null
|
|
1765
|
+
? deserializeAws_restJson1ComponentProperty(output.url, context)
|
|
1766
|
+
: undefined,
|
|
1767
|
+
};
|
|
1768
|
+
};
|
|
1666
1769
|
const deserializeAws_restJson1Component = (output, context) => {
|
|
1667
1770
|
return {
|
|
1668
1771
|
appId: smithy_client_1.expectString(output.appId),
|
|
@@ -1680,6 +1783,9 @@ const deserializeAws_restJson1Component = (output, context) => {
|
|
|
1680
1783
|
? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.createdAt))
|
|
1681
1784
|
: undefined,
|
|
1682
1785
|
environmentName: smithy_client_1.expectString(output.environmentName),
|
|
1786
|
+
events: output.events !== undefined && output.events !== null
|
|
1787
|
+
? deserializeAws_restJson1ComponentEvents(output.events, context)
|
|
1788
|
+
: undefined,
|
|
1683
1789
|
id: smithy_client_1.expectString(output.id),
|
|
1684
1790
|
modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
|
|
1685
1791
|
? smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output.modifiedAt))
|
|
@@ -1691,6 +1797,7 @@ const deserializeAws_restJson1Component = (output, context) => {
|
|
|
1691
1797
|
properties: output.properties !== undefined && output.properties !== null
|
|
1692
1798
|
? deserializeAws_restJson1ComponentProperties(output.properties, context)
|
|
1693
1799
|
: undefined,
|
|
1800
|
+
schemaVersion: smithy_client_1.expectString(output.schemaVersion),
|
|
1694
1801
|
sourceId: smithy_client_1.expectString(output.sourceId),
|
|
1695
1802
|
tags: output.tags !== undefined && output.tags !== null
|
|
1696
1803
|
? deserializeAws_restJson1Tags(output.tags, context)
|
|
@@ -1739,6 +1846,9 @@ const deserializeAws_restJson1ComponentChild = (output, context) => {
|
|
|
1739
1846
|
? deserializeAws_restJson1ComponentChildList(output.children, context)
|
|
1740
1847
|
: undefined,
|
|
1741
1848
|
componentType: smithy_client_1.expectString(output.componentType),
|
|
1849
|
+
events: output.events !== undefined && output.events !== null
|
|
1850
|
+
? deserializeAws_restJson1ComponentEvents(output.events, context)
|
|
1851
|
+
: undefined,
|
|
1742
1852
|
name: smithy_client_1.expectString(output.name),
|
|
1743
1853
|
properties: output.properties !== undefined && output.properties !== null
|
|
1744
1854
|
? deserializeAws_restJson1ComponentProperties(output.properties, context)
|
|
@@ -1774,6 +1884,7 @@ const deserializeAws_restJson1ComponentConditionProperty = (output, context) =>
|
|
|
1774
1884
|
: undefined,
|
|
1775
1885
|
field: smithy_client_1.expectString(output.field),
|
|
1776
1886
|
operand: smithy_client_1.expectString(output.operand),
|
|
1887
|
+
operandType: smithy_client_1.expectString(output.operandType),
|
|
1777
1888
|
operator: smithy_client_1.expectString(output.operator),
|
|
1778
1889
|
property: smithy_client_1.expectString(output.property),
|
|
1779
1890
|
then: output.then !== undefined && output.then !== null
|
|
@@ -1795,6 +1906,25 @@ const deserializeAws_restJson1ComponentDataConfiguration = (output, context) =>
|
|
|
1795
1906
|
: undefined,
|
|
1796
1907
|
};
|
|
1797
1908
|
};
|
|
1909
|
+
const deserializeAws_restJson1ComponentEvent = (output, context) => {
|
|
1910
|
+
return {
|
|
1911
|
+
action: smithy_client_1.expectString(output.action),
|
|
1912
|
+
parameters: output.parameters !== undefined && output.parameters !== null
|
|
1913
|
+
? deserializeAws_restJson1ActionParameters(output.parameters, context)
|
|
1914
|
+
: undefined,
|
|
1915
|
+
};
|
|
1916
|
+
};
|
|
1917
|
+
const deserializeAws_restJson1ComponentEvents = (output, context) => {
|
|
1918
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1919
|
+
if (value === null) {
|
|
1920
|
+
return acc;
|
|
1921
|
+
}
|
|
1922
|
+
return {
|
|
1923
|
+
...acc,
|
|
1924
|
+
[key]: deserializeAws_restJson1ComponentEvent(value, context),
|
|
1925
|
+
};
|
|
1926
|
+
}, {});
|
|
1927
|
+
};
|
|
1798
1928
|
const deserializeAws_restJson1ComponentList = (output, context) => {
|
|
1799
1929
|
const retVal = (output || [])
|
|
1800
1930
|
.filter((e) => e != null)
|
|
@@ -1850,6 +1980,7 @@ const deserializeAws_restJson1ComponentProperty = (output, context) => {
|
|
|
1850
1980
|
collectionBindingProperties: output.collectionBindingProperties !== undefined && output.collectionBindingProperties !== null
|
|
1851
1981
|
? deserializeAws_restJson1ComponentPropertyBindingProperties(output.collectionBindingProperties, context)
|
|
1852
1982
|
: undefined,
|
|
1983
|
+
componentName: smithy_client_1.expectString(output.componentName),
|
|
1853
1984
|
concat: output.concat !== undefined && output.concat !== null
|
|
1854
1985
|
? deserializeAws_restJson1ComponentPropertyList(output.concat, context)
|
|
1855
1986
|
: undefined,
|
|
@@ -1861,6 +1992,7 @@ const deserializeAws_restJson1ComponentProperty = (output, context) => {
|
|
|
1861
1992
|
event: smithy_client_1.expectString(output.event),
|
|
1862
1993
|
importedValue: smithy_client_1.expectString(output.importedValue),
|
|
1863
1994
|
model: smithy_client_1.expectString(output.model),
|
|
1995
|
+
property: smithy_client_1.expectString(output.property),
|
|
1864
1996
|
type: smithy_client_1.expectString(output.type),
|
|
1865
1997
|
userAttribute: smithy_client_1.expectString(output.userAttribute),
|
|
1866
1998
|
value: smithy_client_1.expectString(output.value),
|
|
@@ -1963,6 +2095,15 @@ const deserializeAws_restJson1IdentifierList = (output, context) => {
|
|
|
1963
2095
|
});
|
|
1964
2096
|
return retVal;
|
|
1965
2097
|
};
|
|
2098
|
+
const deserializeAws_restJson1MutationActionSetStateParameter = (output, context) => {
|
|
2099
|
+
return {
|
|
2100
|
+
componentName: smithy_client_1.expectString(output.componentName),
|
|
2101
|
+
property: smithy_client_1.expectString(output.property),
|
|
2102
|
+
set: output.set !== undefined && output.set !== null
|
|
2103
|
+
? deserializeAws_restJson1ComponentProperty(output.set, context)
|
|
2104
|
+
: undefined,
|
|
2105
|
+
};
|
|
2106
|
+
};
|
|
1966
2107
|
const deserializeAws_restJson1Predicate = (output, context) => {
|
|
1967
2108
|
return {
|
|
1968
2109
|
and: output.and !== undefined && output.and !== null
|
|
@@ -193,6 +193,10 @@ export var UpdateThemeData;
|
|
|
193
193
|
(function (UpdateThemeData) {
|
|
194
194
|
UpdateThemeData.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
195
195
|
})(UpdateThemeData || (UpdateThemeData = {}));
|
|
196
|
+
export var MutationActionSetStateParameter;
|
|
197
|
+
(function (MutationActionSetStateParameter) {
|
|
198
|
+
MutationActionSetStateParameter.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
199
|
+
})(MutationActionSetStateParameter || (MutationActionSetStateParameter = {}));
|
|
196
200
|
export var ComponentConditionProperty;
|
|
197
201
|
(function (ComponentConditionProperty) {
|
|
198
202
|
ComponentConditionProperty.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -221,6 +225,14 @@ export var ExportThemesResponse;
|
|
|
221
225
|
(function (ExportThemesResponse) {
|
|
222
226
|
ExportThemesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
223
227
|
})(ExportThemesResponse || (ExportThemesResponse = {}));
|
|
228
|
+
export var ActionParameters;
|
|
229
|
+
(function (ActionParameters) {
|
|
230
|
+
ActionParameters.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
231
|
+
})(ActionParameters || (ActionParameters = {}));
|
|
232
|
+
export var ComponentEvent;
|
|
233
|
+
(function (ComponentEvent) {
|
|
234
|
+
ComponentEvent.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
235
|
+
})(ComponentEvent || (ComponentEvent = {}));
|
|
224
236
|
export var ComponentChild;
|
|
225
237
|
(function (ComponentChild) {
|
|
226
238
|
ComponentChild.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
|
+
import { AmplifyUIBuilder } from "../AmplifyUIBuilder";
|
|
3
|
+
import { AmplifyUIBuilderClient } from "../AmplifyUIBuilderClient";
|
|
4
|
+
import { ExportComponentsCommand, } from "../commands/ExportComponentsCommand";
|
|
5
|
+
var makePagedClientRequest = function (client, input) {
|
|
6
|
+
var args = [];
|
|
7
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
+
args[_i - 2] = arguments[_i];
|
|
9
|
+
}
|
|
10
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
+
return __generator(this, function (_a) {
|
|
12
|
+
switch (_a.label) {
|
|
13
|
+
case 0: return [4, client.send.apply(client, __spreadArray([new ExportComponentsCommand(input)], __read(args)))];
|
|
14
|
+
case 1: return [2, _a.sent()];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
var makePagedRequest = function (client, input) {
|
|
20
|
+
var args = [];
|
|
21
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
+
args[_i - 2] = arguments[_i];
|
|
23
|
+
}
|
|
24
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
+
return __generator(this, function (_a) {
|
|
26
|
+
switch (_a.label) {
|
|
27
|
+
case 0: return [4, client.exportComponents.apply(client, __spreadArray([input], __read(args)))];
|
|
28
|
+
case 1: return [2, _a.sent()];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export function paginateExportComponents(config, input) {
|
|
34
|
+
var additionalArguments = [];
|
|
35
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
36
|
+
additionalArguments[_i - 2] = arguments[_i];
|
|
37
|
+
}
|
|
38
|
+
return __asyncGenerator(this, arguments, function paginateExportComponents_1() {
|
|
39
|
+
var token, hasNext, page;
|
|
40
|
+
return __generator(this, function (_a) {
|
|
41
|
+
switch (_a.label) {
|
|
42
|
+
case 0:
|
|
43
|
+
token = config.startingToken || undefined;
|
|
44
|
+
hasNext = true;
|
|
45
|
+
_a.label = 1;
|
|
46
|
+
case 1:
|
|
47
|
+
if (!hasNext) return [3, 9];
|
|
48
|
+
input.nextToken = token;
|
|
49
|
+
if (!(config.client instanceof AmplifyUIBuilder)) return [3, 3];
|
|
50
|
+
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
|
|
51
|
+
case 2:
|
|
52
|
+
page = _a.sent();
|
|
53
|
+
return [3, 6];
|
|
54
|
+
case 3:
|
|
55
|
+
if (!(config.client instanceof AmplifyUIBuilderClient)) return [3, 5];
|
|
56
|
+
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
|
|
57
|
+
case 4:
|
|
58
|
+
page = _a.sent();
|
|
59
|
+
return [3, 6];
|
|
60
|
+
case 5: throw new Error("Invalid client, expected AmplifyUIBuilder | AmplifyUIBuilderClient");
|
|
61
|
+
case 6: return [4, __await(page)];
|
|
62
|
+
case 7: return [4, _a.sent()];
|
|
63
|
+
case 8:
|
|
64
|
+
_a.sent();
|
|
65
|
+
token = page.nextToken;
|
|
66
|
+
hasNext = !!token;
|
|
67
|
+
return [3, 1];
|
|
68
|
+
case 9: return [4, __await(undefined)];
|
|
69
|
+
case 10: return [2, _a.sent()];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|