@aws-sdk/client-connectcases 3.474.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.
@@ -3,182 +3,131 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_ListTagsForResourceCommand = exports.de_ListLayoutsCommand = exports.de_ListFieldsCommand = exports.de_ListFieldOptionsCommand = exports.de_ListDomainsCommand = exports.de_ListCasesForContactCommand = exports.de_GetTemplateCommand = exports.de_GetLayoutCommand = exports.de_GetDomainCommand = exports.de_GetCaseEventConfigurationCommand = exports.de_GetCaseCommand = exports.de_DeleteDomainCommand = exports.de_CreateTemplateCommand = exports.de_CreateRelatedItemCommand = exports.de_CreateLayoutCommand = exports.de_CreateFieldCommand = exports.de_CreateDomainCommand = exports.de_CreateCaseCommand = exports.de_BatchPutFieldOptionsCommand = exports.de_BatchGetFieldCommand = exports.se_UpdateTemplateCommand = exports.se_UpdateLayoutCommand = exports.se_UpdateFieldCommand = exports.se_UpdateCaseCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SearchRelatedItemsCommand = exports.se_SearchCasesCommand = exports.se_PutCaseEventConfigurationCommand = exports.se_ListTemplatesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListLayoutsCommand = exports.se_ListFieldsCommand = exports.se_ListFieldOptionsCommand = exports.se_ListDomainsCommand = exports.se_ListCasesForContactCommand = exports.se_GetTemplateCommand = exports.se_GetLayoutCommand = exports.se_GetDomainCommand = exports.se_GetCaseEventConfigurationCommand = exports.se_GetCaseCommand = exports.se_DeleteDomainCommand = exports.se_CreateTemplateCommand = exports.se_CreateRelatedItemCommand = exports.se_CreateLayoutCommand = exports.se_CreateFieldCommand = exports.se_CreateDomainCommand = exports.se_CreateCaseCommand = exports.se_BatchPutFieldOptionsCommand = exports.se_BatchGetFieldCommand = void 0;
4
4
  exports.de_UpdateTemplateCommand = exports.de_UpdateLayoutCommand = exports.de_UpdateFieldCommand = exports.de_UpdateCaseCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SearchRelatedItemsCommand = exports.de_SearchCasesCommand = exports.de_PutCaseEventConfigurationCommand = exports.de_ListTemplatesCommand = void 0;
5
5
  const core_1 = require("@aws-sdk/core");
6
- const protocol_http_1 = require("@smithy/protocol-http");
6
+ const core_2 = require("@smithy/core");
7
7
  const smithy_client_1 = require("@smithy/smithy-client");
8
8
  const uuid_1 = require("uuid");
9
9
  const ConnectCasesServiceException_1 = require("../models/ConnectCasesServiceException");
10
10
  const models_0_1 = require("../models/models_0");
11
11
  const se_BatchGetFieldCommand = async (input, context) => {
12
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
12
+ const b = (0, core_2.requestBuilder)(input, context);
13
13
  const headers = {
14
14
  "content-type": "application/json",
15
15
  };
16
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/fields-batch";
17
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
16
+ b.bp("/domains/{domainId}/fields-batch");
17
+ b.p("domainId", () => input.domainId, "{domainId}", false);
18
18
  let body;
19
19
  body = JSON.stringify((0, smithy_client_1.take)(input, {
20
20
  fields: (_) => (0, smithy_client_1._json)(_),
21
21
  }));
22
- return new protocol_http_1.HttpRequest({
23
- protocol,
24
- hostname,
25
- port,
26
- method: "POST",
27
- headers,
28
- path: resolvedPath,
29
- body,
30
- });
22
+ b.m("POST").h(headers).b(body);
23
+ return b.build();
31
24
  };
32
25
  exports.se_BatchGetFieldCommand = se_BatchGetFieldCommand;
33
26
  const se_BatchPutFieldOptionsCommand = async (input, context) => {
34
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
27
+ const b = (0, core_2.requestBuilder)(input, context);
35
28
  const headers = {
36
29
  "content-type": "application/json",
37
30
  };
38
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
39
- "/domains/{domainId}/fields/{fieldId}/options";
40
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
41
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "fieldId", () => input.fieldId, "{fieldId}", false);
31
+ b.bp("/domains/{domainId}/fields/{fieldId}/options");
32
+ b.p("domainId", () => input.domainId, "{domainId}", false);
33
+ b.p("fieldId", () => input.fieldId, "{fieldId}", false);
42
34
  let body;
