@aws-sdk/client-qconnect 3.476.0 → 3.478.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist-cjs/pagination/ListAssistantAssociationsPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListAssistantsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListContentsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListImportJobsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListKnowledgeBasesPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListQuickResponsesPaginator.js +2 -24
  7. package/dist-cjs/pagination/QueryAssistantPaginator.js +2 -24
  8. package/dist-cjs/pagination/SearchContentPaginator.js +2 -24
  9. package/dist-cjs/pagination/SearchQuickResponsesPaginator.js +2 -24
  10. package/dist-cjs/pagination/SearchSessionsPaginator.js +2 -24
  11. package/dist-cjs/protocols/Aws_restJson1.js +247 -571
  12. package/dist-es/pagination/ListAssistantAssociationsPaginator.js +2 -23
  13. package/dist-es/pagination/ListAssistantsPaginator.js +2 -23
  14. package/dist-es/pagination/ListContentsPaginator.js +2 -23
  15. package/dist-es/pagination/ListImportJobsPaginator.js +2 -23
  16. package/dist-es/pagination/ListKnowledgeBasesPaginator.js +2 -23
  17. package/dist-es/pagination/ListQuickResponsesPaginator.js +2 -23
  18. package/dist-es/pagination/QueryAssistantPaginator.js +2 -23
  19. package/dist-es/pagination/SearchContentPaginator.js +2 -23
  20. package/dist-es/pagination/SearchQuickResponsesPaginator.js +2 -23
  21. package/dist-es/pagination/SearchSessionsPaginator.js +2 -23
  22. package/dist-es/protocols/Aws_restJson1.js +248 -572
  23. package/dist-types/pagination/ListAssistantAssociationsPaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListAssistantsPaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListContentsPaginator.d.ts +1 -1
  26. package/dist-types/pagination/ListImportJobsPaginator.d.ts +1 -1
  27. package/dist-types/pagination/ListKnowledgeBasesPaginator.d.ts +1 -1
  28. package/dist-types/pagination/ListQuickResponsesPaginator.d.ts +1 -1
  29. package/dist-types/pagination/QueryAssistantPaginator.d.ts +1 -1
  30. package/dist-types/pagination/SearchContentPaginator.d.ts +1 -1
  31. package/dist-types/pagination/SearchQuickResponsesPaginator.d.ts +1 -1
  32. package/dist-types/pagination/SearchSessionsPaginator.d.ts +1 -1
  33. package/dist-types/ts3.4/pagination/ListAssistantAssociationsPaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListAssistantsPaginator.d.ts +3 -3
  35. package/dist-types/ts3.4/pagination/ListContentsPaginator.d.ts +3 -3
  36. package/dist-types/ts3.4/pagination/ListImportJobsPaginator.d.ts +3 -3
  37. package/dist-types/ts3.4/pagination/ListKnowledgeBasesPaginator.d.ts +3 -3
  38. package/dist-types/ts3.4/pagination/ListQuickResponsesPaginator.d.ts +3 -3
  39. package/dist-types/ts3.4/pagination/QueryAssistantPaginator.d.ts +3 -3
  40. package/dist-types/ts3.4/pagination/SearchContentPaginator.d.ts +3 -3
  41. package/dist-types/ts3.4/pagination/SearchQuickResponsesPaginator.d.ts +3 -3
  42. package/dist-types/ts3.4/pagination/SearchSessionsPaginator.d.ts +3 -3
  43. package/package.json +7 -6
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_DeleteAssistantAssociationCommand = exports.de_DeleteAssistantCommand = exports.de_CreateSessionCommand = exports.de_CreateQuickResponseCommand = exports.de_CreateKnowledgeBaseCommand = exports.de_CreateContentCommand = exports.de_CreateAssistantAssociationCommand = exports.de_CreateAssistantCommand = exports.se_UpdateQuickResponseCommand = exports.se_UpdateKnowledgeBaseTemplateUriCommand = exports.se_UpdateContentCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartImportJobCommand = exports.se_StartContentUploadCommand = exports.se_SearchSessionsCommand = exports.se_SearchQuickResponsesCommand = exports.se_SearchContentCommand = exports.se_RemoveKnowledgeBaseTemplateUriCommand = exports.se_QueryAssistantCommand = exports.se_PutFeedbackCommand = exports.se_NotifyRecommendationsReceivedCommand = exports.se_ListTagsForResourceCommand = exports.se_ListQuickResponsesCommand = exports.se_ListKnowledgeBasesCommand = exports.se_ListImportJobsCommand = exports.se_ListContentsCommand = exports.se_ListAssistantsCommand = exports.se_ListAssistantAssociationsCommand = exports.se_GetSessionCommand = exports.se_GetRecommendationsCommand = exports.se_GetQuickResponseCommand = exports.se_GetKnowledgeBaseCommand = exports.se_GetImportJobCommand = exports.se_GetContentSummaryCommand = exports.se_GetContentCommand = exports.se_GetAssistantAssociationCommand = exports.se_GetAssistantCommand = exports.se_DeleteQuickResponseCommand = exports.se_DeleteKnowledgeBaseCommand = exports.se_DeleteImportJobCommand = exports.se_DeleteContentCommand = exports.se_DeleteAssistantAssociationCommand = exports.se_DeleteAssistantCommand = exports.se_CreateSessionCommand = exports.se_CreateQuickResponseCommand = exports.se_CreateKnowledgeBaseCommand = exports.se_CreateContentCommand = exports.se_CreateAssistantAssociationCommand = exports.se_CreateAssistantCommand = void 0;
4
4
  exports.de_UpdateQuickResponseCommand = exports.de_UpdateKnowledgeBaseTemplateUriCommand = exports.de_UpdateContentCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartImportJobCommand = exports.de_StartContentUploadCommand = exports.de_SearchSessionsCommand = exports.de_SearchQuickResponsesCommand = exports.de_SearchContentCommand = exports.de_RemoveKnowledgeBaseTemplateUriCommand = exports.de_QueryAssistantCommand = exports.de_PutFeedbackCommand = exports.de_NotifyRecommendationsReceivedCommand = exports.de_ListTagsForResourceCommand = exports.de_ListQuickResponsesCommand = exports.de_ListKnowledgeBasesCommand = exports.de_ListImportJobsCommand = exports.de_ListContentsCommand = exports.de_ListAssistantsCommand = exports.de_ListAssistantAssociationsCommand = exports.de_GetSessionCommand = exports.de_GetRecommendationsCommand = exports.de_GetQuickResponseCommand = exports.de_GetKnowledgeBaseCommand = exports.de_GetImportJobCommand = exports.de_GetContentSummaryCommand = exports.de_GetContentCommand = exports.de_GetAssistantAssociationCommand = exports.de_GetAssistantCommand = exports.de_DeleteQuickResponseCommand = exports.de_DeleteKnowledgeBaseCommand = exports.de_DeleteImportJobCommand = exports.de_DeleteContentCommand = 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 models_0_1 = require("../models/models_0");
