@aws-sdk/client-connect 3.319.0 → 3.321.1

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 (113) hide show
  1. package/README.md +119 -7
  2. package/dist-cjs/Connect.js +28 -0
  3. package/dist-cjs/commands/ActivateEvaluationFormCommand.js +45 -0
  4. package/dist-cjs/commands/CreateEvaluationFormCommand.js +45 -0
  5. package/dist-cjs/commands/DeactivateEvaluationFormCommand.js +45 -0
  6. package/dist-cjs/commands/DeleteContactEvaluationCommand.js +45 -0
  7. package/dist-cjs/commands/DeleteEvaluationFormCommand.js +45 -0
  8. package/dist-cjs/commands/DescribeContactEvaluationCommand.js +45 -0
  9. package/dist-cjs/commands/DescribeEvaluationFormCommand.js +45 -0
  10. package/dist-cjs/commands/GetFederationTokenCommand.js +2 -2
  11. package/dist-cjs/commands/ListContactEvaluationsCommand.js +45 -0
  12. package/dist-cjs/commands/ListEvaluationFormVersionsCommand.js +45 -0
  13. package/dist-cjs/commands/ListEvaluationFormsCommand.js +45 -0
  14. package/dist-cjs/commands/StartContactEvaluationCommand.js +45 -0
  15. package/dist-cjs/commands/SubmitContactEvaluationCommand.js +45 -0
  16. package/dist-cjs/commands/UpdateContactEvaluationCommand.js +45 -0
  17. package/dist-cjs/commands/UpdateEvaluationFormCommand.js +45 -0
  18. package/dist-cjs/commands/index.js +14 -0
  19. package/dist-cjs/models/models_0.js +142 -125
  20. package/dist-cjs/models/models_1.js +71 -1
  21. package/dist-cjs/pagination/ListContactEvaluationsPaginator.js +28 -0
  22. package/dist-cjs/pagination/ListEvaluationFormVersionsPaginator.js +29 -0
  23. package/dist-cjs/pagination/ListEvaluationFormsPaginator.js +29 -0
  24. package/dist-cjs/pagination/index.js +3 -0
  25. package/dist-cjs/protocols/Aws_restJson1.js +1272 -41
  26. package/dist-es/Connect.js +28 -0
  27. package/dist-es/commands/ActivateEvaluationFormCommand.js +41 -0
  28. package/dist-es/commands/CreateEvaluationFormCommand.js +41 -0
  29. package/dist-es/commands/DeactivateEvaluationFormCommand.js +41 -0
  30. package/dist-es/commands/DeleteContactEvaluationCommand.js +41 -0
  31. package/dist-es/commands/DeleteEvaluationFormCommand.js +41 -0
  32. package/dist-es/commands/DescribeContactEvaluationCommand.js +41 -0
  33. package/dist-es/commands/DescribeEvaluationFormCommand.js +41 -0
  34. package/dist-es/commands/GetFederationTokenCommand.js +1 -1
  35. package/dist-es/commands/ListContactEvaluationsCommand.js +41 -0
  36. package/dist-es/commands/ListEvaluationFormVersionsCommand.js +41 -0
  37. package/dist-es/commands/ListEvaluationFormsCommand.js +41 -0
  38. package/dist-es/commands/StartContactEvaluationCommand.js +41 -0
  39. package/dist-es/commands/SubmitContactEvaluationCommand.js +41 -0
  40. package/dist-es/commands/UpdateContactEvaluationCommand.js +41 -0
  41. package/dist-es/commands/UpdateEvaluationFormCommand.js +41 -0
  42. package/dist-es/commands/index.js +14 -0
  43. package/dist-es/models/models_0.js +136 -116
  44. package/dist-es/models/models_1.js +67 -0
  45. package/dist-es/pagination/ListContactEvaluationsPaginator.js +24 -0
  46. package/dist-es/pagination/ListEvaluationFormVersionsPaginator.js +25 -0
  47. package/dist-es/pagination/ListEvaluationFormsPaginator.js +25 -0
  48. package/dist-es/pagination/index.js +3 -0
  49. package/dist-es/protocols/Aws_restJson1.js +1235 -33
  50. package/dist-types/Connect.d.ts +98 -0
  51. package/dist-types/ConnectClient.d.ts +16 -2
  52. package/dist-types/commands/ActivateEvaluationFormCommand.d.ts +81 -0
  53. package/dist-types/commands/CreateEvaluationFormCommand.d.ts +213 -0
  54. package/dist-types/commands/CreateParticipantCommand.d.ts +1 -1
  55. package/dist-types/commands/DeactivateEvaluationFormCommand.d.ts +81 -0
  56. package/dist-types/commands/DeleteContactEvaluationCommand.d.ts +79 -0
  57. package/dist-types/commands/DeleteEvaluationFormCommand.d.ts +89 -0
  58. package/dist-types/commands/DescribeContactEvaluationCommand.d.ts +77 -0
  59. package/dist-types/commands/DescribeEvaluationFormCommand.d.ts +79 -0
  60. package/dist-types/commands/GetCurrentUserDataCommand.d.ts +1 -1
  61. package/dist-types/commands/GetFederationTokenCommand.d.ts +1 -1
  62. package/dist-types/commands/GetMetricDataCommand.d.ts +1 -1
  63. package/dist-types/commands/GetMetricDataV2Command.d.ts +1 -1
  64. package/dist-types/commands/GetTaskTemplateCommand.d.ts +1 -1
  65. package/dist-types/commands/GetTrafficDistributionCommand.d.ts +1 -1
  66. package/dist-types/commands/ListAgentStatusesCommand.d.ts +1 -2
  67. package/dist-types/commands/ListContactEvaluationsCommand.d.ts +77 -0
  68. package/dist-types/commands/ListEvaluationFormVersionsCommand.d.ts +78 -0
  69. package/dist-types/commands/ListEvaluationFormsCommand.d.ts +77 -0
  70. package/dist-types/commands/StartContactEvaluationCommand.d.ts +91 -0
  71. package/dist-types/commands/SubmitContactEvaluationCommand.d.ts +98 -0
  72. package/dist-types/commands/UpdateContactEvaluationCommand.d.ts +96 -0
  73. package/dist-types/commands/UpdateEvaluationFormCommand.d.ts +215 -0
  74. package/dist-types/commands/index.d.ts +14 -0
  75. package/dist-types/models/models_0.d.ts +859 -1281
  76. package/dist-types/models/models_1.d.ts +1758 -3
  77. package/dist-types/pagination/ListContactEvaluationsPaginator.d.ts +7 -0
  78. package/dist-types/pagination/ListEvaluationFormVersionsPaginator.d.ts +7 -0
  79. package/dist-types/pagination/ListEvaluationFormsPaginator.d.ts +7 -0
  80. package/dist-types/pagination/index.d.ts +3 -0
  81. package/dist-types/protocols/Aws_restJson1.d.ts +126 -0
  82. package/dist-types/ts3.4/Connect.d.ts +238 -0
  83. package/dist-types/ts3.4/ConnectClient.d.ts +84 -0
  84. package/dist-types/ts3.4/commands/ActivateEvaluationFormCommand.d.ts +41 -0
  85. package/dist-types/ts3.4/commands/CreateEvaluationFormCommand.d.ts +39 -0
  86. package/dist-types/ts3.4/commands/DeactivateEvaluationFormCommand.d.ts +41 -0
  87. package/dist-types/ts3.4/commands/DeleteContactEvaluationCommand.d.ts +37 -0
  88. package/dist-types/ts3.4/commands/DeleteEvaluationFormCommand.d.ts +36 -0
  89. package/dist-types/ts3.4/commands/DescribeContactEvaluationCommand.d.ts +39 -0
  90. package/dist-types/ts3.4/commands/DescribeEvaluationFormCommand.d.ts +39 -0
  91. package/dist-types/ts3.4/commands/GetCurrentUserDataCommand.d.ts +1 -1
  92. package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +1 -1
  93. package/dist-types/ts3.4/commands/GetMetricDataCommand.d.ts +1 -1
  94. package/dist-types/ts3.4/commands/GetMetricDataV2Command.d.ts +1 -1
  95. package/dist-types/ts3.4/commands/GetTaskTemplateCommand.d.ts +1 -1
  96. package/dist-types/ts3.4/commands/GetTrafficDistributionCommand.d.ts +1 -1
  97. package/dist-types/ts3.4/commands/ListAgentStatusesCommand.d.ts +4 -2
  98. package/dist-types/ts3.4/commands/ListContactEvaluationsCommand.d.ts +41 -0
  99. package/dist-types/ts3.4/commands/ListEvaluationFormVersionsCommand.d.ts +41 -0
  100. package/dist-types/ts3.4/commands/ListEvaluationFormsCommand.d.ts +38 -0
  101. package/dist-types/ts3.4/commands/StartContactEvaluationCommand.d.ts +41 -0
  102. package/dist-types/ts3.4/commands/SubmitContactEvaluationCommand.d.ts +41 -0
  103. package/dist-types/ts3.4/commands/UpdateContactEvaluationCommand.d.ts +41 -0
  104. package/dist-types/ts3.4/commands/UpdateEvaluationFormCommand.d.ts +41 -0
  105. package/dist-types/ts3.4/commands/index.d.ts +14 -0
  106. package/dist-types/ts3.4/models/models_0.d.ts +328 -262
  107. package/dist-types/ts3.4/models/models_1.d.ts +425 -1
  108. package/dist-types/ts3.4/pagination/ListContactEvaluationsPaginator.d.ts +11 -0
  109. package/dist-types/ts3.4/pagination/ListEvaluationFormVersionsPaginator.d.ts +11 -0
  110. package/dist-types/ts3.4/pagination/ListEvaluationFormsPaginator.d.ts +11 -0
  111. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  112. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +168 -0
  113. package/package.json +4 -4
