@aws-sdk/client-wisdom 3.451.0 → 3.454.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 (78) hide show
  1. package/README.md +80 -0
  2. package/dist-cjs/Wisdom.js +20 -0
  3. package/dist-cjs/commands/CreateQuickResponseCommand.js +52 -0
  4. package/dist-cjs/commands/DeleteImportJobCommand.js +51 -0
  5. package/dist-cjs/commands/DeleteQuickResponseCommand.js +51 -0
  6. package/dist-cjs/commands/GetImportJobCommand.js +52 -0
  7. package/dist-cjs/commands/GetQuickResponseCommand.js +52 -0
  8. package/dist-cjs/commands/ListImportJobsCommand.js +51 -0
  9. package/dist-cjs/commands/ListQuickResponsesCommand.js +52 -0
  10. package/dist-cjs/commands/SearchQuickResponsesCommand.js +52 -0
  11. package/dist-cjs/commands/StartImportJobCommand.js +52 -0
  12. package/dist-cjs/commands/UpdateQuickResponseCommand.js +52 -0
  13. package/dist-cjs/commands/index.js +10 -0
  14. package/dist-cjs/models/models_0.js +200 -1
  15. package/dist-cjs/pagination/ListImportJobsPaginator.js +29 -0
  16. package/dist-cjs/pagination/ListQuickResponsesPaginator.js +29 -0
  17. package/dist-cjs/pagination/SearchQuickResponsesPaginator.js +29 -0
  18. package/dist-cjs/pagination/index.js +3 -0
  19. package/dist-cjs/protocols/Aws_restJson1.js +816 -18
  20. package/dist-es/Wisdom.js +20 -0
  21. package/dist-es/commands/CreateQuickResponseCommand.js +48 -0
  22. package/dist-es/commands/DeleteImportJobCommand.js +47 -0
  23. package/dist-es/commands/DeleteQuickResponseCommand.js +47 -0
  24. package/dist-es/commands/GetImportJobCommand.js +48 -0
  25. package/dist-es/commands/GetQuickResponseCommand.js +48 -0
  26. package/dist-es/commands/ListImportJobsCommand.js +47 -0
  27. package/dist-es/commands/ListQuickResponsesCommand.js +48 -0
  28. package/dist-es/commands/SearchQuickResponsesCommand.js +48 -0
  29. package/dist-es/commands/StartImportJobCommand.js +48 -0
  30. package/dist-es/commands/UpdateQuickResponseCommand.js +48 -0
  31. package/dist-es/commands/index.js +10 -0
  32. package/dist-es/models/models_0.js +179 -0
  33. package/dist-es/pagination/ListImportJobsPaginator.js +25 -0
  34. package/dist-es/pagination/ListQuickResponsesPaginator.js +25 -0
  35. package/dist-es/pagination/SearchQuickResponsesPaginator.js +25 -0
  36. package/dist-es/pagination/index.js +3 -0
  37. package/dist-es/protocols/Aws_restJson1.js +794 -16
  38. package/dist-types/Wisdom.d.ts +70 -0
  39. package/dist-types/WisdomClient.d.ts +12 -2
  40. package/dist-types/commands/CreateQuickResponseCommand.d.ts +149 -0
  41. package/dist-types/commands/DeleteImportJobCommand.d.ts +87 -0
  42. package/dist-types/commands/DeleteQuickResponseCommand.d.ts +81 -0
  43. package/dist-types/commands/GetImportJobCommand.d.ts +106 -0
  44. package/dist-types/commands/GetQuickResponseCommand.d.ts +118 -0
  45. package/dist-types/commands/ListImportJobsCommand.d.ts +104 -0
  46. package/dist-types/commands/ListQuickResponsesCommand.d.ts +106 -0
  47. package/dist-types/commands/QueryAssistantCommand.d.ts +5 -0
  48. package/dist-types/commands/SearchQuickResponsesCommand.d.ts +163 -0
  49. package/dist-types/commands/StartContentUploadCommand.d.ts +1 -0
  50. package/dist-types/commands/StartImportJobCommand.d.ts +135 -0
  51. package/dist-types/commands/UpdateQuickResponseCommand.d.ts +149 -0
  52. package/dist-types/commands/index.d.ts +10 -0
  53. package/dist-types/models/models_0.d.ts +1631 -167
  54. package/dist-types/pagination/ListImportJobsPaginator.d.ts +7 -0
  55. package/dist-types/pagination/ListQuickResponsesPaginator.d.ts +7 -0
  56. package/dist-types/pagination/SearchQuickResponsesPaginator.d.ts +7 -0
  57. package/dist-types/pagination/index.d.ts +3 -0
  58. package/dist-types/protocols/Aws_restJson1.d.ts +90 -0
  59. package/dist-types/ts3.4/Wisdom.d.ts +170 -0
  60. package/dist-types/ts3.4/WisdomClient.d.ts +62 -2
  61. package/dist-types/ts3.4/commands/CreateQuickResponseCommand.d.ts +39 -0
  62. package/dist-types/ts3.4/commands/DeleteImportJobCommand.d.ts +38 -0
  63. package/dist-types/ts3.4/commands/DeleteQuickResponseCommand.d.ts +39 -0
  64. package/dist-types/ts3.4/commands/GetImportJobCommand.d.ts +35 -0
  65. package/dist-types/ts3.4/commands/GetQuickResponseCommand.d.ts +38 -0
  66. package/dist-types/ts3.4/commands/ListImportJobsCommand.d.ts +38 -0
  67. package/dist-types/ts3.4/commands/ListQuickResponsesCommand.d.ts +39 -0
  68. package/dist-types/ts3.4/commands/SearchQuickResponsesCommand.d.ts +42 -0
  69. package/dist-types/ts3.4/commands/StartImportJobCommand.d.ts +38 -0
  70. package/dist-types/ts3.4/commands/UpdateQuickResponseCommand.d.ts +39 -0
  71. package/dist-types/ts3.4/commands/index.d.ts +10 -0
  72. package/dist-types/ts3.4/models/models_0.d.ts +397 -0
  73. package/dist-types/ts3.4/pagination/ListImportJobsPaginator.d.ts +11 -0
  74. package/dist-types/ts3.4/pagination/ListQuickResponsesPaginator.d.ts +11 -0
  75. package/dist-types/ts3.4/pagination/SearchQuickResponsesPaginator.d.ts +11 -0
  76. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  77. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +120 -0
  78. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