10
10
  const QConnectServiceException_1 = require("../models/QConnectServiceException");
11
11
  const se_CreateAssistantCommand = 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
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants";
16
+ b.bp("/assistants");
17
17
  let body;
18
18
  body = JSON.stringify((0, smithy_client_1.take)(input, {
19
19
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -23,24 +23,17 @@ const se_CreateAssistantCommand = async (input, context) => {
23
23
  tags: (_) => (0, smithy_client_1._json)(_),
24
24
  type: [],
25
25
  }));
26
- return new protocol_http_1.HttpRequest({
27
- protocol,
28
- hostname,
29
- port,
30
- method: "POST",
31
- headers,
32
- path: resolvedPath,
33
- body,
34
- });
26
+ b.m("POST").h(headers).b(body);
27
+ return b.build();
35
28
  };
36
29
  exports.se_CreateAssistantCommand = se_CreateAssistantCommand;
37
30
  const se_CreateAssistantAssociationCommand = async (input, context) => {
38
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
31
+ const b = (0, core_2.requestBuilder)(input, context);
39
32
  const headers = {
40
33
  "content-type": "application/json",
41
34
  };
42
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/associations";
43
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
35
+ b.bp("/assistants/{assistantId}/associations");
36
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
44
37
  let body;
45
38
  body = JSON.stringify((0, smithy_client_1.take)(input, {
46
39
  association: (_) => (0, smithy_client_1._json)(_),
@@ -48,25 +41,17 @@ const se_CreateAssistantAssociationCommand = async (input, context) => {
48
41
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
49
42
  tags: (_) => (0, smithy_client_1._json)(_),
50
43
  }));
51
- return new protocol_http_1.HttpRequest({
52
- protocol,
53
- hostname,
54
- port,
55
- method: "POST",
56
- headers,
57
- path: resolvedPath,
58
- body,
59
- });
44
+ b.m("POST").h(headers).b(body);
45
+ return b.build();
60
46
  };
61
47
  exports.se_CreateAssistantAssociationCommand = se_CreateAssistantAssociationCommand;
62
48
  const se_CreateContentCommand = async (input, context) => {
63
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
49
+ const b = (0, core_2.requestBuilder)(input, context);
64
50
  const headers = {
65
51
  "content-type": "application/json",
66
52
  };
67
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
68
- "/knowledgeBases/{knowledgeBaseId}/contents";
69
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
53
+ b.bp("/knowledgeBases/{knowledgeBaseId}/contents");
54
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
70
55
  let body;
71
56
  body = JSON.stringify((0, smithy_client_1.take)(input, {
72
57
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -77,23 +62,16 @@ const se_CreateContentCommand = async (input, context) => {
77
62
  title: [],
78
63
  uploadId: [],
79
64
  }));
80
- return new protocol_http_1.HttpRequest({
81
- protocol,
82
- hostname,
83
- port,
84
- method: "POST",
85
- headers,
86
- path: resolvedPath,
87
- body,
88
- });
65
+ b.m("POST").h(headers).b(body);
66
+ return b.build();
89
67
  };
90
68
  exports.se_CreateContentCommand = se_CreateContentCommand;
91
69
  const se_CreateKnowledgeBaseCommand = async (input, context) => {
92
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
70
+ const b = (0, core_2.requestBuilder)(input, context);
93
71
  const headers = {
94
72
  "content-type": "application/json",
95
73
  };
96
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases";
74
+ b.bp("/knowledgeBases");
97
75
  let body;
98
76
  body = JSON.stringify((0, smithy_client_1.take)(input, {
99
77
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -105,25 +83,17 @@ const se_CreateKnowledgeBaseCommand = async (input, context) => {
105
83
  sourceConfiguration: (_) => (0, smithy_client_1._json)(_),
106
84
  tags: (_) => (0, smithy_client_1._json)(_),
107
85
  }));
108
- return new protocol_http_1.HttpRequest({
109
- protocol,
110
- hostname,
111
- port,
112
- method: "POST",
113
- headers,
114
- path: resolvedPath,
115
- body,
116
- });
86
+ b.m("POST").h(headers).b(body);
87
+ return b.build();
117
88
  };
118
89
  exports.se_CreateKnowledgeBaseCommand = se_CreateKnowledgeBaseCommand;
119
90
  const se_CreateQuickResponseCommand = async (input, context) => {
120
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
91
+ const b = (0, core_2.requestBuilder)(input, context);
121
92
  const headers = {
122
93
  "content-type": "application/json",
123
94
  };
124
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
125
- "/knowledgeBases/{knowledgeBaseId}/quickResponses";
126
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
95
+ b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses");
96
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
127
97
  let body;
128
98
  body = JSON.stringify((0, smithy_client_1.take)(input, {
129
99
  channels: (_) => (0, smithy_client_1._json)(_),
@@ -138,24 +108,17 @@ const se_CreateQuickResponseCommand = async (input, context) => {
138
108
  shortcutKey: [],
139
109
  tags: (_) => (0, smithy_client_1._json)(_),
140
110
  }));
141
- return new protocol_http_1.HttpRequest({
142
- protocol,
143
- hostname,
144
- port,
145
- method: "POST",
146
- headers,
147
- path: resolvedPath,
148
- body,
149
- });
111
+ b.m("POST").h(headers).b(body);
112
+ return b.build();
150
113
  };
151
114
  exports.se_CreateQuickResponseCommand = se_CreateQuickResponseCommand;
152
115
  const se_CreateSessionCommand = async (input, context) => {
153
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = (0, core_2.requestBuilder)(input, context);
154
117
  const headers = {
155
118
  "content-type": "application/json",
156
119
  };
157
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/sessions";
158
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
120
+ b.bp("/assistants/{assistantId}/sessions");
121
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
159
122
  let body;
160
123
  body = JSON.stringify((0, smithy_client_1.take)(input, {
161
124
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -163,504 +126,307 @@ const se_CreateSessionCommand = async (input, context) => {
163
126
  name: [],
164
127
  tags: (_) => (0, smithy_client_1._json)(_),
165
128
  }));
166
- return new protocol_http_1.HttpRequest({
167
- protocol,
168
- hostname,
169
- port,
170
- method: "POST",
171
- headers,
172
- path: resolvedPath,
173
- body,
174
- });
129
+ b.m("POST").h(headers).b(body);
130
+ return b.build();
175
131
  };
176
132
  exports.se_CreateSessionCommand = se_CreateSessionCommand;
177
133
  const se_DeleteAssistantCommand = async (input, context) => {
178
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
134
+ const b = (0, core_2.requestBuilder)(input, context);
179
135
  const headers = {};
180
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}";
181
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
136
+ b.bp("/assistants/{assistantId}");
137
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
182
138
  let body;
183
- return new protocol_http_1.HttpRequest({
184
- protocol,
185
- hostname,
186
- port,
187
- method: "DELETE",
188
- headers,
189
- path: resolvedPath,
190
- body,
191
- });
139
+ b.m("DELETE").h(headers).b(body);
140
+ return b.build();
192
141
  };
193
142
  exports.se_DeleteAssistantCommand = se_DeleteAssistantCommand;
194
143
  const se_DeleteAssistantAssociationCommand = async (input, context) => {
195
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
144
+ const b = (0, core_2.requestBuilder)(input, context);
196
145
  const headers = {};
197
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
198
- "/assistants/{assistantId}/associations/{assistantAssociationId}";
199
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantAssociationId", () => input.assistantAssociationId, "{assistantAssociationId}", false);
200
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
146
+ b.bp("/assistants/{assistantId}/associations/{assistantAssociationId}");
147
+ b.p("assistantAssociationId", () => input.assistantAssociationId, "{assistantAssociationId}", false);
148
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
201
149
  let body;
202
- return new protocol_http_1.HttpRequest({
203
- protocol,
204
- hostname,
205
- port,
206
- method: "DELETE",
207
- headers,
208
- path: resolvedPath,
209
- body,
210
- });
150
+ b.m("DELETE").h(headers).b(body);
151
+ return b.build();
211
152
  };
212
153
  exports.se_DeleteAssistantAssociationCommand = se_DeleteAssistantAssociationCommand;
213
154
  const se_DeleteContentCommand = async (input, context) => {
214
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
155
+ const b = (0, core_2.requestBuilder)(input, context);
215
156
  const headers = {};
216
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
217
- "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}";
218
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
219
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "contentId", () => input.contentId, "{contentId}", false);
157
+ b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}");
158
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
159
+ b.p("contentId", () => input.contentId, "{contentId}", false);
220
160
  let body;
221
- return new protocol_http_1.HttpRequest({
222
- protocol,
223
- hostname,
224
- port,
225
- method: "DELETE",
226
- headers,
227
- path: resolvedPath,
228
- body,
229
- });
161
+ b.m("DELETE").h(headers).b(body);
162
+ return b.build();
230
163
  };
231
164
  exports.se_DeleteContentCommand = se_DeleteContentCommand;
232
165
  const se_DeleteImportJobCommand = async (input, context) => {
233
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
166
+ const b = (0, core_2.requestBuilder)(input, context);
234
167
  const headers = {};
235
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
236
- "/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}";
237
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
238
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "importJobId", () => input.importJobId, "{importJobId}", false);
168
+ b.bp("/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}");
169
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
170
+ b.p("importJobId", () => input.importJobId, "{importJobId}", false);
239
171
  let body;
240
- return new protocol_http_1.HttpRequest({
241
- protocol,
242
- hostname,
243
- port,
244
- method: "DELETE",
245
- headers,
246
- path: resolvedPath,
247
- body,
248
- });
172
+ b.m("DELETE").h(headers).b(body);
173
+ return b.build();
249
174
  };
250
175
  exports.se_DeleteImportJobCommand = se_DeleteImportJobCommand;
251
176
  const se_DeleteKnowledgeBaseCommand = async (input, context) => {
252
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
177
+ const b = (0, core_2.requestBuilder)(input, context);
253
178
  const headers = {};
254
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}";
255
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
179
+ b.bp("/knowledgeBases/{knowledgeBaseId}");
180
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
256
181
  let body;
257
- return new protocol_http_1.HttpRequest({
258
- protocol,
259
- hostname,
260
- port,
261
- method: "DELETE",
262
- headers,
263
- path: resolvedPath,
264
- body,
265
- });
182
+ b.m("DELETE").h(headers).b(body);
183
+ return b.build();
266
184
  };