43
35
  body = JSON.stringify((0, smithy_client_1.take)(input, {
44
36
  options: (_) => (0, smithy_client_1._json)(_),
45
37
  }));
46
- return new protocol_http_1.HttpRequest({
47
- protocol,
48
- hostname,
49
- port,
50
- method: "PUT",
51
- headers,
52
- path: resolvedPath,
53
- body,
54
- });
38
+ b.m("PUT").h(headers).b(body);
39
+ return b.build();
55
40
  };
56
41
  exports.se_BatchPutFieldOptionsCommand = se_BatchPutFieldOptionsCommand;
57
42
  const se_CreateCaseCommand = async (input, context) => {
58
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
43
+ const b = (0, core_2.requestBuilder)(input, context);
59
44
  const headers = {
60
45
  "content-type": "application/json",
61
46
  };
62
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/cases";
63
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
47
+ b.bp("/domains/{domainId}/cases");
48
+ b.p("domainId", () => input.domainId, "{domainId}", false);
64
49
  let body;
65
50
  body = JSON.stringify((0, smithy_client_1.take)(input, {
66
51
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
67
52
  fields: (_) => se_FieldValueList(_, context),
68
53
  templateId: [],
69
54
  }));
70
- return new protocol_http_1.HttpRequest({
71
- protocol,
72
- hostname,
73
- port,
74
- method: "POST",
75
- headers,
76
- path: resolvedPath,
77
- body,
78
- });
55
+ b.m("POST").h(headers).b(body);
56
+ return b.build();
79
57
  };
80
58
  exports.se_CreateCaseCommand = se_CreateCaseCommand;
81
59
  const se_CreateDomainCommand = async (input, context) => {
82
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
60
+ const b = (0, core_2.requestBuilder)(input, context);
83
61
  const headers = {
84
62
  "content-type": "application/json",
85
63
  };
86
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains";
64
+ b.bp("/domains");
87
65
  let body;
88
66
  body = JSON.stringify((0, smithy_client_1.take)(input, {
89
67
  name: [],
90
68
  }));
91
- return new protocol_http_1.HttpRequest({
92
- protocol,
93
- hostname,
94
- port,
95
- method: "POST",
96
- headers,
97
- path: resolvedPath,
98
- body,
99
- });
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
100
71
  };
101
72
  exports.se_CreateDomainCommand = se_CreateDomainCommand;
102
73
  const se_CreateFieldCommand = async (input, context) => {
103
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
74
+ const b = (0, core_2.requestBuilder)(input, context);
104
75
  const headers = {
105
76
  "content-type": "application/json",
106
77
  };
107
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/fields";
108
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
78
+ b.bp("/domains/{domainId}/fields");
79
+ b.p("domainId", () => input.domainId, "{domainId}", false);
109
80
  let body;
110
81
  body = JSON.stringify((0, smithy_client_1.take)(input, {
111
82
  description: [],
112
83
  name: [],
113
84
  type: [],
114
85
  }));
115
- return new protocol_http_1.HttpRequest({
116
- protocol,
117
- hostname,
118
- port,
119
- method: "POST",
120
- headers,
121
- path: resolvedPath,
122
- body,
123
- });
86
+ b.m("POST").h(headers).b(body);
87
+ return b.build();
124
88
  };
125
89
  exports.se_CreateFieldCommand = se_CreateFieldCommand;
126
90
  const se_CreateLayoutCommand = async (input, context) => {
127
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
91
+ const b = (0, core_2.requestBuilder)(input, context);
128
92
  const headers = {
129
93
  "content-type": "application/json",
130
94
  };
131
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/layouts";
132
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
95
+ b.bp("/domains/{domainId}/layouts");
96
+ b.p("domainId", () => input.domainId, "{domainId}", false);
133
97
  let body;
134
98
  body = JSON.stringify((0, smithy_client_1.take)(input, {
135
99
  content: (_) => (0, smithy_client_1._json)(_),
136
100
  name: [],
137
101
  }));
138
- return new protocol_http_1.HttpRequest({
139
- protocol,
140
- hostname,
141
- port,
142
- method: "POST",
143
- headers,
144
- path: resolvedPath,
145
- body,
146
- });
102
+ b.m("POST").h(headers).b(body);
103
+ return b.build();
147
104
  };
148
105
  exports.se_CreateLayoutCommand = se_CreateLayoutCommand;