- import { AccessDeniedException, ConflictException, PreconditionFailedException, ResourceNotFoundException, ServiceQuotaExceededException, TooManyTagsException, ValidationException, } from "../models/models_0";
5
+ import { AccessDeniedException, ConflictException, PreconditionFailedException, RequestTimeoutException, ResourceNotFoundException, ServiceQuotaExceededException, TooManyTagsException, ValidationException, } from "../models/models_0";
6
6
  import { WisdomServiceException as __BaseException } from "../models/WisdomServiceException";
7
7
  export const se_CreateAssistantCommand = async (input, context) => {
8
8
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -108,6 +108,38 @@ export const se_CreateKnowledgeBaseCommand = async (input, context) => {
108
108
  body,
109
109
  });
110
110
  };
111
+ export const se_CreateQuickResponseCommand = async (input, context) => {
112
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const headers = {
114
+ "content-type": "application/json",
115
+ };
116
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
117
+ "/knowledgeBases/{knowledgeBaseId}/quickResponses";
118
+ resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
119
+ let body;
120
+ body = JSON.stringify(take(input, {
121
+ channels: (_) => _json(_),
122
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
123
+ content: (_) => _json(_),
124
+ contentType: [],
125
+ description: [],
126
+ groupingConfiguration: (_) => _json(_),
127
+ isActive: [],
128
+ language: [],
129
+ name: [],
130
+ shortcutKey: [],
131
+ tags: (_) => _json(_),
132
+ }));
133
+ return new __HttpRequest({
134
+ protocol,
135
+ hostname,
136
+ port,
137
+ method: "POST",
138
+ headers,
139
+ path: resolvedPath,
140
+ body,
141
+ });
142
+ };
111
143
  export const se_CreateSessionCommand = async (input, context) => {
112
144
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
145
  const headers = {
@@ -184,6 +216,24 @@ export const se_DeleteContentCommand = async (input, context) => {
184
216
  body,
185
217
  });
186
218
  };
219
+ export const se_DeleteImportJobCommand = async (input, context) => {
220
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
221
+ const headers = {};
222
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
223
+ "/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}";
224
+ resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
225
+ resolvedPath = __resolvedPath(resolvedPath, input, "importJobId", () => input.importJobId, "{importJobId}", false);
226
+ let body;
227
+ return new __HttpRequest({
228
+ protocol,
229
+ hostname,
230
+ port,
231
+ method: "DELETE",
232
+ headers,
233
+ path: resolvedPath,
234
+ body,
235
+ });
236
+ };
187
237
  export const se_DeleteKnowledgeBaseCommand = async (input, context) => {
188
238
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
189
239
  const headers = {};
@@ -200,6 +250,24 @@ export const se_DeleteKnowledgeBaseCommand = async (input, context) => {
200
250
  body,
201
251
  });
202
252
  };
253
+ export const se_DeleteQuickResponseCommand = async (input, context) => {
254
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const headers = {};
256
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
257
+ "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}";
258
+ resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
259
+ resolvedPath = __resolvedPath(resolvedPath, input, "quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
260
+ let body;
261
+ return new __HttpRequest({
262
+ protocol,
263
+ hostname,
264
+ port,
265
+ method: "DELETE",
266
+ headers,
267
+ path: resolvedPath,
268
+ body,
269
+ });
270
+ };
203
271
  export const se_GetAssistantCommand = async (input, context) => {
204
272
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
273
  const headers = {};
@@ -270,6 +338,24 @@ export const se_GetContentSummaryCommand = async (input, context) => {
270
338
  body,
271
339
  });
272
340
  };
341
+ export const se_GetImportJobCommand = async (input, context) => {
342
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
343
+ const headers = {};
344
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
345
+ "/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}";
346
+ resolvedPath = __resolvedPath(resolvedPath, input, "importJobId", () => input.importJobId, "{importJobId}", false);
347
+ resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
348
+ let body;
349
+ return new __HttpRequest({
350
+ protocol,
351
+ hostname,
352
+ port,
353
+ method: "GET",
354
+ headers,
355
+ path: resolvedPath,
356
+ body,
357
+ });
358
+ };
273
359
  export const se_GetKnowledgeBaseCommand = async (input, context) => {
274
360
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
275
361
  const headers = {};
@@ -286,6 +372,24 @@ export const se_GetKnowledgeBaseCommand = async (input, context) => {
286
372
  body,
287
373
  });
288
374
  };