267
185
  exports.se_DeleteKnowledgeBaseCommand = se_DeleteKnowledgeBaseCommand;
268
186
  const se_DeleteQuickResponseCommand = async (input, context) => {
269
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
187
+ const b = (0, core_2.requestBuilder)(input, context);
270
188
  const headers = {};
271
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
272
- "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}";
273
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
274
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
189
+ b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}");
190
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
191
+ b.p("quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
275
192
  let body;
276
- return new protocol_http_1.HttpRequest({
277
- protocol,
278
- hostname,
279
- port,
280
- method: "DELETE",
281
- headers,
282
- path: resolvedPath,
283
- body,
284
- });
193
+ b.m("DELETE").h(headers).b(body);
194
+ return b.build();
285
195
  };
286
196
  exports.se_DeleteQuickResponseCommand = se_DeleteQuickResponseCommand;
287
197
  const se_GetAssistantCommand = async (input, context) => {
288
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
198
+ const b = (0, core_2.requestBuilder)(input, context);
289
199
  const headers = {};
290
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}";
291
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
200
+ b.bp("/assistants/{assistantId}");
201
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
292
202
  let body;
293
- return new protocol_http_1.HttpRequest({
294
- protocol,
295
- hostname,
296
- port,
297
- method: "GET",
298
- headers,
299
- path: resolvedPath,
300
- body,
301
- });
203
+ b.m("GET").h(headers).b(body);
204
+ return b.build();
302
205
  };