149
106
  const se_CreateRelatedItemCommand = async (input, context) => {
150
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const b = (0, core_2.requestBuilder)(input, context);
151
108
  const headers = {
152
109
  "content-type": "application/json",
153
110
  };
154
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
155
- "/domains/{domainId}/cases/{caseId}/related-items";
156
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
157
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "caseId", () => input.caseId, "{caseId}", false);
111
+ b.bp("/domains/{domainId}/cases/{caseId}/related-items");
112
+ b.p("domainId", () => input.domainId, "{domainId}", false);
113
+ b.p("caseId", () => input.caseId, "{caseId}", false);
158
114
  let body;
159
115
  body = JSON.stringify((0, smithy_client_1.take)(input, {
160
116
  content: (_) => (0, smithy_client_1._json)(_),
161
117
  performedBy: (_) => (0, smithy_client_1._json)(_),
162
118
  type: [],
163
119
  }));
164
- return new protocol_http_1.HttpRequest({
165
- protocol,
166
- hostname,
167
- port,
168
- method: "POST",
169
- headers,
170
- path: resolvedPath,
171
- body,
172
- });
120
+ b.m("POST").h(headers).b(body);
121
+ return b.build();
173
122
  };
174
123
  exports.se_CreateRelatedItemCommand = se_CreateRelatedItemCommand;
175
124
  const se_CreateTemplateCommand = async (input, context) => {
176
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const b = (0, core_2.requestBuilder)(input, context);
177
126
  const headers = {
178
127
  "content-type": "application/json",
179
128
  };
180
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/templates";
181
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
129
+ b.bp("/domains/{domainId}/templates");
130
+ b.p("domainId", () => input.domainId, "{domainId}", false);
182
131
  let body;
183
132
  body = JSON.stringify((0, smithy_client_1.take)(input, {
184
133
  description: [],
@@ -187,315 +136,200 @@ const se_CreateTemplateCommand = async (input, context) => {
187
136
  requiredFields: (_) => (0, smithy_client_1._json)(_),
188
137
  status: [],
189
138
  }));
190
- return new protocol_http_1.HttpRequest({
191
- protocol,
192
- hostname,
193
- port,
194
- method: "POST",
195
- headers,
196
- path: resolvedPath,
197
- body,
198
- });
139
+ b.m("POST").h(headers).b(body);
140
+ return b.build();
199
141
  };
200
142
  exports.se_CreateTemplateCommand = se_CreateTemplateCommand;
201
143
  const se_DeleteDomainCommand = async (input, context) => {
202
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
144
+ const b = (0, core_2.requestBuilder)(input, context);
203
145
  const headers = {};
204
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}";
205
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
146
+ b.bp("/domains/{domainId}");
147
+ b.p("domainId", () => input.domainId, "{domainId}", false);
206
148
  let body;
207
- return new protocol_http_1.HttpRequest({
208
- protocol,
209
- hostname,
210
- port,
211
- method: "DELETE",
212
- headers,
213
- path: resolvedPath,
214
- body,
215
- });
149
+ b.m("DELETE").h(headers).b(body);
150
+ return b.build();
216
151
  };
217
152
  exports.se_DeleteDomainCommand = se_DeleteDomainCommand;
218
153
  const se_GetCaseCommand = async (input, context) => {
219
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
154
+ const b = (0, core_2.requestBuilder)(input, context);
220
155
  const headers = {
221
156
  "content-type": "application/json",
222
157
  };
223
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/cases/{caseId}";
224
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "caseId", () => input.caseId, "{caseId}", false);
225
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
158
+ b.bp("/domains/{domainId}/cases/{caseId}");
159
+ b.p("caseId", () => input.caseId, "{caseId}", false);
160
+ b.p("domainId", () => input.domainId, "{domainId}", false);
226
161
  let body;
227
162
  body = JSON.stringify((0, smithy_client_1.take)(input, {
228
163
  fields: (_) => (0, smithy_client_1._json)(_),
229
164
  nextToken: [],
230
165
  }));
231
- return new protocol_http_1.HttpRequest({
232
- protocol,
233
- hostname,
234
- port,
235
- method: "POST",
236
- headers,
237
- path: resolvedPath,
238
- body,
239
- });
166
+ b.m("POST").h(headers).b(body);
167
+ return b.build();
240
168
  };
241
169
  exports.se_GetCaseCommand = se_GetCaseCommand;
