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