375
+ export const se_GetQuickResponseCommand = async (input, context) => {
376
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
377
+ const headers = {};
378
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
379
+ "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}";
380
+ resolvedPath = __resolvedPath(resolvedPath, input, "quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
381
+ resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
382
+ let body;
383
+ return new __HttpRequest({
384
+ protocol,
385
+ hostname,
386
+ port,
387
+ method: "GET",
388
+ headers,
389
+ path: resolvedPath,
390
+ body,
391
+ });
392
+ };
289
393
  export const se_GetRecommendationsCommand = async (input, context) => {
290
394
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
291
395
  const headers = {};
@@ -390,6 +494,28 @@ export const se_ListContentsCommand = async (input, context) => {
390
494
  body,
391
495
  });
392
496
  };
497
+ export const se_ListImportJobsCommand = async (input, context) => {
498
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
499
+ const headers = {};
500
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
501
+ "/knowledgeBases/{knowledgeBaseId}/importJobs";
502
+ resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
503
+ const query = map({
504
+ nextToken: [, input.nextToken],
505
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
506
+ });
507
+ let body;
508
+ return new __HttpRequest({
509
+ protocol,
510
+ hostname,
511
+ port,
512
+ method: "GET",
513
+ headers,
514
+ path: resolvedPath,
515
+ query,
516
+ body,
517
+ });
518
+ };
393
519
  export const se_ListKnowledgeBasesCommand = async (input, context) => {
394
520
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
395
521
  const headers = {};
@@ -410,6 +536,28 @@ export const se_ListKnowledgeBasesCommand = async (input, context) => {
410
536
  body,
411
537
  });
412
538
  };
539
+ export const se_ListQuickResponsesCommand = async (input, context) => {
540
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
541
+ const headers = {};
542
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
543
+ "/knowledgeBases/{knowledgeBaseId}/quickResponses";
544
+ resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
545
+ const query = map({
546
+ nextToken: [, input.nextToken],
547
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
548
+ });
549
+ let body;
550
+ return new __HttpRequest({
551
+ protocol,
552
+ hostname,
553
+ port,
554
+ method: "GET",
555
+ headers,
556
+ path: resolvedPath,
557
+ query,
558
+ body,
559
+ });
560
+ };
413
561
  export const se_ListTagsForResourceCommand = async (input, context) => {
414
562
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
415
563
  const headers = {};
@@ -515,6 +663,34 @@ export const se_SearchContentCommand = async (input, context) => {
515
663
  body,
516
664
  });
517
665
  };
666
+ export const se_SearchQuickResponsesCommand = async (input, context) => {
667
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
668
+ const headers = {
669
+ "content-type": "application/json",
670
+ };
671
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
672
+ "/knowledgeBases/{knowledgeBaseId}/search/quickResponses";
673
+ resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
674
+ const query = map({
675
+ nextToken: [, input.nextToken],
676
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
677
+ });
678
+ let body;
679
+ body = JSON.stringify(take(input, {
680
+ attributes: (_) => _json(_),
681
+ searchExpression: (_) => _json(_),
682
+ }));
683
+ return new __HttpRequest({
684
+ protocol,
685
+ hostname,
686
+ port,
687
+ method: "POST",
688
+ headers,
689
+ path: resolvedPath,
690
+ query,
691
+ body,
692
+ });
693
+ };
518
694
  export const se_SearchSessionsCommand = async (input, context) => {
519
695
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
520
696
  const headers = {
@@ -551,6 +727,33 @@ export const se_StartContentUploadCommand = async (input, context) => {
551
727
  let body;
552
728
  body = JSON.stringify(take(input, {
553
729
  contentType: [],
730
+ presignedUrlTimeToLive: [],
731
+ }));
732
+ return new __HttpRequest({
733
+ protocol,
734
+ hostname,
735
+ port,
736
+ method: "POST",
737
+ headers,
738
+ path: resolvedPath,
739
+ body,
740
+ });
741
+ };
742
+ export const se_StartImportJobCommand = async (input, context) => {
743
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
744
+ const headers = {
745
+ "content-type": "application/json",
746
+ };
747
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
748
+ "/knowledgeBases/{knowledgeBaseId}/importJobs";
749
+ resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
750
+ let body;
751
+ body = JSON.stringify(take(input, {
752
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
753
+ externalSourceConfiguration: (_) => _json(_),
754
+ importJobType: [],
755
+ metadata: (_) => _json(_),
756
+ uploadId: [],
554
757
  }));
555
758
  return new __HttpRequest({
556
759
  protocol,
@@ -656,6 +859,40 @@ export const se_UpdateKnowledgeBaseTemplateUriCommand = async (input, context) =
656
859
  body,
657
860
  });
658
861
  };
862
+ export const se_UpdateQuickResponseCommand = async (input, context) => {
863
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
864
+ const headers = {
865
+ "content-type": "application/json",
866
+ };
867
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
868
+ "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}";
869
+ resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
870
+ resolvedPath = __resolvedPath(resolvedPath, input, "quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
871
+ let body;
872
+ body = JSON.stringify(take(input, {
873
+ channels: (_) => _json(_),
874
+ content: (_) => _json(_),
875
+ contentType: [],
876
+ description: [],
877
+ groupingConfiguration: (_) => _json(_),
878
+ isActive: [],
879
+ language: [],
880
+ name: [],
881
+ removeDescription: [],
882
+ removeGroupingConfiguration: [],
883
+ removeShortcutKey: [],
884
+ shortcutKey: [],
885
+ }));
886
+ return new __HttpRequest({
887
+ protocol,
888
+ hostname,
889
+ port,
890
+ method: "POST",
891
+ headers,
892
+ path: resolvedPath,
893
+ body,
894
+ });
895
+ };
659
896
  export const de_CreateAssistantCommand = async (output, context) => {
660
897
  if (output.statusCode !== 200 && output.statusCode >= 300) {
661
898
  return de_CreateAssistantCommandError(output, context);
@@ -830,6 +1067,51 @@ const de_CreateKnowledgeBaseCommandError = async (output, context) => {
830
1067
  });
831
1068
  }
832
1069
  };
1070
+ export const de_CreateQuickResponseCommand = async (output, context) => {
1071
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1072
+ return de_CreateQuickResponseCommandError(output, context);
1073
+ }
1074
+ const contents = map({
1075
+ $metadata: deserializeMetadata(output),
1076
+ });
1077
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1078
+ const doc = take(data, {
1079
+ quickResponse: (_) => de_QuickResponseData(_, context),
1080
+ });
1081
+ Object.assign(contents, doc);
1082
+ return contents;
1083
+ };
1084
+ const de_CreateQuickResponseCommandError = async (output, context) => {
1085
+ const parsedOutput = {
1086
+ ...output,
1087
+ body: await parseErrorBody(output.body, context),
1088
+ };
1089
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1090
+ switch (errorCode) {
1091
+ case "AccessDeniedException":
1092
+ case "com.amazonaws.wisdom#AccessDeniedException":
1093
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1094
+ case "ConflictException":
1095
+ case "com.amazonaws.wisdom#ConflictException":
1096
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1097
+ case "ResourceNotFoundException":
1098
+ case "com.amazonaws.wisdom#ResourceNotFoundException":
1099
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1100
+ case "ServiceQuotaExceededException":
1101
+ case "com.amazonaws.wisdom#ServiceQuotaExceededException":
1102
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1103
+ case "ValidationException":
1104
+ case "com.amazonaws.wisdom#ValidationException":
1105
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1106
+ default:
1107
+ const parsedBody = parsedOutput.body;
1108
+ return throwDefaultError({
1109
+ output,
1110
+ parsedBody,
1111
+ errorCode,
1112
+ });
1113
+ }
1114
+ };
833
1115
  export const de_CreateSessionCommand = async (output, context) => {
834
1116
  if (output.statusCode !== 200 && output.statusCode >= 300) {
835
1117
  return de_CreateSessionCommandError(output, context);
@@ -974,9 +1256,9 @@ const de_DeleteContentCommandError = async (output, context) => {
974
1256
  });
975
1257
  }
976
1258
  };