242
170
  const se_GetCaseEventConfigurationCommand = async (input, context) => {
243
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
171
+ const b = (0, core_2.requestBuilder)(input, context);
244
172
  const headers = {};
245
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
246
- "/domains/{domainId}/case-event-configuration";
247
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
173
+ b.bp("/domains/{domainId}/case-event-configuration");
174
+ b.p("domainId", () => input.domainId, "{domainId}", false);
248
175
  let body;
249
- return new protocol_http_1.HttpRequest({
250
- protocol,
251
- hostname,
252
- port,
253
- method: "POST",
254
- headers,
255
- path: resolvedPath,
256
- body,
257
- });
176
+ b.m("POST").h(headers).b(body);
177
+ return b.build();
258
178
  };
259
179
  exports.se_GetCaseEventConfigurationCommand = se_GetCaseEventConfigurationCommand;
260
180
  const se_GetDomainCommand = async (input, context) => {
261
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
181
+ const b = (0, core_2.requestBuilder)(input, context);
262
182
  const headers = {};
263
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}";
264
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
183
+ b.bp("/domains/{domainId}");
184
+ b.p("domainId", () => input.domainId, "{domainId}", false);
265
185
  let body;
266
- return new protocol_http_1.HttpRequest({
267
- protocol,
268
- hostname,
269
- port,
270
- method: "POST",
271
- headers,
272
- path: resolvedPath,
273
- body,
274
- });
186
+ b.m("POST").h(headers).b(body);
187
+ return b.build();
275
188
  };
276
189
  exports.se_GetDomainCommand = se_GetDomainCommand;
277
190
  const se_GetLayoutCommand = async (input, context) => {
278
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
191
+ const b = (0, core_2.requestBuilder)(input, context);
279
192
  const headers = {};
280
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/layouts/{layoutId}";
281
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
282
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "layoutId", () => input.layoutId, "{layoutId}", false);
193
+ b.bp("/domains/{domainId}/layouts/{layoutId}");
194
+ b.p("domainId", () => input.domainId, "{domainId}", false);
195
+ b.p("layoutId", () => input.layoutId, "{layoutId}", false);
283
196
  let body;
284
- return new protocol_http_1.HttpRequest({
285
- protocol,
286
- hostname,
287
- port,
288
- method: "POST",
289
- headers,
290
- path: resolvedPath,
291
- body,
292
- });
197
+ b.m("POST").h(headers).b(body);
198
+ return b.build();
293
199
  };
294
200
  exports.se_GetLayoutCommand = se_GetLayoutCommand;
295
201
  const se_GetTemplateCommand = async (input, context) => {
296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
202
+ const b = (0, core_2.requestBuilder)(input, context);
297
203
  const headers = {};
298
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
299
- "/domains/{domainId}/templates/{templateId}";
300
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
301
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "templateId", () => input.templateId, "{templateId}", false);
204
+ b.bp("/domains/{domainId}/templates/{templateId}");
205
+ b.p("domainId", () => input.domainId, "{domainId}", false);
206
+ b.p("templateId", () => input.templateId, "{templateId}", false);
302
207
  let body;
303
- return new protocol_http_1.HttpRequest({
304
- protocol,
305
- hostname,
306
- port,
307
- method: "POST",
308
- headers,
309
- path: resolvedPath,
310
- body,
311
- });
208
+ b.m("POST").h(headers).b(body);
209
+ return b.build();
312
210
  };
313
211
  exports.se_GetTemplateCommand = se_GetTemplateCommand;
314
212
  const se_ListCasesForContactCommand = async (input, context) => {
315
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
+ const b = (0, core_2.requestBuilder)(input, context);
316
214
  const headers = {
317
215
  "content-type": "application/json",
318
216
  };
319
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
320
- "/domains/{domainId}/list-cases-for-contact";
321
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
217
+ b.bp("/domains/{domainId}/list-cases-for-contact");
218
+ b.p("domainId", () => input.domainId, "{domainId}", false);
322
219
  let body;
323
220
  body = JSON.stringify((0, smithy_client_1.take)(input, {
324
221
  contactArn: [],
325
222
  maxResults: [],
326
223
  nextToken: [],
327
224
  }));
328
- return new protocol_http_1.HttpRequest({
329
- protocol,
330
- hostname,
331
- port,
332
- method: "POST",
333
- headers,
334
- path: resolvedPath,
335
- body,
336
- });
225
+ b.m("POST").h(headers).b(body);
226
+ return b.build();
337
227
  };