@@ -1,9 +1,32 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ConnectServiceException as __BaseException } from "../models/ConnectServiceException";
5
- import { AccessDeniedException, ContactFlowNotPublishedException, DuplicateResourceException, IdempotencyException, InternalServiceException, InvalidContactFlowException, InvalidContactFlowModuleException, InvalidParameterException, InvalidRequestException, LimitExceededException, PropertyValidationException, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, ServiceQuotaExceededException, ThrottlingException, UserNotFoundException, } from "../models/models_0";
6
- import { ContactNotFoundException, DestinationNotAllowedException, OutboundContactNotPermittedException, } from "../models/models_1";
5
+ import { AccessDeniedException, ContactFlowNotPublishedException, DuplicateResourceException, EvaluationAnswerData, IdempotencyException, InternalServiceException, InvalidContactFlowException, InvalidContactFlowModuleException, InvalidParameterException, InvalidRequestException, LimitExceededException, PropertyValidationException, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, ServiceQuotaExceededException, ThrottlingException, } from "../models/models_0";
6
+ import { ContactNotFoundException, DestinationNotAllowedException, EvaluationFormItem, OutboundContactNotPermittedException, UserNotFoundException, } from "../models/models_1";
7
+ export const se_ActivateEvaluationFormCommand = async (input, context) => {
8
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const headers = {
10
+ "content-type": "application/json",
11
+ };
12
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
13
+ "/evaluation-forms/{InstanceId}/{EvaluationFormId}/activate";
14
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
15
+ resolvedPath = __resolvedPath(resolvedPath, input, "EvaluationFormId", () => input.EvaluationFormId, "{EvaluationFormId}", false);
16
+ let body;
17
+ body = JSON.stringify(take(input, {
18
+ EvaluationFormVersion: [],
19
+ }));
20
+ return new __HttpRequest({
21
+ protocol,
22
+ hostname,
23
+ port,
24
+ method: "POST",
25
+ headers,
26
+ path: resolvedPath,
27
+ body,
28
+ });
29
+ };
7
30
  export const se_AssociateApprovedOriginCommand = async (input, context) => {
8
31
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
32
  const headers = {
@@ -323,6 +346,31 @@ export const se_CreateContactFlowModuleCommand = async (input, context) => {
323
346
  body,
324
347
  });
325
348
  };
349
+ export const se_CreateEvaluationFormCommand = async (input, context) => {
350
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
351
+ const headers = {
352
+ "content-type": "application/json",
353
+ };
354
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/evaluation-forms/{InstanceId}";
355
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
356
+ let body;
357
+ body = JSON.stringify(take(input, {
358
+ ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
359
+ Description: [],
360
+ Items: (_) => se_EvaluationFormItemsList(_, context),
361
+ ScoringStrategy: (_) => _json(_),
362
+ Title: [],
363
+ }));
364
+ return new __HttpRequest({
365
+ protocol,
366
+ hostname,
367
+ port,
368
+ method: "PUT",
369
+ headers,
370
+ path: resolvedPath,
371
+ body,
372
+ });
373
+ };
326
374
  export const se_CreateHoursOfOperationCommand = async (input, context) => {
327
375
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
328
376
  const headers = {
@@ -705,6 +753,47 @@ export const se_CreateVocabularyCommand = async (input, context) => {
705
753
  body,
706
754
  });
707
755
  };
756
+ export const se_DeactivateEvaluationFormCommand = async (input, context) => {
757
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
758
+ const headers = {
759
+ "content-type": "application/json",
760
+ };
761
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
762
+ "/evaluation-forms/{InstanceId}/{EvaluationFormId}/deactivate";
763
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
764
+ resolvedPath = __resolvedPath(resolvedPath, input, "EvaluationFormId", () => input.EvaluationFormId, "{EvaluationFormId}", false);
765
+ let body;
766
+ body = JSON.stringify(take(input, {
767
+ EvaluationFormVersion: [],
768
+ }));
769
+ return new __HttpRequest({
770
+ protocol,
771
+ hostname,
772
+ port,
773
+ method: "POST",
774
+ headers,
775
+ path: resolvedPath,
776
+ body,
777
+ });
778
+ };
779
+ export const se_DeleteContactEvaluationCommand = async (input, context) => {
780
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
781
+ const headers = {};
782
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
783
+ "/contact-evaluations/{InstanceId}/{EvaluationId}";
784
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
785
+ resolvedPath = __resolvedPath(resolvedPath, input, "EvaluationId", () => input.EvaluationId, "{EvaluationId}", false);
786
+ let body;
787
+ return new __HttpRequest({
788
+ protocol,
789
+ hostname,
790
+ port,
791
+ method: "DELETE",
792
+ headers,
793
+ path: resolvedPath,
794
+ body,
795
+ });
796
+ };
708
797
  export const se_DeleteContactFlowCommand = async (input, context) => {
709
798
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
710
799
  const headers = {};
@@ -741,6 +830,28 @@ export const se_DeleteContactFlowModuleCommand = async (input, context) => {
741
830
  body,
742
831
  });
743
832
  };
833
+ export const se_DeleteEvaluationFormCommand = async (input, context) => {
834
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
835
+ const headers = {};
836
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
837
+ "/evaluation-forms/{InstanceId}/{EvaluationFormId}";
838
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
839
+ resolvedPath = __resolvedPath(resolvedPath, input, "EvaluationFormId", () => input.EvaluationFormId, "{EvaluationFormId}", false);
840
+ const query = map({
841
+ version: [() => input.EvaluationFormVersion !== void 0, () => input.EvaluationFormVersion.toString()],
842
+ });
843
+ let body;
844
+ return new __HttpRequest({
845
+ protocol,
846
+ hostname,
847
+ port,
848
+ method: "DELETE",
849
+ headers,
850
+ path: resolvedPath,
851
+ query,
852
+ body,
853
+ });
854
+ };
744
855
  export const se_DeleteHoursOfOperationCommand = async (input, context) => {
745
856
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
746
857
  const headers = {};
@@ -988,6 +1099,24 @@ export const se_DescribeContactCommand = async (input, context) => {
988
1099
  body,
989
1100
  });
990
1101
  };
1102
+ export const se_DescribeContactEvaluationCommand = async (input, context) => {
1103
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1104
+ const headers = {};
1105
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1106
+ "/contact-evaluations/{InstanceId}/{EvaluationId}";
1107
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1108
+ resolvedPath = __resolvedPath(resolvedPath, input, "EvaluationId", () => input.EvaluationId, "{EvaluationId}", false);
1109
+ let body;
1110
+ return new __HttpRequest({
1111
+ protocol,
1112
+ hostname,
1113
+ port,
1114
+ method: "GET",
1115
+ headers,
1116
+ path: resolvedPath,
1117
+ body,
1118
+ });
1119
+ };
991
1120
  export const se_DescribeContactFlowCommand = async (input, context) => {
992
1121
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
993
1122
  const headers = {};
@@ -1024,6 +1153,28 @@ export const se_DescribeContactFlowModuleCommand = async (input, context) => {
1024
1153
  body,
1025
1154
  });
1026
1155
  };
1156
+ export const se_DescribeEvaluationFormCommand = async (input, context) => {
1157
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1158
+ const headers = {};
1159
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1160
+ "/evaluation-forms/{InstanceId}/{EvaluationFormId}";
1161
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1162
+ resolvedPath = __resolvedPath(resolvedPath, input, "EvaluationFormId", () => input.EvaluationFormId, "{EvaluationFormId}", false);
1163
+ const query = map({
1164
+ version: [() => input.EvaluationFormVersion !== void 0, () => input.EvaluationFormVersion.toString()],
1165
+ });
1166
+ let body;
1167
+ return new __HttpRequest({
1168
+ protocol,
1169
+ hostname,
1170
+ port,
1171
+ method: "GET",
1172
+ headers,
1173
+ path: resolvedPath,
1174
+ query,
1175
+ body,
1176
+ });
1177
+ };
1027
1178
  export const se_DescribeHoursOfOperationCommand = async (input, context) => {
1028
1179
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1029
1180
  const headers = {};
@@ -1742,6 +1893,27 @@ export const se_ListBotsCommand = async (input, context) => {
1742
1893
  body,
1743
1894
  });
