@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.
- package/CHANGELOG.md +11 -0
- package/LICENSE +201 -0
- package/README.md +212 -0
- package/dist-cjs/AmplifyUIBuilder.js +217 -0
- package/dist-cjs/AmplifyUIBuilderClient.js +35 -0
- package/dist-cjs/commands/CreateComponentCommand.js +36 -0
- package/dist-cjs/commands/CreateThemeCommand.js +36 -0
- package/dist-cjs/commands/DeleteComponentCommand.js +36 -0
- package/dist-cjs/commands/DeleteThemeCommand.js +36 -0
- package/dist-cjs/commands/ExchangeCodeForTokenCommand.js +36 -0
- package/dist-cjs/commands/ExportComponentsCommand.js +36 -0
- package/dist-cjs/commands/ExportThemesCommand.js +36 -0
- package/dist-cjs/commands/GetComponentCommand.js +36 -0
- package/dist-cjs/commands/GetThemeCommand.js +36 -0
- package/dist-cjs/commands/ListComponentsCommand.js +36 -0
- package/dist-cjs/commands/ListThemesCommand.js +36 -0
- package/dist-cjs/commands/RefreshTokenCommand.js +36 -0
- package/dist-cjs/commands/UpdateComponentCommand.js +36 -0
- package/dist-cjs/commands/UpdateThemeCommand.js +36 -0
- package/dist-cjs/commands/index.js +17 -0
- package/dist-cjs/endpoints.js +131 -0
- package/dist-cjs/index.js +8 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +340 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListComponentsPaginator.js +35 -0
- package/dist-cjs/pagination/ListThemesPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +6 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2404 -0
- package/dist-cjs/runtimeConfig.browser.js +40 -0
- package/dist-cjs/runtimeConfig.js +44 -0
- package/dist-cjs/runtimeConfig.native.js +16 -0
- package/dist-cjs/runtimeConfig.shared.js +17 -0
- package/dist-es/AmplifyUIBuilder.js +220 -0
- package/dist-es/AmplifyUIBuilderClient.js +37 -0
- package/dist-es/commands/CreateComponentCommand.js +39 -0
- package/dist-es/commands/CreateThemeCommand.js +39 -0
- package/dist-es/commands/DeleteComponentCommand.js +39 -0
- package/dist-es/commands/DeleteThemeCommand.js +39 -0
- package/dist-es/commands/ExchangeCodeForTokenCommand.js +39 -0
- package/dist-es/commands/ExportComponentsCommand.js +39 -0
- package/dist-es/commands/ExportThemesCommand.js +39 -0
- package/dist-es/commands/GetComponentCommand.js +39 -0
- package/dist-es/commands/GetThemeCommand.js +39 -0
- package/dist-es/commands/ListComponentsCommand.js +39 -0
- package/dist-es/commands/ListThemesCommand.js +39 -0
- package/dist-es/commands/RefreshTokenCommand.js +39 -0
- package/dist-es/commands/UpdateComponentCommand.js +39 -0
- package/dist-es/commands/UpdateThemeCommand.js +39 -0
- package/dist-es/commands/index.js +14 -0
- package/dist-es/endpoints.js +127 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +222 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListComponentsPaginator.js +74 -0
- package/dist-es/pagination/ListThemesPaginator.js +74 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +2546 -0
- package/dist-es/runtimeConfig.browser.js +17 -0
- package/dist-es/runtimeConfig.js +21 -0
- package/dist-es/runtimeConfig.native.js +8 -0
- package/dist-es/runtimeConfig.shared.js +13 -0
- package/dist-types/AmplifyUIBuilder.d.ts +116 -0
- package/dist-types/AmplifyUIBuilderClient.d.ts +163 -0
- package/dist-types/commands/CreateComponentCommand.d.ts +35 -0
- package/dist-types/commands/CreateThemeCommand.d.ts +35 -0
- package/dist-types/commands/DeleteComponentCommand.d.ts +35 -0
- package/dist-types/commands/DeleteThemeCommand.d.ts +35 -0
- package/dist-types/commands/ExchangeCodeForTokenCommand.d.ts +35 -0
- package/dist-types/commands/ExportComponentsCommand.d.ts +36 -0
- package/dist-types/commands/ExportThemesCommand.d.ts +36 -0
- package/dist-types/commands/GetComponentCommand.d.ts +35 -0
- package/dist-types/commands/GetThemeCommand.d.ts +35 -0
- package/dist-types/commands/ListComponentsCommand.d.ts +35 -0
- package/dist-types/commands/ListThemesCommand.d.ts +35 -0
- package/dist-types/commands/RefreshTokenCommand.d.ts +35 -0
- package/dist-types/commands/UpdateComponentCommand.d.ts +35 -0
- package/dist-types/commands/UpdateThemeCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +14 -0
- package/dist-types/endpoints.d.ts +2 -0
- package/dist-types/index.d.ts +5 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1342 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListComponentsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListThemesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +44 -0
- package/dist-types/runtimeConfig.browser.d.ts +39 -0
- package/dist-types/runtimeConfig.d.ts +39 -0
- package/dist-types/runtimeConfig.native.d.ts +38 -0
- package/dist-types/runtimeConfig.shared.d.ts +13 -0
- package/dist-types/ts3.4/AmplifyUIBuilder.d.ts +75 -0
- package/dist-types/ts3.4/AmplifyUIBuilderClient.d.ts +85 -0
- package/dist-types/ts3.4/commands/CreateComponentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateThemeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteComponentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteThemeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ExchangeCodeForTokenCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ExportComponentsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ExportThemesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetComponentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetThemeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListComponentsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListThemesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RefreshTokenCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateComponentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateThemeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +14 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +5 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +783 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListComponentsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListThemesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +44 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +36 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +96 -0
|
@@ -0,0 +1,2546 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
|
+
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
+
import { expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseRfc3339DateTime as __parseRfc3339DateTime, } from "@aws-sdk/smithy-client";
|
|
4
|
+
export var serializeAws_restJson1CreateComponentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
6
|
+
return __generator(this, function (_c) {
|
|
7
|
+
switch (_c.label) {
|
|
8
|
+
case 0: return [4, context.endpoint()];
|
|
9
|
+
case 1:
|
|
10
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
11
|
+
headers = {
|
|
12
|
+
"content-type": "application/json",
|
|
13
|
+
};
|
|
14
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
15
|
+
"/app/{appId}/environment/{environmentName}/components";
|
|
16
|
+
if (input.appId !== undefined) {
|
|
17
|
+
labelValue = input.appId;
|
|
18
|
+
if (labelValue.length <= 0) {
|
|
19
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
20
|
+
}
|
|
21
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
25
|
+
}
|
|
26
|
+
if (input.environmentName !== undefined) {
|
|
27
|
+
labelValue = input.environmentName;
|
|
28
|
+
if (labelValue.length <= 0) {
|
|
29
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
30
|
+
}
|
|
31
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
35
|
+
}
|
|
36
|
+
query = __assign({}, (input.clientToken !== undefined && { clientToken: input.clientToken }));
|
|
37
|
+
if (input.componentToCreate !== undefined) {
|
|
38
|
+
body = serializeAws_restJson1CreateComponentData(input.componentToCreate, context);
|
|
39
|
+
}
|
|
40
|
+
if (body === undefined) {
|
|
41
|
+
body = {};
|
|
42
|
+
}
|
|
43
|
+
body = JSON.stringify(body);
|
|
44
|
+
return [2, new __HttpRequest({
|
|
45
|
+
protocol: protocol,
|
|
46
|
+
hostname: hostname,
|
|
47
|
+
port: port,
|
|
48
|
+
method: "POST",
|
|
49
|
+
headers: headers,
|
|
50
|
+
path: resolvedPath,
|
|
51
|
+
query: query,
|
|
52
|
+
body: body,
|
|
53
|
+
})];
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}); };
|
|
57
|
+
export var serializeAws_restJson1CreateThemeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
59
|
+
return __generator(this, function (_c) {
|
|
60
|
+
switch (_c.label) {
|
|
61
|
+
case 0: return [4, context.endpoint()];
|
|
62
|
+
case 1:
|
|
63
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
64
|
+
headers = {
|
|
65
|
+
"content-type": "application/json",
|
|
66
|
+
};
|
|
67
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
68
|
+
"/app/{appId}/environment/{environmentName}/themes";
|
|
69
|
+
if (input.appId !== undefined) {
|
|
70
|
+
labelValue = input.appId;
|
|
71
|
+
if (labelValue.length <= 0) {
|
|
72
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
73
|
+
}
|
|
74
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
78
|
+
}
|
|
79
|
+
if (input.environmentName !== undefined) {
|
|
80
|
+
labelValue = input.environmentName;
|
|
81
|
+
if (labelValue.length <= 0) {
|
|
82
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
83
|
+
}
|
|
84
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
88
|
+
}
|
|
89
|
+
query = __assign({}, (input.clientToken !== undefined && { clientToken: input.clientToken }));
|
|
90
|
+
if (input.themeToCreate !== undefined) {
|
|
91
|
+
body = serializeAws_restJson1CreateThemeData(input.themeToCreate, context);
|
|
92
|
+
}
|
|
93
|
+
if (body === undefined) {
|
|
94
|
+
body = {};
|
|
95
|
+
}
|
|
96
|
+
body = JSON.stringify(body);
|
|
97
|
+
return [2, new __HttpRequest({
|
|
98
|
+
protocol: protocol,
|
|
99
|
+
hostname: hostname,
|
|
100
|
+
port: port,
|
|
101
|
+
method: "POST",
|
|
102
|
+
headers: headers,
|
|
103
|
+
path: resolvedPath,
|
|
104
|
+
query: query,
|
|
105
|
+
body: body,
|
|
106
|
+
})];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}); };
|
|
110
|
+
export var serializeAws_restJson1DeleteComponentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
111
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
|
|
112
|
+
return __generator(this, function (_c) {
|
|
113
|
+
switch (_c.label) {
|
|
114
|
+
case 0: return [4, context.endpoint()];
|
|
115
|
+
case 1:
|
|
116
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
117
|
+
headers = {};
|
|
118
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
119
|
+
"/app/{appId}/environment/{environmentName}/components/{id}";
|
|
120
|
+
if (input.appId !== undefined) {
|
|
121
|
+
labelValue = input.appId;
|
|
122
|
+
if (labelValue.length <= 0) {
|
|
123
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
124
|
+
}
|
|
125
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
129
|
+
}
|
|
130
|
+
if (input.environmentName !== undefined) {
|
|
131
|
+
labelValue = input.environmentName;
|
|
132
|
+
if (labelValue.length <= 0) {
|
|
133
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
134
|
+
}
|
|
135
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
139
|
+
}
|
|
140
|
+
if (input.id !== undefined) {
|
|
141
|
+
labelValue = input.id;
|
|
142
|
+
if (labelValue.length <= 0) {
|
|
143
|
+
throw new Error("Empty value provided for input HTTP label: id.");
|
|
144
|
+
}
|
|
145
|
+
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
throw new Error("No value provided for input HTTP label: id.");
|
|
149
|
+
}
|
|
150
|
+
return [2, new __HttpRequest({
|
|
151
|
+
protocol: protocol,
|
|
152
|
+
hostname: hostname,
|
|
153
|
+
port: port,
|
|
154
|
+
method: "DELETE",
|
|
155
|
+
headers: headers,
|
|
156
|
+
path: resolvedPath,
|
|
157
|
+
body: body,
|
|
158
|
+
})];
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}); };
|
|
162
|
+
export var serializeAws_restJson1DeleteThemeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
163
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
|
|
164
|
+
return __generator(this, function (_c) {
|
|
165
|
+
switch (_c.label) {
|
|
166
|
+
case 0: return [4, context.endpoint()];
|
|
167
|
+
case 1:
|
|
168
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
169
|
+
headers = {};
|
|
170
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
171
|
+
"/app/{appId}/environment/{environmentName}/themes/{id}";
|
|
172
|
+
if (input.appId !== undefined) {
|
|
173
|
+
labelValue = input.appId;
|
|
174
|
+
if (labelValue.length <= 0) {
|
|
175
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
176
|
+
}
|
|
177
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
181
|
+
}
|
|
182
|
+
if (input.environmentName !== undefined) {
|
|
183
|
+
labelValue = input.environmentName;
|
|
184
|
+
if (labelValue.length <= 0) {
|
|
185
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
186
|
+
}
|
|
187
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
191
|
+
}
|
|
192
|
+
if (input.id !== undefined) {
|
|
193
|
+
labelValue = input.id;
|
|
194
|
+
if (labelValue.length <= 0) {
|
|
195
|
+
throw new Error("Empty value provided for input HTTP label: id.");
|
|
196
|
+
}
|
|
197
|
+
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
throw new Error("No value provided for input HTTP label: id.");
|
|
201
|
+
}
|
|
202
|
+
return [2, new __HttpRequest({
|
|
203
|
+
protocol: protocol,
|
|
204
|
+
hostname: hostname,
|
|
205
|
+
port: port,
|
|
206
|
+
method: "DELETE",
|
|
207
|
+
headers: headers,
|
|
208
|
+
path: resolvedPath,
|
|
209
|
+
body: body,
|
|
210
|
+
})];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
}); };
|
|
214
|
+
export var serializeAws_restJson1ExchangeCodeForTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
215
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
216
|
+
return __generator(this, function (_c) {
|
|
217
|
+
switch (_c.label) {
|
|
218
|
+
case 0: return [4, context.endpoint()];
|
|
219
|
+
case 1:
|
|
220
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
221
|
+
headers = {
|
|
222
|
+
"content-type": "application/json",
|
|
223
|
+
};
|
|
224
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tokens/{provider}";
|
|
225
|
+
if (input.provider !== undefined) {
|
|
226
|
+
labelValue = input.provider;
|
|
227
|
+
if (labelValue.length <= 0) {
|
|
228
|
+
throw new Error("Empty value provided for input HTTP label: provider.");
|
|
229
|
+
}
|
|
230
|
+
resolvedPath = resolvedPath.replace("{provider}", __extendedEncodeURIComponent(labelValue));
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
throw new Error("No value provided for input HTTP label: provider.");
|
|
234
|
+
}
|
|
235
|
+
if (input.request !== undefined) {
|
|
236
|
+
body = serializeAws_restJson1ExchangeCodeForTokenRequestBody(input.request, context);
|
|
237
|
+
}
|
|
238
|
+
if (body === undefined) {
|
|
239
|
+
body = {};
|
|
240
|
+
}
|
|
241
|
+
body = JSON.stringify(body);
|
|
242
|
+
return [2, new __HttpRequest({
|
|
243
|
+
protocol: protocol,
|
|
244
|
+
hostname: hostname,
|
|
245
|
+
port: port,
|
|
246
|
+
method: "POST",
|
|
247
|
+
headers: headers,
|
|
248
|
+
path: resolvedPath,
|
|
249
|
+
body: body,
|
|
250
|
+
})];
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}); };
|
|
254
|
+
export var serializeAws_restJson1ExportComponentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
255
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
256
|
+
return __generator(this, function (_c) {
|
|
257
|
+
switch (_c.label) {
|
|
258
|
+
case 0: return [4, context.endpoint()];
|
|
259
|
+
case 1:
|
|
260
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
261
|
+
headers = {};
|
|
262
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
263
|
+
"/export/app/{appId}/environment/{environmentName}/components";
|
|
264
|
+
if (input.appId !== undefined) {
|
|
265
|
+
labelValue = input.appId;
|
|
266
|
+
if (labelValue.length <= 0) {
|
|
267
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
268
|
+
}
|
|
269
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
273
|
+
}
|
|
274
|
+
if (input.environmentName !== undefined) {
|
|
275
|
+
labelValue = input.environmentName;
|
|
276
|
+
if (labelValue.length <= 0) {
|
|
277
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
278
|
+
}
|
|
279
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
283
|
+
}
|
|
284
|
+
return [2, new __HttpRequest({
|
|
285
|
+
protocol: protocol,
|
|
286
|
+
hostname: hostname,
|
|
287
|
+
port: port,
|
|
288
|
+
method: "GET",
|
|
289
|
+
headers: headers,
|
|
290
|
+
path: resolvedPath,
|
|
291
|
+
body: body,
|
|
292
|
+
})];
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
}); };
|
|
296
|
+
export var serializeAws_restJson1ExportThemesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
297
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
298
|
+
return __generator(this, function (_c) {
|
|
299
|
+
switch (_c.label) {
|
|
300
|
+
case 0: return [4, context.endpoint()];
|
|
301
|
+
case 1:
|
|
302
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
303
|
+
headers = {};
|
|
304
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
305
|
+
"/export/app/{appId}/environment/{environmentName}/themes";
|
|
306
|
+
if (input.appId !== undefined) {
|
|
307
|
+
labelValue = input.appId;
|
|
308
|
+
if (labelValue.length <= 0) {
|
|
309
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
310
|
+
}
|
|
311
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
315
|
+
}
|
|
316
|
+
if (input.environmentName !== undefined) {
|
|
317
|
+
labelValue = input.environmentName;
|
|
318
|
+
if (labelValue.length <= 0) {
|
|
319
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
320
|
+
}
|
|
321
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
325
|
+
}
|
|
326
|
+
return [2, new __HttpRequest({
|
|
327
|
+
protocol: protocol,
|
|
328
|
+
hostname: hostname,
|
|
329
|
+
port: port,
|
|
330
|
+
method: "GET",
|
|
331
|
+
headers: headers,
|
|
332
|
+
path: resolvedPath,
|
|
333
|
+
body: body,
|
|
334
|
+
})];
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}); };
|
|
338
|
+
export var serializeAws_restJson1GetComponentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
339
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
|
|
340
|
+
return __generator(this, function (_c) {
|
|
341
|
+
switch (_c.label) {
|
|
342
|
+
case 0: return [4, context.endpoint()];
|
|
343
|
+
case 1:
|
|
344
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
345
|
+
headers = {};
|
|
346
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
347
|
+
"/app/{appId}/environment/{environmentName}/components/{id}";
|
|
348
|
+
if (input.appId !== undefined) {
|
|
349
|
+
labelValue = input.appId;
|
|
350
|
+
if (labelValue.length <= 0) {
|
|
351
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
352
|
+
}
|
|
353
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
357
|
+
}
|
|
358
|
+
if (input.environmentName !== undefined) {
|
|
359
|
+
labelValue = input.environmentName;
|
|
360
|
+
if (labelValue.length <= 0) {
|
|
361
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
362
|
+
}
|
|
363
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
367
|
+
}
|
|
368
|
+
if (input.id !== undefined) {
|
|
369
|
+
labelValue = input.id;
|
|
370
|
+
if (labelValue.length <= 0) {
|
|
371
|
+
throw new Error("Empty value provided for input HTTP label: id.");
|
|
372
|
+
}
|
|
373
|
+
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
throw new Error("No value provided for input HTTP label: id.");
|
|
377
|
+
}
|
|
378
|
+
return [2, new __HttpRequest({
|
|
379
|
+
protocol: protocol,
|
|
380
|
+
hostname: hostname,
|
|
381
|
+
port: port,
|
|
382
|
+
method: "GET",
|
|
383
|
+
headers: headers,
|
|
384
|
+
path: resolvedPath,
|
|
385
|
+
body: body,
|
|
386
|
+
})];
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
}); };
|
|
390
|
+
export var serializeAws_restJson1GetThemeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
391
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
|
|
392
|
+
return __generator(this, function (_c) {
|
|
393
|
+
switch (_c.label) {
|
|
394
|
+
case 0: return [4, context.endpoint()];
|
|
395
|
+
case 1:
|
|
396
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
397
|
+
headers = {};
|
|
398
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
399
|
+
"/app/{appId}/environment/{environmentName}/themes/{id}";
|
|
400
|
+
if (input.appId !== undefined) {
|
|
401
|
+
labelValue = input.appId;
|
|
402
|
+
if (labelValue.length <= 0) {
|
|
403
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
404
|
+
}
|
|
405
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
406
|
+
}
|
|
407
|
+
else {
|
|
408
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
409
|
+
}
|
|
410
|
+
if (input.environmentName !== undefined) {
|
|
411
|
+
labelValue = input.environmentName;
|
|
412
|
+
if (labelValue.length <= 0) {
|
|
413
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
414
|
+
}
|
|
415
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
419
|
+
}
|
|
420
|
+
if (input.id !== undefined) {
|
|
421
|
+
labelValue = input.id;
|
|
422
|
+
if (labelValue.length <= 0) {
|
|
423
|
+
throw new Error("Empty value provided for input HTTP label: id.");
|
|
424
|
+
}
|
|
425
|
+
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
throw new Error("No value provided for input HTTP label: id.");
|
|
429
|
+
}
|
|
430
|
+
return [2, new __HttpRequest({
|
|
431
|
+
protocol: protocol,
|
|
432
|
+
hostname: hostname,
|
|
433
|
+
port: port,
|
|
434
|
+
method: "GET",
|
|
435
|
+
headers: headers,
|
|
436
|
+
path: resolvedPath,
|
|
437
|
+
body: body,
|
|
438
|
+
})];
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
}); };
|
|
442
|
+
export var serializeAws_restJson1ListComponentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
443
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
444
|
+
return __generator(this, function (_c) {
|
|
445
|
+
switch (_c.label) {
|
|
446
|
+
case 0: return [4, context.endpoint()];
|
|
447
|
+
case 1:
|
|
448
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
449
|
+
headers = {};
|
|
450
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
451
|
+
"/app/{appId}/environment/{environmentName}/components";
|
|
452
|
+
if (input.appId !== undefined) {
|
|
453
|
+
labelValue = input.appId;
|
|
454
|
+
if (labelValue.length <= 0) {
|
|
455
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
456
|
+
}
|
|
457
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
461
|
+
}
|
|
462
|
+
if (input.environmentName !== undefined) {
|
|
463
|
+
labelValue = input.environmentName;
|
|
464
|
+
if (labelValue.length <= 0) {
|
|
465
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
466
|
+
}
|
|
467
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
471
|
+
}
|
|
472
|
+
query = __assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
|
|
473
|
+
return [2, new __HttpRequest({
|
|
474
|
+
protocol: protocol,
|
|
475
|
+
hostname: hostname,
|
|
476
|
+
port: port,
|
|
477
|
+
method: "GET",
|
|
478
|
+
headers: headers,
|
|
479
|
+
path: resolvedPath,
|
|
480
|
+
query: query,
|
|
481
|
+
body: body,
|
|
482
|
+
})];
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
}); };
|
|
486
|
+
export var serializeAws_restJson1ListThemesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
487
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
488
|
+
return __generator(this, function (_c) {
|
|
489
|
+
switch (_c.label) {
|
|
490
|
+
case 0: return [4, context.endpoint()];
|
|
491
|
+
case 1:
|
|
492
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
493
|
+
headers = {};
|
|
494
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
495
|
+
"/app/{appId}/environment/{environmentName}/themes";
|
|
496
|
+
if (input.appId !== undefined) {
|
|
497
|
+
labelValue = input.appId;
|
|
498
|
+
if (labelValue.length <= 0) {
|
|
499
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
500
|
+
}
|
|
501
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
502
|
+
}
|
|
503
|
+
else {
|
|
504
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
505
|
+
}
|
|
506
|
+
if (input.environmentName !== undefined) {
|
|
507
|
+
labelValue = input.environmentName;
|
|
508
|
+
if (labelValue.length <= 0) {
|
|
509
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
510
|
+
}
|
|
511
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
515
|
+
}
|
|
516
|
+
query = __assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
|
|
517
|
+
return [2, new __HttpRequest({
|
|
518
|
+
protocol: protocol,
|
|
519
|
+
hostname: hostname,
|
|
520
|
+
port: port,
|
|
521
|
+
method: "GET",
|
|
522
|
+
headers: headers,
|
|
523
|
+
path: resolvedPath,
|
|
524
|
+
query: query,
|
|
525
|
+
body: body,
|
|
526
|
+
})];
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
}); };
|
|
530
|
+
export var serializeAws_restJson1RefreshTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
531
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
532
|
+
return __generator(this, function (_c) {
|
|
533
|
+
switch (_c.label) {
|
|
534
|
+
case 0: return [4, context.endpoint()];
|
|
535
|
+
case 1:
|
|
536
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
537
|
+
headers = {
|
|
538
|
+
"content-type": "application/json",
|
|
539
|
+
};
|
|
540
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tokens/{provider}/refresh";
|
|
541
|
+
if (input.provider !== undefined) {
|
|
542
|
+
labelValue = input.provider;
|
|
543
|
+
if (labelValue.length <= 0) {
|
|
544
|
+
throw new Error("Empty value provided for input HTTP label: provider.");
|
|
545
|
+
}
|
|
546
|
+
resolvedPath = resolvedPath.replace("{provider}", __extendedEncodeURIComponent(labelValue));
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
throw new Error("No value provided for input HTTP label: provider.");
|
|
550
|
+
}
|
|
551
|
+
if (input.refreshTokenBody !== undefined) {
|
|
552
|
+
body = serializeAws_restJson1RefreshTokenRequestBody(input.refreshTokenBody, context);
|
|
553
|
+
}
|
|
554
|
+
if (body === undefined) {
|
|
555
|
+
body = {};
|
|
556
|
+
}
|
|
557
|
+
body = JSON.stringify(body);
|
|
558
|
+
return [2, new __HttpRequest({
|
|
559
|
+
protocol: protocol,
|
|
560
|
+
hostname: hostname,
|
|
561
|
+
port: port,
|
|
562
|
+
method: "POST",
|
|
563
|
+
headers: headers,
|
|
564
|
+
path: resolvedPath,
|
|
565
|
+
body: body,
|
|
566
|
+
})];
|
|
567
|
+
}
|
|
568
|
+
});
|
|
569
|
+
}); };
|
|
570
|
+
export var serializeAws_restJson1UpdateComponentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
571
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, query, body;
|
|
572
|
+
return __generator(this, function (_c) {
|
|
573
|
+
switch (_c.label) {
|
|
574
|
+
case 0: return [4, context.endpoint()];
|
|
575
|
+
case 1:
|
|
576
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
577
|
+
headers = {
|
|
578
|
+
"content-type": "application/json",
|
|
579
|
+
};
|
|
580
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
581
|
+
"/app/{appId}/environment/{environmentName}/components/{id}";
|
|
582
|
+
if (input.appId !== undefined) {
|
|
583
|
+
labelValue = input.appId;
|
|
584
|
+
if (labelValue.length <= 0) {
|
|
585
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
586
|
+
}
|
|
587
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
588
|
+
}
|
|
589
|
+
else {
|
|
590
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
591
|
+
}
|
|
592
|
+
if (input.environmentName !== undefined) {
|
|
593
|
+
labelValue = input.environmentName;
|
|
594
|
+
if (labelValue.length <= 0) {
|
|
595
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
596
|
+
}
|
|
597
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
598
|
+
}
|
|
599
|
+
else {
|
|
600
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
601
|
+
}
|
|
602
|
+
if (input.id !== undefined) {
|
|
603
|
+
labelValue = input.id;
|
|
604
|
+
if (labelValue.length <= 0) {
|
|
605
|
+
throw new Error("Empty value provided for input HTTP label: id.");
|
|
606
|
+
}
|
|
607
|
+
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
608
|
+
}
|
|
609
|
+
else {
|
|
610
|
+
throw new Error("No value provided for input HTTP label: id.");
|
|
611
|
+
}
|
|
612
|
+
query = __assign({}, (input.clientToken !== undefined && { clientToken: input.clientToken }));
|
|
613
|
+
if (input.updatedComponent !== undefined) {
|
|
614
|
+
body = serializeAws_restJson1UpdateComponentData(input.updatedComponent, context);
|
|
615
|
+
}
|
|
616
|
+
if (body === undefined) {
|
|
617
|
+
body = {};
|
|
618
|
+
}
|
|
619
|
+
body = JSON.stringify(body);
|
|
620
|
+
return [2, new __HttpRequest({
|
|
621
|
+
protocol: protocol,
|
|
622
|
+
hostname: hostname,
|
|
623
|
+
port: port,
|
|
624
|
+
method: "PATCH",
|
|
625
|
+
headers: headers,
|
|
626
|
+
path: resolvedPath,
|
|
627
|
+
query: query,
|
|
628
|
+
body: body,
|
|
629
|
+
})];
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
}); };
|
|
633
|
+
export var serializeAws_restJson1UpdateThemeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
634
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, query, body;
|
|
635
|
+
return __generator(this, function (_c) {
|
|
636
|
+
switch (_c.label) {
|
|
637
|
+
case 0: return [4, context.endpoint()];
|
|
638
|
+
case 1:
|
|
639
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
640
|
+
headers = {
|
|
641
|
+
"content-type": "application/json",
|
|
642
|
+
};
|
|
643
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
644
|
+
"/app/{appId}/environment/{environmentName}/themes/{id}";
|
|
645
|
+
if (input.appId !== undefined) {
|
|
646
|
+
labelValue = input.appId;
|
|
647
|
+
if (labelValue.length <= 0) {
|
|
648
|
+
throw new Error("Empty value provided for input HTTP label: appId.");
|
|
649
|
+
}
|
|
650
|
+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
|
|
651
|
+
}
|
|
652
|
+
else {
|
|
653
|
+
throw new Error("No value provided for input HTTP label: appId.");
|
|
654
|
+
}
|
|
655
|
+
if (input.environmentName !== undefined) {
|
|
656
|
+
labelValue = input.environmentName;
|
|
657
|
+
if (labelValue.length <= 0) {
|
|
658
|
+
throw new Error("Empty value provided for input HTTP label: environmentName.");
|
|
659
|
+
}
|
|
660
|
+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
|
|
661
|
+
}
|
|
662
|
+
else {
|
|
663
|
+
throw new Error("No value provided for input HTTP label: environmentName.");
|
|
664
|
+
}
|
|
665
|
+
if (input.id !== undefined) {
|
|
666
|
+
labelValue = input.id;
|
|
667
|
+
if (labelValue.length <= 0) {
|
|
668
|
+
throw new Error("Empty value provided for input HTTP label: id.");
|
|
669
|
+
}
|
|
670
|
+
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
throw new Error("No value provided for input HTTP label: id.");
|
|
674
|
+
}
|
|
675
|
+
query = __assign({}, (input.clientToken !== undefined && { clientToken: input.clientToken }));
|
|
676
|
+
if (input.updatedTheme !== undefined) {
|
|
677
|
+
body = serializeAws_restJson1UpdateThemeData(input.updatedTheme, context);
|
|
678
|
+
}
|
|
679
|
+
if (body === undefined) {
|
|
680
|
+
body = {};
|
|
681
|
+
}
|
|
682
|
+
body = JSON.stringify(body);
|
|
683
|
+
return [2, new __HttpRequest({
|
|
684
|
+
protocol: protocol,
|
|
685
|
+
hostname: hostname,
|
|
686
|
+
port: port,
|
|
687
|
+
method: "PATCH",
|
|
688
|
+
headers: headers,
|
|
689
|
+
path: resolvedPath,
|
|
690
|
+
query: query,
|
|
691
|
+
body: body,
|
|
692
|
+
})];
|
|
693
|
+
}
|
|
694
|
+
});
|
|
695
|
+
}); };
|
|
696
|
+
export var deserializeAws_restJson1CreateComponentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
697
|
+
var contents, data, _a;
|
|
698
|
+
return __generator(this, function (_b) {
|
|
699
|
+
switch (_b.label) {
|
|
700
|
+
case 0:
|
|
701
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
702
|
+
return [2, deserializeAws_restJson1CreateComponentCommandError(output, context)];
|
|
703
|
+
}
|
|
704
|
+
contents = {
|
|
705
|
+
$metadata: deserializeMetadata(output),
|
|
706
|
+
entity: undefined,
|
|
707
|
+
};
|
|
708
|
+
_a = __expectObject;
|
|
709
|
+
return [4, parseBody(output.body, context)];
|
|
710
|
+
case 1:
|
|
711
|
+
data = _a.apply(void 0, [_b.sent()]);
|
|
712
|
+
contents.entity = deserializeAws_restJson1Component(data, context);
|
|
713
|
+
return [2, Promise.resolve(contents)];
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
}); };
|
|
717
|
+
var deserializeAws_restJson1CreateComponentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
718
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
719
|
+
var _g;
|
|
720
|
+
return __generator(this, function (_h) {
|
|
721
|
+
switch (_h.label) {
|
|
722
|
+
case 0:
|
|
723
|
+
_a = [__assign({}, output)];
|
|
724
|
+
_g = {};
|
|
725
|
+
return [4, parseBody(output.body, context)];
|
|
726
|
+
case 1:
|
|
727
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
728
|
+
errorCode = "UnknownError";
|
|
729
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
730
|
+
_b = errorCode;
|
|
731
|
+
switch (_b) {
|
|
732
|
+
case "InternalServerException": return [3, 2];
|
|
733
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
734
|
+
case "InvalidParameterException": return [3, 4];
|
|
735
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
736
|
+
case "ResourceConflictException": return [3, 6];
|
|
737
|
+
case "com.amazonaws.amplifyuibuilder#ResourceConflictException": return [3, 6];
|
|
738
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
739
|
+
case "com.amazonaws.amplifyuibuilder#ServiceQuotaExceededException": return [3, 8];
|
|
740
|
+
}
|
|
741
|
+
return [3, 10];
|
|
742
|
+
case 2:
|
|
743
|
+
_c = [{}];
|
|
744
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
745
|
+
case 3:
|
|
746
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
747
|
+
return [3, 11];
|
|
748
|
+
case 4:
|
|
749
|
+
_d = [{}];
|
|
750
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
751
|
+
case 5:
|
|
752
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
753
|
+
return [3, 11];
|
|
754
|
+
case 6:
|
|
755
|
+
_e = [{}];
|
|
756
|
+
return [4, deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context)];
|
|
757
|
+
case 7:
|
|
758
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
759
|
+
return [3, 11];
|
|
760
|
+
case 8:
|
|
761
|
+
_f = [{}];
|
|
762
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
763
|
+
case 9:
|
|
764
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
765
|
+
return [3, 11];
|
|
766
|
+
case 10:
|
|
767
|
+
parsedBody = parsedOutput.body;
|
|
768
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
769
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
770
|
+
_h.label = 11;
|
|
771
|
+
case 11:
|
|
772
|
+
message = response.message || response.Message || errorCode;
|
|
773
|
+
response.message = message;
|
|
774
|
+
delete response.Message;
|
|
775
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
}); };
|
|
779
|
+
export var deserializeAws_restJson1CreateThemeCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
780
|
+
var contents, data, _a;
|
|
781
|
+
return __generator(this, function (_b) {
|
|
782
|
+
switch (_b.label) {
|
|
783
|
+
case 0:
|
|
784
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
785
|
+
return [2, deserializeAws_restJson1CreateThemeCommandError(output, context)];
|
|
786
|
+
}
|
|
787
|
+
contents = {
|
|
788
|
+
$metadata: deserializeMetadata(output),
|
|
789
|
+
entity: undefined,
|
|
790
|
+
};
|
|
791
|
+
_a = __expectObject;
|
|
792
|
+
return [4, parseBody(output.body, context)];
|
|
793
|
+
case 1:
|
|
794
|
+
data = _a.apply(void 0, [_b.sent()]);
|
|
795
|
+
contents.entity = deserializeAws_restJson1Theme(data, context);
|
|
796
|
+
return [2, Promise.resolve(contents)];
|
|
797
|
+
}
|
|
798
|
+
});
|
|
799
|
+
}); };
|
|
800
|
+
var deserializeAws_restJson1CreateThemeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
801
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
802
|
+
var _g;
|
|
803
|
+
return __generator(this, function (_h) {
|
|
804
|
+
switch (_h.label) {
|
|
805
|
+
case 0:
|
|
806
|
+
_a = [__assign({}, output)];
|
|
807
|
+
_g = {};
|
|
808
|
+
return [4, parseBody(output.body, context)];
|
|
809
|
+
case 1:
|
|
810
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
811
|
+
errorCode = "UnknownError";
|
|
812
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
813
|
+
_b = errorCode;
|
|
814
|
+
switch (_b) {
|
|
815
|
+
case "InternalServerException": return [3, 2];
|
|
816
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
817
|
+
case "InvalidParameterException": return [3, 4];
|
|
818
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
819
|
+
case "ResourceConflictException": return [3, 6];
|
|
820
|
+
case "com.amazonaws.amplifyuibuilder#ResourceConflictException": return [3, 6];
|
|
821
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
822
|
+
case "com.amazonaws.amplifyuibuilder#ServiceQuotaExceededException": return [3, 8];
|
|
823
|
+
}
|
|
824
|
+
return [3, 10];
|
|
825
|
+
case 2:
|
|
826
|
+
_c = [{}];
|
|
827
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
828
|
+
case 3:
|
|
829
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
830
|
+
return [3, 11];
|
|
831
|
+
case 4:
|
|
832
|
+
_d = [{}];
|
|
833
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
834
|
+
case 5:
|
|
835
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
836
|
+
return [3, 11];
|
|
837
|
+
case 6:
|
|
838
|
+
_e = [{}];
|
|
839
|
+
return [4, deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context)];
|
|
840
|
+
case 7:
|
|
841
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
842
|
+
return [3, 11];
|
|
843
|
+
case 8:
|
|
844
|
+
_f = [{}];
|
|
845
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
846
|
+
case 9:
|
|
847
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
848
|
+
return [3, 11];
|
|
849
|
+
case 10:
|
|
850
|
+
parsedBody = parsedOutput.body;
|
|
851
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
852
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
853
|
+
_h.label = 11;
|
|
854
|
+
case 11:
|
|
855
|
+
message = response.message || response.Message || errorCode;
|
|
856
|
+
response.message = message;
|
|
857
|
+
delete response.Message;
|
|
858
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
}); };
|
|
862
|
+
export var deserializeAws_restJson1DeleteComponentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
863
|
+
var contents;
|
|
864
|
+
return __generator(this, function (_a) {
|
|
865
|
+
switch (_a.label) {
|
|
866
|
+
case 0:
|
|
867
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
868
|
+
return [2, deserializeAws_restJson1DeleteComponentCommandError(output, context)];
|
|
869
|
+
}
|
|
870
|
+
contents = {
|
|
871
|
+
$metadata: deserializeMetadata(output),
|
|
872
|
+
};
|
|
873
|
+
return [4, collectBody(output.body, context)];
|
|
874
|
+
case 1:
|
|
875
|
+
_a.sent();
|
|
876
|
+
return [2, Promise.resolve(contents)];
|
|
877
|
+
}
|
|
878
|
+
});
|
|
879
|
+
}); };
|
|
880
|
+
var deserializeAws_restJson1DeleteComponentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
881
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
882
|
+
var _f;
|
|
883
|
+
return __generator(this, function (_g) {
|
|
884
|
+
switch (_g.label) {
|
|
885
|
+
case 0:
|
|
886
|
+
_a = [__assign({}, output)];
|
|
887
|
+
_f = {};
|
|
888
|
+
return [4, parseBody(output.body, context)];
|
|
889
|
+
case 1:
|
|
890
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
891
|
+
errorCode = "UnknownError";
|
|
892
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
893
|
+
_b = errorCode;
|
|
894
|
+
switch (_b) {
|
|
895
|
+
case "InternalServerException": return [3, 2];
|
|
896
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
897
|
+
case "InvalidParameterException": return [3, 4];
|
|
898
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
899
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
900
|
+
case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException": return [3, 6];
|
|
901
|
+
}
|
|
902
|
+
return [3, 8];
|
|
903
|
+
case 2:
|
|
904
|
+
_c = [{}];
|
|
905
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
906
|
+
case 3:
|
|
907
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
908
|
+
return [3, 9];
|
|
909
|
+
case 4:
|
|
910
|
+
_d = [{}];
|
|
911
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
912
|
+
case 5:
|
|
913
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
914
|
+
return [3, 9];
|
|
915
|
+
case 6:
|
|
916
|
+
_e = [{}];
|
|
917
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
918
|
+
case 7:
|
|
919
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
920
|
+
return [3, 9];
|
|
921
|
+
case 8:
|
|
922
|
+
parsedBody = parsedOutput.body;
|
|
923
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
924
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
925
|
+
_g.label = 9;
|
|
926
|
+
case 9:
|
|
927
|
+
message = response.message || response.Message || errorCode;
|
|
928
|
+
response.message = message;
|
|
929
|
+
delete response.Message;
|
|
930
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
}); };
|
|
934
|
+
export var deserializeAws_restJson1DeleteThemeCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
935
|
+
var contents;
|
|
936
|
+
return __generator(this, function (_a) {
|
|
937
|
+
switch (_a.label) {
|
|
938
|
+
case 0:
|
|
939
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
940
|
+
return [2, deserializeAws_restJson1DeleteThemeCommandError(output, context)];
|
|
941
|
+
}
|
|
942
|
+
contents = {
|
|
943
|
+
$metadata: deserializeMetadata(output),
|
|
944
|
+
};
|
|
945
|
+
return [4, collectBody(output.body, context)];
|
|
946
|
+
case 1:
|
|
947
|
+
_a.sent();
|
|
948
|
+
return [2, Promise.resolve(contents)];
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
}); };
|
|
952
|
+
var deserializeAws_restJson1DeleteThemeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
953
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
954
|
+
var _f;
|
|
955
|
+
return __generator(this, function (_g) {
|
|
956
|
+
switch (_g.label) {
|
|
957
|
+
case 0:
|
|
958
|
+
_a = [__assign({}, output)];
|
|
959
|
+
_f = {};
|
|
960
|
+
return [4, parseBody(output.body, context)];
|
|
961
|
+
case 1:
|
|
962
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
963
|
+
errorCode = "UnknownError";
|
|
964
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
965
|
+
_b = errorCode;
|
|
966
|
+
switch (_b) {
|
|
967
|
+
case "InternalServerException": return [3, 2];
|
|
968
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
969
|
+
case "InvalidParameterException": return [3, 4];
|
|
970
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
971
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
972
|
+
case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException": return [3, 6];
|
|
973
|
+
}
|
|
974
|
+
return [3, 8];
|
|
975
|
+
case 2:
|
|
976
|
+
_c = [{}];
|
|
977
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
978
|
+
case 3:
|
|
979
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
980
|
+
return [3, 9];
|
|
981
|
+
case 4:
|
|
982
|
+
_d = [{}];
|
|
983
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
984
|
+
case 5:
|
|
985
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
986
|
+
return [3, 9];
|
|
987
|
+
case 6:
|
|
988
|
+
_e = [{}];
|
|
989
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
990
|
+
case 7:
|
|
991
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
992
|
+
return [3, 9];
|
|
993
|
+
case 8:
|
|
994
|
+
parsedBody = parsedOutput.body;
|
|
995
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
996
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
997
|
+
_g.label = 9;
|
|
998
|
+
case 9:
|
|
999
|
+
message = response.message || response.Message || errorCode;
|
|
1000
|
+
response.message = message;
|
|
1001
|
+
delete response.Message;
|
|
1002
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
}); };
|
|
1006
|
+
export var deserializeAws_restJson1ExchangeCodeForTokenCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1007
|
+
var contents, data, _a, _b;
|
|
1008
|
+
return __generator(this, function (_c) {
|
|
1009
|
+
switch (_c.label) {
|
|
1010
|
+
case 0:
|
|
1011
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1012
|
+
return [2, deserializeAws_restJson1ExchangeCodeForTokenCommandError(output, context)];
|
|
1013
|
+
}
|
|
1014
|
+
contents = {
|
|
1015
|
+
$metadata: deserializeMetadata(output),
|
|
1016
|
+
accessToken: undefined,
|
|
1017
|
+
expiresIn: undefined,
|
|
1018
|
+
refreshToken: undefined,
|
|
1019
|
+
};
|
|
1020
|
+
_a = __expectNonNull;
|
|
1021
|
+
_b = __expectObject;
|
|
1022
|
+
return [4, parseBody(output.body, context)];
|
|
1023
|
+
case 1:
|
|
1024
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1025
|
+
if (data.accessToken !== undefined && data.accessToken !== null) {
|
|
1026
|
+
contents.accessToken = __expectString(data.accessToken);
|
|
1027
|
+
}
|
|
1028
|
+
if (data.expiresIn !== undefined && data.expiresIn !== null) {
|
|
1029
|
+
contents.expiresIn = __expectInt32(data.expiresIn);
|
|
1030
|
+
}
|
|
1031
|
+
if (data.refreshToken !== undefined && data.refreshToken !== null) {
|
|
1032
|
+
contents.refreshToken = __expectString(data.refreshToken);
|
|
1033
|
+
}
|
|
1034
|
+
return [2, Promise.resolve(contents)];
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
}); };
|
|
1038
|
+
var deserializeAws_restJson1ExchangeCodeForTokenCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1039
|
+
var parsedOutput, _a, response, errorCode, _b, _c, parsedBody, message;
|
|
1040
|
+
var _d;
|
|
1041
|
+
return __generator(this, function (_e) {
|
|
1042
|
+
switch (_e.label) {
|
|
1043
|
+
case 0:
|
|
1044
|
+
_a = [__assign({}, output)];
|
|
1045
|
+
_d = {};
|
|
1046
|
+
return [4, parseBody(output.body, context)];
|
|
1047
|
+
case 1:
|
|
1048
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_d.body = _e.sent(), _d)]));
|
|
1049
|
+
errorCode = "UnknownError";
|
|
1050
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1051
|
+
_b = errorCode;
|
|
1052
|
+
switch (_b) {
|
|
1053
|
+
case "InvalidParameterException": return [3, 2];
|
|
1054
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 2];
|
|
1055
|
+
}
|
|
1056
|
+
return [3, 4];
|
|
1057
|
+
case 2:
|
|
1058
|
+
_c = [{}];
|
|
1059
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1060
|
+
case 3:
|
|
1061
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_e.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1062
|
+
return [3, 5];
|
|
1063
|
+
case 4:
|
|
1064
|
+
parsedBody = parsedOutput.body;
|
|
1065
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1066
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1067
|
+
_e.label = 5;
|
|
1068
|
+
case 5:
|
|
1069
|
+
message = response.message || response.Message || errorCode;
|
|
1070
|
+
response.message = message;
|
|
1071
|
+
delete response.Message;
|
|
1072
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1073
|
+
}
|
|
1074
|
+
});
|
|
1075
|
+
}); };
|
|
1076
|
+
export var deserializeAws_restJson1ExportComponentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1077
|
+
var contents, data, _a, _b;
|
|
1078
|
+
return __generator(this, function (_c) {
|
|
1079
|
+
switch (_c.label) {
|
|
1080
|
+
case 0:
|
|
1081
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1082
|
+
return [2, deserializeAws_restJson1ExportComponentsCommandError(output, context)];
|
|
1083
|
+
}
|
|
1084
|
+
contents = {
|
|
1085
|
+
$metadata: deserializeMetadata(output),
|
|
1086
|
+
entities: undefined,
|
|
1087
|
+
};
|
|
1088
|
+
_a = __expectNonNull;
|
|
1089
|
+
_b = __expectObject;
|
|
1090
|
+
return [4, parseBody(output.body, context)];
|
|
1091
|
+
case 1:
|
|
1092
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1093
|
+
if (data.entities !== undefined && data.entities !== null) {
|
|
1094
|
+
contents.entities = deserializeAws_restJson1ComponentList(data.entities, context);
|
|
1095
|
+
}
|
|
1096
|
+
return [2, Promise.resolve(contents)];
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
}); };
|
|
1100
|
+
var deserializeAws_restJson1ExportComponentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1101
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
|
|
1102
|
+
var _e;
|
|
1103
|
+
return __generator(this, function (_f) {
|
|
1104
|
+
switch (_f.label) {
|
|
1105
|
+
case 0:
|
|
1106
|
+
_a = [__assign({}, output)];
|
|
1107
|
+
_e = {};
|
|
1108
|
+
return [4, parseBody(output.body, context)];
|
|
1109
|
+
case 1:
|
|
1110
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
|
|
1111
|
+
errorCode = "UnknownError";
|
|
1112
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1113
|
+
_b = errorCode;
|
|
1114
|
+
switch (_b) {
|
|
1115
|
+
case "InternalServerException": return [3, 2];
|
|
1116
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
1117
|
+
case "InvalidParameterException": return [3, 4];
|
|
1118
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
1119
|
+
}
|
|
1120
|
+
return [3, 6];
|
|
1121
|
+
case 2:
|
|
1122
|
+
_c = [{}];
|
|
1123
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1124
|
+
case 3:
|
|
1125
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1126
|
+
return [3, 7];
|
|
1127
|
+
case 4:
|
|
1128
|
+
_d = [{}];
|
|
1129
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1130
|
+
case 5:
|
|
1131
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1132
|
+
return [3, 7];
|
|
1133
|
+
case 6:
|
|
1134
|
+
parsedBody = parsedOutput.body;
|
|
1135
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1136
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1137
|
+
_f.label = 7;
|
|
1138
|
+
case 7:
|
|
1139
|
+
message = response.message || response.Message || errorCode;
|
|
1140
|
+
response.message = message;
|
|
1141
|
+
delete response.Message;
|
|
1142
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1145
|
+
}); };
|
|
1146
|
+
export var deserializeAws_restJson1ExportThemesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1147
|
+
var contents, data, _a, _b;
|
|
1148
|
+
return __generator(this, function (_c) {
|
|
1149
|
+
switch (_c.label) {
|
|
1150
|
+
case 0:
|
|
1151
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1152
|
+
return [2, deserializeAws_restJson1ExportThemesCommandError(output, context)];
|
|
1153
|
+
}
|
|
1154
|
+
contents = {
|
|
1155
|
+
$metadata: deserializeMetadata(output),
|
|
1156
|
+
entities: undefined,
|
|
1157
|
+
};
|
|
1158
|
+
_a = __expectNonNull;
|
|
1159
|
+
_b = __expectObject;
|
|
1160
|
+
return [4, parseBody(output.body, context)];
|
|
1161
|
+
case 1:
|
|
1162
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1163
|
+
if (data.entities !== undefined && data.entities !== null) {
|
|
1164
|
+
contents.entities = deserializeAws_restJson1ThemeList(data.entities, context);
|
|
1165
|
+
}
|
|
1166
|
+
return [2, Promise.resolve(contents)];
|
|
1167
|
+
}
|
|
1168
|
+
});
|
|
1169
|
+
}); };
|
|
1170
|
+
var deserializeAws_restJson1ExportThemesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1171
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
|
|
1172
|
+
var _e;
|
|
1173
|
+
return __generator(this, function (_f) {
|
|
1174
|
+
switch (_f.label) {
|
|
1175
|
+
case 0:
|
|
1176
|
+
_a = [__assign({}, output)];
|
|
1177
|
+
_e = {};
|
|
1178
|
+
return [4, parseBody(output.body, context)];
|
|
1179
|
+
case 1:
|
|
1180
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
|
|
1181
|
+
errorCode = "UnknownError";
|
|
1182
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1183
|
+
_b = errorCode;
|
|
1184
|
+
switch (_b) {
|
|
1185
|
+
case "InternalServerException": return [3, 2];
|
|
1186
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
1187
|
+
case "InvalidParameterException": return [3, 4];
|
|
1188
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
1189
|
+
}
|
|
1190
|
+
return [3, 6];
|
|
1191
|
+
case 2:
|
|
1192
|
+
_c = [{}];
|
|
1193
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1194
|
+
case 3:
|
|
1195
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1196
|
+
return [3, 7];
|
|
1197
|
+
case 4:
|
|
1198
|
+
_d = [{}];
|
|
1199
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1200
|
+
case 5:
|
|
1201
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1202
|
+
return [3, 7];
|
|
1203
|
+
case 6:
|
|
1204
|
+
parsedBody = parsedOutput.body;
|
|
1205
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1206
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1207
|
+
_f.label = 7;
|
|
1208
|
+
case 7:
|
|
1209
|
+
message = response.message || response.Message || errorCode;
|
|
1210
|
+
response.message = message;
|
|
1211
|
+
delete response.Message;
|
|
1212
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
}); };
|
|
1216
|
+
export var deserializeAws_restJson1GetComponentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1217
|
+
var contents, data, _a;
|
|
1218
|
+
return __generator(this, function (_b) {
|
|
1219
|
+
switch (_b.label) {
|
|
1220
|
+
case 0:
|
|
1221
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1222
|
+
return [2, deserializeAws_restJson1GetComponentCommandError(output, context)];
|
|
1223
|
+
}
|
|
1224
|
+
contents = {
|
|
1225
|
+
$metadata: deserializeMetadata(output),
|
|
1226
|
+
component: undefined,
|
|
1227
|
+
};
|
|
1228
|
+
_a = __expectObject;
|
|
1229
|
+
return [4, parseBody(output.body, context)];
|
|
1230
|
+
case 1:
|
|
1231
|
+
data = _a.apply(void 0, [_b.sent()]);
|
|
1232
|
+
contents.component = deserializeAws_restJson1Component(data, context);
|
|
1233
|
+
return [2, Promise.resolve(contents)];
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
}); };
|
|
1237
|
+
var deserializeAws_restJson1GetComponentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1238
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1239
|
+
var _f;
|
|
1240
|
+
return __generator(this, function (_g) {
|
|
1241
|
+
switch (_g.label) {
|
|
1242
|
+
case 0:
|
|
1243
|
+
_a = [__assign({}, output)];
|
|
1244
|
+
_f = {};
|
|
1245
|
+
return [4, parseBody(output.body, context)];
|
|
1246
|
+
case 1:
|
|
1247
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
1248
|
+
errorCode = "UnknownError";
|
|
1249
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1250
|
+
_b = errorCode;
|
|
1251
|
+
switch (_b) {
|
|
1252
|
+
case "InternalServerException": return [3, 2];
|
|
1253
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
1254
|
+
case "InvalidParameterException": return [3, 4];
|
|
1255
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
1256
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
1257
|
+
case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException": return [3, 6];
|
|
1258
|
+
}
|
|
1259
|
+
return [3, 8];
|
|
1260
|
+
case 2:
|
|
1261
|
+
_c = [{}];
|
|
1262
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1263
|
+
case 3:
|
|
1264
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1265
|
+
return [3, 9];
|
|
1266
|
+
case 4:
|
|
1267
|
+
_d = [{}];
|
|
1268
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1269
|
+
case 5:
|
|
1270
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1271
|
+
return [3, 9];
|
|
1272
|
+
case 6:
|
|
1273
|
+
_e = [{}];
|
|
1274
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1275
|
+
case 7:
|
|
1276
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1277
|
+
return [3, 9];
|
|
1278
|
+
case 8:
|
|
1279
|
+
parsedBody = parsedOutput.body;
|
|
1280
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1281
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1282
|
+
_g.label = 9;
|
|
1283
|
+
case 9:
|
|
1284
|
+
message = response.message || response.Message || errorCode;
|
|
1285
|
+
response.message = message;
|
|
1286
|
+
delete response.Message;
|
|
1287
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1288
|
+
}
|
|
1289
|
+
});
|
|
1290
|
+
}); };
|
|
1291
|
+
export var deserializeAws_restJson1GetThemeCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1292
|
+
var contents, data, _a;
|
|
1293
|
+
return __generator(this, function (_b) {
|
|
1294
|
+
switch (_b.label) {
|
|
1295
|
+
case 0:
|
|
1296
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1297
|
+
return [2, deserializeAws_restJson1GetThemeCommandError(output, context)];
|
|
1298
|
+
}
|
|
1299
|
+
contents = {
|
|
1300
|
+
$metadata: deserializeMetadata(output),
|
|
1301
|
+
theme: undefined,
|
|
1302
|
+
};
|
|
1303
|
+
_a = __expectObject;
|
|
1304
|
+
return [4, parseBody(output.body, context)];
|
|
1305
|
+
case 1:
|
|
1306
|
+
data = _a.apply(void 0, [_b.sent()]);
|
|
1307
|
+
contents.theme = deserializeAws_restJson1Theme(data, context);
|
|
1308
|
+
return [2, Promise.resolve(contents)];
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
}); };
|
|
1312
|
+
var deserializeAws_restJson1GetThemeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1313
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1314
|
+
var _f;
|
|
1315
|
+
return __generator(this, function (_g) {
|
|
1316
|
+
switch (_g.label) {
|
|
1317
|
+
case 0:
|
|
1318
|
+
_a = [__assign({}, output)];
|
|
1319
|
+
_f = {};
|
|
1320
|
+
return [4, parseBody(output.body, context)];
|
|
1321
|
+
case 1:
|
|
1322
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
1323
|
+
errorCode = "UnknownError";
|
|
1324
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1325
|
+
_b = errorCode;
|
|
1326
|
+
switch (_b) {
|
|
1327
|
+
case "InternalServerException": return [3, 2];
|
|
1328
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
1329
|
+
case "InvalidParameterException": return [3, 4];
|
|
1330
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
1331
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
1332
|
+
case "com.amazonaws.amplifyuibuilder#ResourceNotFoundException": return [3, 6];
|
|
1333
|
+
}
|
|
1334
|
+
return [3, 8];
|
|
1335
|
+
case 2:
|
|
1336
|
+
_c = [{}];
|
|
1337
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1338
|
+
case 3:
|
|
1339
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1340
|
+
return [3, 9];
|
|
1341
|
+
case 4:
|
|
1342
|
+
_d = [{}];
|
|
1343
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1344
|
+
case 5:
|
|
1345
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1346
|
+
return [3, 9];
|
|
1347
|
+
case 6:
|
|
1348
|
+
_e = [{}];
|
|
1349
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1350
|
+
case 7:
|
|
1351
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1352
|
+
return [3, 9];
|
|
1353
|
+
case 8:
|
|
1354
|
+
parsedBody = parsedOutput.body;
|
|
1355
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1356
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1357
|
+
_g.label = 9;
|
|
1358
|
+
case 9:
|
|
1359
|
+
message = response.message || response.Message || errorCode;
|
|
1360
|
+
response.message = message;
|
|
1361
|
+
delete response.Message;
|
|
1362
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1363
|
+
}
|
|
1364
|
+
});
|
|
1365
|
+
}); };
|
|
1366
|
+
export var deserializeAws_restJson1ListComponentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1367
|
+
var contents, data, _a, _b;
|
|
1368
|
+
return __generator(this, function (_c) {
|
|
1369
|
+
switch (_c.label) {
|
|
1370
|
+
case 0:
|
|
1371
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1372
|
+
return [2, deserializeAws_restJson1ListComponentsCommandError(output, context)];
|
|
1373
|
+
}
|
|
1374
|
+
contents = {
|
|
1375
|
+
$metadata: deserializeMetadata(output),
|
|
1376
|
+
entities: undefined,
|
|
1377
|
+
nextToken: undefined,
|
|
1378
|
+
};
|
|
1379
|
+
_a = __expectNonNull;
|
|
1380
|
+
_b = __expectObject;
|
|
1381
|
+
return [4, parseBody(output.body, context)];
|
|
1382
|
+
case 1:
|
|
1383
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1384
|
+
if (data.entities !== undefined && data.entities !== null) {
|
|
1385
|
+
contents.entities = deserializeAws_restJson1ComponentSummaryList(data.entities, context);
|
|
1386
|
+
}
|
|
1387
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1388
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
1389
|
+
}
|
|
1390
|
+
return [2, Promise.resolve(contents)];
|
|
1391
|
+
}
|
|
1392
|
+
});
|
|
1393
|
+
}); };
|
|
1394
|
+
var deserializeAws_restJson1ListComponentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1395
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
|
|
1396
|
+
var _e;
|
|
1397
|
+
return __generator(this, function (_f) {
|
|
1398
|
+
switch (_f.label) {
|
|
1399
|
+
case 0:
|
|
1400
|
+
_a = [__assign({}, output)];
|
|
1401
|
+
_e = {};
|
|
1402
|
+
return [4, parseBody(output.body, context)];
|
|
1403
|
+
case 1:
|
|
1404
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
|
|
1405
|
+
errorCode = "UnknownError";
|
|
1406
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1407
|
+
_b = errorCode;
|
|
1408
|
+
switch (_b) {
|
|
1409
|
+
case "InternalServerException": return [3, 2];
|
|
1410
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
1411
|
+
case "InvalidParameterException": return [3, 4];
|
|
1412
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
1413
|
+
}
|
|
1414
|
+
return [3, 6];
|
|
1415
|
+
case 2:
|
|
1416
|
+
_c = [{}];
|
|
1417
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1418
|
+
case 3:
|
|
1419
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1420
|
+
return [3, 7];
|
|
1421
|
+
case 4:
|
|
1422
|
+
_d = [{}];
|
|
1423
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1424
|
+
case 5:
|
|
1425
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1426
|
+
return [3, 7];
|
|
1427
|
+
case 6:
|
|
1428
|
+
parsedBody = parsedOutput.body;
|
|
1429
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1430
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1431
|
+
_f.label = 7;
|
|
1432
|
+
case 7:
|
|
1433
|
+
message = response.message || response.Message || errorCode;
|
|
1434
|
+
response.message = message;
|
|
1435
|
+
delete response.Message;
|
|
1436
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1437
|
+
}
|
|
1438
|
+
});
|
|
1439
|
+
}); };
|
|
1440
|
+
export var deserializeAws_restJson1ListThemesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1441
|
+
var contents, data, _a, _b;
|
|
1442
|
+
return __generator(this, function (_c) {
|
|
1443
|
+
switch (_c.label) {
|
|
1444
|
+
case 0:
|
|
1445
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1446
|
+
return [2, deserializeAws_restJson1ListThemesCommandError(output, context)];
|
|
1447
|
+
}
|
|
1448
|
+
contents = {
|
|
1449
|
+
$metadata: deserializeMetadata(output),
|
|
1450
|
+
entities: undefined,
|
|
1451
|
+
nextToken: undefined,
|
|
1452
|
+
};
|
|
1453
|
+
_a = __expectNonNull;
|
|
1454
|
+
_b = __expectObject;
|
|
1455
|
+
return [4, parseBody(output.body, context)];
|
|
1456
|
+
case 1:
|
|
1457
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1458
|
+
if (data.entities !== undefined && data.entities !== null) {
|
|
1459
|
+
contents.entities = deserializeAws_restJson1ThemeSummaryList(data.entities, context);
|
|
1460
|
+
}
|
|
1461
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1462
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
1463
|
+
}
|
|
1464
|
+
return [2, Promise.resolve(contents)];
|
|
1465
|
+
}
|
|
1466
|
+
});
|
|
1467
|
+
}); };
|
|
1468
|
+
var deserializeAws_restJson1ListThemesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1469
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, parsedBody, message;
|
|
1470
|
+
var _e;
|
|
1471
|
+
return __generator(this, function (_f) {
|
|
1472
|
+
switch (_f.label) {
|
|
1473
|
+
case 0:
|
|
1474
|
+
_a = [__assign({}, output)];
|
|
1475
|
+
_e = {};
|
|
1476
|
+
return [4, parseBody(output.body, context)];
|
|
1477
|
+
case 1:
|
|
1478
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_e.body = _f.sent(), _e)]));
|
|
1479
|
+
errorCode = "UnknownError";
|
|
1480
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1481
|
+
_b = errorCode;
|
|
1482
|
+
switch (_b) {
|
|
1483
|
+
case "InternalServerException": return [3, 2];
|
|
1484
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
1485
|
+
case "InvalidParameterException": return [3, 4];
|
|
1486
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
1487
|
+
}
|
|
1488
|
+
return [3, 6];
|
|
1489
|
+
case 2:
|
|
1490
|
+
_c = [{}];
|
|
1491
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1492
|
+
case 3:
|
|
1493
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1494
|
+
return [3, 7];
|
|
1495
|
+
case 4:
|
|
1496
|
+
_d = [{}];
|
|
1497
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1498
|
+
case 5:
|
|
1499
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1500
|
+
return [3, 7];
|
|
1501
|
+
case 6:
|
|
1502
|
+
parsedBody = parsedOutput.body;
|
|
1503
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1504
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1505
|
+
_f.label = 7;
|
|
1506
|
+
case 7:
|
|
1507
|
+
message = response.message || response.Message || errorCode;
|
|
1508
|
+
response.message = message;
|
|
1509
|
+
delete response.Message;
|
|
1510
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1513
|
+
}); };
|
|
1514
|
+
export var deserializeAws_restJson1RefreshTokenCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1515
|
+
var contents, data, _a, _b;
|
|
1516
|
+
return __generator(this, function (_c) {
|
|
1517
|
+
switch (_c.label) {
|
|
1518
|
+
case 0:
|
|
1519
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1520
|
+
return [2, deserializeAws_restJson1RefreshTokenCommandError(output, context)];
|
|
1521
|
+
}
|
|
1522
|
+
contents = {
|
|
1523
|
+
$metadata: deserializeMetadata(output),
|
|
1524
|
+
accessToken: undefined,
|
|
1525
|
+
expiresIn: undefined,
|
|
1526
|
+
};
|
|
1527
|
+
_a = __expectNonNull;
|
|
1528
|
+
_b = __expectObject;
|
|
1529
|
+
return [4, parseBody(output.body, context)];
|
|
1530
|
+
case 1:
|
|
1531
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1532
|
+
if (data.accessToken !== undefined && data.accessToken !== null) {
|
|
1533
|
+
contents.accessToken = __expectString(data.accessToken);
|
|
1534
|
+
}
|
|
1535
|
+
if (data.expiresIn !== undefined && data.expiresIn !== null) {
|
|
1536
|
+
contents.expiresIn = __expectInt32(data.expiresIn);
|
|
1537
|
+
}
|
|
1538
|
+
return [2, Promise.resolve(contents)];
|
|
1539
|
+
}
|
|
1540
|
+
});
|
|
1541
|
+
}); };
|
|
1542
|
+
var deserializeAws_restJson1RefreshTokenCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1543
|
+
var parsedOutput, _a, response, errorCode, _b, _c, parsedBody, message;
|
|
1544
|
+
var _d;
|
|
1545
|
+
return __generator(this, function (_e) {
|
|
1546
|
+
switch (_e.label) {
|
|
1547
|
+
case 0:
|
|
1548
|
+
_a = [__assign({}, output)];
|
|
1549
|
+
_d = {};
|
|
1550
|
+
return [4, parseBody(output.body, context)];
|
|
1551
|
+
case 1:
|
|
1552
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_d.body = _e.sent(), _d)]));
|
|
1553
|
+
errorCode = "UnknownError";
|
|
1554
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1555
|
+
_b = errorCode;
|
|
1556
|
+
switch (_b) {
|
|
1557
|
+
case "InvalidParameterException": return [3, 2];
|
|
1558
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 2];
|
|
1559
|
+
}
|
|
1560
|
+
return [3, 4];
|
|
1561
|
+
case 2:
|
|
1562
|
+
_c = [{}];
|
|
1563
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1564
|
+
case 3:
|
|
1565
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_e.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1566
|
+
return [3, 5];
|
|
1567
|
+
case 4:
|
|
1568
|
+
parsedBody = parsedOutput.body;
|
|
1569
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1570
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1571
|
+
_e.label = 5;
|
|
1572
|
+
case 5:
|
|
1573
|
+
message = response.message || response.Message || errorCode;
|
|
1574
|
+
response.message = message;
|
|
1575
|
+
delete response.Message;
|
|
1576
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1577
|
+
}
|
|
1578
|
+
});
|
|
1579
|
+
}); };
|
|
1580
|
+
export var deserializeAws_restJson1UpdateComponentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1581
|
+
var contents, data, _a;
|
|
1582
|
+
return __generator(this, function (_b) {
|
|
1583
|
+
switch (_b.label) {
|
|
1584
|
+
case 0:
|
|
1585
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1586
|
+
return [2, deserializeAws_restJson1UpdateComponentCommandError(output, context)];
|
|
1587
|
+
}
|
|
1588
|
+
contents = {
|
|
1589
|
+
$metadata: deserializeMetadata(output),
|
|
1590
|
+
entity: undefined,
|
|
1591
|
+
};
|
|
1592
|
+
_a = __expectObject;
|
|
1593
|
+
return [4, parseBody(output.body, context)];
|
|
1594
|
+
case 1:
|
|
1595
|
+
data = _a.apply(void 0, [_b.sent()]);
|
|
1596
|
+
contents.entity = deserializeAws_restJson1Component(data, context);
|
|
1597
|
+
return [2, Promise.resolve(contents)];
|
|
1598
|
+
}
|
|
1599
|
+
});
|
|
1600
|
+
}); };
|
|
1601
|
+
var deserializeAws_restJson1UpdateComponentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1602
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1603
|
+
var _f;
|
|
1604
|
+
return __generator(this, function (_g) {
|
|
1605
|
+
switch (_g.label) {
|
|
1606
|
+
case 0:
|
|
1607
|
+
_a = [__assign({}, output)];
|
|
1608
|
+
_f = {};
|
|
1609
|
+
return [4, parseBody(output.body, context)];
|
|
1610
|
+
case 1:
|
|
1611
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
1612
|
+
errorCode = "UnknownError";
|
|
1613
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1614
|
+
_b = errorCode;
|
|
1615
|
+
switch (_b) {
|
|
1616
|
+
case "InternalServerException": return [3, 2];
|
|
1617
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
1618
|
+
case "InvalidParameterException": return [3, 4];
|
|
1619
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
1620
|
+
case "ResourceConflictException": return [3, 6];
|
|
1621
|
+
case "com.amazonaws.amplifyuibuilder#ResourceConflictException": return [3, 6];
|
|
1622
|
+
}
|
|
1623
|
+
return [3, 8];
|
|
1624
|
+
case 2:
|
|
1625
|
+
_c = [{}];
|
|
1626
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1627
|
+
case 3:
|
|
1628
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1629
|
+
return [3, 9];
|
|
1630
|
+
case 4:
|
|
1631
|
+
_d = [{}];
|
|
1632
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1633
|
+
case 5:
|
|
1634
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1635
|
+
return [3, 9];
|
|
1636
|
+
case 6:
|
|
1637
|
+
_e = [{}];
|
|
1638
|
+
return [4, deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context)];
|
|
1639
|
+
case 7:
|
|
1640
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1641
|
+
return [3, 9];
|
|
1642
|
+
case 8:
|
|
1643
|
+
parsedBody = parsedOutput.body;
|
|
1644
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1645
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1646
|
+
_g.label = 9;
|
|
1647
|
+
case 9:
|
|
1648
|
+
message = response.message || response.Message || errorCode;
|
|
1649
|
+
response.message = message;
|
|
1650
|
+
delete response.Message;
|
|
1651
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1652
|
+
}
|
|
1653
|
+
});
|
|
1654
|
+
}); };
|
|
1655
|
+
export var deserializeAws_restJson1UpdateThemeCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1656
|
+
var contents, data, _a;
|
|
1657
|
+
return __generator(this, function (_b) {
|
|
1658
|
+
switch (_b.label) {
|
|
1659
|
+
case 0:
|
|
1660
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1661
|
+
return [2, deserializeAws_restJson1UpdateThemeCommandError(output, context)];
|
|
1662
|
+
}
|
|
1663
|
+
contents = {
|
|
1664
|
+
$metadata: deserializeMetadata(output),
|
|
1665
|
+
entity: undefined,
|
|
1666
|
+
};
|
|
1667
|
+
_a = __expectObject;
|
|
1668
|
+
return [4, parseBody(output.body, context)];
|
|
1669
|
+
case 1:
|
|
1670
|
+
data = _a.apply(void 0, [_b.sent()]);
|
|
1671
|
+
contents.entity = deserializeAws_restJson1Theme(data, context);
|
|
1672
|
+
return [2, Promise.resolve(contents)];
|
|
1673
|
+
}
|
|
1674
|
+
});
|
|
1675
|
+
}); };
|
|
1676
|
+
var deserializeAws_restJson1UpdateThemeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1677
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1678
|
+
var _f;
|
|
1679
|
+
return __generator(this, function (_g) {
|
|
1680
|
+
switch (_g.label) {
|
|
1681
|
+
case 0:
|
|
1682
|
+
_a = [__assign({}, output)];
|
|
1683
|
+
_f = {};
|
|
1684
|
+
return [4, parseBody(output.body, context)];
|
|
1685
|
+
case 1:
|
|
1686
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
1687
|
+
errorCode = "UnknownError";
|
|
1688
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1689
|
+
_b = errorCode;
|
|
1690
|
+
switch (_b) {
|
|
1691
|
+
case "InternalServerException": return [3, 2];
|
|
1692
|
+
case "com.amazonaws.amplifyuibuilder#InternalServerException": return [3, 2];
|
|
1693
|
+
case "InvalidParameterException": return [3, 4];
|
|
1694
|
+
case "com.amazonaws.amplifyuibuilder#InvalidParameterException": return [3, 4];
|
|
1695
|
+
case "ResourceConflictException": return [3, 6];
|
|
1696
|
+
case "com.amazonaws.amplifyuibuilder#ResourceConflictException": return [3, 6];
|
|
1697
|
+
}
|
|
1698
|
+
return [3, 8];
|
|
1699
|
+
case 2:
|
|
1700
|
+
_c = [{}];
|
|
1701
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1702
|
+
case 3:
|
|
1703
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1704
|
+
return [3, 9];
|
|
1705
|
+
case 4:
|
|
1706
|
+
_d = [{}];
|
|
1707
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1708
|
+
case 5:
|
|
1709
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1710
|
+
return [3, 9];
|
|
1711
|
+
case 6:
|
|
1712
|
+
_e = [{}];
|
|
1713
|
+
return [4, deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context)];
|
|
1714
|
+
case 7:
|
|
1715
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1716
|
+
return [3, 9];
|
|
1717
|
+
case 8:
|
|
1718
|
+
parsedBody = parsedOutput.body;
|
|
1719
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1720
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1721
|
+
_g.label = 9;
|
|
1722
|
+
case 9:
|
|
1723
|
+
message = response.message || response.Message || errorCode;
|
|
1724
|
+
response.message = message;
|
|
1725
|
+
delete response.Message;
|
|
1726
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1727
|
+
}
|
|
1728
|
+
});
|
|
1729
|
+
}); };
|
|
1730
|
+
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1731
|
+
var contents, data;
|
|
1732
|
+
return __generator(this, function (_a) {
|
|
1733
|
+
contents = {
|
|
1734
|
+
name: "InternalServerException",
|
|
1735
|
+
$fault: "server",
|
|
1736
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1737
|
+
message: undefined,
|
|
1738
|
+
};
|
|
1739
|
+
data = parsedOutput.body;
|
|
1740
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1741
|
+
contents.message = __expectString(data.message);
|
|
1742
|
+
}
|
|
1743
|
+
return [2, contents];
|
|
1744
|
+
});
|
|
1745
|
+
}); };
|
|
1746
|
+
var deserializeAws_restJson1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1747
|
+
var contents, data;
|
|
1748
|
+
return __generator(this, function (_a) {
|
|
1749
|
+
contents = {
|
|
1750
|
+
name: "InvalidParameterException",
|
|
1751
|
+
$fault: "client",
|
|
1752
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1753
|
+
message: undefined,
|
|
1754
|
+
};
|
|
1755
|
+
data = parsedOutput.body;
|
|
1756
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1757
|
+
contents.message = __expectString(data.message);
|
|
1758
|
+
}
|
|
1759
|
+
return [2, contents];
|
|
1760
|
+
});
|
|
1761
|
+
}); };
|
|
1762
|
+
var deserializeAws_restJson1ResourceConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1763
|
+
var contents, data;
|
|
1764
|
+
return __generator(this, function (_a) {
|
|
1765
|
+
contents = {
|
|
1766
|
+
name: "ResourceConflictException",
|
|
1767
|
+
$fault: "client",
|
|
1768
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1769
|
+
message: undefined,
|
|
1770
|
+
};
|
|
1771
|
+
data = parsedOutput.body;
|
|
1772
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1773
|
+
contents.message = __expectString(data.message);
|
|
1774
|
+
}
|
|
1775
|
+
return [2, contents];
|
|
1776
|
+
});
|
|
1777
|
+
}); };
|
|
1778
|
+
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1779
|
+
var contents, data;
|
|
1780
|
+
return __generator(this, function (_a) {
|
|
1781
|
+
contents = {
|
|
1782
|
+
name: "ResourceNotFoundException",
|
|
1783
|
+
$fault: "client",
|
|
1784
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1785
|
+
message: undefined,
|
|
1786
|
+
};
|
|
1787
|
+
data = parsedOutput.body;
|
|
1788
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1789
|
+
contents.message = __expectString(data.message);
|
|
1790
|
+
}
|
|
1791
|
+
return [2, contents];
|
|
1792
|
+
});
|
|
1793
|
+
}); };
|
|
1794
|
+
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1795
|
+
var contents, data;
|
|
1796
|
+
return __generator(this, function (_a) {
|
|
1797
|
+
contents = {
|
|
1798
|
+
name: "ServiceQuotaExceededException",
|
|
1799
|
+
$fault: "client",
|
|
1800
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1801
|
+
message: undefined,
|
|
1802
|
+
};
|
|
1803
|
+
data = parsedOutput.body;
|
|
1804
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1805
|
+
contents.message = __expectString(data.message);
|
|
1806
|
+
}
|
|
1807
|
+
return [2, contents];
|
|
1808
|
+
});
|
|
1809
|
+
}); };
|
|
1810
|
+
var serializeAws_restJson1ComponentBindingProperties = function (input, context) {
|
|
1811
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
1812
|
+
var _b;
|
|
1813
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1814
|
+
if (value === null) {
|
|
1815
|
+
return acc;
|
|
1816
|
+
}
|
|
1817
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_restJson1ComponentBindingPropertiesValue(value, context), _b));
|
|
1818
|
+
}, {});
|
|
1819
|
+
};
|
|
1820
|
+
var serializeAws_restJson1ComponentBindingPropertiesValue = function (input, context) {
|
|
1821
|
+
return __assign(__assign(__assign({}, (input.bindingProperties !== undefined &&
|
|
1822
|
+
input.bindingProperties !== null && {
|
|
1823
|
+
bindingProperties: serializeAws_restJson1ComponentBindingPropertiesValueProperties(input.bindingProperties, context),
|
|
1824
|
+
})), (input.defaultValue !== undefined && input.defaultValue !== null && { defaultValue: input.defaultValue })), (input.type !== undefined && input.type !== null && { type: input.type }));
|
|
1825
|
+
};
|
|
1826
|
+
var serializeAws_restJson1ComponentBindingPropertiesValueProperties = function (input, context) {
|
|
1827
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.bucket !== undefined && input.bucket !== null && { bucket: input.bucket })), (input.defaultValue !== undefined && input.defaultValue !== null && { defaultValue: input.defaultValue })), (input.field !== undefined && input.field !== null && { field: input.field })), (input.key !== undefined && input.key !== null && { key: input.key })), (input.model !== undefined && input.model !== null && { model: input.model })), (input.predicates !== undefined &&
|
|
1828
|
+
input.predicates !== null && { predicates: serializeAws_restJson1PredicateList(input.predicates, context) })), (input.userAttribute !== undefined && input.userAttribute !== null && { userAttribute: input.userAttribute }));
|
|
1829
|
+
};
|
|
1830
|
+
var serializeAws_restJson1ComponentChild = function (input, context) {
|
|
1831
|
+
return __assign(__assign(__assign(__assign({}, (input.children !== undefined &&
|
|
1832
|
+
input.children !== null && { children: serializeAws_restJson1ComponentChildList(input.children, context) })), (input.componentType !== undefined && input.componentType !== null && { componentType: input.componentType })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.properties !== undefined &&
|
|
1833
|
+
input.properties !== null && {
|
|
1834
|
+
properties: serializeAws_restJson1ComponentProperties(input.properties, context),
|
|
1835
|
+
}));
|
|
1836
|
+
};
|
|
1837
|
+
var serializeAws_restJson1ComponentChildList = function (input, context) {
|
|
1838
|
+
return input
|
|
1839
|
+
.filter(function (e) { return e != null; })
|
|
1840
|
+
.map(function (entry) {
|
|
1841
|
+
if (entry === null) {
|
|
1842
|
+
return null;
|
|
1843
|
+
}
|
|
1844
|
+
return serializeAws_restJson1ComponentChild(entry, context);
|
|
1845
|
+
});
|
|
1846
|
+
};
|
|
1847
|
+
var serializeAws_restJson1ComponentCollectionProperties = function (input, context) {
|
|
1848
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
1849
|
+
var _b;
|
|
1850
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1851
|
+
if (value === null) {
|
|
1852
|
+
return acc;
|
|
1853
|
+
}
|
|
1854
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_restJson1ComponentDataConfiguration(value, context), _b));
|
|
1855
|
+
}, {});
|
|
1856
|
+
};
|
|
1857
|
+
var serializeAws_restJson1ComponentConditionProperty = function (input, context) {
|
|
1858
|
+
return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.else !== undefined &&
|
|
1859
|
+
input.else !== null && { else: serializeAws_restJson1ComponentProperty(input.else, context) })), (input.field !== undefined && input.field !== null && { field: input.field })), (input.operand !== undefined && input.operand !== null && { operand: input.operand })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.property !== undefined && input.property !== null && { property: input.property })), (input.then !== undefined &&
|
|
1860
|
+
input.then !== null && { then: serializeAws_restJson1ComponentProperty(input.then, context) }));
|
|
1861
|
+
};
|
|
1862
|
+
var serializeAws_restJson1ComponentDataConfiguration = function (input, context) {
|
|
1863
|
+
return __assign(__assign(__assign(__assign({}, (input.identifiers !== undefined &&
|
|
1864
|
+
input.identifiers !== null && { identifiers: serializeAws_restJson1IdentifierList(input.identifiers, context) })), (input.model !== undefined && input.model !== null && { model: input.model })), (input.predicate !== undefined &&
|
|
1865
|
+
input.predicate !== null && { predicate: serializeAws_restJson1Predicate(input.predicate, context) })), (input.sort !== undefined &&
|
|
1866
|
+
input.sort !== null && { sort: serializeAws_restJson1SortPropertyList(input.sort, context) }));
|
|
1867
|
+
};
|
|
1868
|
+
var serializeAws_restJson1ComponentOverrides = function (input, context) {
|
|
1869
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
1870
|
+
var _b;
|
|
1871
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1872
|
+
if (value === null) {
|
|
1873
|
+
return acc;
|
|
1874
|
+
}
|
|
1875
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_restJson1ComponentOverridesValue(value, context), _b));
|
|
1876
|
+
}, {});
|
|
1877
|
+
};
|
|
1878
|
+
var serializeAws_restJson1ComponentOverridesValue = function (input, context) {
|
|
1879
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
1880
|
+
var _b;
|
|
1881
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1882
|
+
if (value === null) {
|
|
1883
|
+
return acc;
|
|
1884
|
+
}
|
|
1885
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
1886
|
+
}, {});
|
|
1887
|
+
};
|
|
1888
|
+
var serializeAws_restJson1ComponentProperties = function (input, context) {
|
|
1889
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
1890
|
+
var _b;
|
|
1891
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1892
|
+
if (value === null) {
|
|
1893
|
+
return acc;
|
|
1894
|
+
}
|
|
1895
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_restJson1ComponentProperty(value, context), _b));
|
|
1896
|
+
}, {});
|
|
1897
|
+
};
|
|
1898
|
+
var serializeAws_restJson1ComponentProperty = function (input, context) {
|
|
1899
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.bindingProperties !== undefined &&
|
|
1900
|
+
input.bindingProperties !== null && {
|
|
1901
|
+
bindingProperties: serializeAws_restJson1ComponentPropertyBindingProperties(input.bindingProperties, context),
|
|
1902
|
+
})), (input.bindings !== undefined &&
|
|
1903
|
+
input.bindings !== null && { bindings: serializeAws_restJson1FormBindings(input.bindings, context) })), (input.collectionBindingProperties !== undefined &&
|
|
1904
|
+
input.collectionBindingProperties !== null && {
|
|
1905
|
+
collectionBindingProperties: serializeAws_restJson1ComponentPropertyBindingProperties(input.collectionBindingProperties, context),
|
|
1906
|
+
})), (input.concat !== undefined &&
|
|
1907
|
+
input.concat !== null && { concat: serializeAws_restJson1ComponentPropertyList(input.concat, context) })), (input.condition !== undefined &&
|
|
1908
|
+
input.condition !== null && {
|
|
1909
|
+
condition: serializeAws_restJson1ComponentConditionProperty(input.condition, context),
|
|
1910
|
+
})), (input.configured !== undefined && input.configured !== null && { configured: input.configured })), (input.defaultValue !== undefined && input.defaultValue !== null && { defaultValue: input.defaultValue })), (input.event !== undefined && input.event !== null && { event: input.event })), (input.importedValue !== undefined && input.importedValue !== null && { importedValue: input.importedValue })), (input.model !== undefined && input.model !== null && { model: input.model })), (input.type !== undefined && input.type !== null && { type: input.type })), (input.userAttribute !== undefined && input.userAttribute !== null && { userAttribute: input.userAttribute })), (input.value !== undefined && input.value !== null && { value: input.value }));
|
|
1911
|
+
};
|
|
1912
|
+
var serializeAws_restJson1ComponentPropertyBindingProperties = function (input, context) {
|
|
1913
|
+
return __assign(__assign({}, (input.field !== undefined && input.field !== null && { field: input.field })), (input.property !== undefined && input.property !== null && { property: input.property }));
|
|
1914
|
+
};
|
|
1915
|
+
var serializeAws_restJson1ComponentPropertyList = function (input, context) {
|
|
1916
|
+
return input
|
|
1917
|
+
.filter(function (e) { return e != null; })
|
|
1918
|
+
.map(function (entry) {
|
|
1919
|
+
if (entry === null) {
|
|
1920
|
+
return null;
|
|
1921
|
+
}
|
|
1922
|
+
return serializeAws_restJson1ComponentProperty(entry, context);
|
|
1923
|
+
});
|
|
1924
|
+
};
|
|
1925
|
+
var serializeAws_restJson1ComponentVariant = function (input, context) {
|
|
1926
|
+
return __assign(__assign({}, (input.overrides !== undefined &&
|
|
1927
|
+
input.overrides !== null && { overrides: serializeAws_restJson1ComponentOverrides(input.overrides, context) })), (input.variantValues !== undefined &&
|
|
1928
|
+
input.variantValues !== null && {
|
|
1929
|
+
variantValues: serializeAws_restJson1ComponentVariantValues(input.variantValues, context),
|
|
1930
|
+
}));
|
|
1931
|
+
};
|
|
1932
|
+
var serializeAws_restJson1ComponentVariants = function (input, context) {
|
|
1933
|
+
return input
|
|
1934
|
+
.filter(function (e) { return e != null; })
|
|
1935
|
+
.map(function (entry) {
|
|
1936
|
+
if (entry === null) {
|
|
1937
|
+
return null;
|
|
1938
|
+
}
|
|
1939
|
+
return serializeAws_restJson1ComponentVariant(entry, context);
|
|
1940
|
+
});
|
|
1941
|
+
};
|
|
1942
|
+
var serializeAws_restJson1ComponentVariantValues = function (input, context) {
|
|
1943
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
1944
|
+
var _b;
|
|
1945
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1946
|
+
if (value === null) {
|
|
1947
|
+
return acc;
|
|
1948
|
+
}
|
|
1949
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
1950
|
+
}, {});
|
|
1951
|
+
};
|
|
1952
|
+
var serializeAws_restJson1CreateComponentData = function (input, context) {
|
|
1953
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.bindingProperties !== undefined &&
|
|
1954
|
+
input.bindingProperties !== null && {
|
|
1955
|
+
bindingProperties: serializeAws_restJson1ComponentBindingProperties(input.bindingProperties, context),
|
|
1956
|
+
})), (input.children !== undefined &&
|
|
1957
|
+
input.children !== null && { children: serializeAws_restJson1ComponentChildList(input.children, context) })), (input.collectionProperties !== undefined &&
|
|
1958
|
+
input.collectionProperties !== null && {
|
|
1959
|
+
collectionProperties: serializeAws_restJson1ComponentCollectionProperties(input.collectionProperties, context),
|
|
1960
|
+
})), (input.componentType !== undefined && input.componentType !== null && { componentType: input.componentType })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.overrides !== undefined &&
|
|
1961
|
+
input.overrides !== null && { overrides: serializeAws_restJson1ComponentOverrides(input.overrides, context) })), (input.properties !== undefined &&
|
|
1962
|
+
input.properties !== null && {
|
|
1963
|
+
properties: serializeAws_restJson1ComponentProperties(input.properties, context),
|
|
1964
|
+
})), (input.sourceId !== undefined && input.sourceId !== null && { sourceId: input.sourceId })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) })), (input.variants !== undefined &&
|
|
1965
|
+
input.variants !== null && { variants: serializeAws_restJson1ComponentVariants(input.variants, context) }));
|
|
1966
|
+
};
|
|
1967
|
+
var serializeAws_restJson1CreateThemeData = function (input, context) {
|
|
1968
|
+
return __assign(__assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.overrides !== undefined &&
|
|
1969
|
+
input.overrides !== null && { overrides: serializeAws_restJson1ThemeValuesList(input.overrides, context) })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) })), (input.values !== undefined &&
|
|
1970
|
+
input.values !== null && { values: serializeAws_restJson1ThemeValuesList(input.values, context) }));
|
|
1971
|
+
};
|
|
1972
|
+
var serializeAws_restJson1ExchangeCodeForTokenRequestBody = function (input, context) {
|
|
1973
|
+
return __assign(__assign({}, (input.code !== undefined && input.code !== null && { code: input.code })), (input.redirectUri !== undefined && input.redirectUri !== null && { redirectUri: input.redirectUri }));
|
|
1974
|
+
};
|
|
1975
|
+
var serializeAws_restJson1FormBindingElement = function (input, context) {
|
|
1976
|
+
return __assign(__assign({}, (input.element !== undefined && input.element !== null && { element: input.element })), (input.property !== undefined && input.property !== null && { property: input.property }));
|
|
1977
|
+
};
|
|
1978
|
+
var serializeAws_restJson1FormBindings = function (input, context) {
|
|
1979
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
1980
|
+
var _b;
|
|
1981
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1982
|
+
if (value === null) {
|
|
1983
|
+
return acc;
|
|
1984
|
+
}
|
|
1985
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_restJson1FormBindingElement(value, context), _b));
|
|
1986
|
+
}, {});
|
|
1987
|
+
};
|
|
1988
|
+
var serializeAws_restJson1IdentifierList = function (input, context) {
|
|
1989
|
+
return input
|
|
1990
|
+
.filter(function (e) { return e != null; })
|
|
1991
|
+
.map(function (entry) {
|
|
1992
|
+
if (entry === null) {
|
|
1993
|
+
return null;
|
|
1994
|
+
}
|
|
1995
|
+
return entry;
|
|
1996
|
+
});
|
|
1997
|
+
};
|
|
1998
|
+
var serializeAws_restJson1Predicate = function (input, context) {
|
|
1999
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.and !== undefined &&
|
|
2000
|
+
input.and !== null && { and: serializeAws_restJson1PredicateList(input.and, context) })), (input.field !== undefined && input.field !== null && { field: input.field })), (input.operand !== undefined && input.operand !== null && { operand: input.operand })), (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.or !== undefined && input.or !== null && { or: serializeAws_restJson1PredicateList(input.or, context) }));
|
|
2001
|
+
};
|
|
2002
|
+
var serializeAws_restJson1PredicateList = function (input, context) {
|
|
2003
|
+
return input
|
|
2004
|
+
.filter(function (e) { return e != null; })
|
|
2005
|
+
.map(function (entry) {
|
|
2006
|
+
if (entry === null) {
|
|
2007
|
+
return null;
|
|
2008
|
+
}
|
|
2009
|
+
return serializeAws_restJson1Predicate(entry, context);
|
|
2010
|
+
});
|
|
2011
|
+
};
|
|
2012
|
+
var serializeAws_restJson1RefreshTokenRequestBody = function (input, context) {
|
|
2013
|
+
return __assign({}, (input.token !== undefined && input.token !== null && { token: input.token }));
|
|
2014
|
+
};
|
|
2015
|
+
var serializeAws_restJson1SortProperty = function (input, context) {
|
|
2016
|
+
return __assign(__assign({}, (input.direction !== undefined && input.direction !== null && { direction: input.direction })), (input.field !== undefined && input.field !== null && { field: input.field }));
|
|
2017
|
+
};
|
|
2018
|
+
var serializeAws_restJson1SortPropertyList = function (input, context) {
|
|
2019
|
+
return input
|
|
2020
|
+
.filter(function (e) { return e != null; })
|
|
2021
|
+
.map(function (entry) {
|
|
2022
|
+
if (entry === null) {
|
|
2023
|
+
return null;
|
|
2024
|
+
}
|
|
2025
|
+
return serializeAws_restJson1SortProperty(entry, context);
|
|
2026
|
+
});
|
|
2027
|
+
};
|
|
2028
|
+
var serializeAws_restJson1Tags = function (input, context) {
|
|
2029
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
2030
|
+
var _b;
|
|
2031
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2032
|
+
if (value === null) {
|
|
2033
|
+
return acc;
|
|
2034
|
+
}
|
|
2035
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
2036
|
+
}, {});
|
|
2037
|
+
};
|
|
2038
|
+
var serializeAws_restJson1ThemeValue = function (input, context) {
|
|
2039
|
+
return __assign(__assign({}, (input.children !== undefined &&
|
|
2040
|
+
input.children !== null && { children: serializeAws_restJson1ThemeValuesList(input.children, context) })), (input.value !== undefined && input.value !== null && { value: input.value }));
|
|
2041
|
+
};
|
|
2042
|
+
var serializeAws_restJson1ThemeValues = function (input, context) {
|
|
2043
|
+
return __assign(__assign({}, (input.key !== undefined && input.key !== null && { key: input.key })), (input.value !== undefined &&
|
|
2044
|
+
input.value !== null && { value: serializeAws_restJson1ThemeValue(input.value, context) }));
|
|
2045
|
+
};
|
|
2046
|
+
var serializeAws_restJson1ThemeValuesList = function (input, context) {
|
|
2047
|
+
return input
|
|
2048
|
+
.filter(function (e) { return e != null; })
|
|
2049
|
+
.map(function (entry) {
|
|
2050
|
+
if (entry === null) {
|
|
2051
|
+
return null;
|
|
2052
|
+
}
|
|
2053
|
+
return serializeAws_restJson1ThemeValues(entry, context);
|
|
2054
|
+
});
|
|
2055
|
+
};
|
|
2056
|
+
var serializeAws_restJson1UpdateComponentData = function (input, context) {
|
|
2057
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.bindingProperties !== undefined &&
|
|
2058
|
+
input.bindingProperties !== null && {
|
|
2059
|
+
bindingProperties: serializeAws_restJson1ComponentBindingProperties(input.bindingProperties, context),
|
|
2060
|
+
})), (input.children !== undefined &&
|
|
2061
|
+
input.children !== null && { children: serializeAws_restJson1ComponentChildList(input.children, context) })), (input.collectionProperties !== undefined &&
|
|
2062
|
+
input.collectionProperties !== null && {
|
|
2063
|
+
collectionProperties: serializeAws_restJson1ComponentCollectionProperties(input.collectionProperties, context),
|
|
2064
|
+
})), (input.componentType !== undefined && input.componentType !== null && { componentType: input.componentType })), (input.id !== undefined && input.id !== null && { id: input.id })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.overrides !== undefined &&
|
|
2065
|
+
input.overrides !== null && { overrides: serializeAws_restJson1ComponentOverrides(input.overrides, context) })), (input.properties !== undefined &&
|
|
2066
|
+
input.properties !== null && {
|
|
2067
|
+
properties: serializeAws_restJson1ComponentProperties(input.properties, context),
|
|
2068
|
+
})), (input.sourceId !== undefined && input.sourceId !== null && { sourceId: input.sourceId })), (input.variants !== undefined &&
|
|
2069
|
+
input.variants !== null && { variants: serializeAws_restJson1ComponentVariants(input.variants, context) }));
|
|
2070
|
+
};
|
|
2071
|
+
var serializeAws_restJson1UpdateThemeData = function (input, context) {
|
|
2072
|
+
return __assign(__assign(__assign(__assign({}, (input.id !== undefined && input.id !== null && { id: input.id })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.overrides !== undefined &&
|
|
2073
|
+
input.overrides !== null && { overrides: serializeAws_restJson1ThemeValuesList(input.overrides, context) })), (input.values !== undefined &&
|
|
2074
|
+
input.values !== null && { values: serializeAws_restJson1ThemeValuesList(input.values, context) }));
|
|
2075
|
+
};
|
|
2076
|
+
var deserializeAws_restJson1Component = function (output, context) {
|
|
2077
|
+
return {
|
|
2078
|
+
appId: __expectString(output.appId),
|
|
2079
|
+
bindingProperties: output.bindingProperties !== undefined && output.bindingProperties !== null
|
|
2080
|
+
? deserializeAws_restJson1ComponentBindingProperties(output.bindingProperties, context)
|
|
2081
|
+
: undefined,
|
|
2082
|
+
children: output.children !== undefined && output.children !== null
|
|
2083
|
+
? deserializeAws_restJson1ComponentChildList(output.children, context)
|
|
2084
|
+
: undefined,
|
|
2085
|
+
collectionProperties: output.collectionProperties !== undefined && output.collectionProperties !== null
|
|
2086
|
+
? deserializeAws_restJson1ComponentCollectionProperties(output.collectionProperties, context)
|
|
2087
|
+
: undefined,
|
|
2088
|
+
componentType: __expectString(output.componentType),
|
|
2089
|
+
createdAt: output.createdAt !== undefined && output.createdAt !== null
|
|
2090
|
+
? __expectNonNull(__parseRfc3339DateTime(output.createdAt))
|
|
2091
|
+
: undefined,
|
|
2092
|
+
environmentName: __expectString(output.environmentName),
|
|
2093
|
+
id: __expectString(output.id),
|
|
2094
|
+
modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
|
|
2095
|
+
? __expectNonNull(__parseRfc3339DateTime(output.modifiedAt))
|
|
2096
|
+
: undefined,
|
|
2097
|
+
name: __expectString(output.name),
|
|
2098
|
+
overrides: output.overrides !== undefined && output.overrides !== null
|
|
2099
|
+
? deserializeAws_restJson1ComponentOverrides(output.overrides, context)
|
|
2100
|
+
: undefined,
|
|
2101
|
+
properties: output.properties !== undefined && output.properties !== null
|
|
2102
|
+
? deserializeAws_restJson1ComponentProperties(output.properties, context)
|
|
2103
|
+
: undefined,
|
|
2104
|
+
sourceId: __expectString(output.sourceId),
|
|
2105
|
+
tags: output.tags !== undefined && output.tags !== null
|
|
2106
|
+
? deserializeAws_restJson1Tags(output.tags, context)
|
|
2107
|
+
: undefined,
|
|
2108
|
+
variants: output.variants !== undefined && output.variants !== null
|
|
2109
|
+
? deserializeAws_restJson1ComponentVariants(output.variants, context)
|
|
2110
|
+
: undefined,
|
|
2111
|
+
};
|
|
2112
|
+
};
|
|
2113
|
+
var deserializeAws_restJson1ComponentBindingProperties = function (output, context) {
|
|
2114
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
2115
|
+
var _b;
|
|
2116
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2117
|
+
if (value === null) {
|
|
2118
|
+
return acc;
|
|
2119
|
+
}
|
|
2120
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_restJson1ComponentBindingPropertiesValue(value, context), _b));
|
|
2121
|
+
}, {});
|
|
2122
|
+
};
|
|
2123
|
+
var deserializeAws_restJson1ComponentBindingPropertiesValue = function (output, context) {
|
|
2124
|
+
return {
|
|
2125
|
+
bindingProperties: output.bindingProperties !== undefined && output.bindingProperties !== null
|
|
2126
|
+
? deserializeAws_restJson1ComponentBindingPropertiesValueProperties(output.bindingProperties, context)
|
|
2127
|
+
: undefined,
|
|
2128
|
+
defaultValue: __expectString(output.defaultValue),
|
|
2129
|
+
type: __expectString(output.type),
|
|
2130
|
+
};
|
|
2131
|
+
};
|
|
2132
|
+
var deserializeAws_restJson1ComponentBindingPropertiesValueProperties = function (output, context) {
|
|
2133
|
+
return {
|
|
2134
|
+
bucket: __expectString(output.bucket),
|
|
2135
|
+
defaultValue: __expectString(output.defaultValue),
|
|
2136
|
+
field: __expectString(output.field),
|
|
2137
|
+
key: __expectString(output.key),
|
|
2138
|
+
model: __expectString(output.model),
|
|
2139
|
+
predicates: output.predicates !== undefined && output.predicates !== null
|
|
2140
|
+
? deserializeAws_restJson1PredicateList(output.predicates, context)
|
|
2141
|
+
: undefined,
|
|
2142
|
+
userAttribute: __expectString(output.userAttribute),
|
|
2143
|
+
};
|
|
2144
|
+
};
|
|
2145
|
+
var deserializeAws_restJson1ComponentChild = function (output, context) {
|
|
2146
|
+
return {
|
|
2147
|
+
children: output.children !== undefined && output.children !== null
|
|
2148
|
+
? deserializeAws_restJson1ComponentChildList(output.children, context)
|
|
2149
|
+
: undefined,
|
|
2150
|
+
componentType: __expectString(output.componentType),
|
|
2151
|
+
name: __expectString(output.name),
|
|
2152
|
+
properties: output.properties !== undefined && output.properties !== null
|
|
2153
|
+
? deserializeAws_restJson1ComponentProperties(output.properties, context)
|
|
2154
|
+
: undefined,
|
|
2155
|
+
};
|
|
2156
|
+
};
|
|
2157
|
+
var deserializeAws_restJson1ComponentChildList = function (output, context) {
|
|
2158
|
+
return (output || [])
|
|
2159
|
+
.filter(function (e) { return e != null; })
|
|
2160
|
+
.map(function (entry) {
|
|
2161
|
+
if (entry === null) {
|
|
2162
|
+
return null;
|
|
2163
|
+
}
|
|
2164
|
+
return deserializeAws_restJson1ComponentChild(entry, context);
|
|
2165
|
+
});
|
|
2166
|
+
};
|
|
2167
|
+
var deserializeAws_restJson1ComponentCollectionProperties = function (output, context) {
|
|
2168
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
2169
|
+
var _b;
|
|
2170
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2171
|
+
if (value === null) {
|
|
2172
|
+
return acc;
|
|
2173
|
+
}
|
|
2174
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_restJson1ComponentDataConfiguration(value, context), _b));
|
|
2175
|
+
}, {});
|
|
2176
|
+
};
|
|
2177
|
+
var deserializeAws_restJson1ComponentConditionProperty = function (output, context) {
|
|
2178
|
+
return {
|
|
2179
|
+
else: output.else !== undefined && output.else !== null
|
|
2180
|
+
? deserializeAws_restJson1ComponentProperty(output.else, context)
|
|
2181
|
+
: undefined,
|
|
2182
|
+
field: __expectString(output.field),
|
|
2183
|
+
operand: __expectString(output.operand),
|
|
2184
|
+
operator: __expectString(output.operator),
|
|
2185
|
+
property: __expectString(output.property),
|
|
2186
|
+
then: output.then !== undefined && output.then !== null
|
|
2187
|
+
? deserializeAws_restJson1ComponentProperty(output.then, context)
|
|
2188
|
+
: undefined,
|
|
2189
|
+
};
|
|
2190
|
+
};
|
|
2191
|
+
var deserializeAws_restJson1ComponentDataConfiguration = function (output, context) {
|
|
2192
|
+
return {
|
|
2193
|
+
identifiers: output.identifiers !== undefined && output.identifiers !== null
|
|
2194
|
+
? deserializeAws_restJson1IdentifierList(output.identifiers, context)
|
|
2195
|
+
: undefined,
|
|
2196
|
+
model: __expectString(output.model),
|
|
2197
|
+
predicate: output.predicate !== undefined && output.predicate !== null
|
|
2198
|
+
? deserializeAws_restJson1Predicate(output.predicate, context)
|
|
2199
|
+
: undefined,
|
|
2200
|
+
sort: output.sort !== undefined && output.sort !== null
|
|
2201
|
+
? deserializeAws_restJson1SortPropertyList(output.sort, context)
|
|
2202
|
+
: undefined,
|
|
2203
|
+
};
|
|
2204
|
+
};
|
|
2205
|
+
var deserializeAws_restJson1ComponentList = function (output, context) {
|
|
2206
|
+
return (output || [])
|
|
2207
|
+
.filter(function (e) { return e != null; })
|
|
2208
|
+
.map(function (entry) {
|
|
2209
|
+
if (entry === null) {
|
|
2210
|
+
return null;
|
|
2211
|
+
}
|
|
2212
|
+
return deserializeAws_restJson1Component(entry, context);
|
|
2213
|
+
});
|
|
2214
|
+
};
|
|
2215
|
+
var deserializeAws_restJson1ComponentOverrides = function (output, context) {
|
|
2216
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
2217
|
+
var _b;
|
|
2218
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2219
|
+
if (value === null) {
|
|
2220
|
+
return acc;
|
|
2221
|
+
}
|
|
2222
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_restJson1ComponentOverridesValue(value, context), _b));
|
|
2223
|
+
}, {});
|
|
2224
|
+
};
|
|
2225
|
+
var deserializeAws_restJson1ComponentOverridesValue = function (output, context) {
|
|
2226
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
2227
|
+
var _b;
|
|
2228
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2229
|
+
if (value === null) {
|
|
2230
|
+
return acc;
|
|
2231
|
+
}
|
|
2232
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
2233
|
+
}, {});
|
|
2234
|
+
};
|
|
2235
|
+
var deserializeAws_restJson1ComponentProperties = function (output, context) {
|
|
2236
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
2237
|
+
var _b;
|
|
2238
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2239
|
+
if (value === null) {
|
|
2240
|
+
return acc;
|
|
2241
|
+
}
|
|
2242
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_restJson1ComponentProperty(value, context), _b));
|
|
2243
|
+
}, {});
|
|
2244
|
+
};
|
|
2245
|
+
var deserializeAws_restJson1ComponentProperty = function (output, context) {
|
|
2246
|
+
return {
|
|
2247
|
+
bindingProperties: output.bindingProperties !== undefined && output.bindingProperties !== null
|
|
2248
|
+
? deserializeAws_restJson1ComponentPropertyBindingProperties(output.bindingProperties, context)
|
|
2249
|
+
: undefined,
|
|
2250
|
+
bindings: output.bindings !== undefined && output.bindings !== null
|
|
2251
|
+
? deserializeAws_restJson1FormBindings(output.bindings, context)
|
|
2252
|
+
: undefined,
|
|
2253
|
+
collectionBindingProperties: output.collectionBindingProperties !== undefined && output.collectionBindingProperties !== null
|
|
2254
|
+
? deserializeAws_restJson1ComponentPropertyBindingProperties(output.collectionBindingProperties, context)
|
|
2255
|
+
: undefined,
|
|
2256
|
+
concat: output.concat !== undefined && output.concat !== null
|
|
2257
|
+
? deserializeAws_restJson1ComponentPropertyList(output.concat, context)
|
|
2258
|
+
: undefined,
|
|
2259
|
+
condition: output.condition !== undefined && output.condition !== null
|
|
2260
|
+
? deserializeAws_restJson1ComponentConditionProperty(output.condition, context)
|
|
2261
|
+
: undefined,
|
|
2262
|
+
configured: __expectBoolean(output.configured),
|
|
2263
|
+
defaultValue: __expectString(output.defaultValue),
|
|
2264
|
+
event: __expectString(output.event),
|
|
2265
|
+
importedValue: __expectString(output.importedValue),
|
|
2266
|
+
model: __expectString(output.model),
|
|
2267
|
+
type: __expectString(output.type),
|
|
2268
|
+
userAttribute: __expectString(output.userAttribute),
|
|
2269
|
+
value: __expectString(output.value),
|
|
2270
|
+
};
|
|
2271
|
+
};
|
|
2272
|
+
var deserializeAws_restJson1ComponentPropertyBindingProperties = function (output, context) {
|
|
2273
|
+
return {
|
|
2274
|
+
field: __expectString(output.field),
|
|
2275
|
+
property: __expectString(output.property),
|
|
2276
|
+
};
|
|
2277
|
+
};
|
|
2278
|
+
var deserializeAws_restJson1ComponentPropertyList = function (output, context) {
|
|
2279
|
+
return (output || [])
|
|
2280
|
+
.filter(function (e) { return e != null; })
|
|
2281
|
+
.map(function (entry) {
|
|
2282
|
+
if (entry === null) {
|
|
2283
|
+
return null;
|
|
2284
|
+
}
|
|
2285
|
+
return deserializeAws_restJson1ComponentProperty(entry, context);
|
|
2286
|
+
});
|
|
2287
|
+
};
|
|
2288
|
+
var deserializeAws_restJson1ComponentSummary = function (output, context) {
|
|
2289
|
+
return {
|
|
2290
|
+
appId: __expectString(output.appId),
|
|
2291
|
+
componentType: __expectString(output.componentType),
|
|
2292
|
+
environmentName: __expectString(output.environmentName),
|
|
2293
|
+
id: __expectString(output.id),
|
|
2294
|
+
name: __expectString(output.name),
|
|
2295
|
+
};
|
|
2296
|
+
};
|
|
2297
|
+
var deserializeAws_restJson1ComponentSummaryList = function (output, context) {
|
|
2298
|
+
return (output || [])
|
|
2299
|
+
.filter(function (e) { return e != null; })
|
|
2300
|
+
.map(function (entry) {
|
|
2301
|
+
if (entry === null) {
|
|
2302
|
+
return null;
|
|
2303
|
+
}
|
|
2304
|
+
return deserializeAws_restJson1ComponentSummary(entry, context);
|
|
2305
|
+
});
|
|
2306
|
+
};
|
|
2307
|
+
var deserializeAws_restJson1ComponentVariant = function (output, context) {
|
|
2308
|
+
return {
|
|
2309
|
+
overrides: output.overrides !== undefined && output.overrides !== null
|
|
2310
|
+
? deserializeAws_restJson1ComponentOverrides(output.overrides, context)
|
|
2311
|
+
: undefined,
|
|
2312
|
+
variantValues: output.variantValues !== undefined && output.variantValues !== null
|
|
2313
|
+
? deserializeAws_restJson1ComponentVariantValues(output.variantValues, context)
|
|
2314
|
+
: undefined,
|
|
2315
|
+
};
|
|
2316
|
+
};
|
|
2317
|
+
var deserializeAws_restJson1ComponentVariants = function (output, context) {
|
|
2318
|
+
return (output || [])
|
|
2319
|
+
.filter(function (e) { return e != null; })
|
|
2320
|
+
.map(function (entry) {
|
|
2321
|
+
if (entry === null) {
|
|
2322
|
+
return null;
|
|
2323
|
+
}
|
|
2324
|
+
return deserializeAws_restJson1ComponentVariant(entry, context);
|
|
2325
|
+
});
|
|
2326
|
+
};
|
|
2327
|
+
var deserializeAws_restJson1ComponentVariantValues = function (output, context) {
|
|
2328
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
2329
|
+
var _b;
|
|
2330
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2331
|
+
if (value === null) {
|
|
2332
|
+
return acc;
|
|
2333
|
+
}
|
|
2334
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
2335
|
+
}, {});
|
|
2336
|
+
};
|
|
2337
|
+
var deserializeAws_restJson1FormBindingElement = function (output, context) {
|
|
2338
|
+
return {
|
|
2339
|
+
element: __expectString(output.element),
|
|
2340
|
+
property: __expectString(output.property),
|
|
2341
|
+
};
|
|
2342
|
+
};
|
|
2343
|
+
var deserializeAws_restJson1FormBindings = function (output, context) {
|
|
2344
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
2345
|
+
var _b;
|
|
2346
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2347
|
+
if (value === null) {
|
|
2348
|
+
return acc;
|
|
2349
|
+
}
|
|
2350
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_restJson1FormBindingElement(value, context), _b));
|
|
2351
|
+
}, {});
|
|
2352
|
+
};
|
|
2353
|
+
var deserializeAws_restJson1IdentifierList = function (output, context) {
|
|
2354
|
+
return (output || [])
|
|
2355
|
+
.filter(function (e) { return e != null; })
|
|
2356
|
+
.map(function (entry) {
|
|
2357
|
+
if (entry === null) {
|
|
2358
|
+
return null;
|
|
2359
|
+
}
|
|
2360
|
+
return __expectString(entry);
|
|
2361
|
+
});
|
|
2362
|
+
};
|
|
2363
|
+
var deserializeAws_restJson1Predicate = function (output, context) {
|
|
2364
|
+
return {
|
|
2365
|
+
and: output.and !== undefined && output.and !== null
|
|
2366
|
+
? deserializeAws_restJson1PredicateList(output.and, context)
|
|
2367
|
+
: undefined,
|
|
2368
|
+
field: __expectString(output.field),
|
|
2369
|
+
operand: __expectString(output.operand),
|
|
2370
|
+
operator: __expectString(output.operator),
|
|
2371
|
+
or: output.or !== undefined && output.or !== null
|
|
2372
|
+
? deserializeAws_restJson1PredicateList(output.or, context)
|
|
2373
|
+
: undefined,
|
|
2374
|
+
};
|
|
2375
|
+
};
|
|
2376
|
+
var deserializeAws_restJson1PredicateList = function (output, context) {
|
|
2377
|
+
return (output || [])
|
|
2378
|
+
.filter(function (e) { return e != null; })
|
|
2379
|
+
.map(function (entry) {
|
|
2380
|
+
if (entry === null) {
|
|
2381
|
+
return null;
|
|
2382
|
+
}
|
|
2383
|
+
return deserializeAws_restJson1Predicate(entry, context);
|
|
2384
|
+
});
|
|
2385
|
+
};
|
|
2386
|
+
var deserializeAws_restJson1SortProperty = function (output, context) {
|
|
2387
|
+
return {
|
|
2388
|
+
direction: __expectString(output.direction),
|
|
2389
|
+
field: __expectString(output.field),
|
|
2390
|
+
};
|
|
2391
|
+
};
|
|
2392
|
+
var deserializeAws_restJson1SortPropertyList = function (output, context) {
|
|
2393
|
+
return (output || [])
|
|
2394
|
+
.filter(function (e) { return e != null; })
|
|
2395
|
+
.map(function (entry) {
|
|
2396
|
+
if (entry === null) {
|
|
2397
|
+
return null;
|
|
2398
|
+
}
|
|
2399
|
+
return deserializeAws_restJson1SortProperty(entry, context);
|
|
2400
|
+
});
|
|
2401
|
+
};
|
|
2402
|
+
var deserializeAws_restJson1Tags = function (output, context) {
|
|
2403
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
2404
|
+
var _b;
|
|
2405
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2406
|
+
if (value === null) {
|
|
2407
|
+
return acc;
|
|
2408
|
+
}
|
|
2409
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
2410
|
+
}, {});
|
|
2411
|
+
};
|
|
2412
|
+
var deserializeAws_restJson1Theme = function (output, context) {
|
|
2413
|
+
return {
|
|
2414
|
+
appId: __expectString(output.appId),
|
|
2415
|
+
createdAt: output.createdAt !== undefined && output.createdAt !== null
|
|
2416
|
+
? __expectNonNull(__parseRfc3339DateTime(output.createdAt))
|
|
2417
|
+
: undefined,
|
|
2418
|
+
environmentName: __expectString(output.environmentName),
|
|
2419
|
+
id: __expectString(output.id),
|
|
2420
|
+
modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
|
|
2421
|
+
? __expectNonNull(__parseRfc3339DateTime(output.modifiedAt))
|
|
2422
|
+
: undefined,
|
|
2423
|
+
name: __expectString(output.name),
|
|
2424
|
+
overrides: output.overrides !== undefined && output.overrides !== null
|
|
2425
|
+
? deserializeAws_restJson1ThemeValuesList(output.overrides, context)
|
|
2426
|
+
: undefined,
|
|
2427
|
+
tags: output.tags !== undefined && output.tags !== null
|
|
2428
|
+
? deserializeAws_restJson1Tags(output.tags, context)
|
|
2429
|
+
: undefined,
|
|
2430
|
+
values: output.values !== undefined && output.values !== null
|
|
2431
|
+
? deserializeAws_restJson1ThemeValuesList(output.values, context)
|
|
2432
|
+
: undefined,
|
|
2433
|
+
};
|
|
2434
|
+
};
|
|
2435
|
+
var deserializeAws_restJson1ThemeList = function (output, context) {
|
|
2436
|
+
return (output || [])
|
|
2437
|
+
.filter(function (e) { return e != null; })
|
|
2438
|
+
.map(function (entry) {
|
|
2439
|
+
if (entry === null) {
|
|
2440
|
+
return null;
|
|
2441
|
+
}
|
|
2442
|
+
return deserializeAws_restJson1Theme(entry, context);
|
|
2443
|
+
});
|
|
2444
|
+
};
|
|
2445
|
+
var deserializeAws_restJson1ThemeSummary = function (output, context) {
|
|
2446
|
+
return {
|
|
2447
|
+
appId: __expectString(output.appId),
|
|
2448
|
+
environmentName: __expectString(output.environmentName),
|
|
2449
|
+
id: __expectString(output.id),
|
|
2450
|
+
name: __expectString(output.name),
|
|
2451
|
+
};
|
|
2452
|
+
};
|
|
2453
|
+
var deserializeAws_restJson1ThemeSummaryList = function (output, context) {
|
|
2454
|
+
return (output || [])
|
|
2455
|
+
.filter(function (e) { return e != null; })
|
|
2456
|
+
.map(function (entry) {
|
|
2457
|
+
if (entry === null) {
|
|
2458
|
+
return null;
|
|
2459
|
+
}
|
|
2460
|
+
return deserializeAws_restJson1ThemeSummary(entry, context);
|
|
2461
|
+
});
|
|
2462
|
+
};
|
|
2463
|
+
var deserializeAws_restJson1ThemeValue = function (output, context) {
|
|
2464
|
+
return {
|
|
2465
|
+
children: output.children !== undefined && output.children !== null
|
|
2466
|
+
? deserializeAws_restJson1ThemeValuesList(output.children, context)
|
|
2467
|
+
: undefined,
|
|
2468
|
+
value: __expectString(output.value),
|
|
2469
|
+
};
|
|
2470
|
+
};
|
|
2471
|
+
var deserializeAws_restJson1ThemeValues = function (output, context) {
|
|
2472
|
+
return {
|
|
2473
|
+
key: __expectString(output.key),
|
|
2474
|
+
value: output.value !== undefined && output.value !== null
|
|
2475
|
+
? deserializeAws_restJson1ThemeValue(output.value, context)
|
|
2476
|
+
: undefined,
|
|
2477
|
+
};
|
|
2478
|
+
};
|
|
2479
|
+
var deserializeAws_restJson1ThemeValuesList = function (output, context) {
|
|
2480
|
+
return (output || [])
|
|
2481
|
+
.filter(function (e) { return e != null; })
|
|
2482
|
+
.map(function (entry) {
|
|
2483
|
+
if (entry === null) {
|
|
2484
|
+
return null;
|
|
2485
|
+
}
|
|
2486
|
+
return deserializeAws_restJson1ThemeValues(entry, context);
|
|
2487
|
+
});
|
|
2488
|
+
};
|
|
2489
|
+
var deserializeMetadata = function (output) {
|
|
2490
|
+
var _a;
|
|
2491
|
+
return ({
|
|
2492
|
+
httpStatusCode: output.statusCode,
|
|
2493
|
+
requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
|
|
2494
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2495
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
2496
|
+
});
|
|
2497
|
+
};
|
|
2498
|
+
var collectBody = function (streamBody, context) {
|
|
2499
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
2500
|
+
if (streamBody instanceof Uint8Array) {
|
|
2501
|
+
return Promise.resolve(streamBody);
|
|
2502
|
+
}
|
|
2503
|
+
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2504
|
+
};
|
|
2505
|
+
var collectBodyString = function (streamBody, context) {
|
|
2506
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
2507
|
+
};
|
|
2508
|
+
var isSerializableHeaderValue = function (value) {
|
|
2509
|
+
return value !== undefined &&
|
|
2510
|
+
value !== null &&
|
|
2511
|
+
value !== "" &&
|
|
2512
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
2513
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2514
|
+
};
|
|
2515
|
+
var parseBody = function (streamBody, context) {
|
|
2516
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
2517
|
+
if (encoded.length) {
|
|
2518
|
+
return JSON.parse(encoded);
|
|
2519
|
+
}
|
|
2520
|
+
return {};
|
|
2521
|
+
});
|
|
2522
|
+
};
|
|
2523
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
2524
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2525
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
2526
|
+
var cleanValue = rawValue;
|
|
2527
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
2528
|
+
cleanValue = cleanValue.split(":")[0];
|
|
2529
|
+
}
|
|
2530
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
2531
|
+
cleanValue = cleanValue.split("#")[1];
|
|
2532
|
+
}
|
|
2533
|
+
return cleanValue;
|
|
2534
|
+
};
|
|
2535
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2536
|
+
if (headerKey !== undefined) {
|
|
2537
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2538
|
+
}
|
|
2539
|
+
if (data.code !== undefined) {
|
|
2540
|
+
return sanitizeErrorCode(data.code);
|
|
2541
|
+
}
|
|
2542
|
+
if (data["__type"] !== undefined) {
|
|
2543
|
+
return sanitizeErrorCode(data["__type"]);
|
|
2544
|
+
}
|
|
2545
|
+
return "";
|
|
2546
|
+
};
|