@aws-sdk/client-amplifyuibuilder 3.45.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 (124) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +201 -0
  3. package/README.md +212 -0
  4. package/dist-cjs/AmplifyUIBuilder.js +217 -0
  5. package/dist-cjs/AmplifyUIBuilderClient.js +35 -0
  6. package/dist-cjs/commands/CreateComponentCommand.js +36 -0
  7. package/dist-cjs/commands/CreateThemeCommand.js +36 -0
  8. package/dist-cjs/commands/DeleteComponentCommand.js +36 -0
  9. package/dist-cjs/commands/DeleteThemeCommand.js +36 -0
  10. package/dist-cjs/commands/ExchangeCodeForTokenCommand.js +36 -0
  11. package/dist-cjs/commands/ExportComponentsCommand.js +36 -0
  12. package/dist-cjs/commands/ExportThemesCommand.js +36 -0
  13. package/dist-cjs/commands/GetComponentCommand.js +36 -0
  14. package/dist-cjs/commands/GetThemeCommand.js +36 -0
  15. package/dist-cjs/commands/ListComponentsCommand.js +36 -0
  16. package/dist-cjs/commands/ListThemesCommand.js +36 -0
  17. package/dist-cjs/commands/RefreshTokenCommand.js +36 -0
  18. package/dist-cjs/commands/UpdateComponentCommand.js +36 -0
  19. package/dist-cjs/commands/UpdateThemeCommand.js +36 -0
  20. package/dist-cjs/commands/index.js +17 -0
  21. package/dist-cjs/endpoints.js +131 -0
  22. package/dist-cjs/index.js +8 -0
  23. package/dist-cjs/models/index.js +4 -0
  24. package/dist-cjs/models/models_0.js +340 -0
  25. package/dist-cjs/pagination/Interfaces.js +2 -0
  26. package/dist-cjs/pagination/ListComponentsPaginator.js +35 -0
  27. package/dist-cjs/pagination/ListThemesPaginator.js +35 -0
  28. package/dist-cjs/pagination/index.js +6 -0
  29. package/dist-cjs/protocols/Aws_restJson1.js +2404 -0
  30. package/dist-cjs/runtimeConfig.browser.js +40 -0
  31. package/dist-cjs/runtimeConfig.js +44 -0
  32. package/dist-cjs/runtimeConfig.native.js +16 -0
  33. package/dist-cjs/runtimeConfig.shared.js +17 -0
  34. package/dist-es/AmplifyUIBuilder.js +220 -0
  35. package/dist-es/AmplifyUIBuilderClient.js +37 -0
  36. package/dist-es/commands/CreateComponentCommand.js +39 -0
  37. package/dist-es/commands/CreateThemeCommand.js +39 -0
  38. package/dist-es/commands/DeleteComponentCommand.js +39 -0
  39. package/dist-es/commands/DeleteThemeCommand.js +39 -0
  40. package/dist-es/commands/ExchangeCodeForTokenCommand.js +39 -0
  41. package/dist-es/commands/ExportComponentsCommand.js +39 -0
  42. package/dist-es/commands/ExportThemesCommand.js +39 -0
  43. package/dist-es/commands/GetComponentCommand.js +39 -0
  44. package/dist-es/commands/GetThemeCommand.js +39 -0
  45. package/dist-es/commands/ListComponentsCommand.js +39 -0
  46. package/dist-es/commands/ListThemesCommand.js +39 -0
  47. package/dist-es/commands/RefreshTokenCommand.js +39 -0
  48. package/dist-es/commands/UpdateComponentCommand.js +39 -0
  49. package/dist-es/commands/UpdateThemeCommand.js +39 -0
  50. package/dist-es/commands/index.js +14 -0
  51. package/dist-es/endpoints.js +127 -0
  52. package/dist-es/index.js +5 -0
  53. package/dist-es/models/index.js +1 -0
  54. package/dist-es/models/models_0.js +222 -0
  55. package/dist-es/pagination/Interfaces.js +1 -0
  56. package/dist-es/pagination/ListComponentsPaginator.js +74 -0
  57. package/dist-es/pagination/ListThemesPaginator.js +74 -0
  58. package/dist-es/pagination/index.js +3 -0
  59. package/dist-es/protocols/Aws_restJson1.js +2546 -0
  60. package/dist-es/runtimeConfig.browser.js +17 -0
  61. package/dist-es/runtimeConfig.js +21 -0
  62. package/dist-es/runtimeConfig.native.js +8 -0
  63. package/dist-es/runtimeConfig.shared.js +13 -0
  64. package/dist-types/AmplifyUIBuilder.d.ts +116 -0
  65. package/dist-types/AmplifyUIBuilderClient.d.ts +163 -0
  66. package/dist-types/commands/CreateComponentCommand.d.ts +35 -0
  67. package/dist-types/commands/CreateThemeCommand.d.ts +35 -0
  68. package/dist-types/commands/DeleteComponentCommand.d.ts +35 -0
  69. package/dist-types/commands/DeleteThemeCommand.d.ts +35 -0
  70. package/dist-types/commands/ExchangeCodeForTokenCommand.d.ts +35 -0
  71. package/dist-types/commands/ExportComponentsCommand.d.ts +36 -0
  72. package/dist-types/commands/ExportThemesCommand.d.ts +36 -0
  73. package/dist-types/commands/GetComponentCommand.d.ts +35 -0
  74. package/dist-types/commands/GetThemeCommand.d.ts +35 -0
  75. package/dist-types/commands/ListComponentsCommand.d.ts +35 -0
  76. package/dist-types/commands/ListThemesCommand.d.ts +35 -0
  77. package/dist-types/commands/RefreshTokenCommand.d.ts +35 -0
  78. package/dist-types/commands/UpdateComponentCommand.d.ts +35 -0
  79. package/dist-types/commands/UpdateThemeCommand.d.ts +35 -0
  80. package/dist-types/commands/index.d.ts +14 -0
  81. package/dist-types/endpoints.d.ts +2 -0
  82. package/dist-types/index.d.ts +5 -0
  83. package/dist-types/models/index.d.ts +1 -0
  84. package/dist-types/models/models_0.d.ts +1342 -0
  85. package/dist-types/pagination/Interfaces.d.ts +6 -0
  86. package/dist-types/pagination/ListComponentsPaginator.d.ts +4 -0
  87. package/dist-types/pagination/ListThemesPaginator.d.ts +4 -0
  88. package/dist-types/pagination/index.d.ts +3 -0
  89. package/dist-types/protocols/Aws_restJson1.d.ts +44 -0
  90. package/dist-types/runtimeConfig.browser.d.ts +39 -0
  91. package/dist-types/runtimeConfig.d.ts +39 -0
  92. package/dist-types/runtimeConfig.native.d.ts +38 -0
  93. package/dist-types/runtimeConfig.shared.d.ts +13 -0
  94. package/dist-types/ts3.4/AmplifyUIBuilder.d.ts +75 -0
  95. package/dist-types/ts3.4/AmplifyUIBuilderClient.d.ts +85 -0
  96. package/dist-types/ts3.4/commands/CreateComponentCommand.d.ts +17 -0
  97. package/dist-types/ts3.4/commands/CreateThemeCommand.d.ts +17 -0
  98. package/dist-types/ts3.4/commands/DeleteComponentCommand.d.ts +17 -0
  99. package/dist-types/ts3.4/commands/DeleteThemeCommand.d.ts +17 -0
  100. package/dist-types/ts3.4/commands/ExchangeCodeForTokenCommand.d.ts +17 -0
  101. package/dist-types/ts3.4/commands/ExportComponentsCommand.d.ts +17 -0
  102. package/dist-types/ts3.4/commands/ExportThemesCommand.d.ts +17 -0
  103. package/dist-types/ts3.4/commands/GetComponentCommand.d.ts +17 -0
  104. package/dist-types/ts3.4/commands/GetThemeCommand.d.ts +17 -0
  105. package/dist-types/ts3.4/commands/ListComponentsCommand.d.ts +17 -0
  106. package/dist-types/ts3.4/commands/ListThemesCommand.d.ts +17 -0
  107. package/dist-types/ts3.4/commands/RefreshTokenCommand.d.ts +17 -0
  108. package/dist-types/ts3.4/commands/UpdateComponentCommand.d.ts +17 -0
  109. package/dist-types/ts3.4/commands/UpdateThemeCommand.d.ts +17 -0
  110. package/dist-types/ts3.4/commands/index.d.ts +14 -0
  111. package/dist-types/ts3.4/endpoints.d.ts +2 -0
  112. package/dist-types/ts3.4/index.d.ts +5 -0
  113. package/dist-types/ts3.4/models/index.d.ts +1 -0
  114. package/dist-types/ts3.4/models/models_0.d.ts +783 -0
  115. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  116. package/dist-types/ts3.4/pagination/ListComponentsPaginator.d.ts +4 -0
  117. package/dist-types/ts3.4/pagination/ListThemesPaginator.d.ts +4 -0
  118. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  119. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +44 -0
  120. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +37 -0
  121. package/dist-types/ts3.4/runtimeConfig.d.ts +37 -0
  122. package/dist-types/ts3.4/runtimeConfig.native.d.ts +36 -0
  123. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
  124. package/package.json +96 -0
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const config_resolver_1 = require("@aws-sdk/config-resolver");
8
+ const fetch_http_handler_1 = require("@aws-sdk/fetch-http-handler");
9
+ const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
10
+ const middleware_retry_1 = require("@aws-sdk/middleware-retry");
11
+ const util_base64_browser_1 = require("@aws-sdk/util-base64-browser");
12
+ const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
13
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
14
+ const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
15
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
+ const getRuntimeConfig = (config) => {
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
+ const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
19
+ return {
20
+ ...clientSharedValues,
21
+ ...config,
22
+ runtime: "browser",
23
+ base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
24
+ base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
25
+ bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
26
+ credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
+ defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_browser_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
28
+ maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
29
+ region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalid_dependency_1.invalidProvider("Region is missing"),
30
+ requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(),
31
+ retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (() => Promise.resolve(middleware_retry_1.DEFAULT_RETRY_MODE)),
32
+ sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
33
+ streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
34
+ useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
35
+ useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
36
+ utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_browser_1.fromUtf8,
37
+ utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_browser_1.toUtf8,
38
+ };
39
+ };
40
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const client_sts_1 = require("@aws-sdk/client-sts");
7
+ const config_resolver_1 = require("@aws-sdk/config-resolver");
8
+ const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
9
+ const hash_node_1 = require("@aws-sdk/hash-node");
10
+ const middleware_retry_1 = require("@aws-sdk/middleware-retry");
11
+ const node_config_provider_1 = require("@aws-sdk/node-config-provider");
12
+ const node_http_handler_1 = require("@aws-sdk/node-http-handler");
13
+ const util_base64_node_1 = require("@aws-sdk/util-base64-node");
14
+ const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
15
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
16
+ const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
17
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
18
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
19
+ const getRuntimeConfig = (config) => {
20
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
21
+ smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
22
+ const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
23
+ return {
24
+ ...clientSharedValues,
25
+ ...config,
26
+ runtime: "node",
27
+ base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
28
+ base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
29
+ bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
30
+ credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : client_sts_1.decorateDefaultCredentialProvider(credential_provider_node_1.defaultProvider),
31
+ defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
32
+ maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
33
+ region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
34
+ requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
35
+ retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
36
+ sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
37
+ streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
38
+ useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
39
+ useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
40
+ utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
41
+ utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
42
+ };
43
+ };
44
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ var _a;
8
+ const browserDefaults = runtimeConfig_browser_1.getRuntimeConfig(config);
9
+ return {
10
+ ...browserDefaults,
11
+ ...config,
12
+ runtime: "react-native",
13
+ sha256: (_a = config === null || config === void 0 ? void 0 : config.sha256) !== null && _a !== void 0 ? _a : sha256_js_1.Sha256,
14
+ };
15
+ };
16
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const url_parser_1 = require("@aws-sdk/url-parser");
5
+ const endpoints_1 = require("./endpoints");
6
+ const getRuntimeConfig = (config) => {
7
+ var _a, _b, _c, _d, _e;
8
+ return ({
9
+ apiVersion: "2021-08-11",
10
+ disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
11
+ logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},
12
+ regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider,
13
+ serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "AmplifyUIBuilder",
14
+ urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,
15
+ });
16
+ };
17
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,220 @@
1
+ import { __extends } from "tslib";
2
+ import { AmplifyUIBuilderClient } from "./AmplifyUIBuilderClient";
3
+ import { CreateComponentCommand, } from "./commands/CreateComponentCommand";
4
+ import { CreateThemeCommand } from "./commands/CreateThemeCommand";
5
+ import { DeleteComponentCommand, } from "./commands/DeleteComponentCommand";
6
+ import { DeleteThemeCommand } from "./commands/DeleteThemeCommand";
7
+ import { ExchangeCodeForTokenCommand, } from "./commands/ExchangeCodeForTokenCommand";
8
+ import { ExportComponentsCommand, } from "./commands/ExportComponentsCommand";
9
+ import { ExportThemesCommand, } from "./commands/ExportThemesCommand";
10
+ import { GetComponentCommand, } from "./commands/GetComponentCommand";
11
+ import { GetThemeCommand } from "./commands/GetThemeCommand";
12
+ import { ListComponentsCommand, } from "./commands/ListComponentsCommand";
13
+ import { ListThemesCommand } from "./commands/ListThemesCommand";
14
+ import { RefreshTokenCommand, } from "./commands/RefreshTokenCommand";
15
+ import { UpdateComponentCommand, } from "./commands/UpdateComponentCommand";
16
+ import { UpdateThemeCommand } from "./commands/UpdateThemeCommand";
17
+ var AmplifyUIBuilder = (function (_super) {
18
+ __extends(AmplifyUIBuilder, _super);
19
+ function AmplifyUIBuilder() {
20
+ return _super !== null && _super.apply(this, arguments) || this;
21
+ }
22
+ AmplifyUIBuilder.prototype.createComponent = function (args, optionsOrCb, cb) {
23
+ var command = new CreateComponentCommand(args);
24
+ if (typeof optionsOrCb === "function") {
25
+ this.send(command, optionsOrCb);
26
+ }
27
+ else if (typeof cb === "function") {
28
+ if (typeof optionsOrCb !== "object")
29
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
30
+ this.send(command, optionsOrCb || {}, cb);
31
+ }
32
+ else {
33
+ return this.send(command, optionsOrCb);
34
+ }
35
+ };
36
+ AmplifyUIBuilder.prototype.createTheme = function (args, optionsOrCb, cb) {
37
+ var command = new CreateThemeCommand(args);
38
+ if (typeof optionsOrCb === "function") {
39
+ this.send(command, optionsOrCb);
40
+ }
41
+ else if (typeof cb === "function") {
42
+ if (typeof optionsOrCb !== "object")
43
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
44
+ this.send(command, optionsOrCb || {}, cb);
45
+ }
46
+ else {
47
+ return this.send(command, optionsOrCb);
48
+ }
49
+ };
50
+ AmplifyUIBuilder.prototype.deleteComponent = function (args, optionsOrCb, cb) {
51
+ var command = new DeleteComponentCommand(args);
52
+ if (typeof optionsOrCb === "function") {
53
+ this.send(command, optionsOrCb);
54
+ }
55
+ else if (typeof cb === "function") {
56
+ if (typeof optionsOrCb !== "object")
57
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
58
+ this.send(command, optionsOrCb || {}, cb);
59
+ }
60
+ else {
61
+ return this.send(command, optionsOrCb);
62
+ }
63
+ };
64
+ AmplifyUIBuilder.prototype.deleteTheme = function (args, optionsOrCb, cb) {
65
+ var command = new DeleteThemeCommand(args);
66
+ if (typeof optionsOrCb === "function") {
67
+ this.send(command, optionsOrCb);
68
+ }
69
+ else if (typeof cb === "function") {
70
+ if (typeof optionsOrCb !== "object")
71
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
72
+ this.send(command, optionsOrCb || {}, cb);
73
+ }
74
+ else {
75
+ return this.send(command, optionsOrCb);
76
+ }
77
+ };
78
+ AmplifyUIBuilder.prototype.exchangeCodeForToken = function (args, optionsOrCb, cb) {
79
+ var command = new ExchangeCodeForTokenCommand(args);
80
+ if (typeof optionsOrCb === "function") {
81
+ this.send(command, optionsOrCb);
82
+ }
83
+ else if (typeof cb === "function") {
84
+ if (typeof optionsOrCb !== "object")
85
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
86
+ this.send(command, optionsOrCb || {}, cb);
87
+ }
88
+ else {
89
+ return this.send(command, optionsOrCb);
90
+ }
91
+ };
92
+ AmplifyUIBuilder.prototype.exportComponents = function (args, optionsOrCb, cb) {
93
+ var command = new ExportComponentsCommand(args);
94
+ if (typeof optionsOrCb === "function") {
95
+ this.send(command, optionsOrCb);
96
+ }
97
+ else if (typeof cb === "function") {
98
+ if (typeof optionsOrCb !== "object")
99
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
100
+ this.send(command, optionsOrCb || {}, cb);
101
+ }
102
+ else {
103
+ return this.send(command, optionsOrCb);
104
+ }
105
+ };
106
+ AmplifyUIBuilder.prototype.exportThemes = function (args, optionsOrCb, cb) {
107
+ var command = new ExportThemesCommand(args);
108
+ if (typeof optionsOrCb === "function") {
109
+ this.send(command, optionsOrCb);
110
+ }
111
+ else if (typeof cb === "function") {
112
+ if (typeof optionsOrCb !== "object")
113
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
114
+ this.send(command, optionsOrCb || {}, cb);
115
+ }
116
+ else {
117
+ return this.send(command, optionsOrCb);
118
+ }
119
+ };
120
+ AmplifyUIBuilder.prototype.getComponent = function (args, optionsOrCb, cb) {
121
+ var command = new GetComponentCommand(args);
122
+ if (typeof optionsOrCb === "function") {
123
+ this.send(command, optionsOrCb);
124
+ }
125
+ else if (typeof cb === "function") {
126
+ if (typeof optionsOrCb !== "object")
127
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
128
+ this.send(command, optionsOrCb || {}, cb);
129
+ }
130
+ else {
131
+ return this.send(command, optionsOrCb);
132
+ }
133
+ };
134
+ AmplifyUIBuilder.prototype.getTheme = function (args, optionsOrCb, cb) {
135
+ var command = new GetThemeCommand(args);
136
+ if (typeof optionsOrCb === "function") {
137
+ this.send(command, optionsOrCb);
138
+ }
139
+ else if (typeof cb === "function") {
140
+ if (typeof optionsOrCb !== "object")
141
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
142
+ this.send(command, optionsOrCb || {}, cb);
143
+ }
144
+ else {
145
+ return this.send(command, optionsOrCb);
146
+ }
147
+ };
148
+ AmplifyUIBuilder.prototype.listComponents = function (args, optionsOrCb, cb) {
149
+ var command = new ListComponentsCommand(args);
150
+ if (typeof optionsOrCb === "function") {
151
+ this.send(command, optionsOrCb);
152
+ }
153
+ else if (typeof cb === "function") {
154
+ if (typeof optionsOrCb !== "object")
155
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
156
+ this.send(command, optionsOrCb || {}, cb);
157
+ }
158
+ else {
159
+ return this.send(command, optionsOrCb);
160
+ }
161
+ };
162
+ AmplifyUIBuilder.prototype.listThemes = function (args, optionsOrCb, cb) {
163
+ var command = new ListThemesCommand(args);
164
+ if (typeof optionsOrCb === "function") {
165
+ this.send(command, optionsOrCb);
166
+ }
167
+ else if (typeof cb === "function") {
168
+ if (typeof optionsOrCb !== "object")
169
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
170
+ this.send(command, optionsOrCb || {}, cb);
171
+ }
172
+ else {
173
+ return this.send(command, optionsOrCb);
174
+ }
175
+ };
176
+ AmplifyUIBuilder.prototype.refreshToken = function (args, optionsOrCb, cb) {
177
+ var command = new RefreshTokenCommand(args);
178
+ if (typeof optionsOrCb === "function") {
179
+ this.send(command, optionsOrCb);
180
+ }
181
+ else if (typeof cb === "function") {
182
+ if (typeof optionsOrCb !== "object")
183
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
184
+ this.send(command, optionsOrCb || {}, cb);
185
+ }
186
+ else {
187
+ return this.send(command, optionsOrCb);
188
+ }
189
+ };
190
+ AmplifyUIBuilder.prototype.updateComponent = function (args, optionsOrCb, cb) {
191
+ var command = new UpdateComponentCommand(args);
192
+ if (typeof optionsOrCb === "function") {
193
+ this.send(command, optionsOrCb);
194
+ }
195
+ else if (typeof cb === "function") {
196
+ if (typeof optionsOrCb !== "object")
197
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
198
+ this.send(command, optionsOrCb || {}, cb);
199
+ }
200
+ else {
201
+ return this.send(command, optionsOrCb);
202
+ }
203
+ };
204
+ AmplifyUIBuilder.prototype.updateTheme = function (args, optionsOrCb, cb) {
205
+ var command = new UpdateThemeCommand(args);
206
+ if (typeof optionsOrCb === "function") {
207
+ this.send(command, optionsOrCb);
208
+ }
209
+ else if (typeof cb === "function") {
210
+ if (typeof optionsOrCb !== "object")
211
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
212
+ this.send(command, optionsOrCb || {}, cb);
213
+ }
214
+ else {
215
+ return this.send(command, optionsOrCb);
216
+ }
217
+ };
218
+ return AmplifyUIBuilder;
219
+ }(AmplifyUIBuilderClient));
220
+ export { AmplifyUIBuilder };
@@ -0,0 +1,37 @@
1
+ import { __extends } from "tslib";
2
+ import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
+ import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
+ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
5
+ import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
6
+ import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
7
+ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
8
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
9
+ import { Client as __Client, } from "@aws-sdk/smithy-client";
10
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
11
+ var AmplifyUIBuilderClient = (function (_super) {
12
+ __extends(AmplifyUIBuilderClient, _super);
13
+ function AmplifyUIBuilderClient(configuration) {
14
+ var _this = this;
15
+ var _config_0 = __getRuntimeConfig(configuration);
16
+ var _config_1 = resolveRegionConfig(_config_0);
17
+ var _config_2 = resolveEndpointsConfig(_config_1);
18
+ var _config_3 = resolveRetryConfig(_config_2);
19
+ var _config_4 = resolveHostHeaderConfig(_config_3);
20
+ var _config_5 = resolveAwsAuthConfig(_config_4);
21
+ var _config_6 = resolveUserAgentConfig(_config_5);
22
+ _this = _super.call(this, _config_6) || this;
23
+ _this.config = _config_6;
24
+ _this.middlewareStack.use(getRetryPlugin(_this.config));
25
+ _this.middlewareStack.use(getContentLengthPlugin(_this.config));
26
+ _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
27
+ _this.middlewareStack.use(getLoggerPlugin(_this.config));
28
+ _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
29
+ _this.middlewareStack.use(getUserAgentPlugin(_this.config));
30
+ return _this;
31
+ }
32
+ AmplifyUIBuilderClient.prototype.destroy = function () {
33
+ _super.prototype.destroy.call(this);
34
+ };
35
+ return AmplifyUIBuilderClient;
36
+ }(__Client));
37
+ export { AmplifyUIBuilderClient };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { CreateComponentRequest, CreateComponentResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1CreateComponentCommand, serializeAws_restJson1CreateComponentCommand, } from "../protocols/Aws_restJson1";
6
+ var CreateComponentCommand = (function (_super) {
7
+ __extends(CreateComponentCommand, _super);
8
+ function CreateComponentCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ CreateComponentCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "AmplifyUIBuilderClient";
18
+ var commandName = "CreateComponentCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: CreateComponentRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: CreateComponentResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ CreateComponentCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1CreateComponentCommand(input, context);
33
+ };
34
+ CreateComponentCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1CreateComponentCommand(output, context);
36
+ };
37
+ return CreateComponentCommand;
38
+ }($Command));
39
+ export { CreateComponentCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { CreateThemeRequest, CreateThemeResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1CreateThemeCommand, serializeAws_restJson1CreateThemeCommand, } from "../protocols/Aws_restJson1";
6
+ var CreateThemeCommand = (function (_super) {
7
+ __extends(CreateThemeCommand, _super);
8
+ function CreateThemeCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ CreateThemeCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "AmplifyUIBuilderClient";
18
+ var commandName = "CreateThemeCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: CreateThemeRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: CreateThemeResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ CreateThemeCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1CreateThemeCommand(input, context);
33
+ };
34
+ CreateThemeCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1CreateThemeCommand(output, context);
36
+ };
37
+ return CreateThemeCommand;
38
+ }($Command));
39
+ export { CreateThemeCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { DeleteComponentRequest } from "../models/models_0";
5
+ import { deserializeAws_restJson1DeleteComponentCommand, serializeAws_restJson1DeleteComponentCommand, } from "../protocols/Aws_restJson1";
6
+ var DeleteComponentCommand = (function (_super) {
7
+ __extends(DeleteComponentCommand, _super);
8
+ function DeleteComponentCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ DeleteComponentCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "AmplifyUIBuilderClient";
18
+ var commandName = "DeleteComponentCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: DeleteComponentRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: function (output) { return output; },
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ DeleteComponentCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1DeleteComponentCommand(input, context);
33
+ };
34
+ DeleteComponentCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1DeleteComponentCommand(output, context);
36
+ };
37
+ return DeleteComponentCommand;
38
+ }($Command));
39
+ export { DeleteComponentCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { DeleteThemeRequest } from "../models/models_0";
5
+ import { deserializeAws_restJson1DeleteThemeCommand, serializeAws_restJson1DeleteThemeCommand, } from "../protocols/Aws_restJson1";
6
+ var DeleteThemeCommand = (function (_super) {
7
+ __extends(DeleteThemeCommand, _super);
8
+ function DeleteThemeCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ DeleteThemeCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "AmplifyUIBuilderClient";
18
+ var commandName = "DeleteThemeCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: DeleteThemeRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: function (output) { return output; },
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ DeleteThemeCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1DeleteThemeCommand(input, context);
33
+ };
34
+ DeleteThemeCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1DeleteThemeCommand(output, context);
36
+ };
37
+ return DeleteThemeCommand;
38
+ }($Command));
39
+ export { DeleteThemeCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ExchangeCodeForTokenRequest, ExchangeCodeForTokenResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1ExchangeCodeForTokenCommand, serializeAws_restJson1ExchangeCodeForTokenCommand, } from "../protocols/Aws_restJson1";
6
+ var ExchangeCodeForTokenCommand = (function (_super) {
7
+ __extends(ExchangeCodeForTokenCommand, _super);
8
+ function ExchangeCodeForTokenCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ ExchangeCodeForTokenCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "AmplifyUIBuilderClient";
18
+ var commandName = "ExchangeCodeForTokenCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: ExchangeCodeForTokenRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: ExchangeCodeForTokenResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ ExchangeCodeForTokenCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1ExchangeCodeForTokenCommand(input, context);
33
+ };
34
+ ExchangeCodeForTokenCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1ExchangeCodeForTokenCommand(output, context);
36
+ };
37
+ return ExchangeCodeForTokenCommand;
38
+ }($Command));
39
+ export { ExchangeCodeForTokenCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ExportComponentsRequest, ExportComponentsResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1ExportComponentsCommand, serializeAws_restJson1ExportComponentsCommand, } from "../protocols/Aws_restJson1";
6
+ var ExportComponentsCommand = (function (_super) {
7
+ __extends(ExportComponentsCommand, _super);
8
+ function ExportComponentsCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ ExportComponentsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "AmplifyUIBuilderClient";
18
+ var commandName = "ExportComponentsCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: ExportComponentsRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: ExportComponentsResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ ExportComponentsCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1ExportComponentsCommand(input, context);
33
+ };
34
+ ExportComponentsCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1ExportComponentsCommand(output, context);
36
+ };
37
+ return ExportComponentsCommand;
38
+ }($Command));
39
+ export { ExportComponentsCommand };