338
228
  exports.se_ListCasesForContactCommand = se_ListCasesForContactCommand;
339
229
  const se_ListDomainsCommand = async (input, context) => {
340
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
230
+ const b = (0, core_2.requestBuilder)(input, context);
341
231
  const headers = {};
342
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains-list";
232
+ b.bp("/domains-list");
343
233
  const query = (0, smithy_client_1.map)({
344
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
345
- nextToken: [, input.nextToken],
234
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
235
+ [_nT]: [, input[_nT]],
346
236
  });
347
237
  let body;
348
- return new protocol_http_1.HttpRequest({
349
- protocol,
350
- hostname,
351
- port,
352
- method: "POST",
353
- headers,
354
- path: resolvedPath,
355
- query,
356
- body,
357
- });
238
+ b.m("POST").h(headers).q(query).b(body);
239
+ return b.build();
358
240
  };
359
241
  exports.se_ListDomainsCommand = se_ListDomainsCommand;
360
242
  const se_ListFieldOptionsCommand = async (input, context) => {
361
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
243
+ const b = (0, core_2.requestBuilder)(input, context);
362
244
  const headers = {};
363
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
364
- "/domains/{domainId}/fields/{fieldId}/options-list";
365
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
366
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "fieldId", () => input.fieldId, "{fieldId}", false);
245
+ b.bp("/domains/{domainId}/fields/{fieldId}/options-list");
246
+ b.p("domainId", () => input.domainId, "{domainId}", false);
247
+ b.p("fieldId", () => input.fieldId, "{fieldId}", false);
367
248
  const query = (0, smithy_client_1.map)({
368
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
369
- nextToken: [, input.nextToken],
370
- values: [() => input.values !== void 0, () => (input.values || []).map((_entry) => _entry)],
249
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
250
+ [_nT]: [, input[_nT]],
251
+ [_v]: [() => input.values !== void 0, () => (input[_v] || []).map((_entry) => _entry)],
371
252
  });
372
253
  let body;
373
- return new protocol_http_1.HttpRequest({
374
- protocol,
375
- hostname,
376
- port,
377
- method: "POST",
378
- headers,
379
- path: resolvedPath,
380
- query,
381
- body,
382
- });
254
+ b.m("POST").h(headers).q(query).b(body);
255
+ return b.build();
383
256
  };
384
257
  exports.se_ListFieldOptionsCommand = se_ListFieldOptionsCommand;
385
258
  const se_ListFieldsCommand = async (input, context) => {
386
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
259
+ const b = (0, core_2.requestBuilder)(input, context);
387
260
  const headers = {};
388
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/fields-list";
389
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
261
+ b.bp("/domains/{domainId}/fields-list");
262
+ b.p("domainId", () => input.domainId, "{domainId}", false);
390
263
  const query = (0, smithy_client_1.map)({
391
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
392
- nextToken: [, input.nextToken],
264
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
265
+ [_nT]: [, input[_nT]],
393
266
  });
394
267
  let body;
395
- return new protocol_http_1.HttpRequest({
396
- protocol,
397
- hostname,
398
- port,
399
- method: "POST",
400
- headers,
401
- path: resolvedPath,
402
- query,
403
- body,
404
- });
268
+ b.m("POST").h(headers).q(query).b(body);
269
+ return b.build();
405
270
  };
406
271
  exports.se_ListFieldsCommand = se_ListFieldsCommand;
407
272
  const se_ListLayoutsCommand = async (input, context) => {
408
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
273
+ const b = (0, core_2.requestBuilder)(input, context);
409
274
  const headers = {};
410
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/layouts-list";
411
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
275
+ b.bp("/domains/{domainId}/layouts-list");
276
+ b.p("domainId", () => input.domainId, "{domainId}", false);
412
277
  const query = (0, smithy_client_1.map)({
413
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
414
- nextToken: [, input.nextToken],
278
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
279
+ [_nT]: [, input[_nT]],
415
280
  });
416
281
  let body;
417
- return new protocol_http_1.HttpRequest({
418
- protocol,
419
- hostname,
420
- port,
421
- method: "POST",
422
- headers,
423
- path: resolvedPath,
424
- query,
425
- body,
426
- });
282
+ b.m("POST").h(headers).q(query).b(body);
283
+ return b.build();
427
284
  };
428
285
  exports.se_ListLayoutsCommand = se_ListLayoutsCommand;