303
206
  exports.se_GetAssistantCommand = se_GetAssistantCommand;
304
207
  const se_GetAssistantAssociationCommand = async (input, context) => {
305
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
208
+ const b = (0, core_2.requestBuilder)(input, context);
306
209
  const headers = {};
307
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
308
- "/assistants/{assistantId}/associations/{assistantAssociationId}";
309
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantAssociationId", () => input.assistantAssociationId, "{assistantAssociationId}", false);
310
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
210
+ b.bp("/assistants/{assistantId}/associations/{assistantAssociationId}");
211
+ b.p("assistantAssociationId", () => input.assistantAssociationId, "{assistantAssociationId}", false);
212
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
311
213
  let body;
312
- return new protocol_http_1.HttpRequest({
313
- protocol,
314
- hostname,
315
- port,
316
- method: "GET",
317
- headers,
318
- path: resolvedPath,
319
- body,
320
- });
214
+ b.m("GET").h(headers).b(body);
215
+ return b.build();
321
216
  };
322
217
  exports.se_GetAssistantAssociationCommand = se_GetAssistantAssociationCommand;
323
218
  const se_GetContentCommand = async (input, context) => {
324
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
219
+ const b = (0, core_2.requestBuilder)(input, context);
325
220
  const headers = {};
326
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
327
- "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}";
328
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "contentId", () => input.contentId, "{contentId}", false);
329
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
221
+ b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}");
222
+ b.p("contentId", () => input.contentId, "{contentId}", false);
223
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
330
224
  let body;
331
- return new protocol_http_1.HttpRequest({
332
- protocol,
333
- hostname,
334
- port,
335
- method: "GET",
336
- headers,
337
- path: resolvedPath,
338
- body,
339
- });
225
+ b.m("GET").h(headers).b(body);
226
+ return b.build();
340
227
  };
341
228
  exports.se_GetContentCommand = se_GetContentCommand;
342
229
  const se_GetContentSummaryCommand = async (input, context) => {
343
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
230
+ const b = (0, core_2.requestBuilder)(input, context);
344
231
  const headers = {};
345
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
346
- "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/summary";
347
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "contentId", () => input.contentId, "{contentId}", false);
348
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
232
+ b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/summary");
233
+ b.p("contentId", () => input.contentId, "{contentId}", false);
234
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
349
235
  let body;
350
- return new protocol_http_1.HttpRequest({
351
- protocol,
352
- hostname,
353
- port,
354
- method: "GET",
355
- headers,
356
- path: resolvedPath,
357
- body,
358
- });
236
+ b.m("GET").h(headers).b(body);
237
+ return b.build();
359
238
  };
360
239
  exports.se_GetContentSummaryCommand = se_GetContentSummaryCommand;
361
240
  const se_GetImportJobCommand = async (input, context) => {
362
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
241
+ const b = (0, core_2.requestBuilder)(input, context);
363
242
  const headers = {};
364
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
365
- "/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}";
366
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "importJobId", () => input.importJobId, "{importJobId}", false);
367
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
243
+ b.bp("/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}");
244
+ b.p("importJobId", () => input.importJobId, "{importJobId}", false);
245
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
368
246
  let body;
369
- return new protocol_http_1.HttpRequest({
370
- protocol,
371
- hostname,
372
- port,
373
- method: "GET",
374
- headers,
375
- path: resolvedPath,
376
- body,
377
- });
247
+ b.m("GET").h(headers).b(body);
248
+ return b.build();
378
249
  };
379
250
  exports.se_GetImportJobCommand = se_GetImportJobCommand;
380
251
  const se_GetKnowledgeBaseCommand = async (input, context) => {
381
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
252
+ const b = (0, core_2.requestBuilder)(input, context);
382
253
  const headers = {};
383
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}";
384
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
254
+ b.bp("/knowledgeBases/{knowledgeBaseId}");
255
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
385
256
  let body;
386
- return new protocol_http_1.HttpRequest({
387
- protocol,
388
- hostname,
389
- port,
390
- method: "GET",
391
- headers,
392
- path: resolvedPath,
393
- body,
394
- });
257
+ b.m("GET").h(headers).b(body);
258
+ return b.build();
395
259
  };
396
260
  exports.se_GetKnowledgeBaseCommand = se_GetKnowledgeBaseCommand;
397
261
  const se_GetQuickResponseCommand = async (input, context) => {
398
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
262
+ const b = (0, core_2.requestBuilder)(input, context);
399
263
  const headers = {};
400
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
401
- "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}";
402
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
403
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
264
+ b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}");
265
+ b.p("quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
266
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
404
267
  let body;
405
- return new protocol_http_1.HttpRequest({
406
- protocol,
407
- hostname,
408
- port,
409
- method: "GET",
410
- headers,
411
- path: resolvedPath,
412
- body,
413
- });
268
+ b.m("GET").h(headers).b(body);
269
+ return b.build();
414
270
  };
415
271
  exports.se_GetQuickResponseCommand = se_GetQuickResponseCommand;
