@aws-sdk/client-amplifyuibuilder 3.476.0 → 3.477.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.
@@ -2,22 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateThemeCommand = exports.de_UpdateFormCommand = exports.de_UpdateComponentCommand = exports.de_StartCodegenJobCommand = exports.de_RefreshTokenCommand = exports.de_PutMetadataFlagCommand = exports.de_ListThemesCommand = exports.de_ListFormsCommand = exports.de_ListComponentsCommand = exports.de_ListCodegenJobsCommand = exports.de_GetThemeCommand = exports.de_GetMetadataCommand = exports.de_GetFormCommand = exports.de_GetComponentCommand = exports.de_GetCodegenJobCommand = exports.de_ExportThemesCommand = exports.de_ExportFormsCommand = exports.de_ExportComponentsCommand = exports.de_ExchangeCodeForTokenCommand = exports.de_DeleteThemeCommand = exports.de_DeleteFormCommand = exports.de_DeleteComponentCommand = exports.de_CreateThemeCommand = exports.de_CreateFormCommand = exports.de_CreateComponentCommand = exports.se_UpdateThemeCommand = exports.se_UpdateFormCommand = exports.se_UpdateComponentCommand = exports.se_StartCodegenJobCommand = exports.se_RefreshTokenCommand = exports.se_PutMetadataFlagCommand = exports.se_ListThemesCommand = exports.se_ListFormsCommand = exports.se_ListComponentsCommand = exports.se_ListCodegenJobsCommand = exports.se_GetThemeCommand = exports.se_GetMetadataCommand = exports.se_GetFormCommand = exports.se_GetComponentCommand = exports.se_GetCodegenJobCommand = exports.se_ExportThemesCommand = exports.se_ExportFormsCommand = exports.se_ExportComponentsCommand = exports.se_ExchangeCodeForTokenCommand = exports.se_DeleteThemeCommand = exports.se_DeleteFormCommand = exports.se_DeleteComponentCommand = exports.se_CreateThemeCommand = exports.se_CreateFormCommand = exports.se_CreateComponentCommand = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_2 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const uuid_1 = require("uuid");
8
8
  const AmplifyUIBuilderServiceException_1 = require("../models/AmplifyUIBuilderServiceException");
9
9
  const models_0_1 = require("../models/models_0");