1744
1895
  };
1896
+ export const se_ListContactEvaluationsCommand = async (input, context) => {
1897
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1898
+ const headers = {};
1899
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact-evaluations/{InstanceId}";
1900
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
1901
+ const query = map({
1902
+ contactId: [, __expectNonNull(input.ContactId, `ContactId`)],
1903
+ nextToken: [, input.NextToken],
1904
+ });
1905
+ let body;
1906
+ return new __HttpRequest({
1907
+ protocol,
1908
+ hostname,
1909
+ port,
1910
+ method: "GET",
1911
+ headers,
1912
+ path: resolvedPath,
1913
+ query,
1914
+ body,
1915
+ });
1916
+ };
1745
1917
  export const se_ListContactFlowModulesCommand = async (input, context) => {
1746
1918
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1747
1919
  const headers = {};
@@ -1839,6 +2011,50 @@ export const se_ListDefaultVocabulariesCommand = async (input, context) => {
1839
2011
  body,
1840
2012
  });
1841
2013
  };
2014
+ export const se_ListEvaluationFormsCommand = async (input, context) => {
2015
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2016
+ const headers = {};
2017
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/evaluation-forms/{InstanceId}";
2018
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2019
+ const query = map({
2020
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
2021
+ nextToken: [, input.NextToken],
2022
+ });
2023
+ let body;
2024
+ return new __HttpRequest({
2025
+ protocol,
2026
+ hostname,
2027
+ port,
2028
+ method: "GET",
2029
+ headers,
2030
+ path: resolvedPath,
2031
+ query,
2032
+ body,
2033
+ });
2034
+ };
2035
+ export const se_ListEvaluationFormVersionsCommand = async (input, context) => {
2036
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2037
+ const headers = {};
2038
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2039
+ "/evaluation-forms/{InstanceId}/{EvaluationFormId}/versions";
2040
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2041
+ resolvedPath = __resolvedPath(resolvedPath, input, "EvaluationFormId", () => input.EvaluationFormId, "{EvaluationFormId}", false);
2042
+ const query = map({
2043
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
2044
+ nextToken: [, input.NextToken],
2045
+ });
2046
+ let body;
2047
+ return new __HttpRequest({
2048
+ protocol,
2049
+ hostname,
2050
+ port,
2051
+ method: "GET",
2052
+ headers,
2053
+ path: resolvedPath,
2054
+ query,
2055
+ body,
2056
+ });
2057
+ };
1842
2058
  export const se_ListHoursOfOperationsCommand = async (input, context) => {
1843
2059
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1844
2060
  const headers = {};
@@ -2677,6 +2893,29 @@ export const se_StartChatContactCommand = async (input, context) => {
2677
2893
  body,
2678
2894
  });
2679
2895
  };
2896
+ export const se_StartContactEvaluationCommand = async (input, context) => {
2897
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2898
+ const headers = {
2899
+ "content-type": "application/json",
2900
+ };
2901
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact-evaluations/{InstanceId}";
2902
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
2903
+ let body;
2904
+ body = JSON.stringify(take(input, {
2905
+ ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
2906
+ ContactId: [],
2907
+ EvaluationFormId: [],
2908
+ }));
2909
+ return new __HttpRequest({
2910
+ protocol,
2911
+ hostname,
2912
+ port,
2913
+ method: "PUT",
2914
+ headers,
2915
+ path: resolvedPath,
2916
+ body,
2917
+ });
2918
+ };
2680
2919
  export const se_StartContactRecordingCommand = async (input, context) => {
2681
2920
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2682
2921
  const headers = {
@@ -2848,6 +3087,30 @@ export const se_StopContactStreamingCommand = async (input, context) => {
2848
3087
  body,
2849
3088
  });
2850
3089
  };
3090
+ export const se_SubmitContactEvaluationCommand = async (input, context) => {
3091
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3092
+ const headers = {
3093
+ "content-type": "application/json",
3094
+ };
3095
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3096
+ "/contact-evaluations/{InstanceId}/{EvaluationId}/submit";
3097
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3098
+ resolvedPath = __resolvedPath(resolvedPath, input, "EvaluationId", () => input.EvaluationId, "{EvaluationId}", false);
3099
+ let body;
3100
+ body = JSON.stringify(take(input, {
3101
+ Answers: (_) => se_EvaluationAnswersInputMap(_, context),
3102
+ Notes: (_) => _json(_),
3103
+ }));
3104
+ return new __HttpRequest({
3105
+ protocol,
3106
+ hostname,
3107
+ port,
3108
+ method: "POST",
3109
+ headers,
3110
+ path: resolvedPath,
3111
+ body,
3112
+ });
3113
+ };
2851
3114
  export const se_SuspendContactRecordingCommand = async (input, context) => {
2852
3115
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2853
3116
  const headers = {
@@ -3012,6 +3275,30 @@ export const se_UpdateContactAttributesCommand = async (input, context) => {
3012
3275
  body,
3013
3276
  });
3014
3277
  };
3278
+ export const se_UpdateContactEvaluationCommand = async (input, context) => {
3279
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3280
+ const headers = {
3281
+ "content-type": "application/json",
3282
+ };
3283
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3284
+ "/contact-evaluations/{InstanceId}/{EvaluationId}";
3285
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3286
+ resolvedPath = __resolvedPath(resolvedPath, input, "EvaluationId", () => input.EvaluationId, "{EvaluationId}", false);
3287
+ let body;
3288
+ body = JSON.stringify(take(input, {
3289
+ Answers: (_) => se_EvaluationAnswersInputMap(_, context),
3290
+ Notes: (_) => _json(_),
3291
+ }));
3292
+ return new __HttpRequest({
3293
+ protocol,
3294
+ hostname,
3295
+ port,
3296
+ method: "POST",
3297
+ headers,
3298
+ path: resolvedPath,
3299
+ body,
3300
+ });
3301
+ };
3015
3302
  export const se_UpdateContactFlowContentCommand = async (input, context) => {
3016
3303
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3017
3304
  const headers = {
@@ -3154,45 +3441,74 @@ export const se_UpdateContactScheduleCommand = async (input, context) => {
3154
3441
  body,
3155
3442
  });
3156
3443
  };