429
286
  const se_ListTagsForResourceCommand = async (input, context) => {
430
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
287
+ const b = (0, core_2.requestBuilder)(input, context);
431
288
  const headers = {};
432
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
433
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
289
+ b.bp("/tags/{arn}");
290
+ b.p("arn", () => input.arn, "{arn}", false);
434
291
  let body;
435
- return new protocol_http_1.HttpRequest({
436
- protocol,
437
- hostname,
438
- port,
439
- method: "GET",
440
- headers,
441
- path: resolvedPath,
442
- body,
443
- });
292
+ b.m("GET").h(headers).b(body);
293
+ return b.build();
444
294
  };
445
295
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
446
296
  const se_ListTemplatesCommand = async (input, context) => {
447
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
297
+ const b = (0, core_2.requestBuilder)(input, context);
448
298
  const headers = {};
449
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/templates-list";
450
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
299
+ b.bp("/domains/{domainId}/templates-list");
300
+ b.p("domainId", () => input.domainId, "{domainId}", false);
451
301
  const query = (0, smithy_client_1.map)({
452
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
453
- nextToken: [, input.nextToken],
454
- status: [() => input.status !== void 0, () => (input.status || []).map((_entry) => _entry)],
302
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
303
+ [_nT]: [, input[_nT]],
304
+ [_s]: [() => input.status !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
455
305
  });
456
306
  let body;
457
- return new protocol_http_1.HttpRequest({
458
- protocol,
459
- hostname,
460
- port,
461
- method: "POST",
462
- headers,
463
- path: resolvedPath,
464
- query,
465
- body,
466
- });
307
+ b.m("POST").h(headers).q(query).b(body);
308
+ return b.build();
467
309
  };
468
310
  exports.se_ListTemplatesCommand = se_ListTemplatesCommand;
469
311
  const se_PutCaseEventConfigurationCommand = async (input, context) => {
470
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
312
+ const b = (0, core_2.requestBuilder)(input, context);
471
313
  const headers = {
472
314
  "content-type": "application/json",
473
315
  };
474
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
475
- "/domains/{domainId}/case-event-configuration";
476
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
316
+ b.bp("/domains/{domainId}/case-event-configuration");
317
+ b.p("domainId", () => input.domainId, "{domainId}", false);
477
318
  let body;
478
319
  body = JSON.stringify((0, smithy_client_1.take)(input, {
479
320
  eventBridge: (_) => (0, smithy_client_1._json)(_),
480
321
  }));
481
- return new protocol_http_1.HttpRequest({
482
- protocol,
483
- hostname,
484
- port,
485
- method: "PUT",
486
- headers,
487
- path: resolvedPath,
488
- body,
489
- });
322
+ b.m("PUT").h(headers).b(body);
323
+ return b.build();
490
324
  };
491
325
  exports.se_PutCaseEventConfigurationCommand = se_PutCaseEventConfigurationCommand;
492
326
  const se_SearchCasesCommand = async (input, context) => {
493
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
327
+ const b = (0, core_2.requestBuilder)(input, context);
494
328
  const headers = {
495
329
  "content-type": "application/json",
496
330
  };
497
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/cases-search";
498
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
331
+ b.bp("/domains/{domainId}/cases-search");
332
+ b.p("domainId", () => input.domainId, "{domainId}", false);
499
333
  let body;
500
334
  body = JSON.stringify((0, smithy_client_1.take)(input, {
501
335
  fields: (_) => (0, smithy_client_1._json)(_),
@@ -505,169 +339,117 @@ const se_SearchCasesCommand = async (input, context) => {
505
339
  searchTerm: [],
506
340
  sorts: (_) => (0, smithy_client_1._json)(_),
507
341
  }));
508
- return new protocol_http_1.HttpRequest({
509
- protocol,
510
- hostname,
511
- port,
512
- method: "POST",
513
- headers,
514
- path: resolvedPath,
515
- body,
516
- });
342
+ b.m("POST").h(headers).b(body);
343
+ return b.build();
517
344
  };
518
345
  exports.se_SearchCasesCommand = se_SearchCasesCommand;
519
346
  const se_SearchRelatedItemsCommand = async (input, context) => {
520
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
347
+ const b = (0, core_2.requestBuilder)(input, context);
521
348
  const headers = {
522
349
  "content-type": "application/json",
523
350
  };
524
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
525
- "/domains/{domainId}/cases/{caseId}/related-items-search";
526
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
527
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "caseId", () => input.caseId, "{caseId}", false);
351
+ b.bp("/domains/{domainId}/cases/{caseId}/related-items-search");
352
+ b.p("domainId", () => input.domainId, "{domainId}", false);
353
+ b.p("caseId", () => input.caseId, "{caseId}", false);
528
354
  let body;
529
355
  body = JSON.stringify((0, smithy_client_1.take)(input, {
530
356
  filters: (_) => (0, smithy_client_1._json)(_),
531
357
  maxResults: [],
532
358
  nextToken: [],
533
359
  }));
534
- return new protocol_http_1.HttpRequest({
535
- protocol,
536
- hostname,
537
- port,
538
- method: "POST",
539
- headers,
540
- path: resolvedPath,
541
- body,
542
- });
360
+ b.m("POST").h(headers).b(body);
361
+ return b.build();
543
362
  };
544
363
  exports.se_SearchRelatedItemsCommand = se_SearchRelatedItemsCommand;
545
364
  const se_TagResourceCommand = async (input, context) => {
546
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
365
+ const b = (0, core_2.requestBuilder)(input, context);
547
366
  const headers = {
548
367
  "content-type": "application/json",
549
368
  };
550
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
551
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
369
+ b.bp("/tags/{arn}");
370
+ b.p("arn", () => input.arn, "{arn}", false);
552
371
  let body;
553
372
  body = JSON.stringify((0, smithy_client_1.take)(input, {
554
373
  tags: (_) => se_Tags(_, context),
555
374
  }));
556
- return new protocol_http_1.HttpRequest({
557
- protocol,
558
- hostname,
559
- port,
560
- method: "POST",
561
- headers,
562
- path: resolvedPath,
563
- body,
564
- });
375
+ b.m("POST").h(headers).b(body);
376
+ return b.build();
565
377
  };
566
378
  exports.se_TagResourceCommand = se_TagResourceCommand;
567
379
  const se_UntagResourceCommand = async (input, context) => {
568
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
380
+ const b = (0, core_2.requestBuilder)(input, context);
569
381
  const headers = {};
570
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
571
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
382
+ b.bp("/tags/{arn}");
383
+ b.p("arn", () => input.arn, "{arn}", false);
572
384
  const query = (0, smithy_client_1.map)({
573
- tagKeys: [
385
+ [_tK]: [
574
386
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
575
- () => (input.tagKeys || []).map((_entry) => _entry),
387
+ () => (input[_tK] || []).map((_entry) => _entry),
576
388
  ],
577
389
  });
578
390
  let body;
579
- return new protocol_http_1.HttpRequest({
580
- protocol,
581
- hostname,
582
- port,
583
- method: "DELETE",
584
- headers,
585
- path: resolvedPath,
586
- query,
587
- body,
588
- });
391
+ b.m("DELETE").h(headers).q(query).b(body);
392
+ return b.build();
589
393
  };
590
394
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
591
395
  const se_UpdateCaseCommand = async (input, context) => {
592
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
396
+ const b = (0, core_2.requestBuilder)(input, context);
593
397
  const headers = {
594
398
  "content-type": "application/json",
595
399
  };
596
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/cases/{caseId}";
597
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
598
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "caseId", () => input.caseId, "{caseId}", false);
400
+ b.bp("/domains/{domainId}/cases/{caseId}");
401
+ b.p("domainId", () => input.domainId, "{domainId}", false);
402
+ b.p("caseId", () => input.caseId, "{caseId}", false);
599
403
  let body;
600
404
  body = JSON.stringify((0, smithy_client_1.take)(input, {
601
405
  fields: (_) => se_FieldValueList(_, context),
602
406
  }));
603
- return new protocol_http_1.HttpRequest({
604
- protocol,
605
- hostname,
606
- port,
607
- method: "PUT",
608
- headers,
609
- path: resolvedPath,
610
- body,
611
- });
407
+ b.m("PUT").h(headers).b(body);
408
+ return b.build();
612
409
  };
613
410
  exports.se_UpdateCaseCommand = se_UpdateCaseCommand;
614
411
  const se_UpdateFieldCommand = async (input, context) => {
615
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
412
+ const b = (0, core_2.requestBuilder)(input, context);
616
413
  const headers = {
617
414
  "content-type": "application/json",
618
415
  };
619
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/fields/{fieldId}";
620
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
621
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "fieldId", () => input.fieldId, "{fieldId}", false);
416
+ b.bp("/domains/{domainId}/fields/{fieldId}");
417
+ b.p("domainId", () => input.domainId, "{domainId}", false);
418
+ b.p("fieldId", () => input.fieldId, "{fieldId}", false);
622
419
  let body;
623
420
  body = JSON.stringify((0, smithy_client_1.take)(input, {
624
421
  description: [],
625
422
  name: [],
626
423
  }));
627
- return new protocol_http_1.HttpRequest({
628
- protocol,
629
- hostname,
630
- port,
631
- method: "PUT",
632
- headers,
633
- path: resolvedPath,
634
- body,
635
- });
424
+ b.m("PUT").h(headers).b(body);
425
+ return b.build();
636
426
  };