977
- export const de_DeleteKnowledgeBaseCommand = async (output, context) => {
1259
+ export const de_DeleteImportJobCommand = async (output, context) => {
978
1260
  if (output.statusCode !== 204 && output.statusCode >= 300) {
979
- return de_DeleteKnowledgeBaseCommandError(output, context);
1261
+ return de_DeleteImportJobCommandError(output, context);
980
1262
  }
981
1263
  const contents = map({
982
1264
  $metadata: deserializeMetadata(output),
@@ -984,7 +1266,7 @@ export const de_DeleteKnowledgeBaseCommand = async (output, context) => {
984
1266
  await collectBody(output.body, context);
985
1267
  return contents;
986
1268
  };
987
- const de_DeleteKnowledgeBaseCommandError = async (output, context) => {
1269
+ const de_DeleteImportJobCommandError = async (output, context) => {
988
1270
  const parsedOutput = {
989
1271
  ...output,
990
1272
  body: await parseErrorBody(output.body, context),
@@ -1012,21 +1294,17 @@ const de_DeleteKnowledgeBaseCommandError = async (output, context) => {
1012
1294
  });
1013
1295
  }
1014
1296
  };
1015
- export const de_GetAssistantCommand = async (output, context) => {
1016
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1017
- return de_GetAssistantCommandError(output, context);
1297
+ export const de_DeleteKnowledgeBaseCommand = async (output, context) => {
1298
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1299
+ return de_DeleteKnowledgeBaseCommandError(output, context);
1018
1300
  }
1019
1301
  const contents = map({
1020
1302
  $metadata: deserializeMetadata(output),
1021
1303
  });
1022
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1023
- const doc = take(data, {
1024
- assistant: _json,
1025
- });
1026
- Object.assign(contents, doc);
1304
+ await collectBody(output.body, context);
1027
1305
  return contents;
1028
1306
  };
1029
- const de_GetAssistantCommandError = async (output, context) => {
1307
+ const de_DeleteKnowledgeBaseCommandError = async (output, context) => {
1030
1308
  const parsedOutput = {
1031
1309
  ...output,
1032
1310
  body: await parseErrorBody(output.body, context),
@@ -1036,6 +1314,9 @@ const de_GetAssistantCommandError = async (output, context) => {
1036
1314
  case "AccessDeniedException":
1037
1315
  case "com.amazonaws.wisdom#AccessDeniedException":
1038
1316
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1317
+ case "ConflictException":
1318
+ case "com.amazonaws.wisdom#ConflictException":
1319
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1039
1320
  case "ResourceNotFoundException":
1040
1321
  case "com.amazonaws.wisdom#ResourceNotFoundException":
1041
1322
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
@@ -1051,8 +1332,82 @@ const de_GetAssistantCommandError = async (output, context) => {
1051
1332
  });
1052
1333
  }
1053
1334
  };
1054
- export const de_GetAssistantAssociationCommand = async (output, context) => {
1055
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1335
+ export const de_DeleteQuickResponseCommand = async (output, context) => {
1336
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1337
+ return de_DeleteQuickResponseCommandError(output, context);
1338
+ }
1339
+ const contents = map({
1340
+ $metadata: deserializeMetadata(output),
1341
+ });
1342
+ await collectBody(output.body, context);
1343
+ return contents;
1344
+ };
1345
+ const de_DeleteQuickResponseCommandError = async (output, context) => {
1346
+ const parsedOutput = {
1347
+ ...output,
1348
+ body: await parseErrorBody(output.body, context),
1349
+ };
1350
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1351
+ switch (errorCode) {
1352
+ case "AccessDeniedException":
1353
+ case "com.amazonaws.wisdom#AccessDeniedException":
1354
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1355
+ case "ResourceNotFoundException":
1356
+ case "com.amazonaws.wisdom#ResourceNotFoundException":
1357
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1358
+ case "ValidationException":
1359
+ case "com.amazonaws.wisdom#ValidationException":
1360
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1361
+ default:
1362
+ const parsedBody = parsedOutput.body;
1363
+ return throwDefaultError({
1364
+ output,
1365
+ parsedBody,
1366
+ errorCode,
1367
+ });
1368
+ }
1369
+ };
1370
+ export const de_GetAssistantCommand = async (output, context) => {
1371
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1372
+ return de_GetAssistantCommandError(output, context);
1373
+ }
1374
+ const contents = map({
1375
+ $metadata: deserializeMetadata(output),
1376
+ });
1377
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1378
+ const doc = take(data, {
1379
+ assistant: _json,
1380
+ });
1381
+ Object.assign(contents, doc);
1382
+ return contents;
1383
+ };
1384
+ const de_GetAssistantCommandError = async (output, context) => {
1385
+ const parsedOutput = {
1386
+ ...output,
1387
+ body: await parseErrorBody(output.body, context),
1388
+ };
1389
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1390
+ switch (errorCode) {
1391
+ case "AccessDeniedException":
1392
+ case "com.amazonaws.wisdom#AccessDeniedException":
1393
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1394
+ case "ResourceNotFoundException":
1395
+ case "com.amazonaws.wisdom#ResourceNotFoundException":
1396
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1397
+ case "ValidationException":
1398
+ case "com.amazonaws.wisdom#ValidationException":
1399
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1400
+ default:
1401
+ const parsedBody = parsedOutput.body;
1402
+ return throwDefaultError({
1403
+ output,
1404
+ parsedBody,
1405
+ errorCode,
1406
+ });
1407
+ }
1408
+ };
1409
+ export const de_GetAssistantAssociationCommand = async (output, context) => {
1410
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1056
1411
  return de_GetAssistantAssociationCommandError(output, context);
1057
1412
  }
1058
1413
  const contents = map({
@@ -1168,6 +1523,45 @@ const de_GetContentSummaryCommandError = async (output, context) => {
1168
1523
  });
1169
1524
  }
1170
1525
  };
1526
+ export const de_GetImportJobCommand = async (output, context) => {
1527
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1528
+ return de_GetImportJobCommandError(output, context);
1529
+ }
1530
+ const contents = map({
1531
+ $metadata: deserializeMetadata(output),
1532
+ });
1533
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1534
+ const doc = take(data, {
1535
+ importJob: (_) => de_ImportJobData(_, context),
1536
+ });
1537
+ Object.assign(contents, doc);
1538
+ return contents;
1539
+ };
1540
+ const de_GetImportJobCommandError = async (output, context) => {
1541
+ const parsedOutput = {
1542
+ ...output,
1543
+ body: await parseErrorBody(output.body, context),
1544
+ };
1545
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1546
+ switch (errorCode) {
1547
+ case "AccessDeniedException":
1548
+ case "com.amazonaws.wisdom#AccessDeniedException":
1549
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1550
+ case "ResourceNotFoundException":
1551
+ case "com.amazonaws.wisdom#ResourceNotFoundException":
1552
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1553
+ case "ValidationException":
1554
+ case "com.amazonaws.wisdom#ValidationException":
1555
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1556
+ default:
1557
+ const parsedBody = parsedOutput.body;
1558
+ return throwDefaultError({
1559
+ output,
1560
+ parsedBody,
1561
+ errorCode,
1562
+ });
1563
+ }
1564
+ };
1171
1565
  export const de_GetKnowledgeBaseCommand = async (output, context) => {
1172
1566
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1173
1567
  return de_GetKnowledgeBaseCommandError(output, context);
@@ -1207,6 +1601,45 @@ const de_GetKnowledgeBaseCommandError = async (output, context) => {
1207
1601
  });
1208
1602
  }
1209
1603
  };