3157
- export const se_UpdateHoursOfOperationCommand = async (input, context) => {
3444
+ export const se_UpdateEvaluationFormCommand = async (input, context) => {
3158
3445
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3159
3446
  const headers = {
3160
3447
  "content-type": "application/json",
3161
3448
  };
3162
3449
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3163
- "/hours-of-operations/{InstanceId}/{HoursOfOperationId}";
3450
+ "/evaluation-forms/{InstanceId}/{EvaluationFormId}";
3164
3451
  resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3165
- resolvedPath = __resolvedPath(resolvedPath, input, "HoursOfOperationId", () => input.HoursOfOperationId, "{HoursOfOperationId}", false);
3452
+ resolvedPath = __resolvedPath(resolvedPath, input, "EvaluationFormId", () => input.EvaluationFormId, "{EvaluationFormId}", false);
3166
3453
  let body;
3167
3454
  body = JSON.stringify(take(input, {
3168
- Config: (_) => _json(_),
3455
+ ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
3456
+ CreateNewVersion: [],
3169
3457
  Description: [],
3170
- Name: [],
3171
- TimeZone: [],
3458
+ EvaluationFormVersion: [],
3459
+ Items: (_) => se_EvaluationFormItemsList(_, context),
3460
+ ScoringStrategy: (_) => _json(_),
3461
+ Title: [],
3172
3462
  }));
3173
3463
  return new __HttpRequest({
3174
3464
  protocol,
3175
3465
  hostname,
3176
3466
  port,
3177
- method: "POST",
3467
+ method: "PUT",
3178
3468
  headers,
3179
3469
  path: resolvedPath,
3180
3470
  body,
3181
3471
  });
3182
3472
  };
3183
- export const se_UpdateInstanceAttributeCommand = async (input, context) => {
3473
+ export const se_UpdateHoursOfOperationCommand = async (input, context) => {
3184
3474
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3185
3475
  const headers = {
3186
3476
  "content-type": "application/json",
3187
3477
  };
3188
3478
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3189
- "/instance/{InstanceId}/attribute/{AttributeType}";
3479
+ "/hours-of-operations/{InstanceId}/{HoursOfOperationId}";
3190
3480
  resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3191
- resolvedPath = __resolvedPath(resolvedPath, input, "AttributeType", () => input.AttributeType, "{AttributeType}", false);
3481
+ resolvedPath = __resolvedPath(resolvedPath, input, "HoursOfOperationId", () => input.HoursOfOperationId, "{HoursOfOperationId}", false);
3192
3482
  let body;
3193
3483
  body = JSON.stringify(take(input, {
3194
- Value: [],
3195
- }));
3484
+ Config: (_) => _json(_),
3485
+ Description: [],
3486
+ Name: [],
3487
+ TimeZone: [],
3488
+ }));
3489
+ return new __HttpRequest({
3490
+ protocol,
3491
+ hostname,
3492
+ port,
3493
+ method: "POST",
3494
+ headers,
3495
+ path: resolvedPath,
3496
+ body,
3497
+ });
3498
+ };
3499
+ export const se_UpdateInstanceAttributeCommand = async (input, context) => {
3500
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3501
+ const headers = {
3502
+ "content-type": "application/json",
3503
+ };
3504
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
3505
+ "/instance/{InstanceId}/attribute/{AttributeType}";
3506
+ resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
3507
+ resolvedPath = __resolvedPath(resolvedPath, input, "AttributeType", () => input.AttributeType, "{AttributeType}", false);
3508
+ let body;
3509
+ body = JSON.stringify(take(input, {
3510
+ Value: [],
3511
+ }));
3196
3512
  return new __HttpRequest({
3197
3513
  protocol,
3198
3514
  hostname,
@@ -3787,6 +4103,53 @@ export const se_UpdateUserSecurityProfilesCommand = async (input, context) => {
3787
4103
  body,
3788
4104
  });
3789
4105
  };
4106
+ export const de_ActivateEvaluationFormCommand = async (output, context) => {
4107
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4108
+ return de_ActivateEvaluationFormCommandError(output, context);
4109
+ }
4110
+ const contents = map({
4111
+ $metadata: deserializeMetadata(output),
4112
+ });
4113
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4114
+ const doc = take(data, {
4115
+ EvaluationFormArn: __expectString,
4116
+ EvaluationFormId: __expectString,
4117
+ EvaluationFormVersion: __expectInt32,
4118
+ });
4119
+ Object.assign(contents, doc);
4120
+ return contents;
4121
+ };
4122
+ const de_ActivateEvaluationFormCommandError = async (output, context) => {
4123
+ const parsedOutput = {
4124
+ ...output,
4125
+ body: await parseErrorBody(output.body, context),
4126
+ };
4127
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4128
+ switch (errorCode) {
4129
+ case "InternalServiceException":
4130
+ case "com.amazonaws.connect#InternalServiceException":
4131
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
4132
+ case "InvalidParameterException":
4133
+ case "com.amazonaws.connect#InvalidParameterException":
4134
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4135
+ case "ResourceConflictException":
4136
+ case "com.amazonaws.connect#ResourceConflictException":
4137
+ throw await de_ResourceConflictExceptionRes(parsedOutput, context);
4138
+ case "ResourceNotFoundException":
4139
+ case "com.amazonaws.connect#ResourceNotFoundException":
4140
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4141
+ case "ThrottlingException":
4142
+ case "com.amazonaws.connect#ThrottlingException":
4143
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
4144
+ default:
4145
+ const parsedBody = parsedOutput.body;
4146
+ return throwDefaultError({
4147
+ output,
4148
+ parsedBody,
4149
+ errorCode,
4150
+ });
4151
+ }
4152
+ };
3790
4153
  export const de_AssociateApprovedOriginCommand = async (output, context) => {
3791
4154
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3792
4155
  return de_AssociateApprovedOriginCommandError(output, context);
@@ -4458,6 +4821,55 @@ const de_CreateContactFlowModuleCommandError = async (output, context) => {
4458
4821
  });
4459
4822
  }
4460
4823
  };
4824
+ export const de_CreateEvaluationFormCommand = async (output, context) => {
4825
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4826
+ return de_CreateEvaluationFormCommandError(output, context);
4827
+ }
4828
+ const contents = map({
4829
+ $metadata: deserializeMetadata(output),
4830
+ });
4831
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4832
+ const doc = take(data, {
4833
+ EvaluationFormArn: __expectString,
4834
+ EvaluationFormId: __expectString,
4835
+ });
4836
+ Object.assign(contents, doc);
4837
+ return contents;
4838
+ };
4839
+ const de_CreateEvaluationFormCommandError = async (output, context) => {
4840
+ const parsedOutput = {
4841
+ ...output,
4842
+ body: await parseErrorBody(output.body, context),
4843
+ };
4844
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4845
+ switch (errorCode) {
4846
+ case "InternalServiceException":
4847
+ case "com.amazonaws.connect#InternalServiceException":
4848
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
4849
+ case "InvalidParameterException":
4850
+ case "com.amazonaws.connect#InvalidParameterException":
4851
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4852
+ case "ResourceConflictException":
4853
+ case "com.amazonaws.connect#ResourceConflictException":
4854
+ throw await de_ResourceConflictExceptionRes(parsedOutput, context);
4855
+ case "ResourceNotFoundException":
4856
+ case "com.amazonaws.connect#ResourceNotFoundException":
4857
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4858
+ case "ServiceQuotaExceededException":
4859
+ case "com.amazonaws.connect#ServiceQuotaExceededException":
4860
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4861
+ case "ThrottlingException":
4862
+ case "com.amazonaws.connect#ThrottlingException":
4863
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
4864
+ default:
4865
+ const parsedBody = parsedOutput.body;
4866
+ return throwDefaultError({
4867
+ output,
4868
+ parsedBody,
4869
+ errorCode,
4870
+ });
4871
+ }
4872
+ };
4461
4873
  export const de_CreateHoursOfOperationCommand = async (output, context) => {
4462
4874
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4463
4875
  return de_CreateHoursOfOperationCommandError(output, context);
@@ -5218,6 +5630,94 @@ const de_CreateVocabularyCommandError = async (output, context) => {
5218
5630
  });
5219
5631
  }
5220
5632
  };
5633
+ export const de_DeactivateEvaluationFormCommand = async (output, context) => {
5634
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5635
+ return de_DeactivateEvaluationFormCommandError(output, context);
5636
+ }
5637
+ const contents = map({
5638
+ $metadata: deserializeMetadata(output),
5639
+ });
5640
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5641
+ const doc = take(data, {
5642
+ EvaluationFormArn: __expectString,
5643
+ EvaluationFormId: __expectString,
5644
+ EvaluationFormVersion: __expectInt32,
5645
+ });
5646
+ Object.assign(contents, doc);
5647
+ return contents;
5648
+ };
5649
+ const de_DeactivateEvaluationFormCommandError = async (output, context) => {
5650
+ const parsedOutput = {
5651
+ ...output,
5652
+ body: await parseErrorBody(output.body, context),
5653
+ };
5654
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5655
+ switch (errorCode) {
5656
+ case "InternalServiceException":
5657
+ case "com.amazonaws.connect#InternalServiceException":
5658
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
5659
+ case "InvalidParameterException":
5660
+ case "com.amazonaws.connect#InvalidParameterException":
5661
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5662
+ case "ResourceConflictException":
5663
+ case "com.amazonaws.connect#ResourceConflictException":
5664
+ throw await de_ResourceConflictExceptionRes(parsedOutput, context);
5665
+ case "ResourceNotFoundException":
5666
+ case "com.amazonaws.connect#ResourceNotFoundException":
5667
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5668
+ case "ThrottlingException":
5669
+ case "com.amazonaws.connect#ThrottlingException":
5670
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
5671
+ default:
5672
+ const parsedBody = parsedOutput.body;
5673
+ return throwDefaultError({
5674
+ output,
5675
+ parsedBody,
5676
+ errorCode,
5677
+ });
5678
+ }
5679
+ };
5680
+ export const de_DeleteContactEvaluationCommand = async (output, context) => {
5681
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5682
+ return de_DeleteContactEvaluationCommandError(output, context);
5683
+ }
5684
+ const contents = map({
5685
+ $metadata: deserializeMetadata(output),
5686
+ });
5687
+ await collectBody(output.body, context);
5688
+ return contents;
5689
+ };
5690
+ const de_DeleteContactEvaluationCommandError = async (output, context) => {
5691
+ const parsedOutput = {
5692
+ ...output,
5693
+ body: await parseErrorBody(output.body, context),
5694
+ };
5695
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5696
+ switch (errorCode) {
5697
+ case "InternalServiceException":
5698
+ case "com.amazonaws.connect#InternalServiceException":
5699
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
5700
+ case "InvalidParameterException":
5701
+ case "com.amazonaws.connect#InvalidParameterException":
5702
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5703
+ case "ResourceConflictException":
5704
+ case "com.amazonaws.connect#ResourceConflictException":
5705
+ throw await de_ResourceConflictExceptionRes(parsedOutput, context);
5706
+ case "ResourceNotFoundException":
5707
+ case "com.amazonaws.connect#ResourceNotFoundException":
5708
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5709
+ case "ThrottlingException":
5710
+ case "com.amazonaws.connect#ThrottlingException":
5711
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
5712
+ default:
5713
+ const parsedBody = parsedOutput.body;
5714
+ return throwDefaultError({
5715
+ output,
5716
+ parsedBody,
5717
+ errorCode,
5718
+ });
5719
+ }
5720
+ };
5221
5721
  export const de_DeleteContactFlowCommand = async (output, context) => {
5222
5722
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5223
5723
  return de_DeleteContactFlowCommandError(output, context);
@@ -5306,6 +5806,47 @@ const de_DeleteContactFlowModuleCommandError = async (output, context) => {
5306
5806
  });