416
272
  const se_GetRecommendationsCommand = async (input, context) => {
417
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
273
+ const b = (0, core_2.requestBuilder)(input, context);
418
274
  const headers = {};
419
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
420
- "/assistants/{assistantId}/sessions/{sessionId}/recommendations";
421
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
422
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
275
+ b.bp("/assistants/{assistantId}/sessions/{sessionId}/recommendations");
276
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
277
+ b.p("sessionId", () => input.sessionId, "{sessionId}", false);
423
278
  const query = (0, smithy_client_1.map)({
424
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
425
- waitTimeSeconds: [() => input.waitTimeSeconds !== void 0, () => input.waitTimeSeconds.toString()],
279
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
280
+ [_wTS]: [() => input.waitTimeSeconds !== void 0, () => input[_wTS].toString()],
426
281
  });
427
282
  let body;
428
- return new protocol_http_1.HttpRequest({
429
- protocol,
430
- hostname,
431
- port,
432
- method: "GET",
433
- headers,
434
- path: resolvedPath,
435
- query,
436
- body,
437
- });
283
+ b.m("GET").h(headers).q(query).b(body);
284
+ return b.build();
438
285
  };
439
286
  exports.se_GetRecommendationsCommand = se_GetRecommendationsCommand;
440
287
  const se_GetSessionCommand = async (input, context) => {
441
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
288
+ const b = (0, core_2.requestBuilder)(input, context);
442
289
  const headers = {};
443
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
444
- "/assistants/{assistantId}/sessions/{sessionId}";
445
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
446
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
290
+ b.bp("/assistants/{assistantId}/sessions/{sessionId}");
291
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
292
+ b.p("sessionId", () => input.sessionId, "{sessionId}", false);
447
293
  let body;
448
- return new protocol_http_1.HttpRequest({
449
- protocol,
450
- hostname,
451
- port,
452
- method: "GET",
453
- headers,
454
- path: resolvedPath,
455
- body,
456
- });
294
+ b.m("GET").h(headers).b(body);
295
+ return b.build();
457
296
  };
458
297
  exports.se_GetSessionCommand = se_GetSessionCommand;
459
298
  const se_ListAssistantAssociationsCommand = async (input, context) => {
460
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
299
+ const b = (0, core_2.requestBuilder)(input, context);
461
300
  const headers = {};
462
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/associations";
463
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
301
+ b.bp("/assistants/{assistantId}/associations");
302
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
464
303
  const query = (0, smithy_client_1.map)({
465
- nextToken: [, input.nextToken],
466
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
304
+ [_nT]: [, input[_nT]],
305
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
467
306
  });
468
307
  let body;
469
- return new protocol_http_1.HttpRequest({
470
- protocol,
471
- hostname,
472
- port,
473
- method: "GET",
474
- headers,
475
- path: resolvedPath,
476
- query,
477
- body,
478
- });
308
+ b.m("GET").h(headers).q(query).b(body);
309
+ return b.build();
479
310
  };
480
311
  exports.se_ListAssistantAssociationsCommand = se_ListAssistantAssociationsCommand;
481
312
  const se_ListAssistantsCommand = async (input, context) => {
482
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
313
+ const b = (0, core_2.requestBuilder)(input, context);
483
314
  const headers = {};
484
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants";
315
+ b.bp("/assistants");
485
316
  const query = (0, smithy_client_1.map)({
486
- nextToken: [, input.nextToken],
487
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
317
+ [_nT]: [, input[_nT]],
318
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
488
319
  });
489
320
  let body;
490
- return new protocol_http_1.HttpRequest({
491
- protocol,
492
- hostname,
493
- port,
494
- method: "GET",
495
- headers,
496
- path: resolvedPath,
497
- query,
498
- body,
499
- });
321
+ b.m("GET").h(headers).q(query).b(body);
322
+ return b.build();
500
323
  };
501
324
  exports.se_ListAssistantsCommand = se_ListAssistantsCommand;
502
325
  const se_ListContentsCommand = async (input, context) => {
503
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
326
+ const b = (0, core_2.requestBuilder)(input, context);
504
327
  const headers = {};
505
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
506
- "/knowledgeBases/{knowledgeBaseId}/contents";
507
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
328
+ b.bp("/knowledgeBases/{knowledgeBaseId}/contents");
329
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
508
330
  const query = (0, smithy_client_1.map)({
509
- nextToken: [, input.nextToken],
510
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
331
+ [_nT]: [, input[_nT]],
332
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
511
333
  });
512
334
  let body;
513
- return new protocol_http_1.HttpRequest({
514
- protocol,
515
- hostname,
516
- port,
517
- method: "GET",
518
- headers,
519
- path: resolvedPath,
520
- query,
521
- body,
522
- });
335
+ b.m("GET").h(headers).q(query).b(body);
336
+ return b.build();
523
337
  };
524
338
  exports.se_ListContentsCommand = se_ListContentsCommand;
525
339
  const se_ListImportJobsCommand = async (input, context) => {
526
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
340
+ const b = (0, core_2.requestBuilder)(input, context);
527
341
  const headers = {};
528
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
529
- "/knowledgeBases/{knowledgeBaseId}/importJobs";
530
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
342
+ b.bp("/knowledgeBases/{knowledgeBaseId}/importJobs");
343
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
531
344
  const query = (0, smithy_client_1.map)({
532
- nextToken: [, input.nextToken],
533
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
345
+ [_nT]: [, input[_nT]],
346
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
534
347
  });
535
348
  let body;
536
- return new protocol_http_1.HttpRequest({
537
- protocol,
538
- hostname,
539
- port,
540
- method: "GET",
541
- headers,
542
- path: resolvedPath,
543
- query,
544
- body,
545
- });
349
+ b.m("GET").h(headers).q(query).b(body);
350
+ return b.build();
546
351
  };
547
352
  exports.se_ListImportJobsCommand = se_ListImportJobsCommand;