10
10
  const se_CreateComponentCommand = async (input, context) => {
11
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const b = (0, core_2.requestBuilder)(input, context);
12
12
  const headers = {
13
13
  "content-type": "application/json",
14
14
  };
15
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
16
- "/app/{appId}/environment/{environmentName}/components";
17
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
18
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
15
+ b.bp("/app/{appId}/environment/{environmentName}/components");
16
+ b.p("appId", () => input.appId, "{appId}", false);
17
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
19
18
  const query = (0, smithy_client_1.map)({
20
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
19
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
21
20
  });
22
21
  let body;
23
22
  if (input.componentToCreate !== undefined) {
@@ -27,29 +26,20 @@ const se_CreateComponentCommand = async (input, context) => {
27
26
  body = {};
28
27
  }
29
28
  body = JSON.stringify(body);
30
- return new protocol_http_1.HttpRequest({
31
- protocol,
32
- hostname,
33
- port,
34
- method: "POST",
35
- headers,
36
- path: resolvedPath,
37
- query,
38
- body,
39
- });
29
+ b.m("POST").h(headers).q(query).b(body);
30
+ return b.build();
40
31
  };
41
32
  exports.se_CreateComponentCommand = se_CreateComponentCommand;
42
33
  const se_CreateFormCommand = async (input, context) => {
43
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
34
+ const b = (0, core_2.requestBuilder)(input, context);
44
35
  const headers = {
45
36
  "content-type": "application/json",
46
37
  };
47
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
48
- "/app/{appId}/environment/{environmentName}/forms";
49
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
50
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
38
+ b.bp("/app/{appId}/environment/{environmentName}/forms");
39
+ b.p("appId", () => input.appId, "{appId}", false);
40
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
51
41
  const query = (0, smithy_client_1.map)({
52
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
42
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
53
43
  });
54
44
  let body;
55
45
  if (input.formToCreate !== undefined) {
@@ -59,29 +49,20 @@ const se_CreateFormCommand = async (input, context) => {
59
49
  body = {};
60
50
  }
61
51
  body = JSON.stringify(body);
62
- return new protocol_http_1.HttpRequest({
63
- protocol,
64
- hostname,
65
- port,
66
- method: "POST",
67
- headers,
68
- path: resolvedPath,
69
- query,
70
- body,
71
- });
52
+ b.m("POST").h(headers).q(query).b(body);
53
+ return b.build();
72
54
  };
73
55
  exports.se_CreateFormCommand = se_CreateFormCommand;
74
56
  const se_CreateThemeCommand = async (input, context) => {
75
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
57
+ const b = (0, core_2.requestBuilder)(input, context);
76
58
  const headers = {
77
59
  "content-type": "application/json",
78
60
  };
79
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
80
- "/app/{appId}/environment/{environmentName}/themes";
81
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
82
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
61
+ b.bp("/app/{appId}/environment/{environmentName}/themes");
62
+ b.p("appId", () => input.appId, "{appId}", false);
63
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
83
64
  const query = (0, smithy_client_1.map)({
84
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
65
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
85
66
  });
86
67
  let body;
87
68
  if (input.themeToCreate !== undefined) {
@@ -91,85 +72,53 @@ const se_CreateThemeCommand = async (input, context) => {
91
72
  body = {};
92
73
  }
93
74
  body = JSON.stringify(body);
94
- return new protocol_http_1.HttpRequest({
95
- protocol,
96
- hostname,
97
- port,
98
- method: "POST",
99
- headers,
100
- path: resolvedPath,
101
- query,
102
- body,
103
- });
75
+ b.m("POST").h(headers).q(query).b(body);
76
+ return b.build();
104
77
  };
105
78
  exports.se_CreateThemeCommand = se_CreateThemeCommand;
106
79
  const se_DeleteComponentCommand = async (input, context) => {
107
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
+ const b = (0, core_2.requestBuilder)(input, context);
108
81
  const headers = {};
109
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
110
- "/app/{appId}/environment/{environmentName}/components/{id}";
111
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
112
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
113
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
82
+ b.bp("/app/{appId}/environment/{environmentName}/components/{id}");
83
+ b.p("appId", () => input.appId, "{appId}", false);
84
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
85
+ b.p("id", () => input.id, "{id}", false);
114
86
  let body;
115
- return new protocol_http_1.HttpRequest({
116
- protocol,
117
- hostname,
118
- port,
119
- method: "DELETE",
120
- headers,
121
- path: resolvedPath,
122
- body,
123
- });
87
+ b.m("DELETE").h(headers).b(body);
88
+ return b.build();
124
89
  };
125
90
  exports.se_DeleteComponentCommand = se_DeleteComponentCommand;
126
91
  const se_DeleteFormCommand = async (input, context) => {
127
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
92
+ const b = (0, core_2.requestBuilder)(input, context);
128
93
  const headers = {};
129
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
130
- "/app/{appId}/environment/{environmentName}/forms/{id}";
131
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
132
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
133
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
94
+ b.bp("/app/{appId}/environment/{environmentName}/forms/{id}");
95
+ b.p("appId", () => input.appId, "{appId}", false);
96
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
97
+ b.p("id", () => input.id, "{id}", false);
134
98
  let body;
135
- return new protocol_http_1.HttpRequest({
136
- protocol,
137
- hostname,
138
- port,
139
- method: "DELETE",
140
- headers,
141
- path: resolvedPath,
142
- body,
143
- });
99
+ b.m("DELETE").h(headers).b(body);
100
+ return b.build();
144
101
  };
145
102
  exports.se_DeleteFormCommand = se_DeleteFormCommand;
146
103
  const se_DeleteThemeCommand = async (input, context) => {
147
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const b = (0, core_2.requestBuilder)(input, context);
148
105
  const headers = {};
149
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
150
- "/app/{appId}/environment/{environmentName}/themes/{id}";
151
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
152
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
153
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
106
+ b.bp("/app/{appId}/environment/{environmentName}/themes/{id}");
107
+ b.p("appId", () => input.appId, "{appId}", false);
108
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
109
+ b.p("id", () => input.id, "{id}", false);
154
110
  let body;
155
- return new protocol_http_1.HttpRequest({
156
- protocol,
157
- hostname,
158
- port,
159
- method: "DELETE",
160
- headers,
161
- path: resolvedPath,
162
- body,
163
- });
111
+ b.m("DELETE").h(headers).b(body);
112
+ return b.build();
164
113
  };
165
114
  exports.se_DeleteThemeCommand = se_DeleteThemeCommand;
166
115
  const se_ExchangeCodeForTokenCommand = async (input, context) => {
167
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = (0, core_2.requestBuilder)(input, context);
168
117
  const headers = {
169
118
  "content-type": "application/json",
170
119
  };
171
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tokens/{provider}";
172
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "provider", () => input.provider, "{provider}", false);
120
+ b.bp("/tokens/{provider}");
121
+ b.p("provider", () => input.provider, "{provider}", false);
173
122
  let body;
174
123
  if (input.request !== undefined) {
175
124
  body = (0, smithy_client_1._json)(input.request);
@@ -178,291 +127,180 @@ const se_ExchangeCodeForTokenCommand = async (input, context) => {
178
127
  body = {};
179
128
  }
180
129
  body = JSON.stringify(body);
181
- return new protocol_http_1.HttpRequest({
182
- protocol,
183
- hostname,
184
- port,
185
- method: "POST",
186
- headers,
187
- path: resolvedPath,
188
- body,
189
- });
130
+ b.m("POST").h(headers).b(body);
131
+ return b.build();
190
132
  };
191
133
  exports.se_ExchangeCodeForTokenCommand = se_ExchangeCodeForTokenCommand;
192
134
  const se_ExportComponentsCommand = async (input, context) => {
193
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
135
+ const b = (0, core_2.requestBuilder)(input, context);
194
136
  const headers = {};
195
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
196
- "/export/app/{appId}/environment/{environmentName}/components";
197
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
198
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
137
+ b.bp("/export/app/{appId}/environment/{environmentName}/components");
138
+ b.p("appId", () => input.appId, "{appId}", false);
139
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
199
140
  const query = (0, smithy_client_1.map)({
200
- nextToken: [, input.nextToken],
141
+ [_nT]: [, input[_nT]],
201
142
  });
202
143
  let body;
203
- return new protocol_http_1.HttpRequest({
204
- protocol,
205
- hostname,
206
- port,
207
- method: "GET",
208
- headers,
209
- path: resolvedPath,
210
- query,
211
- body,
212
- });
144
+ b.m("GET").h(headers).q(query).b(body);
145
+ return b.build();
213
146
  };
214
147
  exports.se_ExportComponentsCommand = se_ExportComponentsCommand;
215
148
  const se_ExportFormsCommand = async (input, context) => {
216
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const b = (0, core_2.requestBuilder)(input, context);
217
150
  const headers = {};
218
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
219
- "/export/app/{appId}/environment/{environmentName}/forms";
220
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
221
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
151
+ b.bp("/export/app/{appId}/environment/{environmentName}/forms");
152
+ b.p("appId", () => input.appId, "{appId}", false);
153
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
222
154
  const query = (0, smithy_client_1.map)({
223
- nextToken: [, input.nextToken],
155
+ [_nT]: [, input[_nT]],
224
156
  });
225
157
  let body;
226
- return new protocol_http_1.HttpRequest({
227
- protocol,
228
- hostname,
229
- port,
230
- method: "GET",
231
- headers,
232
- path: resolvedPath,
233
- query,
234
- body,
235
- });
158
+ b.m("GET").h(headers).q(query).b(body);
159
+ return b.build();
236
160
  };
237
161
  exports.se_ExportFormsCommand = se_ExportFormsCommand;
238
162
  const se_ExportThemesCommand = async (input, context) => {
239
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
163
+ const b = (0, core_2.requestBuilder)(input, context);
240
164
  const headers = {};
241
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
242
- "/export/app/{appId}/environment/{environmentName}/themes";
243
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
244
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
165
+ b.bp("/export/app/{appId}/environment/{environmentName}/themes");
166
+ b.p("appId", () => input.appId, "{appId}", false);
167
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
245
168
  const query = (0, smithy_client_1.map)({
246
- nextToken: [, input.nextToken],
169
+ [_nT]: [, input[_nT]],
247
170
  });
248
171
  let body;
249
- return new protocol_http_1.HttpRequest({
250
- protocol,
251
- hostname,
252
- port,
253
- method: "GET",
254
- headers,
255
- path: resolvedPath,
256
- query,
257
- body,
258
- });
172
+ b.m("GET").h(headers).q(query).b(body);
173
+ return b.build();
259
174
  };
260
175
  exports.se_ExportThemesCommand = se_ExportThemesCommand;
261
176
  const se_GetCodegenJobCommand = async (input, context) => {
262
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
177
+ const b = (0, core_2.requestBuilder)(input, context);
263
178
  const headers = {};
264
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
265
- "/app/{appId}/environment/{environmentName}/codegen-jobs/{id}";
266
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
267
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
268
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
179
+ b.bp("/app/{appId}/environment/{environmentName}/codegen-jobs/{id}");
180
+ b.p("appId", () => input.appId, "{appId}", false);
181
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
182
+ b.p("id", () => input.id, "{id}", false);
269
183
  let body;
270
- return new protocol_http_1.HttpRequest({
271
- protocol,
272
- hostname,
273
- port,
274
- method: "GET",
275
- headers,
276
- path: resolvedPath,
277
- body,
278
- });
184
+ b.m("GET").h(headers).b(body);
185
+ return b.build();
279
186
  };
280
187
  exports.se_GetCodegenJobCommand = se_GetCodegenJobCommand;
281
188
  const se_GetComponentCommand = async (input, context) => {
282
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
189
+ const b = (0, core_2.requestBuilder)(input, context);
283
190
  const headers = {};
284
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
285
- "/app/{appId}/environment/{environmentName}/components/{id}";
286
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
287
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
288
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
191
+ b.bp("/app/{appId}/environment/{environmentName}/components/{id}");
192
+ b.p("appId", () => input.appId, "{appId}", false);
193
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
194
+ b.p("id", () => input.id, "{id}", false);
289
195
  let body;
290
- return new protocol_http_1.HttpRequest({
291
- protocol,
292
- hostname,
293
- port,
294
- method: "GET",
295
- headers,
296
- path: resolvedPath,
297
- body,
298
- });
196
+ b.m("GET").h(headers).b(body);
197
+ return b.build();
299
198
  };
300
199
  exports.se_GetComponentCommand = se_GetComponentCommand;
301
200
  const se_GetFormCommand = async (input, context) => {
302
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
201
+ const b = (0, core_2.requestBuilder)(input, context);
303
202
  const headers = {};
304
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
305
- "/app/{appId}/environment/{environmentName}/forms/{id}";
306
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
307
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
308
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
203
+ b.bp("/app/{appId}/environment/{environmentName}/forms/{id}");
204
+ b.p("appId", () => input.appId, "{appId}", false);
205
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
206
+ b.p("id", () => input.id, "{id}", false);
309
207
  let body;
310
- return new protocol_http_1.HttpRequest({
311
- protocol,
312
- hostname,
313
- port,
314
- method: "GET",
315
- headers,
316
- path: resolvedPath,
317
- body,
318
- });
208
+ b.m("GET").h(headers).b(body);
209
+ return b.build();
319
210
  };
320
211
  exports.se_GetFormCommand = se_GetFormCommand;
321
212
  const se_GetMetadataCommand = async (input, context) => {
322
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
+ const b = (0, core_2.requestBuilder)(input, context);
323
214
  const headers = {};
324
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
325
- "/app/{appId}/environment/{environmentName}/metadata";
326
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
327
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
215
+ b.bp("/app/{appId}/environment/{environmentName}/metadata");
216
+ b.p("appId", () => input.appId, "{appId}", false);
217
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
328
218
  let body;
329
- return new protocol_http_1.HttpRequest({
330
- protocol,
331
- hostname,
332
- port,
333
- method: "GET",
334
- headers,
335
- path: resolvedPath,
336
- body,
337
- });
219
+ b.m("GET").h(headers).b(body);
220
+ return b.build();
338
221
  };
339
222
  exports.se_GetMetadataCommand = se_GetMetadataCommand;
340
223
  const se_GetThemeCommand = async (input, context) => {
341
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
224
+ const b = (0, core_2.requestBuilder)(input, context);
342
225
  const headers = {};
343
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
344
- "/app/{appId}/environment/{environmentName}/themes/{id}";
345
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
346
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
347
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
226
+ b.bp("/app/{appId}/environment/{environmentName}/themes/{id}");
227
+ b.p("appId", () => input.appId, "{appId}", false);
228
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
229
+ b.p("id", () => input.id, "{id}", false);
348
230
  let body;
349
- return new protocol_http_1.HttpRequest({
350
- protocol,
351
- hostname,
352
- port,
353
- method: "GET",
354
- headers,
355
- path: resolvedPath,
356
- body,
357
- });
231
+ b.m("GET").h(headers).b(body);
232
+ return b.build();
358
233
  };
359
234
  exports.se_GetThemeCommand = se_GetThemeCommand;
360
235
  const se_ListCodegenJobsCommand = async (input, context) => {
361
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
236
+ const b = (0, core_2.requestBuilder)(input, context);
362
237
  const headers = {};
363
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
364
- "/app/{appId}/environment/{environmentName}/codegen-jobs";
365
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
366
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
238
+ b.bp("/app/{appId}/environment/{environmentName}/codegen-jobs");
239
+ b.p("appId", () => input.appId, "{appId}", false);
240
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
367
241
  const query = (0, smithy_client_1.map)({
368
- nextToken: [, input.nextToken],
369
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
242
+ [_nT]: [, input[_nT]],
243
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
370
244
  });
371
245
  let body;
372
- return new protocol_http_1.HttpRequest({
373
- protocol,
374
- hostname,
375
- port,
376
- method: "GET",
377
- headers,
378
- path: resolvedPath,
379
- query,
380
- body,
381
- });
246
+ b.m("GET").h(headers).q(query).b(body);
247
+ return b.build();
382
248
  };
383
249
  exports.se_ListCodegenJobsCommand = se_ListCodegenJobsCommand;
384
250
  const se_ListComponentsCommand = async (input, context) => {
385
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
251
+ const b = (0, core_2.requestBuilder)(input, context);
386
252
  const headers = {};
387
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
388
- "/app/{appId}/environment/{environmentName}/components";
389
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
390
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
253
+ b.bp("/app/{appId}/environment/{environmentName}/components");
254
+ b.p("appId", () => input.appId, "{appId}", false);
255
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
391
256
  const query = (0, smithy_client_1.map)({
392
- nextToken: [, input.nextToken],
393
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
257
+ [_nT]: [, input[_nT]],
258
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
394
259
  });
395
260
  let body;
396
- return new protocol_http_1.HttpRequest({
397
- protocol,
398
- hostname,
399
- port,
400
- method: "GET",
401
- headers,
402
- path: resolvedPath,
403
- query,
404
- body,
405
- });
261
+ b.m("GET").h(headers).q(query).b(body);
262
+ return b.build();
406
263
  };
407
264
  exports.se_ListComponentsCommand = se_ListComponentsCommand;
408
265
  const se_ListFormsCommand = async (input, context) => {
409
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
266
+ const b = (0, core_2.requestBuilder)(input, context);
410
267
  const headers = {};
411
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
412
- "/app/{appId}/environment/{environmentName}/forms";
413
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
414
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
268
+ b.bp("/app/{appId}/environment/{environmentName}/forms");
269
+ b.p("appId", () => input.appId, "{appId}", false);
270
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
415
271
  const query = (0, smithy_client_1.map)({
416
- nextToken: [, input.nextToken],
417
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
272
+ [_nT]: [, input[_nT]],
273
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
418
274
  });
419
275
  let body;
420
- return new protocol_http_1.HttpRequest({
421
- protocol,
422
- hostname,
423
- port,
424
- method: "GET",
425
- headers,
426
- path: resolvedPath,
427
- query,
428
- body,
429
- });
276
+ b.m("GET").h(headers).q(query).b(body);
277
+ return b.build();
430
278
  };
431
279
  exports.se_ListFormsCommand = se_ListFormsCommand;
432
280
  const se_ListThemesCommand = async (input, context) => {
433
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
281
+ const b = (0, core_2.requestBuilder)(input, context);
434
282
  const headers = {};
435
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
436
- "/app/{appId}/environment/{environmentName}/themes";
437
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
438
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
283
+ b.bp("/app/{appId}/environment/{environmentName}/themes");
284
+ b.p("appId", () => input.appId, "{appId}", false);
285
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
439
286
  const query = (0, smithy_client_1.map)({
440
- nextToken: [, input.nextToken],
441
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
287
+ [_nT]: [, input[_nT]],
288
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
442
289
  });
443
290
  let body;
444
- return new protocol_http_1.HttpRequest({
445
- protocol,
446
- hostname,
447
- port,
448
- method: "GET",
449
- headers,
450
- path: resolvedPath,
451
- query,
452
- body,
453
- });
291
+ b.m("GET").h(headers).q(query).b(body);
292
+ return b.build();
454
293
  };
455
294
  exports.se_ListThemesCommand = se_ListThemesCommand;
456
295
  const se_PutMetadataFlagCommand = async (input, context) => {
457
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
296
+ const b = (0, core_2.requestBuilder)(input, context);
458
297
  const headers = {
459
298
  "content-type": "application/json",
460
299
  };
461
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
462
- "/app/{appId}/environment/{environmentName}/metadata/features/{featureName}";
463
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
464
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
465
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "featureName", () => input.featureName, "{featureName}", false);
300
+ b.bp("/app/{appId}/environment/{environmentName}/metadata/features/{featureName}");
301
+ b.p("appId", () => input.appId, "{appId}", false);
302
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
303
+ b.p("featureName", () => input.featureName, "{featureName}", false);
466
304
  let body;
467
305
  if (input.body !== undefined) {
468
306
  body = (0, smithy_client_1._json)(input.body);
@@ -471,24 +309,17 @@ const se_PutMetadataFlagCommand = async (input, context) => {
471
309
  body = {};
472
310
  }
473
311
  body = JSON.stringify(body);
474
- return new protocol_http_1.HttpRequest({
475
- protocol,
476
- hostname,
477
- port,
478
- method: "PUT",
479
- headers,
480
- path: resolvedPath,
481
- body,
482
- });
312
+ b.m("PUT").h(headers).b(body);
313
+ return b.build();
483
314
  };
484
315
  exports.se_PutMetadataFlagCommand = se_PutMetadataFlagCommand;
485
316
  const se_RefreshTokenCommand = async (input, context) => {
486
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
317
+ const b = (0, core_2.requestBuilder)(input, context);
487
318
  const headers = {
488
319
  "content-type": "application/json",
489
320
  };
490
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tokens/{provider}/refresh";
491
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "provider", () => input.provider, "{provider}", false);
321
+ b.bp("/tokens/{provider}/refresh");
322
+ b.p("provider", () => input.provider, "{provider}", false);
492
323
  let body;
493
324
  if (input.refreshTokenBody !== undefined) {
494
325
  body = (0, smithy_client_1._json)(input.refreshTokenBody);
@@ -497,28 +328,20 @@ const se_RefreshTokenCommand = async (input, context) => {
497
328
  body = {};
498
329
  }
499
330
  body = JSON.stringify(body);
500
- return new protocol_http_1.HttpRequest({
501
- protocol,
502
- hostname,
503
- port,
504
- method: "POST",
505
- headers,
506
- path: resolvedPath,
507
- body,
508
- });
331
+ b.m("POST").h(headers).b(body);
332
+ return b.build();
509
333
  };
510
334
  exports.se_RefreshTokenCommand = se_RefreshTokenCommand;
511
335
  const se_StartCodegenJobCommand = async (input, context) => {
512
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
336
+ const b = (0, core_2.requestBuilder)(input, context);
513
337
  const headers = {
514
338
  "content-type": "application/json",
515
339
  };
516
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
517
- "/app/{appId}/environment/{environmentName}/codegen-jobs";
518
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
519
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
340
+ b.bp("/app/{appId}/environment/{environmentName}/codegen-jobs");
341
+ b.p("appId", () => input.appId, "{appId}", false);
342
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
520
343
  const query = (0, smithy_client_1.map)({
521
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
344
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
522
345
  });
523
346
  let body;
524
347
  if (input.codegenJobToCreate !== undefined) {
@@ -528,30 +351,21 @@ const se_StartCodegenJobCommand = async (input, context) => {
528
351
  body = {};
529
352
  }
530
353
  body = JSON.stringify(body);
531
- return new protocol_http_1.HttpRequest({
532
- protocol,
533
- hostname,
534
- port,
535
- method: "POST",
536
- headers,
537
- path: resolvedPath,
538
- query,
539
- body,
540
- });
354
+ b.m("POST").h(headers).q(query).b(body);
355
+ return b.build();
541
356
  };
542
357
  exports.se_StartCodegenJobCommand = se_StartCodegenJobCommand;
543
358
  const se_UpdateComponentCommand = async (input, context) => {
544
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
359
+ const b = (0, core_2.requestBuilder)(input, context);
545
360
  const headers = {
546
361
  "content-type": "application/json",
547
362
  };
548
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
549
- "/app/{appId}/environment/{environmentName}/components/{id}";
550
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
551
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
552
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
363
+ b.bp("/app/{appId}/environment/{environmentName}/components/{id}");
364
+ b.p("appId", () => input.appId, "{appId}", false);
365
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
366
+ b.p("id", () => input.id, "{id}", false);
553
367
  const query = (0, smithy_client_1.map)({
554
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
368
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
555
369
  });
556
370
  let body;
557
371
  if (input.updatedComponent !== undefined) {
@@ -561,30 +375,21 @@ const se_UpdateComponentCommand = async (input, context) => {
561
375
  body = {};
562
376
  }
563
377
  body = JSON.stringify(body);
564
- return new protocol_http_1.HttpRequest({
565
- protocol,
566
- hostname,
567
- port,
568
- method: "PATCH",
569
- headers,
570
- path: resolvedPath,
571
- query,
572
- body,
573
- });
378
+ b.m("PATCH").h(headers).q(query).b(body);
379
+ return b.build();
574
380
  };
575
381
  exports.se_UpdateComponentCommand = se_UpdateComponentCommand;
576
382
  const se_UpdateFormCommand = async (input, context) => {
577
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
383
+ const b = (0, core_2.requestBuilder)(input, context);
578
384
  const headers = {
579
385
  "content-type": "application/json",
580
386
  };
581
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
582
- "/app/{appId}/environment/{environmentName}/forms/{id}";
583
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
584
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
585
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
387
+ b.bp("/app/{appId}/environment/{environmentName}/forms/{id}");
388
+ b.p("appId", () => input.appId, "{appId}", false);
389
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
390
+ b.p("id", () => input.id, "{id}", false);
586
391
  const query = (0, smithy_client_1.map)({
587
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
392
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
588
393
  });
589
394
  let body;
590
395
  if (input.updatedForm !== undefined) {
@@ -594,30 +399,21 @@ const se_UpdateFormCommand = async (input, context) => {
594
399
  body = {};
595
400
  }
596
401
  body = JSON.stringify(body);
597
- return new protocol_http_1.HttpRequest({
598
- protocol,
599
- hostname,
600
- port,
601
- method: "PATCH",
602
- headers,
603
- path: resolvedPath,
604
- query,
605
- body,
606
- });
402
+ b.m("PATCH").h(headers).q(query).b(body);
403
+ return b.build();
607
404
  };
608
405
  exports.se_UpdateFormCommand = se_UpdateFormCommand;
609
406
  const se_UpdateThemeCommand = async (input, context) => {
610
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
407
+ const b = (0, core_2.requestBuilder)(input, context);
611
408
  const headers = {
612
409
  "content-type": "application/json",
613
410
  };
614
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
615
- "/app/{appId}/environment/{environmentName}/themes/{id}";
616
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "appId", () => input.appId, "{appId}", false);
617
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentName", () => input.environmentName, "{environmentName}", false);
618
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
411
+ b.bp("/app/{appId}/environment/{environmentName}/themes/{id}");
412
+ b.p("appId", () => input.appId, "{appId}", false);
413
+ b.p("environmentName", () => input.environmentName, "{environmentName}", false);
414
+ b.p("id", () => input.id, "{id}", false);
619
415
  const query = (0, smithy_client_1.map)({
620
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
416
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
621
417
  });
622
418
  let body;
623
419
  if (input.updatedTheme !== undefined) {
@@ -627,16 +423,8 @@ const se_UpdateThemeCommand = async (input, context) => {
627
423
  body = {};
628
424
  }
629
425
  body = JSON.stringify(body);
630
- return new protocol_http_1.HttpRequest({
631
- protocol,
632
- hostname,
633
- port,
634
- method: "PATCH",
635
- headers,
636
- path: resolvedPath,
637
- query,
638
- body,
639
- });
426
+ b.m("PATCH").h(headers).q(query).b(body);
427
+ return b.build();
640
428
  };
641
429
  exports.se_UpdateThemeCommand = se_UpdateThemeCommand;
642
430
  const de_CreateComponentCommand = async (output, context) => {
@@ -2373,6 +2161,9 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2373
2161
  value !== "" &&
2374
2162
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2375
2163
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2164
+ const _cT = "clientToken";
2165
+ const _mR = "maxResults";
2166
+ const _nT = "nextToken";
2376
2167
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2377
2168
  if (encoded.length) {
2378
2169
  return JSON.parse(encoded);