5307
5807
  }
5308
5808
  };
5809
+ export const de_DeleteEvaluationFormCommand = async (output, context) => {
5810
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5811
+ return de_DeleteEvaluationFormCommandError(output, context);
5812
+ }
5813
+ const contents = map({
5814
+ $metadata: deserializeMetadata(output),
5815
+ });
5816
+ await collectBody(output.body, context);
5817
+ return contents;
5818
+ };
5819
+ const de_DeleteEvaluationFormCommandError = async (output, context) => {
5820
+ const parsedOutput = {
5821
+ ...output,
5822
+ body: await parseErrorBody(output.body, context),
5823
+ };
5824
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5825
+ switch (errorCode) {
5826
+ case "InternalServiceException":
5827
+ case "com.amazonaws.connect#InternalServiceException":
5828
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
5829
+ case "InvalidParameterException":
5830
+ case "com.amazonaws.connect#InvalidParameterException":
5831
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5832
+ case "ResourceConflictException":
5833
+ case "com.amazonaws.connect#ResourceConflictException":
5834
+ throw await de_ResourceConflictExceptionRes(parsedOutput, context);
5835
+ case "ResourceNotFoundException":
5836
+ case "com.amazonaws.connect#ResourceNotFoundException":
5837
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5838
+ case "ThrottlingException":
5839
+ case "com.amazonaws.connect#ThrottlingException":
5840
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
5841
+ default:
5842
+ const parsedBody = parsedOutput.body;
5843
+ return throwDefaultError({
5844
+ output,
5845
+ parsedBody,
5846
+ errorCode,
5847
+ });
5848
+ }
5849
+ };
5309
5850
  export const de_DeleteHoursOfOperationCommand = async (output, context) => {
5310
5851
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5311
5852
  return de_DeleteHoursOfOperationCommandError(output, context);
@@ -5894,39 +6435,34 @@ const de_DescribeContactCommandError = async (output, context) => {
5894
6435
  });
5895
6436
  }
5896
6437
  };
5897
- export const de_DescribeContactFlowCommand = async (output, context) => {
6438
+ export const de_DescribeContactEvaluationCommand = async (output, context) => {
5898
6439
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5899
- return de_DescribeContactFlowCommandError(output, context);
6440
+ return de_DescribeContactEvaluationCommandError(output, context);
5900
6441
  }
5901
6442
  const contents = map({
5902
6443
  $metadata: deserializeMetadata(output),
5903
6444
  });
5904
6445
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5905
6446
  const doc = take(data, {
5906
- ContactFlow: _json,
6447
+ Evaluation: (_) => de_Evaluation(_, context),
6448
+ EvaluationForm: (_) => de_EvaluationFormContent(_, context),
5907
6449
  });
5908
6450
  Object.assign(contents, doc);
5909
6451
  return contents;
5910
6452
  };
5911
- const de_DescribeContactFlowCommandError = async (output, context) => {
6453
+ const de_DescribeContactEvaluationCommandError = async (output, context) => {
5912
6454
  const parsedOutput = {
5913
6455
  ...output,
5914
6456
  body: await parseErrorBody(output.body, context),
5915
6457
  };
5916
6458
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5917
6459
  switch (errorCode) {
5918
- case "ContactFlowNotPublishedException":
5919
- case "com.amazonaws.connect#ContactFlowNotPublishedException":
5920
- throw await de_ContactFlowNotPublishedExceptionRes(parsedOutput, context);
5921
6460
  case "InternalServiceException":
5922
6461
  case "com.amazonaws.connect#InternalServiceException":
5923
6462
  throw await de_InternalServiceExceptionRes(parsedOutput, context);
5924
6463
  case "InvalidParameterException":
5925
6464
  case "com.amazonaws.connect#InvalidParameterException":
5926
6465
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5927
- case "InvalidRequestException":
5928
- case "com.amazonaws.connect#InvalidRequestException":
5929
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
5930
6466
  case "ResourceNotFoundException":
5931
6467
  case "com.amazonaws.connect#ResourceNotFoundException":
5932
6468
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
@@ -5942,30 +6478,30 @@ const de_DescribeContactFlowCommandError = async (output, context) => {
5942
6478
  });
5943
6479
  }
5944
6480
  };
5945
- export const de_DescribeContactFlowModuleCommand = async (output, context) => {
6481
+ export const de_DescribeContactFlowCommand = async (output, context) => {
5946
6482
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5947
- return de_DescribeContactFlowModuleCommandError(output, context);
6483
+ return de_DescribeContactFlowCommandError(output, context);
5948
6484
  }
5949
6485
  const contents = map({
5950
6486
  $metadata: deserializeMetadata(output),
5951
6487
  });
5952
6488
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5953
6489
  const doc = take(data, {
5954
- ContactFlowModule: _json,
6490
+ ContactFlow: _json,
5955
6491
  });
5956
6492
  Object.assign(contents, doc);
5957
6493
  return contents;
5958
6494
  };
5959
- const de_DescribeContactFlowModuleCommandError = async (output, context) => {
6495
+ const de_DescribeContactFlowCommandError = async (output, context) => {
5960
6496
  const parsedOutput = {
5961
6497
  ...output,
5962
6498
  body: await parseErrorBody(output.body, context),
5963
6499
  };
5964
6500
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5965
6501
  switch (errorCode) {
5966
- case "AccessDeniedException":
5967
- case "com.amazonaws.connect#AccessDeniedException":
5968
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
6502
+ case "ContactFlowNotPublishedException":
6503
+ case "com.amazonaws.connect#ContactFlowNotPublishedException":
6504
+ throw await de_ContactFlowNotPublishedExceptionRes(parsedOutput, context);
5969
6505
  case "InternalServiceException":
5970
6506
  case "com.amazonaws.connect#InternalServiceException":
5971
6507
  throw await de_InternalServiceExceptionRes(parsedOutput, context);
@@ -5990,7 +6526,97 @@ const de_DescribeContactFlowModuleCommandError = async (output, context) => {
5990
6526
  });
5991
6527
  }
5992
6528
  };
5993
- export const de_DescribeHoursOfOperationCommand = async (output, context) => {
6529
+ export const de_DescribeContactFlowModuleCommand = async (output, context) => {
6530
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6531
+ return de_DescribeContactFlowModuleCommandError(output, context);
6532
+ }
6533
+ const contents = map({
6534
+ $metadata: deserializeMetadata(output),
6535
+ });
6536
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6537
+ const doc = take(data, {
6538
+ ContactFlowModule: _json,
6539
+ });
6540
+ Object.assign(contents, doc);
6541
+ return contents;
6542
+ };
6543
+ const de_DescribeContactFlowModuleCommandError = async (output, context) => {
6544
+ const parsedOutput = {
6545
+ ...output,
6546
+ body: await parseErrorBody(output.body, context),
6547
+ };
6548
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6549
+ switch (errorCode) {
6550
+ case "AccessDeniedException":
6551
+ case "com.amazonaws.connect#AccessDeniedException":
6552
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
6553
+ case "InternalServiceException":
6554
+ case "com.amazonaws.connect#InternalServiceException":
6555
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
6556
+ case "InvalidParameterException":
6557
+ case "com.amazonaws.connect#InvalidParameterException":
6558
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
6559
+ case "InvalidRequestException":
6560
+ case "com.amazonaws.connect#InvalidRequestException":
6561
+ throw await de_InvalidRequestExceptionRes(parsedOutput, context);
6562
+ case "ResourceNotFoundException":
6563
+ case "com.amazonaws.connect#ResourceNotFoundException":
6564
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6565
+ case "ThrottlingException":
6566
+ case "com.amazonaws.connect#ThrottlingException":
6567
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
6568
+ default:
6569
+ const parsedBody = parsedOutput.body;
6570
+ return throwDefaultError({
6571
+ output,
6572
+ parsedBody,
6573
+ errorCode,
6574
+ });
6575
+ }
6576
+ };
6577
+ export const de_DescribeEvaluationFormCommand = async (output, context) => {
6578
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6579
+ return de_DescribeEvaluationFormCommandError(output, context);
6580
+ }
6581
+ const contents = map({
6582
+ $metadata: deserializeMetadata(output),
6583
+ });
6584
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
6585
+ const doc = take(data, {
6586
+ EvaluationForm: (_) => de_EvaluationForm(_, context),
6587
+ });
6588
+ Object.assign(contents, doc);
6589
+ return contents;
6590
+ };
6591
+ const de_DescribeEvaluationFormCommandError = async (output, context) => {
6592
+ const parsedOutput = {
6593
+ ...output,
6594
+ body: await parseErrorBody(output.body, context),
6595
+ };
6596
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6597
+ switch (errorCode) {
6598
+ case "InternalServiceException":
6599
+ case "com.amazonaws.connect#InternalServiceException":
6600
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
6601
+ case "InvalidParameterException":
6602
+ case "com.amazonaws.connect#InvalidParameterException":
6603
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
6604
+ case "ResourceNotFoundException":
6605
+ case "com.amazonaws.connect#ResourceNotFoundException":
6606
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
6607
+ case "ThrottlingException":
6608
+ case "com.amazonaws.connect#ThrottlingException":
6609
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
6610
+ default:
6611
+ const parsedBody = parsedOutput.body;
6612
+ return throwDefaultError({
6613
+ output,
6614
+ parsedBody,
6615
+ errorCode,
6616
+ });
6617
+ }
6618
+ };
6619
+ export const de_DescribeHoursOfOperationCommand = async (output, context) => {
5994
6620
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5995
6621
  return de_DescribeHoursOfOperationCommandError(output, context);
5996
6622
  }