637
427
  exports.se_UpdateFieldCommand = se_UpdateFieldCommand;
638
428
  const se_UpdateLayoutCommand = async (input, context) => {
639
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
429
+ const b = (0, core_2.requestBuilder)(input, context);
640
430
  const headers = {
641
431
  "content-type": "application/json",
642
432
  };
643
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/layouts/{layoutId}";
644
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
645
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "layoutId", () => input.layoutId, "{layoutId}", false);
433
+ b.bp("/domains/{domainId}/layouts/{layoutId}");
434
+ b.p("domainId", () => input.domainId, "{domainId}", false);
435
+ b.p("layoutId", () => input.layoutId, "{layoutId}", false);
646
436
  let body;
647
437
  body = JSON.stringify((0, smithy_client_1.take)(input, {
648
438
  content: (_) => (0, smithy_client_1._json)(_),
649
439
  name: [],
650
440
  }));
651
- return new protocol_http_1.HttpRequest({
652
- protocol,
653
- hostname,
654
- port,
655
- method: "PUT",
656
- headers,
657
- path: resolvedPath,
658
- body,
659
- });
441
+ b.m("PUT").h(headers).b(body);
442
+ return b.build();
660
443
  };
661
444
  exports.se_UpdateLayoutCommand = se_UpdateLayoutCommand;