548
353
  const se_ListKnowledgeBasesCommand = async (input, context) => {
549
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
354
+ const b = (0, core_2.requestBuilder)(input, context);
550
355
  const headers = {};
551
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases";
356
+ b.bp("/knowledgeBases");
552
357
  const query = (0, smithy_client_1.map)({
553
- nextToken: [, input.nextToken],
554
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
358
+ [_nT]: [, input[_nT]],
359
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
555
360
  });
556
361
  let body;
557
- return new protocol_http_1.HttpRequest({
558
- protocol,
559
- hostname,
560
- port,
561
- method: "GET",
562
- headers,
563
- path: resolvedPath,
564
- query,
565
- body,
566
- });
362
+ b.m("GET").h(headers).q(query).b(body);
363
+ return b.build();
567
364
  };
568
365
  exports.se_ListKnowledgeBasesCommand = se_ListKnowledgeBasesCommand;
569
366
  const se_ListQuickResponsesCommand = async (input, context) => {
570
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
367
+ const b = (0, core_2.requestBuilder)(input, context);
571
368
  const headers = {};
572
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
573
- "/knowledgeBases/{knowledgeBaseId}/quickResponses";
574
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
369
+ b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses");
370
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
575
371
  const query = (0, smithy_client_1.map)({
576
- nextToken: [, input.nextToken],
577
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
372
+ [_nT]: [, input[_nT]],
373
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
578
374
  });
579
375
  let body;
580
- return new protocol_http_1.HttpRequest({
581
- protocol,
582
- hostname,
583
- port,
584
- method: "GET",
585
- headers,
586
- path: resolvedPath,
587
- query,
588
- body,
589
- });
376
+ b.m("GET").h(headers).q(query).b(body);
377
+ return b.build();
590
378
  };
591
379
  exports.se_ListQuickResponsesCommand = se_ListQuickResponsesCommand;
592
380
  const se_ListTagsForResourceCommand = async (input, context) => {
593
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
381
+ const b = (0, core_2.requestBuilder)(input, context);
594
382
  const headers = {};
595
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
596
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
383
+ b.bp("/tags/{resourceArn}");
384
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
597
385
  let body;
598
- return new protocol_http_1.HttpRequest({
599
- protocol,
600
- hostname,
601
- port,
602
- method: "GET",
603
- headers,
604
- path: resolvedPath,
605
- body,
606
- });
386
+ b.m("GET").h(headers).b(body);
387
+ return b.build();
607
388
  };
608
389
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
609
390
  const se_NotifyRecommendationsReceivedCommand = async (input, context) => {
610
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
391
+ const b = (0, core_2.requestBuilder)(input, context);
611
392
  const headers = {
612
393
  "content-type": "application/json",
613
394
  };
614
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
615
- "/assistants/{assistantId}/sessions/{sessionId}/recommendations/notify";
616
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
617
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
395
+ b.bp("/assistants/{assistantId}/sessions/{sessionId}/recommendations/notify");
396
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
397
+ b.p("sessionId", () => input.sessionId, "{sessionId}", false);
618
398
  let body;
619
399
  body = JSON.stringify((0, smithy_client_1.take)(input, {
620
400
  recommendationIds: (_) => (0, smithy_client_1._json)(_),
621
401
  }));
622
- return new protocol_http_1.HttpRequest({
623
- protocol,
624
- hostname,
625
- port,
626
- method: "POST",
627
- headers,
628
- path: resolvedPath,
629
- body,
630
- });
402
+ b.m("POST").h(headers).b(body);
403
+ return b.build();
631
404
  };
632
405
  exports.se_NotifyRecommendationsReceivedCommand = se_NotifyRecommendationsReceivedCommand;
633
406
  const se_PutFeedbackCommand = async (input, context) => {
634
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
407
+ const b = (0, core_2.requestBuilder)(input, context);
635
408
  const headers = {
636
409
  "content-type": "application/json",
637
410
  };
638
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/feedback";
639
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
411
+ b.bp("/assistants/{assistantId}/feedback");
412
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
640
413
  let body;
641
414
  body = JSON.stringify((0, smithy_client_1.take)(input, {
642
415
  contentFeedback: (_) => (0, smithy_client_1._json)(_),
643
416
  targetId: [],
644
417
  targetType: [],
645
418
  }));
646
- return new protocol_http_1.HttpRequest({
647
- protocol,
648
- hostname,
649
- port,
650
- method: "PUT",
651
- headers,
652
- path: resolvedPath,
653
- body,
654
- });
419
+ b.m("PUT").h(headers).b(body);
420
+ return b.build();
655
421
  };
656
422
  exports.se_PutFeedbackCommand = se_PutFeedbackCommand;