1604
+ export const de_GetQuickResponseCommand = async (output, context) => {
1605
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1606
+ return de_GetQuickResponseCommandError(output, context);
1607
+ }
1608
+ const contents = map({
1609
+ $metadata: deserializeMetadata(output),
1610
+ });
1611
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1612
+ const doc = take(data, {
1613
+ quickResponse: (_) => de_QuickResponseData(_, context),
1614
+ });
1615
+ Object.assign(contents, doc);
1616
+ return contents;
1617
+ };
1618
+ const de_GetQuickResponseCommandError = async (output, context) => {
1619
+ const parsedOutput = {
1620
+ ...output,
1621
+ body: await parseErrorBody(output.body, context),
1622
+ };
1623
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1624
+ switch (errorCode) {
1625
+ case "AccessDeniedException":
1626
+ case "com.amazonaws.wisdom#AccessDeniedException":
1627
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1628
+ case "ResourceNotFoundException":
1629
+ case "com.amazonaws.wisdom#ResourceNotFoundException":
1630
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1631
+ case "ValidationException":
1632
+ case "com.amazonaws.wisdom#ValidationException":
1633
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1634
+ default:
1635
+ const parsedBody = parsedOutput.body;
1636
+ return throwDefaultError({
1637
+ output,
1638
+ parsedBody,
1639
+ errorCode,
1640
+ });
1641
+ }
1642
+ };
1210
1643
  export const de_GetRecommendationsCommand = async (output, context) => {
1211
1644
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1212
1645
  return de_GetRecommendationsCommandError(output, context);
@@ -1403,6 +1836,43 @@ const de_ListContentsCommandError = async (output, context) => {
1403
1836
  });