662
445
  const se_UpdateTemplateCommand = async (input, context) => {
663
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
446
+ const b = (0, core_2.requestBuilder)(input, context);
664
447
  const headers = {
665
448
  "content-type": "application/json",
666
449
  };
667
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
668
- "/domains/{domainId}/templates/{templateId}";
669
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainId", () => input.domainId, "{domainId}", false);
670
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "templateId", () => input.templateId, "{templateId}", false);
450
+ b.bp("/domains/{domainId}/templates/{templateId}");
451
+ b.p("domainId", () => input.domainId, "{domainId}", false);
452
+ b.p("templateId", () => input.templateId, "{templateId}", false);
671
453
  let body;
672
454
  body = JSON.stringify((0, smithy_client_1.take)(input, {
673
455
  description: [],
@@ -676,15 +458,8 @@ const se_UpdateTemplateCommand = async (input, context) => {
676
458
  requiredFields: (_) => (0, smithy_client_1._json)(_),
677
459
  status: [],
678
460
  }));
679
- return new protocol_http_1.HttpRequest({
680
- protocol,
681
- hostname,
682
- port,
683
- method: "PUT",
684
- headers,
685
- path: resolvedPath,
686
- body,
687
- });
461
+ b.m("PUT").h(headers).b(body);
462
+ return b.build();
688
463
  };
689
464
  exports.se_UpdateTemplateCommand = se_UpdateTemplateCommand;
690
465
  const de_BatchGetFieldCommand = async (output, context) => {
@@ -2141,10 +1916,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2141
1916
  };
2142
1917
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2143
1918
  const contents = (0, smithy_client_1.map)({
2144
- retryAfterSeconds: [
2145
- () => void 0 !== parsedOutput.headers["retry-after"],
2146
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
2147
- ],
1919
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
2148
1920
  });
2149
1921
  const data = parsedOutput.body;
2150
1922
  const doc = (0, smithy_client_1.take)(data, {
@@ -2398,6 +2170,13 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2398
2170
  value !== "" &&
2399
2171
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2400
2172
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2173
+ const _mR = "maxResults";
2174
+ const _nT = "nextToken";
2175
+ const _rAS = "retryAfterSeconds";
2176
+ const _ra = "retry-after";
2177
+ const _s = "status";
2178
+ const _tK = "tagKeys";
2179
+ const _v = "values";
2401
2180
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2402
2181
  if (encoded.length) {
2403
2182
  return JSON.parse(encoded);