657
423
  const se_QueryAssistantCommand = async (input, context) => {
658
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
424
+ const b = (0, core_2.requestBuilder)(input, context);
659
425
  const headers = {
660
426
  "content-type": "application/json",
661
427
  };
662
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/query";
663
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
428
+ b.bp("/assistants/{assistantId}/query");
429
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
664
430
  let body;
665
431
  body = JSON.stringify((0, smithy_client_1.take)(input, {
666
432
  maxResults: [],
@@ -669,149 +435,101 @@ const se_QueryAssistantCommand = async (input, context) => {
669
435
  queryText: [],
670
436
  sessionId: [],
671
437
  }));
672
- return new protocol_http_1.HttpRequest({
673
- protocol,
674
- hostname,
675
- port,
676
- method: "POST",
677
- headers,
678
- path: resolvedPath,
679
- body,
680
- });
438
+ b.m("POST").h(headers).b(body);
439
+ return b.build();
681
440
  };
682
441
  exports.se_QueryAssistantCommand = se_QueryAssistantCommand;
683
442
  const se_RemoveKnowledgeBaseTemplateUriCommand = async (input, context) => {
684
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
443
+ const b = (0, core_2.requestBuilder)(input, context);
685
444
  const headers = {};
686
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
687
- "/knowledgeBases/{knowledgeBaseId}/templateUri";
688
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
445
+ b.bp("/knowledgeBases/{knowledgeBaseId}/templateUri");
446
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
689
447
  let body;
690
- return new protocol_http_1.HttpRequest({
691
- protocol,
692
- hostname,
693
- port,
694
- method: "DELETE",
695
- headers,
696
- path: resolvedPath,
697
- body,
698
- });
448
+ b.m("DELETE").h(headers).b(body);
449
+ return b.build();
699
450
  };
700
451
  exports.se_RemoveKnowledgeBaseTemplateUriCommand = se_RemoveKnowledgeBaseTemplateUriCommand;
701
452
  const se_SearchContentCommand = async (input, context) => {
702
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
453
+ const b = (0, core_2.requestBuilder)(input, context);
703
454
  const headers = {
704
455
  "content-type": "application/json",
705
456
  };
706
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}/search";
707
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
457
+ b.bp("/knowledgeBases/{knowledgeBaseId}/search");
458
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
708
459
  const query = (0, smithy_client_1.map)({
709
- nextToken: [, input.nextToken],
710
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
460
+ [_nT]: [, input[_nT]],
461
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
711
462
  });
712
463
  let body;
713
464
  body = JSON.stringify((0, smithy_client_1.take)(input, {
714
465
  searchExpression: (_) => (0, smithy_client_1._json)(_),
715
466
  }));
716
- return new protocol_http_1.HttpRequest({
717
- protocol,
718
- hostname,
719
- port,
720
- method: "POST",
721
- headers,
722
- path: resolvedPath,
723
- query,
724
- body,
725
- });
467
+ b.m("POST").h(headers).q(query).b(body);
468
+ return b.build();
726
469
  };
727
470
  exports.se_SearchContentCommand = se_SearchContentCommand;
728
471
  const se_SearchQuickResponsesCommand = async (input, context) => {
729
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
472
+ const b = (0, core_2.requestBuilder)(input, context);
730
473
  const headers = {
731
474
  "content-type": "application/json",
732
475
  };
733
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
734
- "/knowledgeBases/{knowledgeBaseId}/search/quickResponses";
735
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
476
+ b.bp("/knowledgeBases/{knowledgeBaseId}/search/quickResponses");
477
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
736
478
  const query = (0, smithy_client_1.map)({
737
- nextToken: [, input.nextToken],
738
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
479
+ [_nT]: [, input[_nT]],
480
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
739
481
  });
740
482
  let body;
741
483
  body = JSON.stringify((0, smithy_client_1.take)(input, {
742
484
  attributes: (_) => (0, smithy_client_1._json)(_),
743
485
  searchExpression: (_) => (0, smithy_client_1._json)(_),
744
486
  }));
745
- return new protocol_http_1.HttpRequest({
746
- protocol,
747
- hostname,
748
- port,
749
- method: "POST",
750
- headers,
751
- path: resolvedPath,
752
- query,
753
- body,
754
- });
487
+ b.m("POST").h(headers).q(query).b(body);
488
+ return b.build();
755
489
  };
756
490
  exports.se_SearchQuickResponsesCommand = se_SearchQuickResponsesCommand;
757
491
  const se_SearchSessionsCommand = async (input, context) => {
758
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
492
+ const b = (0, core_2.requestBuilder)(input, context);
759
493
  const headers = {
760
494
  "content-type": "application/json",
761
495
  };
762
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/searchSessions";
763
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
496
+ b.bp("/assistants/{assistantId}/searchSessions");
497
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
764
498
  const query = (0, smithy_client_1.map)({
765
- nextToken: [, input.nextToken],
766
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
499
+ [_nT]: [, input[_nT]],
500
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
767
501
  });
768
502
  let body;
769
503
  body = JSON.stringify((0, smithy_client_1.take)(input, {
770
504
  searchExpression: (_) => (0, smithy_client_1._json)(_),
771
505
  }));
772
- return new protocol_http_1.HttpRequest({
773
- protocol,
774
- hostname,
775
- port,
776
- method: "POST",
777
- headers,
778
- path: resolvedPath,
779
- query,
780
- body,
781
- });
506
+ b.m("POST").h(headers).q(query).b(body);
507
+ return b.build();
782
508
  };
783
509
  exports.se_SearchSessionsCommand = se_SearchSessionsCommand;
784
510
  const se_StartContentUploadCommand = async (input, context) => {
785
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
511
+ const b = (0, core_2.requestBuilder)(input, context);
786
512
  const headers = {
787
513
  "content-type": "application/json",
788
514
  };
789
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}/upload";
790
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
515
+ b.bp("/knowledgeBases/{knowledgeBaseId}/upload");
516
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
791
517
  let body;
792
518
  body = JSON.stringify((0, smithy_client_1.take)(input, {
793
519
  contentType: [],
794
520
  presignedUrlTimeToLive: [],
795
521
  }));
796
- return new protocol_http_1.HttpRequest({
797
- protocol,
798
- hostname,
799
- port,
800
- method: "POST",
801
- headers,
802
- path: resolvedPath,
803
- body,
804
- });
522
+ b.m("POST").h(headers).b(body);
523
+ return b.build();
805
524
  };
806
525
  exports.se_StartContentUploadCommand = se_StartContentUploadCommand;