1404
1837
  }
1405
1838
  };
1839
+ export const de_ListImportJobsCommand = async (output, context) => {
1840
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1841
+ return de_ListImportJobsCommandError(output, context);
1842
+ }
1843
+ const contents = map({
1844
+ $metadata: deserializeMetadata(output),
1845
+ });
1846
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1847
+ const doc = take(data, {
1848
+ importJobSummaries: (_) => de_ImportJobList(_, context),
1849
+ nextToken: __expectString,
1850
+ });
1851
+ Object.assign(contents, doc);
1852
+ return contents;
1853
+ };
1854
+ const de_ListImportJobsCommandError = async (output, context) => {
1855
+ const parsedOutput = {
1856
+ ...output,
1857
+ body: await parseErrorBody(output.body, context),
1858
+ };
1859
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1860
+ switch (errorCode) {
1861
+ case "AccessDeniedException":
1862
+ case "com.amazonaws.wisdom#AccessDeniedException":
1863
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1864
+ case "ValidationException":
1865
+ case "com.amazonaws.wisdom#ValidationException":
1866
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1867
+ default:
1868
+ const parsedBody = parsedOutput.body;
1869
+ return throwDefaultError({
1870
+ output,
1871
+ parsedBody,
1872
+ errorCode,
1873
+ });
1874
+ }
1875
+ };
1406
1876
  export const de_ListKnowledgeBasesCommand = async (output, context) => {
1407
1877
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1408
1878
  return de_ListKnowledgeBasesCommandError(output, context);
@@ -1440,6 +1910,46 @@ const de_ListKnowledgeBasesCommandError = async (output, context) => {
1440
1910
  });
1441
1911
  }
1442
1912
  };
1913
+ export const de_ListQuickResponsesCommand = async (output, context) => {
1914
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1915
+ return de_ListQuickResponsesCommandError(output, context);
1916
+ }
1917
+ const contents = map({
1918
+ $metadata: deserializeMetadata(output),
1919
+ });
1920
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1921
+ const doc = take(data, {
1922
+ nextToken: __expectString,
1923
+ quickResponseSummaries: (_) => de_QuickResponseSummaryList(_, context),
1924
+ });
1925
+ Object.assign(contents, doc);
1926
+ return contents;
1927
+ };
1928
+ const de_ListQuickResponsesCommandError = async (output, context) => {
1929
+ const parsedOutput = {
1930
+ ...output,
1931
+ body: await parseErrorBody(output.body, context),
1932
+ };
1933
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1934
+ switch (errorCode) {
1935
+ case "AccessDeniedException":
1936
+ case "com.amazonaws.wisdom#AccessDeniedException":
1937
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1938
+ case "ResourceNotFoundException":
1939
+ case "com.amazonaws.wisdom#ResourceNotFoundException":
1940
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1941
+ case "ValidationException":
1942
+ case "com.amazonaws.wisdom#ValidationException":
1943
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1944
+ default:
1945
+ const parsedBody = parsedOutput.body;
1946
+ return throwDefaultError({
1947
+ output,
1948
+ parsedBody,
1949
+ errorCode,
1950
+ });
1951
+ }
1952
+ };
1443
1953
  export const de_ListTagsForResourceCommand = async (output, context) => {
1444
1954
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1445
1955
  return de_ListTagsForResourceCommandError(output, context);
@@ -1538,6 +2048,9 @@ const de_QueryAssistantCommandError = async (output, context) => {
1538
2048
  case "AccessDeniedException":
1539
2049
  case "com.amazonaws.wisdom#AccessDeniedException":
1540
2050
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2051
+ case "RequestTimeoutException":
2052
+ case "com.amazonaws.wisdom#RequestTimeoutException":
2053
+ throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
1541
2054
  case "ResourceNotFoundException":
1542
2055
  case "com.amazonaws.wisdom#ResourceNotFoundException":
1543
2056
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
@@ -1628,6 +2141,49 @@ const de_SearchContentCommandError = async (output, context) => {
1628
2141
  });
1629
2142
  }
1630
2143
  };