@@ -7585,6 +8211,49 @@ const de_ListBotsCommandError = async (output, context) => {
7585
8211
  });
7586
8212
  }
7587
8213
  };
8214
+ export const de_ListContactEvaluationsCommand = async (output, context) => {
8215
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
8216
+ return de_ListContactEvaluationsCommandError(output, context);
8217
+ }
8218
+ const contents = map({
8219
+ $metadata: deserializeMetadata(output),
8220
+ });
8221
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
8222
+ const doc = take(data, {
8223
+ EvaluationSummaryList: (_) => de_EvaluationSummaryList(_, context),
8224
+ NextToken: __expectString,
8225
+ });
8226
+ Object.assign(contents, doc);
8227
+ return contents;
8228
+ };
8229
+ const de_ListContactEvaluationsCommandError = async (output, context) => {
8230
+ const parsedOutput = {
8231
+ ...output,
8232
+ body: await parseErrorBody(output.body, context),
8233
+ };
8234
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8235
+ switch (errorCode) {
8236
+ case "InternalServiceException":
8237
+ case "com.amazonaws.connect#InternalServiceException":
8238
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
8239
+ case "InvalidParameterException":
8240
+ case "com.amazonaws.connect#InvalidParameterException":
8241
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
8242
+ case "ResourceNotFoundException":
8243
+ case "com.amazonaws.connect#ResourceNotFoundException":
8244
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
8245
+ case "ThrottlingException":
8246
+ case "com.amazonaws.connect#ThrottlingException":
8247
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
8248
+ default:
8249
+ const parsedBody = parsedOutput.body;
8250
+ return throwDefaultError({
8251
+ output,
8252
+ parsedBody,
8253
+ errorCode,
8254
+ });
8255
+ }
8256
+ };
7588
8257
  export const de_ListContactFlowModulesCommand = async (output, context) => {
7589
8258
  if (output.statusCode !== 200 && output.statusCode >= 300) {
7590
8259
  return de_ListContactFlowModulesCommandError(output, context);
@@ -7769,6 +8438,92 @@ const de_ListDefaultVocabulariesCommandError = async (output, context) => {
7769
8438
  });
7770
8439
  }
7771
8440
  };
8441
+ export const de_ListEvaluationFormsCommand = async (output, context) => {
8442
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
8443
+ return de_ListEvaluationFormsCommandError(output, context);
8444
+ }
8445
+ const contents = map({
8446
+ $metadata: deserializeMetadata(output),
8447
+ });
8448
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
8449
+ const doc = take(data, {
8450
+ EvaluationFormSummaryList: (_) => de_EvaluationFormSummaryList(_, context),
8451
+ NextToken: __expectString,
8452
+ });
8453
+ Object.assign(contents, doc);
8454
+ return contents;
8455
+ };
8456
+ const de_ListEvaluationFormsCommandError = async (output, context) => {
8457
+ const parsedOutput = {
8458
+ ...output,
8459
+ body: await parseErrorBody(output.body, context),
8460
+ };
8461
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8462
+ switch (errorCode) {
8463
+ case "InternalServiceException":
8464
+ case "com.amazonaws.connect#InternalServiceException":
8465
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
8466
+ case "InvalidParameterException":
8467
+ case "com.amazonaws.connect#InvalidParameterException":
8468
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
8469
+ case "ResourceNotFoundException":
8470
+ case "com.amazonaws.connect#ResourceNotFoundException":
8471
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
8472
+ case "ThrottlingException":
8473
+ case "com.amazonaws.connect#ThrottlingException":
8474
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
8475
+ default:
8476
+ const parsedBody = parsedOutput.body;
8477
+ return throwDefaultError({
8478
+ output,
8479
+ parsedBody,
8480
+ errorCode,
8481
+ });
8482
+ }
8483
+ };
8484
+ export const de_ListEvaluationFormVersionsCommand = async (output, context) => {
8485
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
8486
+ return de_ListEvaluationFormVersionsCommandError(output, context);
8487
+ }
8488
+ const contents = map({
8489
+ $metadata: deserializeMetadata(output),
8490
+ });
8491
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
8492
+ const doc = take(data, {
8493
+ EvaluationFormVersionSummaryList: (_) => de_EvaluationFormVersionSummaryList(_, context),
8494
+ NextToken: __expectString,
8495
+ });
8496
+ Object.assign(contents, doc);
8497
+ return contents;
8498
+ };
8499
+ const de_ListEvaluationFormVersionsCommandError = async (output, context) => {
8500
+ const parsedOutput = {
8501
+ ...output,
8502
+ body: await parseErrorBody(output.body, context),
8503
+ };
8504
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8505
+ switch (errorCode) {
8506
+ case "InternalServiceException":
8507
+ case "com.amazonaws.connect#InternalServiceException":
8508
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
8509
+ case "InvalidParameterException":
8510
+ case "com.amazonaws.connect#InvalidParameterException":
8511
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
8512
+ case "ResourceNotFoundException":
8513
+ case "com.amazonaws.connect#ResourceNotFoundException":
8514
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
8515
+ case "ThrottlingException":
8516
+ case "com.amazonaws.connect#ThrottlingException":
8517
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
8518
+ default:
8519
+ const parsedBody = parsedOutput.body;
8520
+ return throwDefaultError({
8521
+ output,
8522
+ parsedBody,
8523
+ errorCode,
8524
+ });
8525
+ }
8526
+ };
7772
8527
  export const de_ListHoursOfOperationsCommand = async (output, context) => {
7773
8528
  if (output.statusCode !== 200 && output.statusCode >= 300) {
7774
8529
  return de_ListHoursOfOperationsCommandError(output, context);
@@ -9455,6 +10210,55 @@ const de_StartChatContactCommandError = async (output, context) => {
9455
10210
  });
9456
10211
  }
9457
10212
  };
10213
+ export const de_StartContactEvaluationCommand = async (output, context) => {
10214
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
10215
+ return de_StartContactEvaluationCommandError(output, context);
10216
+ }
10217
+ const contents = map({
10218
+ $metadata: deserializeMetadata(output),
10219
+ });
10220
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
10221
+ const doc = take(data, {
10222
+ EvaluationArn: __expectString,
10223
+ EvaluationId: __expectString,
10224
+ });
10225
+ Object.assign(contents, doc);
10226
+ return contents;
10227
+ };
10228
+ const de_StartContactEvaluationCommandError = async (output, context) => {
10229
+ const parsedOutput = {
10230
+ ...output,
10231
+ body: await parseErrorBody(output.body, context),
10232
+ };
10233
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10234
+ switch (errorCode) {
10235
+ case "InternalServiceException":
10236
+ case "com.amazonaws.connect#InternalServiceException":
10237
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
10238
+ case "InvalidParameterException":
10239
+ case "com.amazonaws.connect#InvalidParameterException":
10240
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
10241
+ case "ResourceConflictException":
10242
+ case "com.amazonaws.connect#ResourceConflictException":
10243
+ throw await de_ResourceConflictExceptionRes(parsedOutput, context);
10244
+ case "ResourceNotFoundException":
10245
+ case "com.amazonaws.connect#ResourceNotFoundException":
10246
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
10247
+ case "ServiceQuotaExceededException":
10248
+ case "com.amazonaws.connect#ServiceQuotaExceededException":
10249
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
10250
+ case "ThrottlingException":
10251
+ case "com.amazonaws.connect#ThrottlingException":
10252
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
10253
+ default:
10254
+ const parsedBody = parsedOutput.body;
10255
+ return throwDefaultError({
10256
+ output,
10257
+ parsedBody,
10258
+ errorCode,
10259
+ });
10260
+ }
10261
+ };
9458
10262
  export const de_StartContactRecordingCommand = async (output, context) => {
9459
10263
  if (output.statusCode !== 200 && output.statusCode >= 300) {
9460
10264
  return de_StartContactRecordingCommandError(output, context);
@@ -9751,6 +10555,52 @@ const de_StopContactStreamingCommandError = async (output, context) => {
9751
10555
  });
9752
10556
  }
9753
10557
  };