807
526
  const se_StartImportJobCommand = async (input, context) => {
808
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
527
+ const b = (0, core_2.requestBuilder)(input, context);
809
528
  const headers = {
810
529
  "content-type": "application/json",
811
530
  };
812
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
813
- "/knowledgeBases/{knowledgeBaseId}/importJobs";
814
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
531
+ b.bp("/knowledgeBases/{knowledgeBaseId}/importJobs");
532
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
815
533
  let body;
816
534
  body = JSON.stringify((0, smithy_client_1.take)(input, {
817
535
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -820,72 +538,49 @@ const se_StartImportJobCommand = async (input, context) => {
820
538
  metadata: (_) => (0, smithy_client_1._json)(_),
821
539
  uploadId: [],
822
540
  }));
823
- return new protocol_http_1.HttpRequest({
824
- protocol,
825
- hostname,
826
- port,
827
- method: "POST",
828
- headers,
829
- path: resolvedPath,
830
- body,
831
- });
541
+ b.m("POST").h(headers).b(body);
542
+ return b.build();
832
543
  };
833
544
  exports.se_StartImportJobCommand = se_StartImportJobCommand;
834
545
  const se_TagResourceCommand = async (input, context) => {
835
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
546
+ const b = (0, core_2.requestBuilder)(input, context);
836
547
  const headers = {
837
548
  "content-type": "application/json",
838
549
  };
839
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
840
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
550
+ b.bp("/tags/{resourceArn}");
551
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
841
552
  let body;
842
553
  body = JSON.stringify((0, smithy_client_1.take)(input, {
843
554
  tags: (_) => (0, smithy_client_1._json)(_),
844
555
  }));
845
- return new protocol_http_1.HttpRequest({
846
- protocol,
847
- hostname,
848
- port,
849
- method: "POST",
850
- headers,
851
- path: resolvedPath,
852
- body,
853
- });
556
+ b.m("POST").h(headers).b(body);
557
+ return b.build();
854
558
  };
855
559
  exports.se_TagResourceCommand = se_TagResourceCommand;
856
560
  const se_UntagResourceCommand = async (input, context) => {
857
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
561
+ const b = (0, core_2.requestBuilder)(input, context);
858
562
  const headers = {};
859
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
860
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
563
+ b.bp("/tags/{resourceArn}");
564
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
861
565
  const query = (0, smithy_client_1.map)({
862
- tagKeys: [
566
+ [_tK]: [
863
567
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
864
- () => (input.tagKeys || []).map((_entry) => _entry),
568
+ () => (input[_tK] || []).map((_entry) => _entry),
865
569
  ],
866
570
  });
867
571
  let body;
868
- return new protocol_http_1.HttpRequest({
869
- protocol,
870
- hostname,
871
- port,
872
- method: "DELETE",
873
- headers,
874
- path: resolvedPath,
875
- query,
876
- body,
877
- });
572
+ b.m("DELETE").h(headers).q(query).b(body);
573
+ return b.build();
878
574
  };
879
575
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
880
576
  const se_UpdateContentCommand = async (input, context) => {
881
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
577
+ const b = (0, core_2.requestBuilder)(input, context);
882
578
  const headers = {
883
579
  "content-type": "application/json",
884
580
  };
885
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
886
- "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}";
887
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
888
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "contentId", () => input.contentId, "{contentId}", false);
581
+ b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}");
582
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
583
+ b.p("contentId", () => input.contentId, "{contentId}", false);
889
584
  let body;
890
585
  body = JSON.stringify((0, smithy_client_1.take)(input, {
891
586
  metadata: (_) => (0, smithy_client_1._json)(_),
@@ -895,49 +590,33 @@ const se_UpdateContentCommand = async (input, context) => {
895
590
  title: [],
896
591
  uploadId: [],
897
592
  }));
898
- return new protocol_http_1.HttpRequest({
899
- protocol,
900
- hostname,
901
- port,
902
- method: "POST",
903
- headers,
904
- path: resolvedPath,
905
- body,
906
- });
593
+ b.m("POST").h(headers).b(body);
594
+ return b.build();
907
595
  };
908
596
  exports.se_UpdateContentCommand = se_UpdateContentCommand;
909
597
  const se_UpdateKnowledgeBaseTemplateUriCommand = async (input, context) => {
910
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
598
+ const b = (0, core_2.requestBuilder)(input, context);
911
599
  const headers = {
912
600
  "content-type": "application/json",
913
601
  };
914
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
915
- "/knowledgeBases/{knowledgeBaseId}/templateUri";
916
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
602
+ b.bp("/knowledgeBases/{knowledgeBaseId}/templateUri");
603
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
917
604
  let body;
918
605
  body = JSON.stringify((0, smithy_client_1.take)(input, {
919
606
  templateUri: [],
920
607
  }));
921
- return new protocol_http_1.HttpRequest({
922
- protocol,
923
- hostname,
924
- port,
925
- method: "POST",
926
- headers,
927
- path: resolvedPath,
928
- body,
929
- });
608
+ b.m("POST").h(headers).b(body);
609
+ return b.build();
930
610
  };
931
611
  exports.se_UpdateKnowledgeBaseTemplateUriCommand = se_UpdateKnowledgeBaseTemplateUriCommand;
932
612
  const se_UpdateQuickResponseCommand = async (input, context) => {
933
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
613
+ const b = (0, core_2.requestBuilder)(input, context);
934
614
  const headers = {
935
615
  "content-type": "application/json",
936
616
  };
937
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
938
- "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}";
939
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
940
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
617
+ b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}");
618
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
619
+ b.p("quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
941
620
  let body;
942
621
  body = JSON.stringify((0, smithy_client_1.take)(input, {
943
622
  channels: (_) => (0, smithy_client_1._json)(_),
@@ -953,15 +632,8 @@ const se_UpdateQuickResponseCommand = async (input, context) => {
953
632
  removeShortcutKey: [],
954
633
  shortcutKey: [],
955
634
  }));
956
- return new protocol_http_1.HttpRequest({
957
- protocol,
958
- hostname,
959
- port,
960
- method: "POST",
961
- headers,
962
- path: resolvedPath,
963
- body,
964
- });
635
+ b.m("POST").h(headers).b(body);
636
+ return b.build();
965
637
  };
966
638
  exports.se_UpdateQuickResponseCommand = se_UpdateQuickResponseCommand;
967
639
  const de_CreateAssistantCommand = async (output, context) => {
@@ -3019,6 +2691,10 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
3019
2691
  value !== "" &&
3020
2692
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
3021
2693
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2694
+ const _mR = "maxResults";
2695
+ const _nT = "nextToken";
2696
+ const _tK = "tagKeys";
2697
+ const _wTS = "waitTimeSeconds";
3022
2698
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3023
2699
  if (encoded.length) {
3024
2700
  return JSON.parse(encoded);