2144
+ export const de_SearchQuickResponsesCommand = async (output, context) => {
2145
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2146
+ return de_SearchQuickResponsesCommandError(output, context);
2147
+ }
2148
+ const contents = map({
2149
+ $metadata: deserializeMetadata(output),
2150
+ });
2151
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2152
+ const doc = take(data, {
2153
+ nextToken: __expectString,
2154
+ results: (_) => de_QuickResponseSearchResultsList(_, context),
2155
+ });
2156
+ Object.assign(contents, doc);
2157
+ return contents;
2158
+ };
2159
+ const de_SearchQuickResponsesCommandError = async (output, context) => {
2160
+ const parsedOutput = {
2161
+ ...output,
2162
+ body: await parseErrorBody(output.body, context),
2163
+ };
2164
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2165
+ switch (errorCode) {
2166
+ case "AccessDeniedException":
2167
+ case "com.amazonaws.wisdom#AccessDeniedException":
2168
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2169
+ case "RequestTimeoutException":
2170
+ case "com.amazonaws.wisdom#RequestTimeoutException":
2171
+ throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
2172
+ case "ResourceNotFoundException":
2173
+ case "com.amazonaws.wisdom#ResourceNotFoundException":
2174
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2175
+ case "ValidationException":
2176
+ case "com.amazonaws.wisdom#ValidationException":
2177
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2178
+ default:
2179
+ const parsedBody = parsedOutput.body;
2180
+ return throwDefaultError({
2181
+ output,
2182
+ parsedBody,
2183
+ errorCode,
2184
+ });
2185
+ }
2186
+ };
1631
2187
  export const de_SearchSessionsCommand = async (output, context) => {
1632
2188
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1633
2189
  return de_SearchSessionsCommandError(output, context);
@@ -1710,6 +2266,51 @@ const de_StartContentUploadCommandError = async (output, context) => {
1710
2266
  });
1711
2267
  }
1712
2268
  };
2269
+ export const de_StartImportJobCommand = async (output, context) => {
2270
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2271
+ return de_StartImportJobCommandError(output, context);
2272
+ }
2273
+ const contents = map({
2274
+ $metadata: deserializeMetadata(output),
2275
+ });
2276
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2277
+ const doc = take(data, {
2278
+ importJob: (_) => de_ImportJobData(_, context),
2279
+ });
2280
+ Object.assign(contents, doc);
2281
+ return contents;
2282
+ };
2283
+ const de_StartImportJobCommandError = async (output, context) => {
2284
+ const parsedOutput = {
2285
+ ...output,
2286
+ body: await parseErrorBody(output.body, context),
2287
+ };
2288
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2289
+ switch (errorCode) {
2290
+ case "AccessDeniedException":
2291
+ case "com.amazonaws.wisdom#AccessDeniedException":
2292
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2293
+ case "ConflictException":
2294
+ case "com.amazonaws.wisdom#ConflictException":
2295
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2296
+ case "ResourceNotFoundException":
2297
+ case "com.amazonaws.wisdom#ResourceNotFoundException":
2298
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2299
+ case "ServiceQuotaExceededException":
2300
+ case "com.amazonaws.wisdom#ServiceQuotaExceededException":
2301
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2302
+ case "ValidationException":
2303
+ case "com.amazonaws.wisdom#ValidationException":
2304
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2305
+ default:
2306
+ const parsedBody = parsedOutput.body;
2307
+ return throwDefaultError({
2308
+ output,
2309
+ parsedBody,
2310
+ errorCode,
2311
+ });
2312
+ }
2313
+ };
1713
2314
  export const de_TagResourceCommand = async (output, context) => {
1714
2315
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1715
2316
  return de_TagResourceCommandError(output, context);
@@ -1852,6 +2453,51 @@ const de_UpdateKnowledgeBaseTemplateUriCommandError = async (output, context) =>
1852
2453
  });
1853
2454
  }
1854
2455
  };
2456
+ export const de_UpdateQuickResponseCommand = async (output, context) => {
2457
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2458
+ return de_UpdateQuickResponseCommandError(output, context);
2459
+ }
2460
+ const contents = map({
2461
+ $metadata: deserializeMetadata(output),
2462
+ });
2463
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2464
+ const doc = take(data, {
2465
+ quickResponse: (_) => de_QuickResponseData(_, context),
2466
+ });
2467
+ Object.assign(contents, doc);
2468
+ return contents;
2469
+ };
2470
+ const de_UpdateQuickResponseCommandError = async (output, context) => {
2471
+ const parsedOutput = {
2472
+ ...output,
2473
+ body: await parseErrorBody(output.body, context),
2474
+ };
2475
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2476
+ switch (errorCode) {
2477
+ case "AccessDeniedException":
2478
+ case "com.amazonaws.wisdom#AccessDeniedException":
2479
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2480
+ case "ConflictException":
2481
+ case "com.amazonaws.wisdom#ConflictException":
2482
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2483
+ case "PreconditionFailedException":
2484
+ case "com.amazonaws.wisdom#PreconditionFailedException":
2485
+ throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
2486
+ case "ResourceNotFoundException":
2487
+ case "com.amazonaws.wisdom#ResourceNotFoundException":
2488
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2489
+ case "ValidationException":
2490
+ case "com.amazonaws.wisdom#ValidationException":
2491
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2492
+ default:
2493
+ const parsedBody = parsedOutput.body;
2494
+ return throwDefaultError({
2495
+ output,
2496
+ parsedBody,
2497
+ errorCode,
2498
+ });
2499
+ }
2500
+ };
1855
2501
  const throwDefaultError = withBaseException(__BaseException);
1856
2502
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1857
2503
  const contents = map({});
@@ -1892,6 +2538,19 @@ const de_PreconditionFailedExceptionRes = async (parsedOutput, context) => {
1892
2538
  });
1893
2539
  return __decorateServiceException(exception, parsedOutput.body);
1894
2540
  };