10558
+ export const de_SubmitContactEvaluationCommand = async (output, context) => {
10559
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
10560
+ return de_SubmitContactEvaluationCommandError(output, context);
10561
+ }
10562
+ const contents = map({
10563
+ $metadata: deserializeMetadata(output),
10564
+ });
10565
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
10566
+ const doc = take(data, {
10567
+ EvaluationArn: __expectString,
10568
+ EvaluationId: __expectString,
10569
+ });
10570
+ Object.assign(contents, doc);
10571
+ return contents;
10572
+ };
10573
+ const de_SubmitContactEvaluationCommandError = async (output, context) => {
10574
+ const parsedOutput = {
10575
+ ...output,
10576
+ body: await parseErrorBody(output.body, context),
10577
+ };
10578
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10579
+ switch (errorCode) {
10580
+ case "InternalServiceException":
10581
+ case "com.amazonaws.connect#InternalServiceException":
10582
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
10583
+ case "InvalidParameterException":
10584
+ case "com.amazonaws.connect#InvalidParameterException":
10585
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
10586
+ case "ResourceConflictException":
10587
+ case "com.amazonaws.connect#ResourceConflictException":
10588
+ throw await de_ResourceConflictExceptionRes(parsedOutput, context);
10589
+ case "ResourceNotFoundException":
10590
+ case "com.amazonaws.connect#ResourceNotFoundException":
10591
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
10592
+ case "ThrottlingException":
10593
+ case "com.amazonaws.connect#ThrottlingException":
10594
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
10595
+ default:
10596
+ const parsedBody = parsedOutput.body;
10597
+ return throwDefaultError({
10598
+ output,
10599
+ parsedBody,
10600
+ errorCode,
10601
+ });
10602
+ }
10603
+ };
9754
10604
  export const de_SuspendContactRecordingCommand = async (output, context) => {
9755
10605
  if (output.statusCode !== 200 && output.statusCode >= 300) {
9756
10606
  return de_SuspendContactRecordingCommandError(output, context);
@@ -10046,6 +10896,52 @@ const de_UpdateContactAttributesCommandError = async (output, context) => {
10046
10896
  });
10047
10897
  }
10048
10898
  };
10899
+ export const de_UpdateContactEvaluationCommand = async (output, context) => {
10900
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
10901
+ return de_UpdateContactEvaluationCommandError(output, context);
10902
+ }
10903
+ const contents = map({
10904
+ $metadata: deserializeMetadata(output),
10905
+ });
10906
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
10907
+ const doc = take(data, {
10908
+ EvaluationArn: __expectString,
10909
+ EvaluationId: __expectString,
10910
+ });
10911
+ Object.assign(contents, doc);
10912
+ return contents;
10913
+ };
10914
+ const de_UpdateContactEvaluationCommandError = async (output, context) => {
10915
+ const parsedOutput = {
10916
+ ...output,
10917
+ body: await parseErrorBody(output.body, context),
10918
+ };
10919
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10920
+ switch (errorCode) {
10921
+ case "InternalServiceException":
10922
+ case "com.amazonaws.connect#InternalServiceException":
10923
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
10924
+ case "InvalidParameterException":
10925
+ case "com.amazonaws.connect#InvalidParameterException":
10926
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
10927
+ case "ResourceConflictException":
10928
+ case "com.amazonaws.connect#ResourceConflictException":
10929
+ throw await de_ResourceConflictExceptionRes(parsedOutput, context);
10930
+ case "ResourceNotFoundException":
10931
+ case "com.amazonaws.connect#ResourceNotFoundException":
10932
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
10933
+ case "ThrottlingException":
10934
+ case "com.amazonaws.connect#ThrottlingException":
10935
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
10936
+ default:
10937
+ const parsedBody = parsedOutput.body;
10938
+ return throwDefaultError({
10939
+ output,
10940
+ parsedBody,
10941
+ errorCode,
10942
+ });
10943
+ }
10944
+ };
10049
10945
  export const de_UpdateContactFlowContentCommand = async (output, context) => {
10050
10946
  if (output.statusCode !== 200 && output.statusCode >= 300) {
10051
10947
  return de_UpdateContactFlowContentCommandError(output, context);
@@ -10313,6 +11209,56 @@ const de_UpdateContactScheduleCommandError = async (output, context) => {
10313
11209
  });
10314
11210
  }
10315
11211
  };
11212
+ export const de_UpdateEvaluationFormCommand = async (output, context) => {
11213
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
11214
+ return de_UpdateEvaluationFormCommandError(output, context);
11215
+ }
11216
+ const contents = map({
11217
+ $metadata: deserializeMetadata(output),
11218
+ });
11219
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
11220
+ const doc = take(data, {
11221
+ EvaluationFormArn: __expectString,
11222
+ EvaluationFormId: __expectString,
11223
+ EvaluationFormVersion: __expectInt32,
11224
+ });
11225
+ Object.assign(contents, doc);
11226
+ return contents;
11227
+ };
11228
+ const de_UpdateEvaluationFormCommandError = async (output, context) => {
11229
+ const parsedOutput = {
11230
+ ...output,
11231
+ body: await parseErrorBody(output.body, context),
11232
+ };
11233
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11234
+ switch (errorCode) {
11235
+ case "InternalServiceException":
11236
+ case "com.amazonaws.connect#InternalServiceException":
11237
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
11238
+ case "InvalidParameterException":
11239
+ case "com.amazonaws.connect#InvalidParameterException":
11240
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
11241
+ case "ResourceConflictException":
11242
+ case "com.amazonaws.connect#ResourceConflictException":
11243
+ throw await de_ResourceConflictExceptionRes(parsedOutput, context);
11244
+ case "ResourceNotFoundException":
11245
+ case "com.amazonaws.connect#ResourceNotFoundException":
11246
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
11247
+ case "ServiceQuotaExceededException":
11248
+ case "com.amazonaws.connect#ServiceQuotaExceededException":
11249
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
11250
+ case "ThrottlingException":
11251
+ case "com.amazonaws.connect#ThrottlingException":
11252
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
11253
+ default:
11254
+ const parsedBody = parsedOutput.body;
11255
+ return throwDefaultError({
11256
+ output,
11257
+ parsedBody,
11258
+ errorCode,
11259
+ });
11260
+ }
11261
+ };
10316
11262
  export const de_UpdateHoursOfOperationCommand = async (output, context) => {
10317
11263
  if (output.statusCode !== 200 && output.statusCode >= 300) {
10318
11264
  return de_UpdateHoursOfOperationCommandError(output, context);
@@ -11750,6 +12696,62 @@ const de_UserNotFoundExceptionRes = async (parsedOutput, context) => {
11750
12696
  });
11751
12697
  return __decorateServiceException(exception, parsedOutput.body);
11752
12698
  };
12699
+ const se_EvaluationAnswerData = (input, context) => {
12700
+ return EvaluationAnswerData.visit(input, {
12701
+ NotApplicable: (value) => ({ NotApplicable: value }),
12702
+ NumericValue: (value) => ({ NumericValue: __serializeFloat(value) }),
12703
+ StringValue: (value) => ({ StringValue: value }),
12704
+ _: (name, value) => ({ name: value }),
12705
+ });
12706
+ };
12707
+ const se_EvaluationAnswerInput = (input, context) => {
12708
+ return take(input, {
12709
+ Value: (_) => se_EvaluationAnswerData(_, context),
12710
+ });
12711
+ };
12712
+ const se_EvaluationAnswersInputMap = (input, context) => {
12713
+ return Object.entries(input).reduce((acc, [key, value]) => {
12714
+ if (value === null) {
12715
+ return acc;
12716
+ }
12717
+ acc[key] = se_EvaluationAnswerInput(value, context);
12718
+ return acc;
12719
+ }, {});
12720
+ };
12721
+ const se_EvaluationFormItem = (input, context) => {
12722
+ return EvaluationFormItem.visit(input, {
12723
+ Question: (value) => ({ Question: se_EvaluationFormQuestion(value, context) }),
12724
+ Section: (value) => ({ Section: se_EvaluationFormSection(value, context) }),
12725
+ _: (name, value) => ({ name: value }),
12726
+ });
12727
+ };
12728
+ const se_EvaluationFormItemsList = (input, context) => {
12729
+ return input
12730
+ .filter((e) => e != null)
12731
+ .map((entry) => {
12732
+ return se_EvaluationFormItem(entry, context);
12733
+ });
12734
+ };
12735
+ const se_EvaluationFormQuestion = (input, context) => {
12736
+ return take(input, {
12737
+ Instructions: [],
12738
+ NotApplicableEnabled: [],
12739
+ QuestionType: [],
12740
+ QuestionTypeProperties: _json,
12741
+ RefId: [],
12742
+ Title: [],
12743
+ Weight: __serializeFloat,
12744
+ });
12745
+ };
12746
+ const se_EvaluationFormSection = (input, context) => {
12747
+ return take(input, {
12748
+ Instructions: [],
12749
+ Items: (_) => se_EvaluationFormItemsList(_, context),
12750
+ RefId: [],
12751
+ Title: [],
12752
+ Weight: __serializeFloat,
12753
+ });
12754
+ };
11753
12755
  const se_HistoricalMetric = (input, context) => {
11754
12756
  return take(input, {
11755
12757
  Name: [],
@@ -11944,6 +12946,206 @@ const de_CurrentMetricResults = (output, context) => {
11944
12946
  });
11945
12947
  return retVal;
11946
12948
  };
12949
+ const de_Evaluation = (output, context) => {
12950
+ return take(output, {
12951
+ Answers: (_) => de_EvaluationAnswersOutputMap(_, context),
12952
+ CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
12953
+ EvaluationArn: __expectString,
12954
+ EvaluationId: __expectString,
12955
+ LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
12956
+ Metadata: (_) => de_EvaluationMetadata(_, context),
12957
+ Notes: _json,
12958
+ Scores: (_) => de_EvaluationScoresMap(_, context),
12959
+ Status: __expectString,
12960
+ Tags: _json,
12961
+ });
12962
+ };
12963
+ const de_EvaluationAnswerData = (output, context) => {
12964
+ if (__expectBoolean(output.NotApplicable) !== undefined) {
12965
+ return { NotApplicable: __expectBoolean(output.NotApplicable) };
12966
+ }
12967
+ if (__limitedParseDouble(output.NumericValue) !== undefined) {
12968
+ return { NumericValue: __limitedParseDouble(output.NumericValue) };
12969
+ }
12970
+ if (__expectString(output.StringValue) !== undefined) {
12971
+ return { StringValue: __expectString(output.StringValue) };
12972
+ }
12973
+ return { $unknown: Object.entries(output)[0] };
12974
+ };
12975
+ const de_EvaluationAnswerOutput = (output, context) => {
12976
+ return take(output, {
12977
+ SystemSuggestedValue: (_) => de_EvaluationAnswerData(__expectUnion(_), context),
12978
+ Value: (_) => de_EvaluationAnswerData(__expectUnion(_), context),
12979
+ });
12980
+ };
12981
+ const de_EvaluationAnswersOutputMap = (output, context) => {
12982
+ return Object.entries(output).reduce((acc, [key, value]) => {
12983
+ if (value === null) {
12984
+ return acc;
12985
+ }
12986
+ acc[key] = de_EvaluationAnswerOutput(value, context);
12987
+ return acc;
12988
+ }, {});
12989
+ };
12990
+ const de_EvaluationForm = (output, context) => {
12991
+ return take(output, {
12992
+ CreatedBy: __expectString,
12993
+ CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
12994
+ Description: __expectString,
12995
+ EvaluationFormArn: __expectString,
12996
+ EvaluationFormId: __expectString,
12997
+ EvaluationFormVersion: __expectInt32,
12998
+ Items: (_) => de_EvaluationFormItemsList(_, context),
12999
+ LastModifiedBy: __expectString,
13000
+ LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
13001
+ Locked: __expectBoolean,
13002
+ ScoringStrategy: _json,
13003
+ Status: __expectString,
13004
+ Tags: _json,
13005
+ Title: __expectString,
13006
+ });
13007
+ };
13008
+ const de_EvaluationFormContent = (output, context) => {
13009
+ return take(output, {
13010
+ Description: __expectString,
13011
+ EvaluationFormArn: __expectString,
13012
+ EvaluationFormId: __expectString,
13013
+ EvaluationFormVersion: __expectInt32,
13014
+ Items: (_) => de_EvaluationFormItemsList(_, context),
13015
+ ScoringStrategy: _json,
13016
+ Title: __expectString,
13017
+ });
13018
+ };
13019
+ const de_EvaluationFormItem = (output, context) => {
13020
+ if (output.Question != null) {
13021
+ return {
13022
+ Question: de_EvaluationFormQuestion(output.Question, context),
13023
+ };
13024
+ }
13025
+ if (output.Section != null) {
13026
+ return {
13027
+ Section: de_EvaluationFormSection(output.Section, context),
13028
+ };
13029
+ }
13030
+ return { $unknown: Object.entries(output)[0] };
13031
+ };
13032
+ const de_EvaluationFormItemsList = (output, context) => {
13033
+ const retVal = (output || [])
13034
+ .filter((e) => e != null)
13035
+ .map((entry) => {
13036
+ return de_EvaluationFormItem(__expectUnion(entry), context);
13037
+ });
13038
+ return retVal;
13039
+ };
13040
+ const de_EvaluationFormQuestion = (output, context) => {
13041
+ return take(output, {
13042
+ Instructions: __expectString,
13043
+ NotApplicableEnabled: __expectBoolean,
13044
+ QuestionType: __expectString,
13045
+ QuestionTypeProperties: (_) => _json(__expectUnion(_)),
13046
+ RefId: __expectString,
13047
+ Title: __expectString,
13048
+ Weight: __limitedParseDouble,
13049
+ });
13050
+ };
13051
+ const de_EvaluationFormSection = (output, context) => {
13052
+ return take(output, {
13053
+ Instructions: __expectString,
13054
+ Items: (_) => de_EvaluationFormItemsList(_, context),
13055
+ RefId: __expectString,
13056
+ Title: __expectString,
13057
+ Weight: __limitedParseDouble,
13058
+ });
13059
+ };
13060
+ const de_EvaluationFormSummary = (output, context) => {
13061
+ return take(output, {
13062
+ ActiveVersion: __expectInt32,
13063
+ CreatedBy: __expectString,
13064
+ CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
13065
+ EvaluationFormArn: __expectString,
13066
+ EvaluationFormId: __expectString,
13067
+ LastActivatedBy: __expectString,
13068
+ LastActivatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
13069
+ LastModifiedBy: __expectString,
13070
+ LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
13071
+ LatestVersion: __expectInt32,
13072
+ Title: __expectString,
13073
+ });
13074
+ };
13075
+ const de_EvaluationFormSummaryList = (output, context) => {
13076
+ const retVal = (output || [])
13077
+ .filter((e) => e != null)
13078
+ .map((entry) => {
13079
+ return de_EvaluationFormSummary(entry, context);
13080
+ });
13081
+ return retVal;
13082
+ };
13083
+ const de_EvaluationFormVersionSummary = (output, context) => {
13084
+ return take(output, {
13085
+ CreatedBy: __expectString,
13086
+ CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
13087
+ EvaluationFormArn: __expectString,
13088
+ EvaluationFormId: __expectString,
13089
+ EvaluationFormVersion: __expectInt32,
13090
+ LastModifiedBy: __expectString,
13091
+ LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
13092
+ Locked: __expectBoolean,
13093
+ Status: __expectString,
13094
+ });
13095
+ };
13096
+ const de_EvaluationFormVersionSummaryList = (output, context) => {
13097
+ const retVal = (output || [])
13098
+ .filter((e) => e != null)
13099
+ .map((entry) => {
13100
+ return de_EvaluationFormVersionSummary(entry, context);
13101
+ });
13102
+ return retVal;
13103
+ };
13104
+ const de_EvaluationMetadata = (output, context) => {
13105
+ return take(output, {
13106
+ ContactAgentId: __expectString,
13107
+ ContactId: __expectString,
13108
+ EvaluatorArn: __expectString,
13109
+ Score: (_) => de_EvaluationScore(_, context),
13110
+ });
13111
+ };
13112
+ const de_EvaluationScore = (output, context) => {
13113
+ return take(output, {
13114
+ AutomaticFail: __expectBoolean,
13115
+ NotApplicable: __expectBoolean,
13116
+ Percentage: __limitedParseDouble,
13117
+ });
13118
+ };
13119
+ const de_EvaluationScoresMap = (output, context) => {
13120
+ return Object.entries(output).reduce((acc, [key, value]) => {
13121
+ if (value === null) {
13122
+ return acc;
13123
+ }
13124
+ acc[key] = de_EvaluationScore(value, context);
13125
+ return acc;
13126
+ }, {});
13127
+ };
13128
+ const de_EvaluationSummary = (output, context) => {
13129
+ return take(output, {
13130
+ CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
13131
+ EvaluationArn: __expectString,
13132
+ EvaluationFormId: __expectString,
13133
+ EvaluationFormTitle: __expectString,
13134
+ EvaluationId: __expectString,
13135
+ EvaluatorArn: __expectString,
13136
+ LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
13137
+ Score: (_) => de_EvaluationScore(_, context),
13138
+ Status: __expectString,
13139
+ });
13140
+ };
13141
+ const de_EvaluationSummaryList = (output, context) => {
13142
+ const retVal = (output || [])
13143
+ .filter((e) => e != null)
13144
+ .map((entry) => {
13145
+ return de_EvaluationSummary(entry, context);
13146
+ });
13147
+ return retVal;
13148
+ };
11947
13149
  const de_HistoricalMetric = (output, context) => {
11948
13150
  return take(output, {
11949
13151
  Name: __expectString,