2541
+ const de_RequestTimeoutExceptionRes = async (parsedOutput, context) => {
2542
+ const contents = map({});
2543
+ const data = parsedOutput.body;
2544
+ const doc = take(data, {
2545
+ message: __expectString,
2546
+ });
2547
+ Object.assign(contents, doc);
2548
+ const exception = new RequestTimeoutException({
2549
+ $metadata: deserializeMetadata(parsedOutput),
2550
+ ...contents,
2551
+ });
2552
+ return __decorateServiceException(exception, parsedOutput.body);
2553
+ };
1895
2554
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1896
2555
  const contents = map({});
1897
2556
  const data = parsedOutput.body;
@@ -1964,6 +2623,45 @@ const de_ContentData = (output, context) => {
1964
2623
  urlExpiry: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1965
2624
  });
1966
2625
  };
2626
+ const de_ImportJobData = (output, context) => {
2627
+ return take(output, {
2628
+ createdTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2629
+ externalSourceConfiguration: _json,
2630
+ failedRecordReport: __expectString,
2631
+ importJobId: __expectString,
2632
+ importJobType: __expectString,
2633
+ knowledgeBaseArn: __expectString,
2634
+ knowledgeBaseId: __expectString,
2635
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2636
+ metadata: _json,
2637
+ status: __expectString,
2638
+ uploadId: __expectString,
2639
+ url: __expectString,
2640
+ urlExpiry: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2641
+ });
2642
+ };
2643
+ const de_ImportJobList = (output, context) => {
2644
+ const retVal = (output || [])
2645
+ .filter((e) => e != null)
2646
+ .map((entry) => {
2647
+ return de_ImportJobSummary(entry, context);
2648
+ });
2649
+ return retVal;
2650
+ };
2651
+ const de_ImportJobSummary = (output, context) => {
2652
+ return take(output, {
2653
+ createdTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2654
+ externalSourceConfiguration: _json,
2655
+ importJobId: __expectString,
2656
+ importJobType: __expectString,
2657
+ knowledgeBaseArn: __expectString,
2658
+ knowledgeBaseId: __expectString,
2659
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2660
+ metadata: _json,
2661
+ status: __expectString,
2662
+ uploadId: __expectString,
2663
+ });
2664
+ };
1967
2665
  const de_KnowledgeBaseData = (output, context) => {
1968
2666
  return take(output, {
1969
2667
  description: __expectString,
@@ -1987,6 +2685,86 @@ const de_QueryResultsList = (output, context) => {
1987
2685
  });
1988
2686
  return retVal;
1989
2687
  };
2688
+ const de_QuickResponseData = (output, context) => {
2689
+ return take(output, {
2690
+ channels: _json,
2691
+ contentType: __expectString,
2692
+ contents: _json,
2693
+ createdTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2694
+ description: __expectString,
2695
+ groupingConfiguration: _json,
2696
+ isActive: __expectBoolean,
2697
+ knowledgeBaseArn: __expectString,
2698
+ knowledgeBaseId: __expectString,
2699
+ language: __expectString,
2700
+ lastModifiedBy: __expectString,
2701
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2702
+ name: __expectString,
2703
+ quickResponseArn: __expectString,
2704
+ quickResponseId: __expectString,
2705
+ shortcutKey: __expectString,
2706
+ status: __expectString,
2707
+ tags: _json,
2708
+ });
2709
+ };
2710
+ const de_QuickResponseSearchResultData = (output, context) => {
2711
+ return take(output, {
2712
+ attributesInterpolated: _json,
2713
+ attributesNotInterpolated: _json,
2714
+ channels: _json,
2715
+ contentType: __expectString,
2716
+ contents: _json,
2717
+ createdTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2718
+ description: __expectString,
2719
+ groupingConfiguration: _json,
2720
+ isActive: __expectBoolean,
2721
+ knowledgeBaseArn: __expectString,
2722
+ knowledgeBaseId: __expectString,
2723
+ language: __expectString,
2724
+ lastModifiedBy: __expectString,
2725
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2726
+ name: __expectString,
2727
+ quickResponseArn: __expectString,
2728
+ quickResponseId: __expectString,
2729
+ shortcutKey: __expectString,
2730
+ status: __expectString,
2731
+ tags: _json,
2732
+ });
2733
+ };
2734
+ const de_QuickResponseSearchResultsList = (output, context) => {
2735
+ const retVal = (output || [])
2736
+ .filter((e) => e != null)
2737
+ .map((entry) => {
2738
+ return de_QuickResponseSearchResultData(entry, context);
2739
+ });
2740
+ return retVal;
2741
+ };
2742
+ const de_QuickResponseSummary = (output, context) => {
2743
+ return take(output, {
2744
+ channels: _json,
2745
+ contentType: __expectString,
2746
+ createdTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2747
+ description: __expectString,
2748
+ isActive: __expectBoolean,
2749
+ knowledgeBaseArn: __expectString,
2750
+ knowledgeBaseId: __expectString,
2751
+ lastModifiedBy: __expectString,
2752
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2753
+ name: __expectString,
2754
+ quickResponseArn: __expectString,
2755
+ quickResponseId: __expectString,
2756
+ status: __expectString,
2757
+ tags: _json,
2758
+ });
2759
+ };
2760
+ const de_QuickResponseSummaryList = (output, context) => {
2761
+ const retVal = (output || [])
2762
+ .filter((e) => e != null)
2763
+ .map((entry) => {
2764
+ return de_QuickResponseSummary(entry, context);
2765
+ });
2766
+ return retVal;
2767
+ };
1990
2768
  const de_RecommendationData = (output, context) => {
1991
2769
  return take(output, {
1992
2770
  document: _json,