@aws-sdk/client-connect 3.40.0 → 3.45.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.
- package/CHANGELOG.md +44 -0
- package/README.md +2 -4
- package/dist-cjs/Connect.js +180 -0
- package/dist-cjs/commands/CreateContactFlowModuleCommand.js +36 -0
- package/dist-cjs/commands/DeleteContactFlowCommand.js +36 -0
- package/dist-cjs/commands/DeleteContactFlowModuleCommand.js +36 -0
- package/dist-cjs/commands/DescribeContactCommand.js +36 -0
- package/dist-cjs/commands/DescribeContactFlowModuleCommand.js +36 -0
- package/dist-cjs/commands/ListContactFlowModulesCommand.js +36 -0
- package/dist-cjs/commands/ListContactReferencesCommand.js +36 -0
- package/dist-cjs/commands/TagResourceCommand.js +2 -2
- package/dist-cjs/commands/UntagResourceCommand.js +2 -2
- package/dist-cjs/commands/UpdateAgentStatusCommand.js +2 -2
- package/dist-cjs/commands/UpdateContactAttributesCommand.js +3 -3
- package/dist-cjs/commands/UpdateContactCommand.js +36 -0
- package/dist-cjs/commands/UpdateContactFlowContentCommand.js +2 -2
- package/dist-cjs/commands/UpdateContactFlowMetadataCommand.js +36 -0
- package/dist-cjs/commands/UpdateContactFlowModuleContentCommand.js +36 -0
- package/dist-cjs/commands/UpdateContactFlowModuleMetadataCommand.js +36 -0
- package/dist-cjs/commands/UpdateContactFlowNameCommand.js +2 -2
- package/dist-cjs/commands/UpdateContactScheduleCommand.js +36 -0
- package/dist-cjs/commands/UpdateHoursOfOperationCommand.js +2 -2
- package/dist-cjs/commands/UpdateInstanceAttributeCommand.js +2 -2
- package/dist-cjs/commands/UpdateInstanceStorageConfigCommand.js +2 -2
- package/dist-cjs/commands/UpdateQueueHoursOfOperationCommand.js +2 -2
- package/dist-cjs/commands/UpdateQueueMaxContactsCommand.js +2 -2
- package/dist-cjs/commands/UpdateQueueNameCommand.js +2 -2
- package/dist-cjs/commands/UpdateQueueOutboundCallerConfigCommand.js +2 -2
- package/dist-cjs/commands/UpdateQueueStatusCommand.js +2 -2
- package/dist-cjs/commands/UpdateQuickConnectConfigCommand.js +2 -2
- package/dist-cjs/commands/UpdateQuickConnectNameCommand.js +2 -2
- package/dist-cjs/commands/UpdateRoutingProfileConcurrencyCommand.js +2 -2
- package/dist-cjs/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.js +2 -2
- package/dist-cjs/commands/UpdateRoutingProfileNameCommand.js +2 -2
- package/dist-cjs/commands/UpdateRoutingProfileQueuesCommand.js +2 -2
- package/dist-cjs/commands/UpdateSecurityProfileCommand.js +2 -2
- package/dist-cjs/commands/UpdateUserHierarchyCommand.js +2 -2
- package/dist-cjs/commands/UpdateUserHierarchyGroupNameCommand.js +2 -2
- package/dist-cjs/commands/UpdateUserHierarchyStructureCommand.js +2 -2
- package/dist-cjs/commands/UpdateUserIdentityInfoCommand.js +2 -2
- package/dist-cjs/commands/index.js +12 -0
- package/dist-cjs/endpoints.js +9 -0
- package/dist-cjs/models/models_0.js +193 -178
- package/dist-cjs/models/models_1.js +223 -1
- package/dist-cjs/pagination/ListContactFlowModulesPaginator.js +35 -0
- package/dist-cjs/pagination/ListContactReferencesPaginator.js +34 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1829 -169
- package/dist-es/Connect.js +180 -0
- package/dist-es/commands/CreateContactFlowModuleCommand.js +39 -0
- package/dist-es/commands/DeleteContactFlowCommand.js +39 -0
- package/dist-es/commands/DeleteContactFlowModuleCommand.js +39 -0
- package/dist-es/commands/DescribeContactCommand.js +39 -0
- package/dist-es/commands/DescribeContactFlowModuleCommand.js +39 -0
- package/dist-es/commands/ListContactFlowModulesCommand.js +39 -0
- package/dist-es/commands/ListContactReferencesCommand.js +39 -0
- package/dist-es/commands/TagResourceCommand.js +1 -1
- package/dist-es/commands/UntagResourceCommand.js +1 -1
- package/dist-es/commands/UpdateAgentStatusCommand.js +1 -1
- package/dist-es/commands/UpdateContactAttributesCommand.js +1 -1
- package/dist-es/commands/UpdateContactCommand.js +39 -0
- package/dist-es/commands/UpdateContactFlowContentCommand.js +1 -1
- package/dist-es/commands/UpdateContactFlowMetadataCommand.js +39 -0
- package/dist-es/commands/UpdateContactFlowModuleContentCommand.js +39 -0
- package/dist-es/commands/UpdateContactFlowModuleMetadataCommand.js +39 -0
- package/dist-es/commands/UpdateContactFlowNameCommand.js +1 -1
- package/dist-es/commands/UpdateContactScheduleCommand.js +39 -0
- package/dist-es/commands/UpdateHoursOfOperationCommand.js +1 -1
- package/dist-es/commands/UpdateInstanceAttributeCommand.js +1 -1
- package/dist-es/commands/UpdateInstanceStorageConfigCommand.js +1 -1
- package/dist-es/commands/UpdateQueueHoursOfOperationCommand.js +1 -1
- package/dist-es/commands/UpdateQueueMaxContactsCommand.js +1 -1
- package/dist-es/commands/UpdateQueueNameCommand.js +1 -1
- package/dist-es/commands/UpdateQueueOutboundCallerConfigCommand.js +1 -1
- package/dist-es/commands/UpdateQueueStatusCommand.js +1 -1
- package/dist-es/commands/UpdateQuickConnectConfigCommand.js +1 -1
- package/dist-es/commands/UpdateQuickConnectNameCommand.js +1 -1
- package/dist-es/commands/UpdateRoutingProfileConcurrencyCommand.js +1 -1
- package/dist-es/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.js +1 -1
- package/dist-es/commands/UpdateRoutingProfileNameCommand.js +1 -1
- package/dist-es/commands/UpdateRoutingProfileQueuesCommand.js +1 -1
- package/dist-es/commands/UpdateSecurityProfileCommand.js +1 -1
- package/dist-es/commands/UpdateUserHierarchyCommand.js +1 -1
- package/dist-es/commands/UpdateUserHierarchyGroupNameCommand.js +1 -1
- package/dist-es/commands/UpdateUserHierarchyStructureCommand.js +1 -1
- package/dist-es/commands/UpdateUserIdentityInfoCommand.js +1 -1
- package/dist-es/commands/index.js +12 -0
- package/dist-es/endpoints.js +9 -0
- package/dist-es/models/models_0.js +143 -116
- package/dist-es/models/models_1.js +148 -0
- package/dist-es/pagination/ListContactFlowModulesPaginator.js +74 -0
- package/dist-es/pagination/ListContactReferencesPaginator.js +73 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +2179 -332
- package/dist-types/Connect.d.ts +112 -14
- package/dist-types/ConnectClient.d.ts +17 -7
- package/dist-types/commands/AssociateApprovedOriginCommand.d.ts +1 -1
- package/dist-types/commands/AssociateBotCommand.d.ts +1 -1
- package/dist-types/commands/AssociateInstanceStorageConfigCommand.d.ts +1 -1
- package/dist-types/commands/AssociateLambdaFunctionCommand.d.ts +1 -1
- package/dist-types/commands/AssociateLexBotCommand.d.ts +1 -1
- package/dist-types/commands/AssociateQueueQuickConnectsCommand.d.ts +1 -1
- package/dist-types/commands/AssociateRoutingProfileQueuesCommand.d.ts +1 -1
- package/dist-types/commands/AssociateSecurityKeyCommand.d.ts +1 -1
- package/dist-types/commands/CreateAgentStatusCommand.d.ts +1 -1
- package/dist-types/commands/CreateContactFlowCommand.d.ts +1 -1
- package/dist-types/commands/CreateContactFlowModuleCommand.d.ts +35 -0
- package/dist-types/commands/CreateHoursOfOperationCommand.d.ts +3 -2
- package/dist-types/commands/CreateInstanceCommand.d.ts +1 -1
- package/dist-types/commands/CreateIntegrationAssociationCommand.d.ts +2 -2
- package/dist-types/commands/CreateQueueCommand.d.ts +1 -1
- package/dist-types/commands/CreateQuickConnectCommand.d.ts +1 -1
- package/dist-types/commands/CreateRoutingProfileCommand.d.ts +1 -1
- package/dist-types/commands/CreateSecurityProfileCommand.d.ts +1 -1
- package/dist-types/commands/CreateUseCaseCommand.d.ts +1 -1
- package/dist-types/commands/CreateUserCommand.d.ts +1 -1
- package/dist-types/commands/CreateUserHierarchyGroupCommand.d.ts +1 -1
- package/dist-types/commands/DeleteContactFlowCommand.d.ts +35 -0
- package/dist-types/commands/DeleteContactFlowModuleCommand.d.ts +35 -0
- package/dist-types/commands/DeleteHoursOfOperationCommand.d.ts +3 -2
- package/dist-types/commands/DeleteInstanceCommand.d.ts +1 -1
- package/dist-types/commands/DeleteIntegrationAssociationCommand.d.ts +2 -2
- package/dist-types/commands/DeleteQuickConnectCommand.d.ts +1 -1
- package/dist-types/commands/DeleteSecurityProfileCommand.d.ts +1 -1
- package/dist-types/commands/DeleteUseCaseCommand.d.ts +1 -1
- package/dist-types/commands/DeleteUserCommand.d.ts +1 -1
- package/dist-types/commands/DeleteUserHierarchyGroupCommand.d.ts +1 -1
- package/dist-types/commands/DescribeAgentStatusCommand.d.ts +1 -1
- package/dist-types/commands/DescribeContactCommand.d.ts +40 -0
- package/dist-types/commands/DescribeContactFlowCommand.d.ts +1 -1
- package/dist-types/commands/DescribeContactFlowModuleCommand.d.ts +35 -0
- package/dist-types/commands/DescribeHoursOfOperationCommand.d.ts +3 -2
- package/dist-types/commands/DescribeInstanceAttributeCommand.d.ts +1 -1
- package/dist-types/commands/DescribeInstanceCommand.d.ts +1 -1
- package/dist-types/commands/DescribeInstanceStorageConfigCommand.d.ts +1 -1
- package/dist-types/commands/DescribeQueueCommand.d.ts +1 -1
- package/dist-types/commands/DescribeQuickConnectCommand.d.ts +1 -1
- package/dist-types/commands/DescribeRoutingProfileCommand.d.ts +1 -1
- package/dist-types/commands/DescribeSecurityProfileCommand.d.ts +1 -1
- package/dist-types/commands/DescribeUserCommand.d.ts +1 -1
- package/dist-types/commands/DescribeUserHierarchyGroupCommand.d.ts +1 -1
- package/dist-types/commands/DescribeUserHierarchyStructureCommand.d.ts +1 -1
- package/dist-types/commands/DisassociateApprovedOriginCommand.d.ts +1 -1
- package/dist-types/commands/DisassociateBotCommand.d.ts +1 -1
- package/dist-types/commands/DisassociateInstanceStorageConfigCommand.d.ts +1 -1
- package/dist-types/commands/DisassociateLambdaFunctionCommand.d.ts +1 -1
- package/dist-types/commands/DisassociateLexBotCommand.d.ts +1 -1
- package/dist-types/commands/DisassociateQueueQuickConnectsCommand.d.ts +1 -1
- package/dist-types/commands/DisassociateRoutingProfileQueuesCommand.d.ts +1 -1
- package/dist-types/commands/DisassociateSecurityKeyCommand.d.ts +1 -1
- package/dist-types/commands/GetContactAttributesCommand.d.ts +1 -1
- package/dist-types/commands/GetCurrentMetricDataCommand.d.ts +1 -1
- package/dist-types/commands/GetFederationTokenCommand.d.ts +1 -1
- package/dist-types/commands/GetMetricDataCommand.d.ts +1 -1
- package/dist-types/commands/ListAgentStatusesCommand.d.ts +1 -1
- package/dist-types/commands/ListApprovedOriginsCommand.d.ts +1 -1
- package/dist-types/commands/ListBotsCommand.d.ts +1 -1
- package/dist-types/commands/ListContactFlowModulesCommand.d.ts +35 -0
- package/dist-types/commands/ListContactFlowsCommand.d.ts +1 -1
- package/dist-types/commands/ListContactReferencesCommand.d.ts +37 -0
- package/dist-types/commands/ListHoursOfOperationsCommand.d.ts +1 -1
- package/dist-types/commands/ListInstanceAttributesCommand.d.ts +1 -1
- package/dist-types/commands/ListInstanceStorageConfigsCommand.d.ts +1 -1
- package/dist-types/commands/ListInstancesCommand.d.ts +1 -1
- package/dist-types/commands/ListIntegrationAssociationsCommand.d.ts +2 -2
- package/dist-types/commands/ListLambdaFunctionsCommand.d.ts +1 -1
- package/dist-types/commands/ListLexBotsCommand.d.ts +1 -1
- package/dist-types/commands/ListPhoneNumbersCommand.d.ts +1 -1
- package/dist-types/commands/ListPromptsCommand.d.ts +1 -1
- package/dist-types/commands/ListQueueQuickConnectsCommand.d.ts +1 -1
- package/dist-types/commands/ListQueuesCommand.d.ts +1 -1
- package/dist-types/commands/ListQuickConnectsCommand.d.ts +1 -1
- package/dist-types/commands/ListRoutingProfileQueuesCommand.d.ts +1 -1
- package/dist-types/commands/ListRoutingProfilesCommand.d.ts +1 -1
- package/dist-types/commands/ListSecurityKeysCommand.d.ts +1 -1
- package/dist-types/commands/ListSecurityProfilePermissionsCommand.d.ts +1 -1
- package/dist-types/commands/ListSecurityProfilesCommand.d.ts +2 -3
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/dist-types/commands/ListUseCasesCommand.d.ts +1 -1
- package/dist-types/commands/ListUserHierarchyGroupsCommand.d.ts +1 -1
- package/dist-types/commands/ListUsersCommand.d.ts +1 -1
- package/dist-types/commands/ResumeContactRecordingCommand.d.ts +1 -1
- package/dist-types/commands/StartChatContactCommand.d.ts +1 -1
- package/dist-types/commands/StartContactRecordingCommand.d.ts +1 -1
- package/dist-types/commands/StartContactStreamingCommand.d.ts +1 -1
- package/dist-types/commands/StartOutboundVoiceContactCommand.d.ts +1 -1
- package/dist-types/commands/StartTaskContactCommand.d.ts +1 -1
- package/dist-types/commands/StopContactCommand.d.ts +1 -1
- package/dist-types/commands/StopContactRecordingCommand.d.ts +1 -1
- package/dist-types/commands/StopContactStreamingCommand.d.ts +1 -1
- package/dist-types/commands/SuspendContactRecordingCommand.d.ts +1 -1
- package/dist-types/commands/TagResourceCommand.d.ts +2 -2
- package/dist-types/commands/UntagResourceCommand.d.ts +2 -2
- package/dist-types/commands/UpdateAgentStatusCommand.d.ts +2 -2
- package/dist-types/commands/UpdateContactAttributesCommand.d.ts +2 -2
- package/dist-types/commands/UpdateContactCommand.d.ts +41 -0
- package/dist-types/commands/UpdateContactFlowContentCommand.d.ts +2 -2
- package/dist-types/commands/UpdateContactFlowMetadataCommand.d.ts +35 -0
- package/dist-types/commands/UpdateContactFlowModuleContentCommand.d.ts +35 -0
- package/dist-types/commands/UpdateContactFlowModuleMetadataCommand.d.ts +35 -0
- package/dist-types/commands/UpdateContactFlowNameCommand.d.ts +2 -2
- package/dist-types/commands/UpdateContactScheduleCommand.d.ts +35 -0
- package/dist-types/commands/UpdateHoursOfOperationCommand.d.ts +4 -3
- package/dist-types/commands/UpdateInstanceAttributeCommand.d.ts +2 -2
- package/dist-types/commands/UpdateInstanceStorageConfigCommand.d.ts +2 -2
- package/dist-types/commands/UpdateQueueHoursOfOperationCommand.d.ts +2 -2
- package/dist-types/commands/UpdateQueueMaxContactsCommand.d.ts +2 -2
- package/dist-types/commands/UpdateQueueNameCommand.d.ts +2 -2
- package/dist-types/commands/UpdateQueueOutboundCallerConfigCommand.d.ts +2 -2
- package/dist-types/commands/UpdateQueueStatusCommand.d.ts +2 -2
- package/dist-types/commands/UpdateQuickConnectConfigCommand.d.ts +2 -2
- package/dist-types/commands/UpdateQuickConnectNameCommand.d.ts +2 -2
- package/dist-types/commands/UpdateRoutingProfileConcurrencyCommand.d.ts +2 -2
- package/dist-types/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.d.ts +2 -2
- package/dist-types/commands/UpdateRoutingProfileNameCommand.d.ts +2 -2
- package/dist-types/commands/UpdateRoutingProfileQueuesCommand.d.ts +2 -2
- package/dist-types/commands/UpdateSecurityProfileCommand.d.ts +2 -2
- package/dist-types/commands/UpdateUserHierarchyCommand.d.ts +2 -2
- package/dist-types/commands/UpdateUserHierarchyGroupNameCommand.d.ts +2 -2
- package/dist-types/commands/UpdateUserHierarchyStructureCommand.d.ts +2 -2
- package/dist-types/commands/UpdateUserIdentityInfoCommand.d.ts +2 -2
- package/dist-types/commands/UpdateUserPhoneConfigCommand.d.ts +1 -1
- package/dist-types/commands/UpdateUserRoutingProfileCommand.d.ts +1 -1
- package/dist-types/commands/UpdateUserSecurityProfilesCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +12 -0
- package/dist-types/models/models_0.d.ts +592 -643
- package/dist-types/models/models_1.d.ts +771 -1
- package/dist-types/pagination/ListContactFlowModulesPaginator.d.ts +4 -0
- package/dist-types/pagination/ListContactReferencesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
- package/dist-types/ts3.4/Connect.d.ts +60 -0
- package/dist-types/ts3.4/ConnectClient.d.ts +14 -2
- package/dist-types/ts3.4/commands/CreateContactFlowModuleCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteContactFlowCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteContactFlowModuleCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeContactCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeContactFlowModuleCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListContactFlowModulesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListContactReferencesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateAgentStatusCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateContactAttributesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateContactCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateContactFlowContentCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateContactFlowMetadataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateContactFlowModuleContentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateContactFlowModuleMetadataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateContactFlowNameCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateContactScheduleCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateHoursOfOperationCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateInstanceAttributeCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateInstanceStorageConfigCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateQueueHoursOfOperationCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateQueueMaxContactsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateQueueNameCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateQueueOutboundCallerConfigCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateQueueStatusCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateQuickConnectConfigCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateQuickConnectNameCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateRoutingProfileConcurrencyCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateRoutingProfileNameCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateRoutingProfileQueuesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateSecurityProfileCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateUserHierarchyCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateUserHierarchyGroupNameCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateUserHierarchyStructureCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateUserIdentityInfoCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/index.d.ts +12 -0
- package/dist-types/ts3.4/models/models_0.d.ts +347 -359
- package/dist-types/ts3.4/models/models_1.d.ts +455 -1
- package/dist-types/ts3.4/pagination/ListContactFlowModulesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListContactReferencesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
export var serializeAws_restJson1AssociateApprovedOriginCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6
6
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
@@ -376,6 +376,41 @@ export var serializeAws_restJson1CreateContactFlowCommand = function (input, con
|
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
378
|
}); };
|
|
379
|
+
export var serializeAws_restJson1CreateContactFlowModuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
380
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
381
|
+
var _c;
|
|
382
|
+
return __generator(this, function (_d) {
|
|
383
|
+
switch (_d.label) {
|
|
384
|
+
case 0: return [4, context.endpoint()];
|
|
385
|
+
case 1:
|
|
386
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
387
|
+
headers = {
|
|
388
|
+
"content-type": "application/json",
|
|
389
|
+
};
|
|
390
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact-flow-modules/{InstanceId}";
|
|
391
|
+
if (input.InstanceId !== undefined) {
|
|
392
|
+
labelValue = input.InstanceId;
|
|
393
|
+
if (labelValue.length <= 0) {
|
|
394
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
395
|
+
}
|
|
396
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
400
|
+
}
|
|
401
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Content !== undefined && input.Content !== null && { Content: input.Content })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
402
|
+
return [2, new __HttpRequest({
|
|
403
|
+
protocol: protocol,
|
|
404
|
+
hostname: hostname,
|
|
405
|
+
port: port,
|
|
406
|
+
method: "PUT",
|
|
407
|
+
headers: headers,
|
|
408
|
+
path: resolvedPath,
|
|
409
|
+
body: body,
|
|
410
|
+
})];
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
}); };
|
|
379
414
|
export var serializeAws_restJson1CreateHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
380
415
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
381
416
|
return __generator(this, function (_c) {
|
|
@@ -755,6 +790,90 @@ export var serializeAws_restJson1CreateUserHierarchyGroupCommand = function (inp
|
|
|
755
790
|
}
|
|
756
791
|
});
|
|
757
792
|
}); };
|
|
793
|
+
export var serializeAws_restJson1DeleteContactFlowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
794
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
795
|
+
return __generator(this, function (_c) {
|
|
796
|
+
switch (_c.label) {
|
|
797
|
+
case 0: return [4, context.endpoint()];
|
|
798
|
+
case 1:
|
|
799
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
800
|
+
headers = {};
|
|
801
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
802
|
+
"/contact-flows/{InstanceId}/{ContactFlowId}";
|
|
803
|
+
if (input.InstanceId !== undefined) {
|
|
804
|
+
labelValue = input.InstanceId;
|
|
805
|
+
if (labelValue.length <= 0) {
|
|
806
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
807
|
+
}
|
|
808
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
809
|
+
}
|
|
810
|
+
else {
|
|
811
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
812
|
+
}
|
|
813
|
+
if (input.ContactFlowId !== undefined) {
|
|
814
|
+
labelValue = input.ContactFlowId;
|
|
815
|
+
if (labelValue.length <= 0) {
|
|
816
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowId.");
|
|
817
|
+
}
|
|
818
|
+
resolvedPath = resolvedPath.replace("{ContactFlowId}", __extendedEncodeURIComponent(labelValue));
|
|
819
|
+
}
|
|
820
|
+
else {
|
|
821
|
+
throw new Error("No value provided for input HTTP label: ContactFlowId.");
|
|
822
|
+
}
|
|
823
|
+
return [2, new __HttpRequest({
|
|
824
|
+
protocol: protocol,
|
|
825
|
+
hostname: hostname,
|
|
826
|
+
port: port,
|
|
827
|
+
method: "DELETE",
|
|
828
|
+
headers: headers,
|
|
829
|
+
path: resolvedPath,
|
|
830
|
+
body: body,
|
|
831
|
+
})];
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
}); };
|
|
835
|
+
export var serializeAws_restJson1DeleteContactFlowModuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
836
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
837
|
+
return __generator(this, function (_c) {
|
|
838
|
+
switch (_c.label) {
|
|
839
|
+
case 0: return [4, context.endpoint()];
|
|
840
|
+
case 1:
|
|
841
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
842
|
+
headers = {};
|
|
843
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
844
|
+
"/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}";
|
|
845
|
+
if (input.InstanceId !== undefined) {
|
|
846
|
+
labelValue = input.InstanceId;
|
|
847
|
+
if (labelValue.length <= 0) {
|
|
848
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
849
|
+
}
|
|
850
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
851
|
+
}
|
|
852
|
+
else {
|
|
853
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
854
|
+
}
|
|
855
|
+
if (input.ContactFlowModuleId !== undefined) {
|
|
856
|
+
labelValue = input.ContactFlowModuleId;
|
|
857
|
+
if (labelValue.length <= 0) {
|
|
858
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
|
|
859
|
+
}
|
|
860
|
+
resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
|
|
861
|
+
}
|
|
862
|
+
else {
|
|
863
|
+
throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
|
|
864
|
+
}
|
|
865
|
+
return [2, new __HttpRequest({
|
|
866
|
+
protocol: protocol,
|
|
867
|
+
hostname: hostname,
|
|
868
|
+
port: port,
|
|
869
|
+
method: "DELETE",
|
|
870
|
+
headers: headers,
|
|
871
|
+
path: resolvedPath,
|
|
872
|
+
body: body,
|
|
873
|
+
})];
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
}); };
|
|
758
877
|
export var serializeAws_restJson1DeleteHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
759
878
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
760
879
|
return __generator(this, function (_c) {
|
|
@@ -1131,6 +1250,47 @@ export var serializeAws_restJson1DescribeAgentStatusCommand = function (input, c
|
|
|
1131
1250
|
}
|
|
1132
1251
|
});
|
|
1133
1252
|
}); };
|
|
1253
|
+
export var serializeAws_restJson1DescribeContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1254
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1255
|
+
return __generator(this, function (_c) {
|
|
1256
|
+
switch (_c.label) {
|
|
1257
|
+
case 0: return [4, context.endpoint()];
|
|
1258
|
+
case 1:
|
|
1259
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1260
|
+
headers = {};
|
|
1261
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contacts/{InstanceId}/{ContactId}";
|
|
1262
|
+
if (input.InstanceId !== undefined) {
|
|
1263
|
+
labelValue = input.InstanceId;
|
|
1264
|
+
if (labelValue.length <= 0) {
|
|
1265
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
1266
|
+
}
|
|
1267
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
1268
|
+
}
|
|
1269
|
+
else {
|
|
1270
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
1271
|
+
}
|
|
1272
|
+
if (input.ContactId !== undefined) {
|
|
1273
|
+
labelValue = input.ContactId;
|
|
1274
|
+
if (labelValue.length <= 0) {
|
|
1275
|
+
throw new Error("Empty value provided for input HTTP label: ContactId.");
|
|
1276
|
+
}
|
|
1277
|
+
resolvedPath = resolvedPath.replace("{ContactId}", __extendedEncodeURIComponent(labelValue));
|
|
1278
|
+
}
|
|
1279
|
+
else {
|
|
1280
|
+
throw new Error("No value provided for input HTTP label: ContactId.");
|
|
1281
|
+
}
|
|
1282
|
+
return [2, new __HttpRequest({
|
|
1283
|
+
protocol: protocol,
|
|
1284
|
+
hostname: hostname,
|
|
1285
|
+
port: port,
|
|
1286
|
+
method: "GET",
|
|
1287
|
+
headers: headers,
|
|
1288
|
+
path: resolvedPath,
|
|
1289
|
+
body: body,
|
|
1290
|
+
})];
|
|
1291
|
+
}
|
|
1292
|
+
});
|
|
1293
|
+
}); };
|
|
1134
1294
|
export var serializeAws_restJson1DescribeContactFlowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1135
1295
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1136
1296
|
return __generator(this, function (_c) {
|
|
@@ -1173,6 +1333,48 @@ export var serializeAws_restJson1DescribeContactFlowCommand = function (input, c
|
|
|
1173
1333
|
}
|
|
1174
1334
|
});
|
|
1175
1335
|
}); };
|
|
1336
|
+
export var serializeAws_restJson1DescribeContactFlowModuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1337
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1338
|
+
return __generator(this, function (_c) {
|
|
1339
|
+
switch (_c.label) {
|
|
1340
|
+
case 0: return [4, context.endpoint()];
|
|
1341
|
+
case 1:
|
|
1342
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1343
|
+
headers = {};
|
|
1344
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
1345
|
+
"/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}";
|
|
1346
|
+
if (input.InstanceId !== undefined) {
|
|
1347
|
+
labelValue = input.InstanceId;
|
|
1348
|
+
if (labelValue.length <= 0) {
|
|
1349
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
1350
|
+
}
|
|
1351
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
1352
|
+
}
|
|
1353
|
+
else {
|
|
1354
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
1355
|
+
}
|
|
1356
|
+
if (input.ContactFlowModuleId !== undefined) {
|
|
1357
|
+
labelValue = input.ContactFlowModuleId;
|
|
1358
|
+
if (labelValue.length <= 0) {
|
|
1359
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
|
|
1360
|
+
}
|
|
1361
|
+
resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
|
|
1362
|
+
}
|
|
1363
|
+
else {
|
|
1364
|
+
throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
|
|
1365
|
+
}
|
|
1366
|
+
return [2, new __HttpRequest({
|
|
1367
|
+
protocol: protocol,
|
|
1368
|
+
hostname: hostname,
|
|
1369
|
+
port: port,
|
|
1370
|
+
method: "GET",
|
|
1371
|
+
headers: headers,
|
|
1372
|
+
path: resolvedPath,
|
|
1373
|
+
body: body,
|
|
1374
|
+
})];
|
|
1375
|
+
}
|
|
1376
|
+
});
|
|
1377
|
+
}); };
|
|
1176
1378
|
export var serializeAws_restJson1DescribeHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1177
1379
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1178
1380
|
return __generator(this, function (_c) {
|
|
@@ -2184,6 +2386,40 @@ export var serializeAws_restJson1ListBotsCommand = function (input, context) { r
|
|
|
2184
2386
|
}
|
|
2185
2387
|
});
|
|
2186
2388
|
}); };
|
|
2389
|
+
export var serializeAws_restJson1ListContactFlowModulesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2390
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2391
|
+
return __generator(this, function (_c) {
|
|
2392
|
+
switch (_c.label) {
|
|
2393
|
+
case 0: return [4, context.endpoint()];
|
|
2394
|
+
case 1:
|
|
2395
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2396
|
+
headers = {};
|
|
2397
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2398
|
+
"/contact-flow-modules-summary/{InstanceId}";
|
|
2399
|
+
if (input.InstanceId !== undefined) {
|
|
2400
|
+
labelValue = input.InstanceId;
|
|
2401
|
+
if (labelValue.length <= 0) {
|
|
2402
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
2403
|
+
}
|
|
2404
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
2405
|
+
}
|
|
2406
|
+
else {
|
|
2407
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
2408
|
+
}
|
|
2409
|
+
query = __assign(__assign(__assign({}, (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.ContactFlowModuleState !== undefined && { state: input.ContactFlowModuleState }));
|
|
2410
|
+
return [2, new __HttpRequest({
|
|
2411
|
+
protocol: protocol,
|
|
2412
|
+
hostname: hostname,
|
|
2413
|
+
port: port,
|
|
2414
|
+
method: "GET",
|
|
2415
|
+
headers: headers,
|
|
2416
|
+
path: resolvedPath,
|
|
2417
|
+
query: query,
|
|
2418
|
+
body: body,
|
|
2419
|
+
})];
|
|
2420
|
+
}
|
|
2421
|
+
});
|
|
2422
|
+
}); };
|
|
2187
2423
|
export var serializeAws_restJson1ListContactFlowsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2188
2424
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2189
2425
|
return __generator(this, function (_c) {
|
|
@@ -2219,6 +2455,52 @@ export var serializeAws_restJson1ListContactFlowsCommand = function (input, cont
|
|
|
2219
2455
|
}
|
|
2220
2456
|
});
|
|
2221
2457
|
}); };
|
|
2458
|
+
export var serializeAws_restJson1ListContactReferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2459
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
2460
|
+
return __generator(this, function (_c) {
|
|
2461
|
+
switch (_c.label) {
|
|
2462
|
+
case 0: return [4, context.endpoint()];
|
|
2463
|
+
case 1:
|
|
2464
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2465
|
+
headers = {};
|
|
2466
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2467
|
+
"/contact/references/{InstanceId}/{ContactId}";
|
|
2468
|
+
if (input.InstanceId !== undefined) {
|
|
2469
|
+
labelValue = input.InstanceId;
|
|
2470
|
+
if (labelValue.length <= 0) {
|
|
2471
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
2472
|
+
}
|
|
2473
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
2474
|
+
}
|
|
2475
|
+
else {
|
|
2476
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
2477
|
+
}
|
|
2478
|
+
if (input.ContactId !== undefined) {
|
|
2479
|
+
labelValue = input.ContactId;
|
|
2480
|
+
if (labelValue.length <= 0) {
|
|
2481
|
+
throw new Error("Empty value provided for input HTTP label: ContactId.");
|
|
2482
|
+
}
|
|
2483
|
+
resolvedPath = resolvedPath.replace("{ContactId}", __extendedEncodeURIComponent(labelValue));
|
|
2484
|
+
}
|
|
2485
|
+
else {
|
|
2486
|
+
throw new Error("No value provided for input HTTP label: ContactId.");
|
|
2487
|
+
}
|
|
2488
|
+
query = __assign(__assign({}, (input.ReferenceTypes !== undefined && {
|
|
2489
|
+
referenceTypes: (input.ReferenceTypes || []).map(function (_entry) { return _entry; }),
|
|
2490
|
+
})), (input.NextToken !== undefined && { nextToken: input.NextToken }));
|
|
2491
|
+
return [2, new __HttpRequest({
|
|
2492
|
+
protocol: protocol,
|
|
2493
|
+
hostname: hostname,
|
|
2494
|
+
port: port,
|
|
2495
|
+
method: "GET",
|
|
2496
|
+
headers: headers,
|
|
2497
|
+
path: resolvedPath,
|
|
2498
|
+
query: query,
|
|
2499
|
+
body: body,
|
|
2500
|
+
})];
|
|
2501
|
+
}
|
|
2502
|
+
});
|
|
2503
|
+
}); };
|
|
2222
2504
|
export var serializeAws_restJson1ListHoursOfOperationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2223
2505
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2224
2506
|
return __generator(this, function (_c) {
|
|
@@ -3108,10 +3390,11 @@ export var serializeAws_restJson1StartTaskContactCommand = function (input, cont
|
|
|
3108
3390
|
"content-type": "application/json",
|
|
3109
3391
|
};
|
|
3110
3392
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/task";
|
|
3111
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Attributes !== undefined &&
|
|
3393
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Attributes !== undefined &&
|
|
3112
3394
|
input.Attributes !== null && { Attributes: serializeAws_restJson1Attributes(input.Attributes, context) })), { ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.PreviousContactId !== undefined &&
|
|
3113
3395
|
input.PreviousContactId !== null && { PreviousContactId: input.PreviousContactId })), (input.References !== undefined &&
|
|
3114
|
-
input.References !== null && { References: serializeAws_restJson1ContactReferences(input.References, context) }))
|
|
3396
|
+
input.References !== null && { References: serializeAws_restJson1ContactReferences(input.References, context) })), (input.ScheduledTime !== undefined &&
|
|
3397
|
+
input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) })));
|
|
3115
3398
|
return [2, new __HttpRequest({
|
|
3116
3399
|
protocol: protocol,
|
|
3117
3400
|
hostname: hostname,
|
|
@@ -3335,8 +3618,8 @@ export var serializeAws_restJson1UpdateAgentStatusCommand = function (input, con
|
|
|
3335
3618
|
}
|
|
3336
3619
|
});
|
|
3337
3620
|
}); };
|
|
3338
|
-
export var
|
|
3339
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
3621
|
+
export var serializeAws_restJson1UpdateContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3622
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3340
3623
|
return __generator(this, function (_c) {
|
|
3341
3624
|
switch (_c.label) {
|
|
3342
3625
|
case 0: return [4, context.endpoint()];
|
|
@@ -3345,14 +3628,59 @@ export var serializeAws_restJson1UpdateContactAttributesCommand = function (inpu
|
|
|
3345
3628
|
headers = {
|
|
3346
3629
|
"content-type": "application/json",
|
|
3347
3630
|
};
|
|
3348
|
-
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3631
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contacts/{InstanceId}/{ContactId}";
|
|
3632
|
+
if (input.InstanceId !== undefined) {
|
|
3633
|
+
labelValue = input.InstanceId;
|
|
3634
|
+
if (labelValue.length <= 0) {
|
|
3635
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
3636
|
+
}
|
|
3637
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
3638
|
+
}
|
|
3639
|
+
else {
|
|
3640
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3641
|
+
}
|
|
3642
|
+
if (input.ContactId !== undefined) {
|
|
3643
|
+
labelValue = input.ContactId;
|
|
3644
|
+
if (labelValue.length <= 0) {
|
|
3645
|
+
throw new Error("Empty value provided for input HTTP label: ContactId.");
|
|
3646
|
+
}
|
|
3647
|
+
resolvedPath = resolvedPath.replace("{ContactId}", __extendedEncodeURIComponent(labelValue));
|
|
3648
|
+
}
|
|
3649
|
+
else {
|
|
3650
|
+
throw new Error("No value provided for input HTTP label: ContactId.");
|
|
3651
|
+
}
|
|
3652
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.References !== undefined &&
|
|
3653
|
+
input.References !== null && { References: serializeAws_restJson1ContactReferences(input.References, context) })));
|
|
3654
|
+
return [2, new __HttpRequest({
|
|
3655
|
+
protocol: protocol,
|
|
3656
|
+
hostname: hostname,
|
|
3657
|
+
port: port,
|
|
3658
|
+
method: "POST",
|
|
3659
|
+
headers: headers,
|
|
3660
|
+
path: resolvedPath,
|
|
3661
|
+
body: body,
|
|
3662
|
+
})];
|
|
3663
|
+
}
|
|
3664
|
+
});
|
|
3665
|
+
}); };
|
|
3666
|
+
export var serializeAws_restJson1UpdateContactAttributesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3667
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
3668
|
+
return __generator(this, function (_c) {
|
|
3669
|
+
switch (_c.label) {
|
|
3670
|
+
case 0: return [4, context.endpoint()];
|
|
3671
|
+
case 1:
|
|
3672
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3673
|
+
headers = {
|
|
3674
|
+
"content-type": "application/json",
|
|
3675
|
+
};
|
|
3676
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/attributes";
|
|
3677
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Attributes !== undefined &&
|
|
3678
|
+
input.Attributes !== null && { Attributes: serializeAws_restJson1Attributes(input.Attributes, context) })), (input.InitialContactId !== undefined &&
|
|
3679
|
+
input.InitialContactId !== null && { InitialContactId: input.InitialContactId })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })));
|
|
3680
|
+
return [2, new __HttpRequest({
|
|
3681
|
+
protocol: protocol,
|
|
3682
|
+
hostname: hostname,
|
|
3683
|
+
port: port,
|
|
3356
3684
|
method: "POST",
|
|
3357
3685
|
headers: headers,
|
|
3358
3686
|
path: resolvedPath,
|
|
@@ -3406,6 +3734,142 @@ export var serializeAws_restJson1UpdateContactFlowContentCommand = function (inp
|
|
|
3406
3734
|
}
|
|
3407
3735
|
});
|
|
3408
3736
|
}); };
|
|
3737
|
+
export var serializeAws_restJson1UpdateContactFlowMetadataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3738
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3739
|
+
return __generator(this, function (_c) {
|
|
3740
|
+
switch (_c.label) {
|
|
3741
|
+
case 0: return [4, context.endpoint()];
|
|
3742
|
+
case 1:
|
|
3743
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3744
|
+
headers = {
|
|
3745
|
+
"content-type": "application/json",
|
|
3746
|
+
};
|
|
3747
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
3748
|
+
"/contact-flows/{InstanceId}/{ContactFlowId}/metadata";
|
|
3749
|
+
if (input.InstanceId !== undefined) {
|
|
3750
|
+
labelValue = input.InstanceId;
|
|
3751
|
+
if (labelValue.length <= 0) {
|
|
3752
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
3753
|
+
}
|
|
3754
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
3755
|
+
}
|
|
3756
|
+
else {
|
|
3757
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3758
|
+
}
|
|
3759
|
+
if (input.ContactFlowId !== undefined) {
|
|
3760
|
+
labelValue = input.ContactFlowId;
|
|
3761
|
+
if (labelValue.length <= 0) {
|
|
3762
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowId.");
|
|
3763
|
+
}
|
|
3764
|
+
resolvedPath = resolvedPath.replace("{ContactFlowId}", __extendedEncodeURIComponent(labelValue));
|
|
3765
|
+
}
|
|
3766
|
+
else {
|
|
3767
|
+
throw new Error("No value provided for input HTTP label: ContactFlowId.");
|
|
3768
|
+
}
|
|
3769
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.ContactFlowState !== undefined &&
|
|
3770
|
+
input.ContactFlowState !== null && { ContactFlowState: input.ContactFlowState })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })));
|
|
3771
|
+
return [2, new __HttpRequest({
|
|
3772
|
+
protocol: protocol,
|
|
3773
|
+
hostname: hostname,
|
|
3774
|
+
port: port,
|
|
3775
|
+
method: "POST",
|
|
3776
|
+
headers: headers,
|
|
3777
|
+
path: resolvedPath,
|
|
3778
|
+
body: body,
|
|
3779
|
+
})];
|
|
3780
|
+
}
|
|
3781
|
+
});
|
|
3782
|
+
}); };
|
|
3783
|
+
export var serializeAws_restJson1UpdateContactFlowModuleContentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3784
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3785
|
+
return __generator(this, function (_c) {
|
|
3786
|
+
switch (_c.label) {
|
|
3787
|
+
case 0: return [4, context.endpoint()];
|
|
3788
|
+
case 1:
|
|
3789
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3790
|
+
headers = {
|
|
3791
|
+
"content-type": "application/json",
|
|
3792
|
+
};
|
|
3793
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
3794
|
+
"/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/content";
|
|
3795
|
+
if (input.InstanceId !== undefined) {
|
|
3796
|
+
labelValue = input.InstanceId;
|
|
3797
|
+
if (labelValue.length <= 0) {
|
|
3798
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
3799
|
+
}
|
|
3800
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
3801
|
+
}
|
|
3802
|
+
else {
|
|
3803
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3804
|
+
}
|
|
3805
|
+
if (input.ContactFlowModuleId !== undefined) {
|
|
3806
|
+
labelValue = input.ContactFlowModuleId;
|
|
3807
|
+
if (labelValue.length <= 0) {
|
|
3808
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
|
|
3809
|
+
}
|
|
3810
|
+
resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
|
|
3811
|
+
}
|
|
3812
|
+
else {
|
|
3813
|
+
throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
|
|
3814
|
+
}
|
|
3815
|
+
body = JSON.stringify(__assign({}, (input.Content !== undefined && input.Content !== null && { Content: input.Content })));
|
|
3816
|
+
return [2, new __HttpRequest({
|
|
3817
|
+
protocol: protocol,
|
|
3818
|
+
hostname: hostname,
|
|
3819
|
+
port: port,
|
|
3820
|
+
method: "POST",
|
|
3821
|
+
headers: headers,
|
|
3822
|
+
path: resolvedPath,
|
|
3823
|
+
body: body,
|
|
3824
|
+
})];
|
|
3825
|
+
}
|
|
3826
|
+
});
|
|
3827
|
+
}); };
|
|
3828
|
+
export var serializeAws_restJson1UpdateContactFlowModuleMetadataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3829
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3830
|
+
return __generator(this, function (_c) {
|
|
3831
|
+
switch (_c.label) {
|
|
3832
|
+
case 0: return [4, context.endpoint()];
|
|
3833
|
+
case 1:
|
|
3834
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3835
|
+
headers = {
|
|
3836
|
+
"content-type": "application/json",
|
|
3837
|
+
};
|
|
3838
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
3839
|
+
"/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/metadata";
|
|
3840
|
+
if (input.InstanceId !== undefined) {
|
|
3841
|
+
labelValue = input.InstanceId;
|
|
3842
|
+
if (labelValue.length <= 0) {
|
|
3843
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
3844
|
+
}
|
|
3845
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
3846
|
+
}
|
|
3847
|
+
else {
|
|
3848
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3849
|
+
}
|
|
3850
|
+
if (input.ContactFlowModuleId !== undefined) {
|
|
3851
|
+
labelValue = input.ContactFlowModuleId;
|
|
3852
|
+
if (labelValue.length <= 0) {
|
|
3853
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
|
|
3854
|
+
}
|
|
3855
|
+
resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
|
|
3856
|
+
}
|
|
3857
|
+
else {
|
|
3858
|
+
throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
|
|
3859
|
+
}
|
|
3860
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.State !== undefined && input.State !== null && { State: input.State })));
|
|
3861
|
+
return [2, new __HttpRequest({
|
|
3862
|
+
protocol: protocol,
|
|
3863
|
+
hostname: hostname,
|
|
3864
|
+
port: port,
|
|
3865
|
+
method: "POST",
|
|
3866
|
+
headers: headers,
|
|
3867
|
+
path: resolvedPath,
|
|
3868
|
+
body: body,
|
|
3869
|
+
})];
|
|
3870
|
+
}
|
|
3871
|
+
});
|
|
3872
|
+
}); };
|
|
3409
3873
|
export var serializeAws_restJson1UpdateContactFlowNameCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3410
3874
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3411
3875
|
return __generator(this, function (_c) {
|
|
@@ -3451,6 +3915,31 @@ export var serializeAws_restJson1UpdateContactFlowNameCommand = function (input,
|
|
|
3451
3915
|
}
|
|
3452
3916
|
});
|
|
3453
3917
|
}); };
|
|
3918
|
+
export var serializeAws_restJson1UpdateContactScheduleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3919
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
3920
|
+
return __generator(this, function (_c) {
|
|
3921
|
+
switch (_c.label) {
|
|
3922
|
+
case 0: return [4, context.endpoint()];
|
|
3923
|
+
case 1:
|
|
3924
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3925
|
+
headers = {
|
|
3926
|
+
"content-type": "application/json",
|
|
3927
|
+
};
|
|
3928
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/schedule";
|
|
3929
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.ContactId !== undefined && input.ContactId !== null && { ContactId: input.ContactId })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })), (input.ScheduledTime !== undefined &&
|
|
3930
|
+
input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) })));
|
|
3931
|
+
return [2, new __HttpRequest({
|
|
3932
|
+
protocol: protocol,
|
|
3933
|
+
hostname: hostname,
|
|
3934
|
+
port: port,
|
|
3935
|
+
method: "POST",
|
|
3936
|
+
headers: headers,
|
|
3937
|
+
path: resolvedPath,
|
|
3938
|
+
body: body,
|
|
3939
|
+
})];
|
|
3940
|
+
}
|
|
3941
|
+
});
|
|
3942
|
+
}); };
|
|
3454
3943
|
export var serializeAws_restJson1UpdateHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3455
3944
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3456
3945
|
return __generator(this, function (_c) {
|
|
@@ -5507,107 +5996,245 @@ var deserializeAws_restJson1CreateContactFlowCommandError = function (output, co
|
|
|
5507
5996
|
}
|
|
5508
5997
|
});
|
|
5509
5998
|
}); };
|
|
5510
|
-
export var
|
|
5999
|
+
export var deserializeAws_restJson1CreateContactFlowModuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5511
6000
|
var contents, data, _a, _b;
|
|
5512
6001
|
return __generator(this, function (_c) {
|
|
5513
6002
|
switch (_c.label) {
|
|
5514
6003
|
case 0:
|
|
5515
6004
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5516
|
-
return [2,
|
|
6005
|
+
return [2, deserializeAws_restJson1CreateContactFlowModuleCommandError(output, context)];
|
|
5517
6006
|
}
|
|
5518
6007
|
contents = {
|
|
5519
6008
|
$metadata: deserializeMetadata(output),
|
|
5520
|
-
|
|
5521
|
-
|
|
6009
|
+
Arn: undefined,
|
|
6010
|
+
Id: undefined,
|
|
5522
6011
|
};
|
|
5523
6012
|
_a = __expectNonNull;
|
|
5524
6013
|
_b = __expectObject;
|
|
5525
6014
|
return [4, parseBody(output.body, context)];
|
|
5526
6015
|
case 1:
|
|
5527
6016
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
5528
|
-
if (data.
|
|
5529
|
-
contents.
|
|
6017
|
+
if (data.Arn !== undefined && data.Arn !== null) {
|
|
6018
|
+
contents.Arn = __expectString(data.Arn);
|
|
5530
6019
|
}
|
|
5531
|
-
if (data.
|
|
5532
|
-
contents.
|
|
6020
|
+
if (data.Id !== undefined && data.Id !== null) {
|
|
6021
|
+
contents.Id = __expectString(data.Id);
|
|
5533
6022
|
}
|
|
5534
6023
|
return [2, Promise.resolve(contents)];
|
|
5535
6024
|
}
|
|
5536
6025
|
});
|
|
5537
6026
|
}); };
|
|
5538
|
-
var
|
|
5539
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
5540
|
-
var
|
|
5541
|
-
return __generator(this, function (
|
|
5542
|
-
switch (
|
|
6027
|
+
var deserializeAws_restJson1CreateContactFlowModuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6028
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, parsedBody, message;
|
|
6029
|
+
var _o;
|
|
6030
|
+
return __generator(this, function (_p) {
|
|
6031
|
+
switch (_p.label) {
|
|
5543
6032
|
case 0:
|
|
5544
6033
|
_a = [__assign({}, output)];
|
|
5545
|
-
|
|
6034
|
+
_o = {};
|
|
5546
6035
|
return [4, parseBody(output.body, context)];
|
|
5547
6036
|
case 1:
|
|
5548
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
6037
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_o.body = _p.sent(), _o)]));
|
|
5549
6038
|
errorCode = "UnknownError";
|
|
5550
6039
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5551
6040
|
_b = errorCode;
|
|
5552
6041
|
switch (_b) {
|
|
5553
|
-
case "
|
|
5554
|
-
case "com.amazonaws.connect#
|
|
5555
|
-
case "
|
|
5556
|
-
case "com.amazonaws.connect#
|
|
5557
|
-
case "
|
|
5558
|
-
case "com.amazonaws.connect#
|
|
5559
|
-
case "
|
|
5560
|
-
case "com.amazonaws.connect#
|
|
5561
|
-
case "
|
|
5562
|
-
case "com.amazonaws.connect#
|
|
5563
|
-
case "
|
|
5564
|
-
case "com.amazonaws.connect#
|
|
5565
|
-
case "
|
|
5566
|
-
case "com.amazonaws.connect#
|
|
5567
|
-
|
|
5568
|
-
|
|
6042
|
+
case "AccessDeniedException": return [3, 2];
|
|
6043
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
6044
|
+
case "DuplicateResourceException": return [3, 4];
|
|
6045
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 4];
|
|
6046
|
+
case "IdempotencyException": return [3, 6];
|
|
6047
|
+
case "com.amazonaws.connect#IdempotencyException": return [3, 6];
|
|
6048
|
+
case "InternalServiceException": return [3, 8];
|
|
6049
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 8];
|
|
6050
|
+
case "InvalidContactFlowModuleException": return [3, 10];
|
|
6051
|
+
case "com.amazonaws.connect#InvalidContactFlowModuleException": return [3, 10];
|
|
6052
|
+
case "InvalidParameterException": return [3, 12];
|
|
6053
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 12];
|
|
6054
|
+
case "InvalidRequestException": return [3, 14];
|
|
6055
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 14];
|
|
6056
|
+
case "LimitExceededException": return [3, 16];
|
|
6057
|
+
case "com.amazonaws.connect#LimitExceededException": return [3, 16];
|
|
6058
|
+
case "ResourceNotFoundException": return [3, 18];
|
|
6059
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 18];
|
|
6060
|
+
case "ThrottlingException": return [3, 20];
|
|
6061
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 20];
|
|
6062
|
+
}
|
|
6063
|
+
return [3, 22];
|
|
5569
6064
|
case 2:
|
|
5570
6065
|
_c = [{}];
|
|
5571
|
-
return [4,
|
|
6066
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
5572
6067
|
case 3:
|
|
5573
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
5574
|
-
return [3,
|
|
6068
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6069
|
+
return [3, 23];
|
|
5575
6070
|
case 4:
|
|
5576
6071
|
_d = [{}];
|
|
5577
|
-
return [4,
|
|
6072
|
+
return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
5578
6073
|
case 5:
|
|
5579
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
5580
|
-
return [3,
|
|
6074
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6075
|
+
return [3, 23];
|
|
5581
6076
|
case 6:
|
|
5582
6077
|
_e = [{}];
|
|
5583
|
-
return [4,
|
|
6078
|
+
return [4, deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context)];
|
|
5584
6079
|
case 7:
|
|
5585
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
5586
|
-
return [3,
|
|
6080
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6081
|
+
return [3, 23];
|
|
5587
6082
|
case 8:
|
|
5588
6083
|
_f = [{}];
|
|
5589
|
-
return [4,
|
|
6084
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
5590
6085
|
case 9:
|
|
5591
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
5592
|
-
return [3,
|
|
6086
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6087
|
+
return [3, 23];
|
|
5593
6088
|
case 10:
|
|
5594
6089
|
_g = [{}];
|
|
5595
|
-
return [4,
|
|
6090
|
+
return [4, deserializeAws_restJson1InvalidContactFlowModuleExceptionResponse(parsedOutput, context)];
|
|
5596
6091
|
case 11:
|
|
5597
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(
|
|
5598
|
-
return [3,
|
|
6092
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6093
|
+
return [3, 23];
|
|
5599
6094
|
case 12:
|
|
5600
6095
|
_h = [{}];
|
|
5601
|
-
return [4,
|
|
6096
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
5602
6097
|
case 13:
|
|
5603
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(
|
|
5604
|
-
return [3,
|
|
6098
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6099
|
+
return [3, 23];
|
|
5605
6100
|
case 14:
|
|
5606
6101
|
_j = [{}];
|
|
5607
|
-
return [4,
|
|
6102
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
5608
6103
|
case 15:
|
|
5609
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(
|
|
5610
|
-
return [3,
|
|
6104
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6105
|
+
return [3, 23];
|
|
6106
|
+
case 16:
|
|
6107
|
+
_k = [{}];
|
|
6108
|
+
return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
6109
|
+
case 17:
|
|
6110
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6111
|
+
return [3, 23];
|
|
6112
|
+
case 18:
|
|
6113
|
+
_l = [{}];
|
|
6114
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
6115
|
+
case 19:
|
|
6116
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6117
|
+
return [3, 23];
|
|
6118
|
+
case 20:
|
|
6119
|
+
_m = [{}];
|
|
6120
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
6121
|
+
case 21:
|
|
6122
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6123
|
+
return [3, 23];
|
|
6124
|
+
case 22:
|
|
6125
|
+
parsedBody = parsedOutput.body;
|
|
6126
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
6127
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
6128
|
+
_p.label = 23;
|
|
6129
|
+
case 23:
|
|
6130
|
+
message = response.message || response.Message || errorCode;
|
|
6131
|
+
response.message = message;
|
|
6132
|
+
delete response.Message;
|
|
6133
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
6134
|
+
}
|
|
6135
|
+
});
|
|
6136
|
+
}); };
|
|
6137
|
+
export var deserializeAws_restJson1CreateHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6138
|
+
var contents, data, _a, _b;
|
|
6139
|
+
return __generator(this, function (_c) {
|
|
6140
|
+
switch (_c.label) {
|
|
6141
|
+
case 0:
|
|
6142
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6143
|
+
return [2, deserializeAws_restJson1CreateHoursOfOperationCommandError(output, context)];
|
|
6144
|
+
}
|
|
6145
|
+
contents = {
|
|
6146
|
+
$metadata: deserializeMetadata(output),
|
|
6147
|
+
HoursOfOperationArn: undefined,
|
|
6148
|
+
HoursOfOperationId: undefined,
|
|
6149
|
+
};
|
|
6150
|
+
_a = __expectNonNull;
|
|
6151
|
+
_b = __expectObject;
|
|
6152
|
+
return [4, parseBody(output.body, context)];
|
|
6153
|
+
case 1:
|
|
6154
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
6155
|
+
if (data.HoursOfOperationArn !== undefined && data.HoursOfOperationArn !== null) {
|
|
6156
|
+
contents.HoursOfOperationArn = __expectString(data.HoursOfOperationArn);
|
|
6157
|
+
}
|
|
6158
|
+
if (data.HoursOfOperationId !== undefined && data.HoursOfOperationId !== null) {
|
|
6159
|
+
contents.HoursOfOperationId = __expectString(data.HoursOfOperationId);
|
|
6160
|
+
}
|
|
6161
|
+
return [2, Promise.resolve(contents)];
|
|
6162
|
+
}
|
|
6163
|
+
});
|
|
6164
|
+
}); };
|
|
6165
|
+
var deserializeAws_restJson1CreateHoursOfOperationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6166
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
6167
|
+
var _k;
|
|
6168
|
+
return __generator(this, function (_l) {
|
|
6169
|
+
switch (_l.label) {
|
|
6170
|
+
case 0:
|
|
6171
|
+
_a = [__assign({}, output)];
|
|
6172
|
+
_k = {};
|
|
6173
|
+
return [4, parseBody(output.body, context)];
|
|
6174
|
+
case 1:
|
|
6175
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
6176
|
+
errorCode = "UnknownError";
|
|
6177
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6178
|
+
_b = errorCode;
|
|
6179
|
+
switch (_b) {
|
|
6180
|
+
case "DuplicateResourceException": return [3, 2];
|
|
6181
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
|
|
6182
|
+
case "InternalServiceException": return [3, 4];
|
|
6183
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
6184
|
+
case "InvalidParameterException": return [3, 6];
|
|
6185
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
6186
|
+
case "InvalidRequestException": return [3, 8];
|
|
6187
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
6188
|
+
case "LimitExceededException": return [3, 10];
|
|
6189
|
+
case "com.amazonaws.connect#LimitExceededException": return [3, 10];
|
|
6190
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
6191
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
|
|
6192
|
+
case "ThrottlingException": return [3, 14];
|
|
6193
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 14];
|
|
6194
|
+
}
|
|
6195
|
+
return [3, 16];
|
|
6196
|
+
case 2:
|
|
6197
|
+
_c = [{}];
|
|
6198
|
+
return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
6199
|
+
case 3:
|
|
6200
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6201
|
+
return [3, 17];
|
|
6202
|
+
case 4:
|
|
6203
|
+
_d = [{}];
|
|
6204
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
6205
|
+
case 5:
|
|
6206
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6207
|
+
return [3, 17];
|
|
6208
|
+
case 6:
|
|
6209
|
+
_e = [{}];
|
|
6210
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
6211
|
+
case 7:
|
|
6212
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6213
|
+
return [3, 17];
|
|
6214
|
+
case 8:
|
|
6215
|
+
_f = [{}];
|
|
6216
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
6217
|
+
case 9:
|
|
6218
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6219
|
+
return [3, 17];
|
|
6220
|
+
case 10:
|
|
6221
|
+
_g = [{}];
|
|
6222
|
+
return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
6223
|
+
case 11:
|
|
6224
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6225
|
+
return [3, 17];
|
|
6226
|
+
case 12:
|
|
6227
|
+
_h = [{}];
|
|
6228
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
6229
|
+
case 13:
|
|
6230
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6231
|
+
return [3, 17];
|
|
6232
|
+
case 14:
|
|
6233
|
+
_j = [{}];
|
|
6234
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
6235
|
+
case 15:
|
|
6236
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6237
|
+
return [3, 17];
|
|
5611
6238
|
case 16:
|
|
5612
6239
|
parsedBody = parsedOutput.body;
|
|
5613
6240
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -6599,13 +7226,13 @@ var deserializeAws_restJson1CreateUserHierarchyGroupCommandError = function (out
|
|
|
6599
7226
|
}
|
|
6600
7227
|
});
|
|
6601
7228
|
}); };
|
|
6602
|
-
export var
|
|
7229
|
+
export var deserializeAws_restJson1DeleteContactFlowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6603
7230
|
var contents;
|
|
6604
7231
|
return __generator(this, function (_a) {
|
|
6605
7232
|
switch (_a.label) {
|
|
6606
7233
|
case 0:
|
|
6607
7234
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6608
|
-
return [2,
|
|
7235
|
+
return [2, deserializeAws_restJson1DeleteContactFlowCommandError(output, context)];
|
|
6609
7236
|
}
|
|
6610
7237
|
contents = {
|
|
6611
7238
|
$metadata: deserializeMetadata(output),
|
|
@@ -6617,69 +7244,77 @@ export var deserializeAws_restJson1DeleteHoursOfOperationCommand = function (out
|
|
|
6617
7244
|
}
|
|
6618
7245
|
});
|
|
6619
7246
|
}); };
|
|
6620
|
-
var
|
|
6621
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
6622
|
-
var
|
|
6623
|
-
return __generator(this, function (
|
|
6624
|
-
switch (
|
|
7247
|
+
var deserializeAws_restJson1DeleteContactFlowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7248
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
7249
|
+
var _j;
|
|
7250
|
+
return __generator(this, function (_k) {
|
|
7251
|
+
switch (_k.label) {
|
|
6625
7252
|
case 0:
|
|
6626
7253
|
_a = [__assign({}, output)];
|
|
6627
|
-
|
|
7254
|
+
_j = {};
|
|
6628
7255
|
return [4, parseBody(output.body, context)];
|
|
6629
7256
|
case 1:
|
|
6630
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
7257
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
6631
7258
|
errorCode = "UnknownError";
|
|
6632
7259
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6633
7260
|
_b = errorCode;
|
|
6634
7261
|
switch (_b) {
|
|
6635
|
-
case "
|
|
6636
|
-
case "com.amazonaws.connect#
|
|
6637
|
-
case "
|
|
6638
|
-
case "com.amazonaws.connect#
|
|
6639
|
-
case "
|
|
6640
|
-
case "com.amazonaws.connect#
|
|
6641
|
-
case "
|
|
6642
|
-
case "com.amazonaws.connect#
|
|
6643
|
-
case "
|
|
6644
|
-
case "com.amazonaws.connect#
|
|
7262
|
+
case "AccessDeniedException": return [3, 2];
|
|
7263
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
7264
|
+
case "InternalServiceException": return [3, 4];
|
|
7265
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
7266
|
+
case "InvalidParameterException": return [3, 6];
|
|
7267
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
7268
|
+
case "InvalidRequestException": return [3, 8];
|
|
7269
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
7270
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
7271
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
7272
|
+
case "ThrottlingException": return [3, 12];
|
|
7273
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
6645
7274
|
}
|
|
6646
|
-
return [3,
|
|
7275
|
+
return [3, 14];
|
|
6647
7276
|
case 2:
|
|
6648
7277
|
_c = [{}];
|
|
6649
|
-
return [4,
|
|
7278
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
6650
7279
|
case 3:
|
|
6651
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
6652
|
-
return [3,
|
|
7280
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7281
|
+
return [3, 15];
|
|
6653
7282
|
case 4:
|
|
6654
7283
|
_d = [{}];
|
|
6655
|
-
return [4,
|
|
7284
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
6656
7285
|
case 5:
|
|
6657
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
6658
|
-
return [3,
|
|
7286
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7287
|
+
return [3, 15];
|
|
6659
7288
|
case 6:
|
|
6660
7289
|
_e = [{}];
|
|
6661
|
-
return [4,
|
|
7290
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
6662
7291
|
case 7:
|
|
6663
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
6664
|
-
return [3,
|
|
7292
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7293
|
+
return [3, 15];
|
|
6665
7294
|
case 8:
|
|
6666
7295
|
_f = [{}];
|
|
6667
|
-
return [4,
|
|
7296
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
6668
7297
|
case 9:
|
|
6669
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
6670
|
-
return [3,
|
|
7298
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7299
|
+
return [3, 15];
|
|
6671
7300
|
case 10:
|
|
6672
7301
|
_g = [{}];
|
|
6673
|
-
return [4,
|
|
7302
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
6674
7303
|
case 11:
|
|
6675
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(
|
|
6676
|
-
return [3,
|
|
7304
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7305
|
+
return [3, 15];
|
|
6677
7306
|
case 12:
|
|
7307
|
+
_h = [{}];
|
|
7308
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7309
|
+
case 13:
|
|
7310
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7311
|
+
return [3, 15];
|
|
7312
|
+
case 14:
|
|
6678
7313
|
parsedBody = parsedOutput.body;
|
|
6679
7314
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
6680
7315
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
6681
|
-
|
|
6682
|
-
case
|
|
7316
|
+
_k.label = 15;
|
|
7317
|
+
case 15:
|
|
6683
7318
|
message = response.message || response.Message || errorCode;
|
|
6684
7319
|
response.message = message;
|
|
6685
7320
|
delete response.Message;
|
|
@@ -6687,13 +7322,13 @@ var deserializeAws_restJson1DeleteHoursOfOperationCommandError = function (outpu
|
|
|
6687
7322
|
}
|
|
6688
7323
|
});
|
|
6689
7324
|
}); };
|
|
6690
|
-
export var
|
|
7325
|
+
export var deserializeAws_restJson1DeleteContactFlowModuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6691
7326
|
var contents;
|
|
6692
7327
|
return __generator(this, function (_a) {
|
|
6693
7328
|
switch (_a.label) {
|
|
6694
7329
|
case 0:
|
|
6695
7330
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6696
|
-
return [2,
|
|
7331
|
+
return [2, deserializeAws_restJson1DeleteContactFlowModuleCommandError(output, context)];
|
|
6697
7332
|
}
|
|
6698
7333
|
contents = {
|
|
6699
7334
|
$metadata: deserializeMetadata(output),
|
|
@@ -6705,59 +7340,243 @@ export var deserializeAws_restJson1DeleteInstanceCommand = function (output, con
|
|
|
6705
7340
|
}
|
|
6706
7341
|
});
|
|
6707
7342
|
}); };
|
|
6708
|
-
var
|
|
6709
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
6710
|
-
var
|
|
6711
|
-
return __generator(this, function (
|
|
6712
|
-
switch (
|
|
7343
|
+
var deserializeAws_restJson1DeleteContactFlowModuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7344
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
7345
|
+
var _j;
|
|
7346
|
+
return __generator(this, function (_k) {
|
|
7347
|
+
switch (_k.label) {
|
|
6713
7348
|
case 0:
|
|
6714
7349
|
_a = [__assign({}, output)];
|
|
6715
|
-
|
|
7350
|
+
_j = {};
|
|
6716
7351
|
return [4, parseBody(output.body, context)];
|
|
6717
7352
|
case 1:
|
|
6718
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
7353
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
6719
7354
|
errorCode = "UnknownError";
|
|
6720
7355
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6721
7356
|
_b = errorCode;
|
|
6722
7357
|
switch (_b) {
|
|
6723
|
-
case "
|
|
6724
|
-
case "com.amazonaws.connect#
|
|
6725
|
-
case "
|
|
6726
|
-
case "com.amazonaws.connect#
|
|
6727
|
-
case "
|
|
6728
|
-
case "com.amazonaws.connect#
|
|
7358
|
+
case "AccessDeniedException": return [3, 2];
|
|
7359
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
7360
|
+
case "InternalServiceException": return [3, 4];
|
|
7361
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
7362
|
+
case "InvalidParameterException": return [3, 6];
|
|
7363
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
7364
|
+
case "InvalidRequestException": return [3, 8];
|
|
7365
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
7366
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
7367
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
7368
|
+
case "ThrottlingException": return [3, 12];
|
|
7369
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
6729
7370
|
}
|
|
6730
|
-
return [3,
|
|
7371
|
+
return [3, 14];
|
|
6731
7372
|
case 2:
|
|
6732
7373
|
_c = [{}];
|
|
6733
|
-
return [4,
|
|
7374
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
6734
7375
|
case 3:
|
|
6735
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
6736
|
-
return [3,
|
|
7376
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7377
|
+
return [3, 15];
|
|
6737
7378
|
case 4:
|
|
6738
7379
|
_d = [{}];
|
|
6739
|
-
return [4,
|
|
7380
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
6740
7381
|
case 5:
|
|
6741
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
6742
|
-
return [3,
|
|
7382
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7383
|
+
return [3, 15];
|
|
6743
7384
|
case 6:
|
|
6744
7385
|
_e = [{}];
|
|
6745
|
-
return [4,
|
|
7386
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
6746
7387
|
case 7:
|
|
6747
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
6748
|
-
return [3,
|
|
7388
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7389
|
+
return [3, 15];
|
|
6749
7390
|
case 8:
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
6753
|
-
_g.label = 9;
|
|
7391
|
+
_f = [{}];
|
|
7392
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
6754
7393
|
case 9:
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
7394
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7395
|
+
return [3, 15];
|
|
7396
|
+
case 10:
|
|
7397
|
+
_g = [{}];
|
|
7398
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7399
|
+
case 11:
|
|
7400
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7401
|
+
return [3, 15];
|
|
7402
|
+
case 12:
|
|
7403
|
+
_h = [{}];
|
|
7404
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7405
|
+
case 13:
|
|
7406
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7407
|
+
return [3, 15];
|
|
7408
|
+
case 14:
|
|
7409
|
+
parsedBody = parsedOutput.body;
|
|
7410
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7411
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
7412
|
+
_k.label = 15;
|
|
7413
|
+
case 15:
|
|
7414
|
+
message = response.message || response.Message || errorCode;
|
|
7415
|
+
response.message = message;
|
|
7416
|
+
delete response.Message;
|
|
7417
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
7418
|
+
}
|
|
7419
|
+
});
|
|
7420
|
+
}); };
|
|
7421
|
+
export var deserializeAws_restJson1DeleteHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7422
|
+
var contents;
|
|
7423
|
+
return __generator(this, function (_a) {
|
|
7424
|
+
switch (_a.label) {
|
|
7425
|
+
case 0:
|
|
7426
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7427
|
+
return [2, deserializeAws_restJson1DeleteHoursOfOperationCommandError(output, context)];
|
|
7428
|
+
}
|
|
7429
|
+
contents = {
|
|
7430
|
+
$metadata: deserializeMetadata(output),
|
|
7431
|
+
};
|
|
7432
|
+
return [4, collectBody(output.body, context)];
|
|
7433
|
+
case 1:
|
|
7434
|
+
_a.sent();
|
|
7435
|
+
return [2, Promise.resolve(contents)];
|
|
7436
|
+
}
|
|
7437
|
+
});
|
|
7438
|
+
}); };
|
|
7439
|
+
var deserializeAws_restJson1DeleteHoursOfOperationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7440
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
7441
|
+
var _h;
|
|
7442
|
+
return __generator(this, function (_j) {
|
|
7443
|
+
switch (_j.label) {
|
|
7444
|
+
case 0:
|
|
7445
|
+
_a = [__assign({}, output)];
|
|
7446
|
+
_h = {};
|
|
7447
|
+
return [4, parseBody(output.body, context)];
|
|
7448
|
+
case 1:
|
|
7449
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
7450
|
+
errorCode = "UnknownError";
|
|
7451
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7452
|
+
_b = errorCode;
|
|
7453
|
+
switch (_b) {
|
|
7454
|
+
case "InternalServiceException": return [3, 2];
|
|
7455
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
7456
|
+
case "InvalidParameterException": return [3, 4];
|
|
7457
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
7458
|
+
case "InvalidRequestException": return [3, 6];
|
|
7459
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
7460
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
7461
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
7462
|
+
case "ThrottlingException": return [3, 10];
|
|
7463
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
7464
|
+
}
|
|
7465
|
+
return [3, 12];
|
|
7466
|
+
case 2:
|
|
7467
|
+
_c = [{}];
|
|
7468
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
7469
|
+
case 3:
|
|
7470
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7471
|
+
return [3, 13];
|
|
7472
|
+
case 4:
|
|
7473
|
+
_d = [{}];
|
|
7474
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
7475
|
+
case 5:
|
|
7476
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7477
|
+
return [3, 13];
|
|
7478
|
+
case 6:
|
|
7479
|
+
_e = [{}];
|
|
7480
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
7481
|
+
case 7:
|
|
7482
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7483
|
+
return [3, 13];
|
|
7484
|
+
case 8:
|
|
7485
|
+
_f = [{}];
|
|
7486
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7487
|
+
case 9:
|
|
7488
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7489
|
+
return [3, 13];
|
|
7490
|
+
case 10:
|
|
7491
|
+
_g = [{}];
|
|
7492
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7493
|
+
case 11:
|
|
7494
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7495
|
+
return [3, 13];
|
|
7496
|
+
case 12:
|
|
7497
|
+
parsedBody = parsedOutput.body;
|
|
7498
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7499
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
7500
|
+
_j.label = 13;
|
|
7501
|
+
case 13:
|
|
7502
|
+
message = response.message || response.Message || errorCode;
|
|
7503
|
+
response.message = message;
|
|
7504
|
+
delete response.Message;
|
|
7505
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
7506
|
+
}
|
|
7507
|
+
});
|
|
7508
|
+
}); };
|
|
7509
|
+
export var deserializeAws_restJson1DeleteInstanceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7510
|
+
var contents;
|
|
7511
|
+
return __generator(this, function (_a) {
|
|
7512
|
+
switch (_a.label) {
|
|
7513
|
+
case 0:
|
|
7514
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7515
|
+
return [2, deserializeAws_restJson1DeleteInstanceCommandError(output, context)];
|
|
7516
|
+
}
|
|
7517
|
+
contents = {
|
|
7518
|
+
$metadata: deserializeMetadata(output),
|
|
7519
|
+
};
|
|
7520
|
+
return [4, collectBody(output.body, context)];
|
|
7521
|
+
case 1:
|
|
7522
|
+
_a.sent();
|
|
7523
|
+
return [2, Promise.resolve(contents)];
|
|
7524
|
+
}
|
|
7525
|
+
});
|
|
7526
|
+
}); };
|
|
7527
|
+
var deserializeAws_restJson1DeleteInstanceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7528
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
7529
|
+
var _f;
|
|
7530
|
+
return __generator(this, function (_g) {
|
|
7531
|
+
switch (_g.label) {
|
|
7532
|
+
case 0:
|
|
7533
|
+
_a = [__assign({}, output)];
|
|
7534
|
+
_f = {};
|
|
7535
|
+
return [4, parseBody(output.body, context)];
|
|
7536
|
+
case 1:
|
|
7537
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
7538
|
+
errorCode = "UnknownError";
|
|
7539
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7540
|
+
_b = errorCode;
|
|
7541
|
+
switch (_b) {
|
|
7542
|
+
case "InternalServiceException": return [3, 2];
|
|
7543
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
7544
|
+
case "InvalidRequestException": return [3, 4];
|
|
7545
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 4];
|
|
7546
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
7547
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 6];
|
|
7548
|
+
}
|
|
7549
|
+
return [3, 8];
|
|
7550
|
+
case 2:
|
|
7551
|
+
_c = [{}];
|
|
7552
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
7553
|
+
case 3:
|
|
7554
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7555
|
+
return [3, 9];
|
|
7556
|
+
case 4:
|
|
7557
|
+
_d = [{}];
|
|
7558
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
7559
|
+
case 5:
|
|
7560
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7561
|
+
return [3, 9];
|
|
7562
|
+
case 6:
|
|
7563
|
+
_e = [{}];
|
|
7564
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7565
|
+
case 7:
|
|
7566
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7567
|
+
return [3, 9];
|
|
7568
|
+
case 8:
|
|
7569
|
+
parsedBody = parsedOutput.body;
|
|
7570
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7571
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
7572
|
+
_g.label = 9;
|
|
7573
|
+
case 9:
|
|
7574
|
+
message = response.message || response.Message || errorCode;
|
|
7575
|
+
response.message = message;
|
|
7576
|
+
delete response.Message;
|
|
7577
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
7578
|
+
}
|
|
7579
|
+
});
|
|
6761
7580
|
}); };
|
|
6762
7581
|
export var deserializeAws_restJson1DeleteIntegrationAssociationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6763
7582
|
var contents;
|
|
@@ -7389,89 +8208,285 @@ var deserializeAws_restJson1DescribeAgentStatusCommandError = function (output,
|
|
|
7389
8208
|
}
|
|
7390
8209
|
});
|
|
7391
8210
|
}); };
|
|
7392
|
-
export var
|
|
8211
|
+
export var deserializeAws_restJson1DescribeContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7393
8212
|
var contents, data, _a, _b;
|
|
7394
8213
|
return __generator(this, function (_c) {
|
|
7395
8214
|
switch (_c.label) {
|
|
7396
8215
|
case 0:
|
|
7397
8216
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7398
|
-
return [2,
|
|
8217
|
+
return [2, deserializeAws_restJson1DescribeContactCommandError(output, context)];
|
|
7399
8218
|
}
|
|
7400
8219
|
contents = {
|
|
7401
8220
|
$metadata: deserializeMetadata(output),
|
|
7402
|
-
|
|
8221
|
+
Contact: undefined,
|
|
7403
8222
|
};
|
|
7404
8223
|
_a = __expectNonNull;
|
|
7405
8224
|
_b = __expectObject;
|
|
7406
8225
|
return [4, parseBody(output.body, context)];
|
|
7407
8226
|
case 1:
|
|
7408
8227
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7409
|
-
if (data.
|
|
7410
|
-
contents.
|
|
8228
|
+
if (data.Contact !== undefined && data.Contact !== null) {
|
|
8229
|
+
contents.Contact = deserializeAws_restJson1Contact(data.Contact, context);
|
|
7411
8230
|
}
|
|
7412
8231
|
return [2, Promise.resolve(contents)];
|
|
7413
8232
|
}
|
|
7414
8233
|
});
|
|
7415
8234
|
}); };
|
|
7416
|
-
var
|
|
7417
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g,
|
|
7418
|
-
var
|
|
7419
|
-
return __generator(this, function (
|
|
7420
|
-
switch (
|
|
8235
|
+
var deserializeAws_restJson1DescribeContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8236
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
8237
|
+
var _h;
|
|
8238
|
+
return __generator(this, function (_j) {
|
|
8239
|
+
switch (_j.label) {
|
|
7421
8240
|
case 0:
|
|
7422
8241
|
_a = [__assign({}, output)];
|
|
7423
|
-
|
|
8242
|
+
_h = {};
|
|
7424
8243
|
return [4, parseBody(output.body, context)];
|
|
7425
8244
|
case 1:
|
|
7426
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
8245
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
7427
8246
|
errorCode = "UnknownError";
|
|
7428
8247
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7429
8248
|
_b = errorCode;
|
|
7430
8249
|
switch (_b) {
|
|
7431
|
-
case "
|
|
7432
|
-
case "com.amazonaws.connect#
|
|
7433
|
-
case "
|
|
7434
|
-
case "com.amazonaws.connect#
|
|
7435
|
-
case "
|
|
7436
|
-
case "com.amazonaws.connect#
|
|
7437
|
-
case "
|
|
7438
|
-
case "com.amazonaws.connect#
|
|
7439
|
-
case "
|
|
7440
|
-
case "com.amazonaws.connect#
|
|
7441
|
-
case "ThrottlingException": return [3, 12];
|
|
7442
|
-
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
8250
|
+
case "InternalServiceException": return [3, 2];
|
|
8251
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
8252
|
+
case "InvalidParameterException": return [3, 4];
|
|
8253
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
8254
|
+
case "InvalidRequestException": return [3, 6];
|
|
8255
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
8256
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
8257
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
8258
|
+
case "ThrottlingException": return [3, 10];
|
|
8259
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
7443
8260
|
}
|
|
7444
|
-
return [3,
|
|
8261
|
+
return [3, 12];
|
|
7445
8262
|
case 2:
|
|
7446
8263
|
_c = [{}];
|
|
7447
|
-
return [4,
|
|
8264
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
7448
8265
|
case 3:
|
|
7449
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
7450
|
-
return [3,
|
|
8266
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8267
|
+
return [3, 13];
|
|
7451
8268
|
case 4:
|
|
7452
8269
|
_d = [{}];
|
|
7453
|
-
return [4,
|
|
8270
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
7454
8271
|
case 5:
|
|
7455
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
7456
|
-
return [3,
|
|
8272
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8273
|
+
return [3, 13];
|
|
7457
8274
|
case 6:
|
|
7458
8275
|
_e = [{}];
|
|
7459
|
-
return [4,
|
|
8276
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
7460
8277
|
case 7:
|
|
7461
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
7462
|
-
return [3,
|
|
8278
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8279
|
+
return [3, 13];
|
|
7463
8280
|
case 8:
|
|
7464
8281
|
_f = [{}];
|
|
7465
|
-
return [4,
|
|
8282
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7466
8283
|
case 9:
|
|
7467
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
7468
|
-
return [3,
|
|
8284
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8285
|
+
return [3, 13];
|
|
7469
8286
|
case 10:
|
|
7470
8287
|
_g = [{}];
|
|
7471
|
-
return [4,
|
|
8288
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7472
8289
|
case 11:
|
|
7473
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(
|
|
7474
|
-
return [3,
|
|
8290
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8291
|
+
return [3, 13];
|
|
8292
|
+
case 12:
|
|
8293
|
+
parsedBody = parsedOutput.body;
|
|
8294
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
8295
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
8296
|
+
_j.label = 13;
|
|
8297
|
+
case 13:
|
|
8298
|
+
message = response.message || response.Message || errorCode;
|
|
8299
|
+
response.message = message;
|
|
8300
|
+
delete response.Message;
|
|
8301
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
8302
|
+
}
|
|
8303
|
+
});
|
|
8304
|
+
}); };
|
|
8305
|
+
export var deserializeAws_restJson1DescribeContactFlowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8306
|
+
var contents, data, _a, _b;
|
|
8307
|
+
return __generator(this, function (_c) {
|
|
8308
|
+
switch (_c.label) {
|
|
8309
|
+
case 0:
|
|
8310
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
8311
|
+
return [2, deserializeAws_restJson1DescribeContactFlowCommandError(output, context)];
|
|
8312
|
+
}
|
|
8313
|
+
contents = {
|
|
8314
|
+
$metadata: deserializeMetadata(output),
|
|
8315
|
+
ContactFlow: undefined,
|
|
8316
|
+
};
|
|
8317
|
+
_a = __expectNonNull;
|
|
8318
|
+
_b = __expectObject;
|
|
8319
|
+
return [4, parseBody(output.body, context)];
|
|
8320
|
+
case 1:
|
|
8321
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
8322
|
+
if (data.ContactFlow !== undefined && data.ContactFlow !== null) {
|
|
8323
|
+
contents.ContactFlow = deserializeAws_restJson1ContactFlow(data.ContactFlow, context);
|
|
8324
|
+
}
|
|
8325
|
+
return [2, Promise.resolve(contents)];
|
|
8326
|
+
}
|
|
8327
|
+
});
|
|
8328
|
+
}); };
|
|
8329
|
+
var deserializeAws_restJson1DescribeContactFlowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8330
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
8331
|
+
var _j;
|
|
8332
|
+
return __generator(this, function (_k) {
|
|
8333
|
+
switch (_k.label) {
|
|
8334
|
+
case 0:
|
|
8335
|
+
_a = [__assign({}, output)];
|
|
8336
|
+
_j = {};
|
|
8337
|
+
return [4, parseBody(output.body, context)];
|
|
8338
|
+
case 1:
|
|
8339
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
8340
|
+
errorCode = "UnknownError";
|
|
8341
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8342
|
+
_b = errorCode;
|
|
8343
|
+
switch (_b) {
|
|
8344
|
+
case "ContactFlowNotPublishedException": return [3, 2];
|
|
8345
|
+
case "com.amazonaws.connect#ContactFlowNotPublishedException": return [3, 2];
|
|
8346
|
+
case "InternalServiceException": return [3, 4];
|
|
8347
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
8348
|
+
case "InvalidParameterException": return [3, 6];
|
|
8349
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
8350
|
+
case "InvalidRequestException": return [3, 8];
|
|
8351
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
8352
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
8353
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
8354
|
+
case "ThrottlingException": return [3, 12];
|
|
8355
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
8356
|
+
}
|
|
8357
|
+
return [3, 14];
|
|
8358
|
+
case 2:
|
|
8359
|
+
_c = [{}];
|
|
8360
|
+
return [4, deserializeAws_restJson1ContactFlowNotPublishedExceptionResponse(parsedOutput, context)];
|
|
8361
|
+
case 3:
|
|
8362
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8363
|
+
return [3, 15];
|
|
8364
|
+
case 4:
|
|
8365
|
+
_d = [{}];
|
|
8366
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
8367
|
+
case 5:
|
|
8368
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8369
|
+
return [3, 15];
|
|
8370
|
+
case 6:
|
|
8371
|
+
_e = [{}];
|
|
8372
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
8373
|
+
case 7:
|
|
8374
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8375
|
+
return [3, 15];
|
|
8376
|
+
case 8:
|
|
8377
|
+
_f = [{}];
|
|
8378
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
8379
|
+
case 9:
|
|
8380
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8381
|
+
return [3, 15];
|
|
8382
|
+
case 10:
|
|
8383
|
+
_g = [{}];
|
|
8384
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8385
|
+
case 11:
|
|
8386
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8387
|
+
return [3, 15];
|
|
8388
|
+
case 12:
|
|
8389
|
+
_h = [{}];
|
|
8390
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
8391
|
+
case 13:
|
|
8392
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8393
|
+
return [3, 15];
|
|
8394
|
+
case 14:
|
|
8395
|
+
parsedBody = parsedOutput.body;
|
|
8396
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
8397
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
8398
|
+
_k.label = 15;
|
|
8399
|
+
case 15:
|
|
8400
|
+
message = response.message || response.Message || errorCode;
|
|
8401
|
+
response.message = message;
|
|
8402
|
+
delete response.Message;
|
|
8403
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
8404
|
+
}
|
|
8405
|
+
});
|
|
8406
|
+
}); };
|
|
8407
|
+
export var deserializeAws_restJson1DescribeContactFlowModuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8408
|
+
var contents, data, _a, _b;
|
|
8409
|
+
return __generator(this, function (_c) {
|
|
8410
|
+
switch (_c.label) {
|
|
8411
|
+
case 0:
|
|
8412
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
8413
|
+
return [2, deserializeAws_restJson1DescribeContactFlowModuleCommandError(output, context)];
|
|
8414
|
+
}
|
|
8415
|
+
contents = {
|
|
8416
|
+
$metadata: deserializeMetadata(output),
|
|
8417
|
+
ContactFlowModule: undefined,
|
|
8418
|
+
};
|
|
8419
|
+
_a = __expectNonNull;
|
|
8420
|
+
_b = __expectObject;
|
|
8421
|
+
return [4, parseBody(output.body, context)];
|
|
8422
|
+
case 1:
|
|
8423
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
8424
|
+
if (data.ContactFlowModule !== undefined && data.ContactFlowModule !== null) {
|
|
8425
|
+
contents.ContactFlowModule = deserializeAws_restJson1ContactFlowModule(data.ContactFlowModule, context);
|
|
8426
|
+
}
|
|
8427
|
+
return [2, Promise.resolve(contents)];
|
|
8428
|
+
}
|
|
8429
|
+
});
|
|
8430
|
+
}); };
|
|
8431
|
+
var deserializeAws_restJson1DescribeContactFlowModuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8432
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
8433
|
+
var _j;
|
|
8434
|
+
return __generator(this, function (_k) {
|
|
8435
|
+
switch (_k.label) {
|
|
8436
|
+
case 0:
|
|
8437
|
+
_a = [__assign({}, output)];
|
|
8438
|
+
_j = {};
|
|
8439
|
+
return [4, parseBody(output.body, context)];
|
|
8440
|
+
case 1:
|
|
8441
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
8442
|
+
errorCode = "UnknownError";
|
|
8443
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8444
|
+
_b = errorCode;
|
|
8445
|
+
switch (_b) {
|
|
8446
|
+
case "AccessDeniedException": return [3, 2];
|
|
8447
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
8448
|
+
case "InternalServiceException": return [3, 4];
|
|
8449
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
8450
|
+
case "InvalidParameterException": return [3, 6];
|
|
8451
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
8452
|
+
case "InvalidRequestException": return [3, 8];
|
|
8453
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
8454
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
8455
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
8456
|
+
case "ThrottlingException": return [3, 12];
|
|
8457
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
8458
|
+
}
|
|
8459
|
+
return [3, 14];
|
|
8460
|
+
case 2:
|
|
8461
|
+
_c = [{}];
|
|
8462
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
8463
|
+
case 3:
|
|
8464
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8465
|
+
return [3, 15];
|
|
8466
|
+
case 4:
|
|
8467
|
+
_d = [{}];
|
|
8468
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
8469
|
+
case 5:
|
|
8470
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8471
|
+
return [3, 15];
|
|
8472
|
+
case 6:
|
|
8473
|
+
_e = [{}];
|
|
8474
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
8475
|
+
case 7:
|
|
8476
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8477
|
+
return [3, 15];
|
|
8478
|
+
case 8:
|
|
8479
|
+
_f = [{}];
|
|
8480
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
8481
|
+
case 9:
|
|
8482
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8483
|
+
return [3, 15];
|
|
8484
|
+
case 10:
|
|
8485
|
+
_g = [{}];
|
|
8486
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8487
|
+
case 11:
|
|
8488
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8489
|
+
return [3, 15];
|
|
7475
8490
|
case 12:
|
|
7476
8491
|
_h = [{}];
|
|
7477
8492
|
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
@@ -9871,17 +10886,17 @@ var deserializeAws_restJson1ListBotsCommandError = function (output, context) {
|
|
|
9871
10886
|
}
|
|
9872
10887
|
});
|
|
9873
10888
|
}); };
|
|
9874
|
-
export var
|
|
10889
|
+
export var deserializeAws_restJson1ListContactFlowModulesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9875
10890
|
var contents, data, _a, _b;
|
|
9876
10891
|
return __generator(this, function (_c) {
|
|
9877
10892
|
switch (_c.label) {
|
|
9878
10893
|
case 0:
|
|
9879
10894
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
9880
|
-
return [2,
|
|
10895
|
+
return [2, deserializeAws_restJson1ListContactFlowModulesCommandError(output, context)];
|
|
9881
10896
|
}
|
|
9882
10897
|
contents = {
|
|
9883
10898
|
$metadata: deserializeMetadata(output),
|
|
9884
|
-
|
|
10899
|
+
ContactFlowModulesSummaryList: undefined,
|
|
9885
10900
|
NextToken: undefined,
|
|
9886
10901
|
};
|
|
9887
10902
|
_a = __expectNonNull;
|
|
@@ -9889,8 +10904,8 @@ export var deserializeAws_restJson1ListContactFlowsCommand = function (output, c
|
|
|
9889
10904
|
return [4, parseBody(output.body, context)];
|
|
9890
10905
|
case 1:
|
|
9891
10906
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
9892
|
-
if (data.
|
|
9893
|
-
contents.
|
|
10907
|
+
if (data.ContactFlowModulesSummaryList !== undefined && data.ContactFlowModulesSummaryList !== null) {
|
|
10908
|
+
contents.ContactFlowModulesSummaryList = deserializeAws_restJson1ContactFlowModulesSummaryList(data.ContactFlowModulesSummaryList, context);
|
|
9894
10909
|
}
|
|
9895
10910
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
9896
10911
|
contents.NextToken = __expectString(data.NextToken);
|
|
@@ -9899,54 +10914,258 @@ export var deserializeAws_restJson1ListContactFlowsCommand = function (output, c
|
|
|
9899
10914
|
}
|
|
9900
10915
|
});
|
|
9901
10916
|
}); };
|
|
9902
|
-
var
|
|
9903
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
9904
|
-
var
|
|
9905
|
-
return __generator(this, function (
|
|
9906
|
-
switch (
|
|
10917
|
+
var deserializeAws_restJson1ListContactFlowModulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10918
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
10919
|
+
var _j;
|
|
10920
|
+
return __generator(this, function (_k) {
|
|
10921
|
+
switch (_k.label) {
|
|
9907
10922
|
case 0:
|
|
9908
10923
|
_a = [__assign({}, output)];
|
|
9909
|
-
|
|
10924
|
+
_j = {};
|
|
9910
10925
|
return [4, parseBody(output.body, context)];
|
|
9911
10926
|
case 1:
|
|
9912
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
10927
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
9913
10928
|
errorCode = "UnknownError";
|
|
9914
10929
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
9915
10930
|
_b = errorCode;
|
|
9916
10931
|
switch (_b) {
|
|
9917
|
-
case "
|
|
9918
|
-
case "com.amazonaws.connect#
|
|
9919
|
-
case "
|
|
9920
|
-
case "com.amazonaws.connect#
|
|
9921
|
-
case "
|
|
9922
|
-
case "com.amazonaws.connect#
|
|
9923
|
-
case "
|
|
9924
|
-
case "com.amazonaws.connect#
|
|
9925
|
-
case "
|
|
9926
|
-
case "com.amazonaws.connect#
|
|
10932
|
+
case "AccessDeniedException": return [3, 2];
|
|
10933
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
10934
|
+
case "InternalServiceException": return [3, 4];
|
|
10935
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
10936
|
+
case "InvalidParameterException": return [3, 6];
|
|
10937
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
10938
|
+
case "InvalidRequestException": return [3, 8];
|
|
10939
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
10940
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
10941
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
10942
|
+
case "ThrottlingException": return [3, 12];
|
|
10943
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
9927
10944
|
}
|
|
9928
|
-
return [3,
|
|
10945
|
+
return [3, 14];
|
|
9929
10946
|
case 2:
|
|
9930
10947
|
_c = [{}];
|
|
9931
|
-
return [4,
|
|
10948
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
9932
10949
|
case 3:
|
|
9933
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
9934
|
-
return [3,
|
|
10950
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10951
|
+
return [3, 15];
|
|
9935
10952
|
case 4:
|
|
9936
10953
|
_d = [{}];
|
|
9937
|
-
return [4,
|
|
10954
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
9938
10955
|
case 5:
|
|
9939
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
9940
|
-
return [3,
|
|
10956
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10957
|
+
return [3, 15];
|
|
9941
10958
|
case 6:
|
|
9942
10959
|
_e = [{}];
|
|
9943
|
-
return [4,
|
|
10960
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
9944
10961
|
case 7:
|
|
9945
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
9946
|
-
return [3,
|
|
10962
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10963
|
+
return [3, 15];
|
|
9947
10964
|
case 8:
|
|
9948
10965
|
_f = [{}];
|
|
9949
|
-
return [4,
|
|
10966
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
10967
|
+
case 9:
|
|
10968
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10969
|
+
return [3, 15];
|
|
10970
|
+
case 10:
|
|
10971
|
+
_g = [{}];
|
|
10972
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
10973
|
+
case 11:
|
|
10974
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10975
|
+
return [3, 15];
|
|
10976
|
+
case 12:
|
|
10977
|
+
_h = [{}];
|
|
10978
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
10979
|
+
case 13:
|
|
10980
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10981
|
+
return [3, 15];
|
|
10982
|
+
case 14:
|
|
10983
|
+
parsedBody = parsedOutput.body;
|
|
10984
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
10985
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
10986
|
+
_k.label = 15;
|
|
10987
|
+
case 15:
|
|
10988
|
+
message = response.message || response.Message || errorCode;
|
|
10989
|
+
response.message = message;
|
|
10990
|
+
delete response.Message;
|
|
10991
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
10992
|
+
}
|
|
10993
|
+
});
|
|
10994
|
+
}); };
|
|
10995
|
+
export var deserializeAws_restJson1ListContactFlowsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10996
|
+
var contents, data, _a, _b;
|
|
10997
|
+
return __generator(this, function (_c) {
|
|
10998
|
+
switch (_c.label) {
|
|
10999
|
+
case 0:
|
|
11000
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
11001
|
+
return [2, deserializeAws_restJson1ListContactFlowsCommandError(output, context)];
|
|
11002
|
+
}
|
|
11003
|
+
contents = {
|
|
11004
|
+
$metadata: deserializeMetadata(output),
|
|
11005
|
+
ContactFlowSummaryList: undefined,
|
|
11006
|
+
NextToken: undefined,
|
|
11007
|
+
};
|
|
11008
|
+
_a = __expectNonNull;
|
|
11009
|
+
_b = __expectObject;
|
|
11010
|
+
return [4, parseBody(output.body, context)];
|
|
11011
|
+
case 1:
|
|
11012
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
11013
|
+
if (data.ContactFlowSummaryList !== undefined && data.ContactFlowSummaryList !== null) {
|
|
11014
|
+
contents.ContactFlowSummaryList = deserializeAws_restJson1ContactFlowSummaryList(data.ContactFlowSummaryList, context);
|
|
11015
|
+
}
|
|
11016
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
11017
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
11018
|
+
}
|
|
11019
|
+
return [2, Promise.resolve(contents)];
|
|
11020
|
+
}
|
|
11021
|
+
});
|
|
11022
|
+
}); };
|
|
11023
|
+
var deserializeAws_restJson1ListContactFlowsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11024
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
11025
|
+
var _h;
|
|
11026
|
+
return __generator(this, function (_j) {
|
|
11027
|
+
switch (_j.label) {
|
|
11028
|
+
case 0:
|
|
11029
|
+
_a = [__assign({}, output)];
|
|
11030
|
+
_h = {};
|
|
11031
|
+
return [4, parseBody(output.body, context)];
|
|
11032
|
+
case 1:
|
|
11033
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
11034
|
+
errorCode = "UnknownError";
|
|
11035
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
11036
|
+
_b = errorCode;
|
|
11037
|
+
switch (_b) {
|
|
11038
|
+
case "InternalServiceException": return [3, 2];
|
|
11039
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
11040
|
+
case "InvalidParameterException": return [3, 4];
|
|
11041
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
11042
|
+
case "InvalidRequestException": return [3, 6];
|
|
11043
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
11044
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
11045
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
11046
|
+
case "ThrottlingException": return [3, 10];
|
|
11047
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
11048
|
+
}
|
|
11049
|
+
return [3, 12];
|
|
11050
|
+
case 2:
|
|
11051
|
+
_c = [{}];
|
|
11052
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
11053
|
+
case 3:
|
|
11054
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11055
|
+
return [3, 13];
|
|
11056
|
+
case 4:
|
|
11057
|
+
_d = [{}];
|
|
11058
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
11059
|
+
case 5:
|
|
11060
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11061
|
+
return [3, 13];
|
|
11062
|
+
case 6:
|
|
11063
|
+
_e = [{}];
|
|
11064
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
11065
|
+
case 7:
|
|
11066
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11067
|
+
return [3, 13];
|
|
11068
|
+
case 8:
|
|
11069
|
+
_f = [{}];
|
|
11070
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
11071
|
+
case 9:
|
|
11072
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11073
|
+
return [3, 13];
|
|
11074
|
+
case 10:
|
|
11075
|
+
_g = [{}];
|
|
11076
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
11077
|
+
case 11:
|
|
11078
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11079
|
+
return [3, 13];
|
|
11080
|
+
case 12:
|
|
11081
|
+
parsedBody = parsedOutput.body;
|
|
11082
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
11083
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
11084
|
+
_j.label = 13;
|
|
11085
|
+
case 13:
|
|
11086
|
+
message = response.message || response.Message || errorCode;
|
|
11087
|
+
response.message = message;
|
|
11088
|
+
delete response.Message;
|
|
11089
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
11090
|
+
}
|
|
11091
|
+
});
|
|
11092
|
+
}); };
|
|
11093
|
+
export var deserializeAws_restJson1ListContactReferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11094
|
+
var contents, data, _a, _b;
|
|
11095
|
+
return __generator(this, function (_c) {
|
|
11096
|
+
switch (_c.label) {
|
|
11097
|
+
case 0:
|
|
11098
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
11099
|
+
return [2, deserializeAws_restJson1ListContactReferencesCommandError(output, context)];
|
|
11100
|
+
}
|
|
11101
|
+
contents = {
|
|
11102
|
+
$metadata: deserializeMetadata(output),
|
|
11103
|
+
NextToken: undefined,
|
|
11104
|
+
ReferenceSummaryList: undefined,
|
|
11105
|
+
};
|
|
11106
|
+
_a = __expectNonNull;
|
|
11107
|
+
_b = __expectObject;
|
|
11108
|
+
return [4, parseBody(output.body, context)];
|
|
11109
|
+
case 1:
|
|
11110
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
11111
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
11112
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
11113
|
+
}
|
|
11114
|
+
if (data.ReferenceSummaryList !== undefined && data.ReferenceSummaryList !== null) {
|
|
11115
|
+
contents.ReferenceSummaryList = deserializeAws_restJson1ReferenceSummaryList(data.ReferenceSummaryList, context);
|
|
11116
|
+
}
|
|
11117
|
+
return [2, Promise.resolve(contents)];
|
|
11118
|
+
}
|
|
11119
|
+
});
|
|
11120
|
+
}); };
|
|
11121
|
+
var deserializeAws_restJson1ListContactReferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11122
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
11123
|
+
var _h;
|
|
11124
|
+
return __generator(this, function (_j) {
|
|
11125
|
+
switch (_j.label) {
|
|
11126
|
+
case 0:
|
|
11127
|
+
_a = [__assign({}, output)];
|
|
11128
|
+
_h = {};
|
|
11129
|
+
return [4, parseBody(output.body, context)];
|
|
11130
|
+
case 1:
|
|
11131
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
11132
|
+
errorCode = "UnknownError";
|
|
11133
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
11134
|
+
_b = errorCode;
|
|
11135
|
+
switch (_b) {
|
|
11136
|
+
case "InternalServiceException": return [3, 2];
|
|
11137
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
11138
|
+
case "InvalidParameterException": return [3, 4];
|
|
11139
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
11140
|
+
case "InvalidRequestException": return [3, 6];
|
|
11141
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
11142
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
11143
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
11144
|
+
case "ThrottlingException": return [3, 10];
|
|
11145
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
11146
|
+
}
|
|
11147
|
+
return [3, 12];
|
|
11148
|
+
case 2:
|
|
11149
|
+
_c = [{}];
|
|
11150
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
11151
|
+
case 3:
|
|
11152
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11153
|
+
return [3, 13];
|
|
11154
|
+
case 4:
|
|
11155
|
+
_d = [{}];
|
|
11156
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
11157
|
+
case 5:
|
|
11158
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11159
|
+
return [3, 13];
|
|
11160
|
+
case 6:
|
|
11161
|
+
_e = [{}];
|
|
11162
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
11163
|
+
case 7:
|
|
11164
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11165
|
+
return [3, 13];
|
|
11166
|
+
case 8:
|
|
11167
|
+
_f = [{}];
|
|
11168
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
9950
11169
|
case 9:
|
|
9951
11170
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9952
11171
|
return [3, 13];
|
|
@@ -13031,13 +14250,573 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
13031
14250
|
}
|
|
13032
14251
|
});
|
|
13033
14252
|
}); };
|
|
13034
|
-
export var deserializeAws_restJson1UpdateAgentStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14253
|
+
export var deserializeAws_restJson1UpdateAgentStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14254
|
+
var contents;
|
|
14255
|
+
return __generator(this, function (_a) {
|
|
14256
|
+
switch (_a.label) {
|
|
14257
|
+
case 0:
|
|
14258
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14259
|
+
return [2, deserializeAws_restJson1UpdateAgentStatusCommandError(output, context)];
|
|
14260
|
+
}
|
|
14261
|
+
contents = {
|
|
14262
|
+
$metadata: deserializeMetadata(output),
|
|
14263
|
+
};
|
|
14264
|
+
return [4, collectBody(output.body, context)];
|
|
14265
|
+
case 1:
|
|
14266
|
+
_a.sent();
|
|
14267
|
+
return [2, Promise.resolve(contents)];
|
|
14268
|
+
}
|
|
14269
|
+
});
|
|
14270
|
+
}); };
|
|
14271
|
+
var deserializeAws_restJson1UpdateAgentStatusCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14272
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
14273
|
+
var _k;
|
|
14274
|
+
return __generator(this, function (_l) {
|
|
14275
|
+
switch (_l.label) {
|
|
14276
|
+
case 0:
|
|
14277
|
+
_a = [__assign({}, output)];
|
|
14278
|
+
_k = {};
|
|
14279
|
+
return [4, parseBody(output.body, context)];
|
|
14280
|
+
case 1:
|
|
14281
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
14282
|
+
errorCode = "UnknownError";
|
|
14283
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14284
|
+
_b = errorCode;
|
|
14285
|
+
switch (_b) {
|
|
14286
|
+
case "DuplicateResourceException": return [3, 2];
|
|
14287
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
|
|
14288
|
+
case "InternalServiceException": return [3, 4];
|
|
14289
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
14290
|
+
case "InvalidParameterException": return [3, 6];
|
|
14291
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
14292
|
+
case "InvalidRequestException": return [3, 8];
|
|
14293
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
14294
|
+
case "LimitExceededException": return [3, 10];
|
|
14295
|
+
case "com.amazonaws.connect#LimitExceededException": return [3, 10];
|
|
14296
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
14297
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
|
|
14298
|
+
case "ThrottlingException": return [3, 14];
|
|
14299
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 14];
|
|
14300
|
+
}
|
|
14301
|
+
return [3, 16];
|
|
14302
|
+
case 2:
|
|
14303
|
+
_c = [{}];
|
|
14304
|
+
return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
14305
|
+
case 3:
|
|
14306
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14307
|
+
return [3, 17];
|
|
14308
|
+
case 4:
|
|
14309
|
+
_d = [{}];
|
|
14310
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14311
|
+
case 5:
|
|
14312
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14313
|
+
return [3, 17];
|
|
14314
|
+
case 6:
|
|
14315
|
+
_e = [{}];
|
|
14316
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
14317
|
+
case 7:
|
|
14318
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14319
|
+
return [3, 17];
|
|
14320
|
+
case 8:
|
|
14321
|
+
_f = [{}];
|
|
14322
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14323
|
+
case 9:
|
|
14324
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14325
|
+
return [3, 17];
|
|
14326
|
+
case 10:
|
|
14327
|
+
_g = [{}];
|
|
14328
|
+
return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
14329
|
+
case 11:
|
|
14330
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14331
|
+
return [3, 17];
|
|
14332
|
+
case 12:
|
|
14333
|
+
_h = [{}];
|
|
14334
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14335
|
+
case 13:
|
|
14336
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14337
|
+
return [3, 17];
|
|
14338
|
+
case 14:
|
|
14339
|
+
_j = [{}];
|
|
14340
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14341
|
+
case 15:
|
|
14342
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14343
|
+
return [3, 17];
|
|
14344
|
+
case 16:
|
|
14345
|
+
parsedBody = parsedOutput.body;
|
|
14346
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14347
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14348
|
+
_l.label = 17;
|
|
14349
|
+
case 17:
|
|
14350
|
+
message = response.message || response.Message || errorCode;
|
|
14351
|
+
response.message = message;
|
|
14352
|
+
delete response.Message;
|
|
14353
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14354
|
+
}
|
|
14355
|
+
});
|
|
14356
|
+
}); };
|
|
14357
|
+
export var deserializeAws_restJson1UpdateContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14358
|
+
var contents;
|
|
14359
|
+
return __generator(this, function (_a) {
|
|
14360
|
+
switch (_a.label) {
|
|
14361
|
+
case 0:
|
|
14362
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14363
|
+
return [2, deserializeAws_restJson1UpdateContactCommandError(output, context)];
|
|
14364
|
+
}
|
|
14365
|
+
contents = {
|
|
14366
|
+
$metadata: deserializeMetadata(output),
|
|
14367
|
+
};
|
|
14368
|
+
return [4, collectBody(output.body, context)];
|
|
14369
|
+
case 1:
|
|
14370
|
+
_a.sent();
|
|
14371
|
+
return [2, Promise.resolve(contents)];
|
|
14372
|
+
}
|
|
14373
|
+
});
|
|
14374
|
+
}); };
|
|
14375
|
+
var deserializeAws_restJson1UpdateContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14376
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
14377
|
+
var _h;
|
|
14378
|
+
return __generator(this, function (_j) {
|
|
14379
|
+
switch (_j.label) {
|
|
14380
|
+
case 0:
|
|
14381
|
+
_a = [__assign({}, output)];
|
|
14382
|
+
_h = {};
|
|
14383
|
+
return [4, parseBody(output.body, context)];
|
|
14384
|
+
case 1:
|
|
14385
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
14386
|
+
errorCode = "UnknownError";
|
|
14387
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14388
|
+
_b = errorCode;
|
|
14389
|
+
switch (_b) {
|
|
14390
|
+
case "InternalServiceException": return [3, 2];
|
|
14391
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
14392
|
+
case "InvalidParameterException": return [3, 4];
|
|
14393
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
14394
|
+
case "InvalidRequestException": return [3, 6];
|
|
14395
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
14396
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
14397
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
14398
|
+
case "ThrottlingException": return [3, 10];
|
|
14399
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
14400
|
+
}
|
|
14401
|
+
return [3, 12];
|
|
14402
|
+
case 2:
|
|
14403
|
+
_c = [{}];
|
|
14404
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14405
|
+
case 3:
|
|
14406
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14407
|
+
return [3, 13];
|
|
14408
|
+
case 4:
|
|
14409
|
+
_d = [{}];
|
|
14410
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
14411
|
+
case 5:
|
|
14412
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14413
|
+
return [3, 13];
|
|
14414
|
+
case 6:
|
|
14415
|
+
_e = [{}];
|
|
14416
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14417
|
+
case 7:
|
|
14418
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14419
|
+
return [3, 13];
|
|
14420
|
+
case 8:
|
|
14421
|
+
_f = [{}];
|
|
14422
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14423
|
+
case 9:
|
|
14424
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14425
|
+
return [3, 13];
|
|
14426
|
+
case 10:
|
|
14427
|
+
_g = [{}];
|
|
14428
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14429
|
+
case 11:
|
|
14430
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14431
|
+
return [3, 13];
|
|
14432
|
+
case 12:
|
|
14433
|
+
parsedBody = parsedOutput.body;
|
|
14434
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14435
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14436
|
+
_j.label = 13;
|
|
14437
|
+
case 13:
|
|
14438
|
+
message = response.message || response.Message || errorCode;
|
|
14439
|
+
response.message = message;
|
|
14440
|
+
delete response.Message;
|
|
14441
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14442
|
+
}
|
|
14443
|
+
});
|
|
14444
|
+
}); };
|
|
14445
|
+
export var deserializeAws_restJson1UpdateContactAttributesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14446
|
+
var contents;
|
|
14447
|
+
return __generator(this, function (_a) {
|
|
14448
|
+
switch (_a.label) {
|
|
14449
|
+
case 0:
|
|
14450
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14451
|
+
return [2, deserializeAws_restJson1UpdateContactAttributesCommandError(output, context)];
|
|
14452
|
+
}
|
|
14453
|
+
contents = {
|
|
14454
|
+
$metadata: deserializeMetadata(output),
|
|
14455
|
+
};
|
|
14456
|
+
return [4, collectBody(output.body, context)];
|
|
14457
|
+
case 1:
|
|
14458
|
+
_a.sent();
|
|
14459
|
+
return [2, Promise.resolve(contents)];
|
|
14460
|
+
}
|
|
14461
|
+
});
|
|
14462
|
+
}); };
|
|
14463
|
+
var deserializeAws_restJson1UpdateContactAttributesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14464
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
14465
|
+
var _g;
|
|
14466
|
+
return __generator(this, function (_h) {
|
|
14467
|
+
switch (_h.label) {
|
|
14468
|
+
case 0:
|
|
14469
|
+
_a = [__assign({}, output)];
|
|
14470
|
+
_g = {};
|
|
14471
|
+
return [4, parseBody(output.body, context)];
|
|
14472
|
+
case 1:
|
|
14473
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
14474
|
+
errorCode = "UnknownError";
|
|
14475
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14476
|
+
_b = errorCode;
|
|
14477
|
+
switch (_b) {
|
|
14478
|
+
case "InternalServiceException": return [3, 2];
|
|
14479
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
14480
|
+
case "InvalidParameterException": return [3, 4];
|
|
14481
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
14482
|
+
case "InvalidRequestException": return [3, 6];
|
|
14483
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
14484
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
14485
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
14486
|
+
}
|
|
14487
|
+
return [3, 10];
|
|
14488
|
+
case 2:
|
|
14489
|
+
_c = [{}];
|
|
14490
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14491
|
+
case 3:
|
|
14492
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14493
|
+
return [3, 11];
|
|
14494
|
+
case 4:
|
|
14495
|
+
_d = [{}];
|
|
14496
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
14497
|
+
case 5:
|
|
14498
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14499
|
+
return [3, 11];
|
|
14500
|
+
case 6:
|
|
14501
|
+
_e = [{}];
|
|
14502
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14503
|
+
case 7:
|
|
14504
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14505
|
+
return [3, 11];
|
|
14506
|
+
case 8:
|
|
14507
|
+
_f = [{}];
|
|
14508
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14509
|
+
case 9:
|
|
14510
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14511
|
+
return [3, 11];
|
|
14512
|
+
case 10:
|
|
14513
|
+
parsedBody = parsedOutput.body;
|
|
14514
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14515
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14516
|
+
_h.label = 11;
|
|
14517
|
+
case 11:
|
|
14518
|
+
message = response.message || response.Message || errorCode;
|
|
14519
|
+
response.message = message;
|
|
14520
|
+
delete response.Message;
|
|
14521
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14522
|
+
}
|
|
14523
|
+
});
|
|
14524
|
+
}); };
|
|
14525
|
+
export var deserializeAws_restJson1UpdateContactFlowContentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14526
|
+
var contents;
|
|
14527
|
+
return __generator(this, function (_a) {
|
|
14528
|
+
switch (_a.label) {
|
|
14529
|
+
case 0:
|
|
14530
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14531
|
+
return [2, deserializeAws_restJson1UpdateContactFlowContentCommandError(output, context)];
|
|
14532
|
+
}
|
|
14533
|
+
contents = {
|
|
14534
|
+
$metadata: deserializeMetadata(output),
|
|
14535
|
+
};
|
|
14536
|
+
return [4, collectBody(output.body, context)];
|
|
14537
|
+
case 1:
|
|
14538
|
+
_a.sent();
|
|
14539
|
+
return [2, Promise.resolve(contents)];
|
|
14540
|
+
}
|
|
14541
|
+
});
|
|
14542
|
+
}); };
|
|
14543
|
+
var deserializeAws_restJson1UpdateContactFlowContentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14544
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
14545
|
+
var _j;
|
|
14546
|
+
return __generator(this, function (_k) {
|
|
14547
|
+
switch (_k.label) {
|
|
14548
|
+
case 0:
|
|
14549
|
+
_a = [__assign({}, output)];
|
|
14550
|
+
_j = {};
|
|
14551
|
+
return [4, parseBody(output.body, context)];
|
|
14552
|
+
case 1:
|
|
14553
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
14554
|
+
errorCode = "UnknownError";
|
|
14555
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14556
|
+
_b = errorCode;
|
|
14557
|
+
switch (_b) {
|
|
14558
|
+
case "InternalServiceException": return [3, 2];
|
|
14559
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
14560
|
+
case "InvalidContactFlowException": return [3, 4];
|
|
14561
|
+
case "com.amazonaws.connect#InvalidContactFlowException": return [3, 4];
|
|
14562
|
+
case "InvalidParameterException": return [3, 6];
|
|
14563
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
14564
|
+
case "InvalidRequestException": return [3, 8];
|
|
14565
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
14566
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
14567
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
14568
|
+
case "ThrottlingException": return [3, 12];
|
|
14569
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
14570
|
+
}
|
|
14571
|
+
return [3, 14];
|
|
14572
|
+
case 2:
|
|
14573
|
+
_c = [{}];
|
|
14574
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14575
|
+
case 3:
|
|
14576
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14577
|
+
return [3, 15];
|
|
14578
|
+
case 4:
|
|
14579
|
+
_d = [{}];
|
|
14580
|
+
return [4, deserializeAws_restJson1InvalidContactFlowExceptionResponse(parsedOutput, context)];
|
|
14581
|
+
case 5:
|
|
14582
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14583
|
+
return [3, 15];
|
|
14584
|
+
case 6:
|
|
14585
|
+
_e = [{}];
|
|
14586
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
14587
|
+
case 7:
|
|
14588
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14589
|
+
return [3, 15];
|
|
14590
|
+
case 8:
|
|
14591
|
+
_f = [{}];
|
|
14592
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14593
|
+
case 9:
|
|
14594
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14595
|
+
return [3, 15];
|
|
14596
|
+
case 10:
|
|
14597
|
+
_g = [{}];
|
|
14598
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14599
|
+
case 11:
|
|
14600
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14601
|
+
return [3, 15];
|
|
14602
|
+
case 12:
|
|
14603
|
+
_h = [{}];
|
|
14604
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14605
|
+
case 13:
|
|
14606
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14607
|
+
return [3, 15];
|
|
14608
|
+
case 14:
|
|
14609
|
+
parsedBody = parsedOutput.body;
|
|
14610
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14611
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14612
|
+
_k.label = 15;
|
|
14613
|
+
case 15:
|
|
14614
|
+
message = response.message || response.Message || errorCode;
|
|
14615
|
+
response.message = message;
|
|
14616
|
+
delete response.Message;
|
|
14617
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14618
|
+
}
|
|
14619
|
+
});
|
|
14620
|
+
}); };
|
|
14621
|
+
export var deserializeAws_restJson1UpdateContactFlowMetadataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14622
|
+
var contents;
|
|
14623
|
+
return __generator(this, function (_a) {
|
|
14624
|
+
switch (_a.label) {
|
|
14625
|
+
case 0:
|
|
14626
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14627
|
+
return [2, deserializeAws_restJson1UpdateContactFlowMetadataCommandError(output, context)];
|
|
14628
|
+
}
|
|
14629
|
+
contents = {
|
|
14630
|
+
$metadata: deserializeMetadata(output),
|
|
14631
|
+
};
|
|
14632
|
+
return [4, collectBody(output.body, context)];
|
|
14633
|
+
case 1:
|
|
14634
|
+
_a.sent();
|
|
14635
|
+
return [2, Promise.resolve(contents)];
|
|
14636
|
+
}
|
|
14637
|
+
});
|
|
14638
|
+
}); };
|
|
14639
|
+
var deserializeAws_restJson1UpdateContactFlowMetadataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14640
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
14641
|
+
var _j;
|
|
14642
|
+
return __generator(this, function (_k) {
|
|
14643
|
+
switch (_k.label) {
|
|
14644
|
+
case 0:
|
|
14645
|
+
_a = [__assign({}, output)];
|
|
14646
|
+
_j = {};
|
|
14647
|
+
return [4, parseBody(output.body, context)];
|
|
14648
|
+
case 1:
|
|
14649
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
14650
|
+
errorCode = "UnknownError";
|
|
14651
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14652
|
+
_b = errorCode;
|
|
14653
|
+
switch (_b) {
|
|
14654
|
+
case "DuplicateResourceException": return [3, 2];
|
|
14655
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
|
|
14656
|
+
case "InternalServiceException": return [3, 4];
|
|
14657
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
14658
|
+
case "InvalidParameterException": return [3, 6];
|
|
14659
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
14660
|
+
case "InvalidRequestException": return [3, 8];
|
|
14661
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
14662
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
14663
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
14664
|
+
case "ThrottlingException": return [3, 12];
|
|
14665
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
14666
|
+
}
|
|
14667
|
+
return [3, 14];
|
|
14668
|
+
case 2:
|
|
14669
|
+
_c = [{}];
|
|
14670
|
+
return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
14671
|
+
case 3:
|
|
14672
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14673
|
+
return [3, 15];
|
|
14674
|
+
case 4:
|
|
14675
|
+
_d = [{}];
|
|
14676
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14677
|
+
case 5:
|
|
14678
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14679
|
+
return [3, 15];
|
|
14680
|
+
case 6:
|
|
14681
|
+
_e = [{}];
|
|
14682
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
14683
|
+
case 7:
|
|
14684
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14685
|
+
return [3, 15];
|
|
14686
|
+
case 8:
|
|
14687
|
+
_f = [{}];
|
|
14688
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14689
|
+
case 9:
|
|
14690
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14691
|
+
return [3, 15];
|
|
14692
|
+
case 10:
|
|
14693
|
+
_g = [{}];
|
|
14694
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14695
|
+
case 11:
|
|
14696
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14697
|
+
return [3, 15];
|
|
14698
|
+
case 12:
|
|
14699
|
+
_h = [{}];
|
|
14700
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14701
|
+
case 13:
|
|
14702
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14703
|
+
return [3, 15];
|
|
14704
|
+
case 14:
|
|
14705
|
+
parsedBody = parsedOutput.body;
|
|
14706
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14707
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14708
|
+
_k.label = 15;
|
|
14709
|
+
case 15:
|
|
14710
|
+
message = response.message || response.Message || errorCode;
|
|
14711
|
+
response.message = message;
|
|
14712
|
+
delete response.Message;
|
|
14713
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14714
|
+
}
|
|
14715
|
+
});
|
|
14716
|
+
}); };
|
|
14717
|
+
export var deserializeAws_restJson1UpdateContactFlowModuleContentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14718
|
+
var contents;
|
|
14719
|
+
return __generator(this, function (_a) {
|
|
14720
|
+
switch (_a.label) {
|
|
14721
|
+
case 0:
|
|
14722
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14723
|
+
return [2, deserializeAws_restJson1UpdateContactFlowModuleContentCommandError(output, context)];
|
|
14724
|
+
}
|
|
14725
|
+
contents = {
|
|
14726
|
+
$metadata: deserializeMetadata(output),
|
|
14727
|
+
};
|
|
14728
|
+
return [4, collectBody(output.body, context)];
|
|
14729
|
+
case 1:
|
|
14730
|
+
_a.sent();
|
|
14731
|
+
return [2, Promise.resolve(contents)];
|
|
14732
|
+
}
|
|
14733
|
+
});
|
|
14734
|
+
}); };
|
|
14735
|
+
var deserializeAws_restJson1UpdateContactFlowModuleContentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14736
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
14737
|
+
var _j;
|
|
14738
|
+
return __generator(this, function (_k) {
|
|
14739
|
+
switch (_k.label) {
|
|
14740
|
+
case 0:
|
|
14741
|
+
_a = [__assign({}, output)];
|
|
14742
|
+
_j = {};
|
|
14743
|
+
return [4, parseBody(output.body, context)];
|
|
14744
|
+
case 1:
|
|
14745
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
14746
|
+
errorCode = "UnknownError";
|
|
14747
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14748
|
+
_b = errorCode;
|
|
14749
|
+
switch (_b) {
|
|
14750
|
+
case "AccessDeniedException": return [3, 2];
|
|
14751
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
14752
|
+
case "InternalServiceException": return [3, 4];
|
|
14753
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
14754
|
+
case "InvalidContactFlowModuleException": return [3, 6];
|
|
14755
|
+
case "com.amazonaws.connect#InvalidContactFlowModuleException": return [3, 6];
|
|
14756
|
+
case "InvalidRequestException": return [3, 8];
|
|
14757
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
14758
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
14759
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
14760
|
+
case "ThrottlingException": return [3, 12];
|
|
14761
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
14762
|
+
}
|
|
14763
|
+
return [3, 14];
|
|
14764
|
+
case 2:
|
|
14765
|
+
_c = [{}];
|
|
14766
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
14767
|
+
case 3:
|
|
14768
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14769
|
+
return [3, 15];
|
|
14770
|
+
case 4:
|
|
14771
|
+
_d = [{}];
|
|
14772
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14773
|
+
case 5:
|
|
14774
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14775
|
+
return [3, 15];
|
|
14776
|
+
case 6:
|
|
14777
|
+
_e = [{}];
|
|
14778
|
+
return [4, deserializeAws_restJson1InvalidContactFlowModuleExceptionResponse(parsedOutput, context)];
|
|
14779
|
+
case 7:
|
|
14780
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14781
|
+
return [3, 15];
|
|
14782
|
+
case 8:
|
|
14783
|
+
_f = [{}];
|
|
14784
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14785
|
+
case 9:
|
|
14786
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14787
|
+
return [3, 15];
|
|
14788
|
+
case 10:
|
|
14789
|
+
_g = [{}];
|
|
14790
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14791
|
+
case 11:
|
|
14792
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14793
|
+
return [3, 15];
|
|
14794
|
+
case 12:
|
|
14795
|
+
_h = [{}];
|
|
14796
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14797
|
+
case 13:
|
|
14798
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14799
|
+
return [3, 15];
|
|
14800
|
+
case 14:
|
|
14801
|
+
parsedBody = parsedOutput.body;
|
|
14802
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14803
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14804
|
+
_k.label = 15;
|
|
14805
|
+
case 15:
|
|
14806
|
+
message = response.message || response.Message || errorCode;
|
|
14807
|
+
response.message = message;
|
|
14808
|
+
delete response.Message;
|
|
14809
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14810
|
+
}
|
|
14811
|
+
});
|
|
14812
|
+
}); };
|
|
14813
|
+
export var deserializeAws_restJson1UpdateContactFlowModuleMetadataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13035
14814
|
var contents;
|
|
13036
14815
|
return __generator(this, function (_a) {
|
|
13037
14816
|
switch (_a.label) {
|
|
13038
14817
|
case 0:
|
|
13039
14818
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
13040
|
-
return [2,
|
|
14819
|
+
return [2, deserializeAws_restJson1UpdateContactFlowModuleMetadataCommandError(output, context)];
|
|
13041
14820
|
}
|
|
13042
14821
|
contents = {
|
|
13043
14822
|
$metadata: deserializeMetadata(output),
|
|
@@ -13049,7 +14828,7 @@ export var deserializeAws_restJson1UpdateAgentStatusCommand = function (output,
|
|
|
13049
14828
|
}
|
|
13050
14829
|
});
|
|
13051
14830
|
}); };
|
|
13052
|
-
var
|
|
14831
|
+
var deserializeAws_restJson1UpdateContactFlowModuleMetadataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13053
14832
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
13054
14833
|
var _k;
|
|
13055
14834
|
return __generator(this, function (_l) {
|
|
@@ -13064,16 +14843,16 @@ var deserializeAws_restJson1UpdateAgentStatusCommandError = function (output, co
|
|
|
13064
14843
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
13065
14844
|
_b = errorCode;
|
|
13066
14845
|
switch (_b) {
|
|
13067
|
-
case "
|
|
13068
|
-
case "com.amazonaws.connect#
|
|
13069
|
-
case "
|
|
13070
|
-
case "com.amazonaws.connect#
|
|
13071
|
-
case "
|
|
13072
|
-
case "com.amazonaws.connect#
|
|
13073
|
-
case "
|
|
13074
|
-
case "com.amazonaws.connect#
|
|
13075
|
-
case "
|
|
13076
|
-
case "com.amazonaws.connect#
|
|
14846
|
+
case "AccessDeniedException": return [3, 2];
|
|
14847
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
14848
|
+
case "DuplicateResourceException": return [3, 4];
|
|
14849
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 4];
|
|
14850
|
+
case "InternalServiceException": return [3, 6];
|
|
14851
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 6];
|
|
14852
|
+
case "InvalidParameterException": return [3, 8];
|
|
14853
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 8];
|
|
14854
|
+
case "InvalidRequestException": return [3, 10];
|
|
14855
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 10];
|
|
13077
14856
|
case "ResourceNotFoundException": return [3, 12];
|
|
13078
14857
|
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
|
|
13079
14858
|
case "ThrottlingException": return [3, 14];
|
|
@@ -13082,31 +14861,31 @@ var deserializeAws_restJson1UpdateAgentStatusCommandError = function (output, co
|
|
|
13082
14861
|
return [3, 16];
|
|
13083
14862
|
case 2:
|
|
13084
14863
|
_c = [{}];
|
|
13085
|
-
return [4,
|
|
14864
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
13086
14865
|
case 3:
|
|
13087
14866
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13088
14867
|
return [3, 17];
|
|
13089
14868
|
case 4:
|
|
13090
14869
|
_d = [{}];
|
|
13091
|
-
return [4,
|
|
14870
|
+
return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
13092
14871
|
case 5:
|
|
13093
14872
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13094
14873
|
return [3, 17];
|
|
13095
14874
|
case 6:
|
|
13096
14875
|
_e = [{}];
|
|
13097
|
-
return [4,
|
|
14876
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
13098
14877
|
case 7:
|
|
13099
14878
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13100
14879
|
return [3, 17];
|
|
13101
14880
|
case 8:
|
|
13102
14881
|
_f = [{}];
|
|
13103
|
-
return [4,
|
|
14882
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
13104
14883
|
case 9:
|
|
13105
14884
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13106
14885
|
return [3, 17];
|
|
13107
14886
|
case 10:
|
|
13108
14887
|
_g = [{}];
|
|
13109
|
-
return [4,
|
|
14888
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
13110
14889
|
case 11:
|
|
13111
14890
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13112
14891
|
return [3, 17];
|
|
@@ -13135,93 +14914,13 @@ var deserializeAws_restJson1UpdateAgentStatusCommandError = function (output, co
|
|
|
13135
14914
|
}
|
|
13136
14915
|
});
|
|
13137
14916
|
}); };
|
|
13138
|
-
export var
|
|
13139
|
-
var contents;
|
|
13140
|
-
return __generator(this, function (_a) {
|
|
13141
|
-
switch (_a.label) {
|
|
13142
|
-
case 0:
|
|
13143
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
13144
|
-
return [2, deserializeAws_restJson1UpdateContactAttributesCommandError(output, context)];
|
|
13145
|
-
}
|
|
13146
|
-
contents = {
|
|
13147
|
-
$metadata: deserializeMetadata(output),
|
|
13148
|
-
};
|
|
13149
|
-
return [4, collectBody(output.body, context)];
|
|
13150
|
-
case 1:
|
|
13151
|
-
_a.sent();
|
|
13152
|
-
return [2, Promise.resolve(contents)];
|
|
13153
|
-
}
|
|
13154
|
-
});
|
|
13155
|
-
}); };
|
|
13156
|
-
var deserializeAws_restJson1UpdateContactAttributesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13157
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
13158
|
-
var _g;
|
|
13159
|
-
return __generator(this, function (_h) {
|
|
13160
|
-
switch (_h.label) {
|
|
13161
|
-
case 0:
|
|
13162
|
-
_a = [__assign({}, output)];
|
|
13163
|
-
_g = {};
|
|
13164
|
-
return [4, parseBody(output.body, context)];
|
|
13165
|
-
case 1:
|
|
13166
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
13167
|
-
errorCode = "UnknownError";
|
|
13168
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
13169
|
-
_b = errorCode;
|
|
13170
|
-
switch (_b) {
|
|
13171
|
-
case "InternalServiceException": return [3, 2];
|
|
13172
|
-
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
13173
|
-
case "InvalidParameterException": return [3, 4];
|
|
13174
|
-
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
13175
|
-
case "InvalidRequestException": return [3, 6];
|
|
13176
|
-
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
13177
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
13178
|
-
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
13179
|
-
}
|
|
13180
|
-
return [3, 10];
|
|
13181
|
-
case 2:
|
|
13182
|
-
_c = [{}];
|
|
13183
|
-
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
13184
|
-
case 3:
|
|
13185
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13186
|
-
return [3, 11];
|
|
13187
|
-
case 4:
|
|
13188
|
-
_d = [{}];
|
|
13189
|
-
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
13190
|
-
case 5:
|
|
13191
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13192
|
-
return [3, 11];
|
|
13193
|
-
case 6:
|
|
13194
|
-
_e = [{}];
|
|
13195
|
-
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
13196
|
-
case 7:
|
|
13197
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13198
|
-
return [3, 11];
|
|
13199
|
-
case 8:
|
|
13200
|
-
_f = [{}];
|
|
13201
|
-
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
13202
|
-
case 9:
|
|
13203
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13204
|
-
return [3, 11];
|
|
13205
|
-
case 10:
|
|
13206
|
-
parsedBody = parsedOutput.body;
|
|
13207
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
13208
|
-
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
13209
|
-
_h.label = 11;
|
|
13210
|
-
case 11:
|
|
13211
|
-
message = response.message || response.Message || errorCode;
|
|
13212
|
-
response.message = message;
|
|
13213
|
-
delete response.Message;
|
|
13214
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
13215
|
-
}
|
|
13216
|
-
});
|
|
13217
|
-
}); };
|
|
13218
|
-
export var deserializeAws_restJson1UpdateContactFlowContentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14917
|
+
export var deserializeAws_restJson1UpdateContactFlowNameCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13219
14918
|
var contents;
|
|
13220
14919
|
return __generator(this, function (_a) {
|
|
13221
14920
|
switch (_a.label) {
|
|
13222
14921
|
case 0:
|
|
13223
14922
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
13224
|
-
return [2,
|
|
14923
|
+
return [2, deserializeAws_restJson1UpdateContactFlowNameCommandError(output, context)];
|
|
13225
14924
|
}
|
|
13226
14925
|
contents = {
|
|
13227
14926
|
$metadata: deserializeMetadata(output),
|
|
@@ -13233,7 +14932,7 @@ export var deserializeAws_restJson1UpdateContactFlowContentCommand = function (o
|
|
|
13233
14932
|
}
|
|
13234
14933
|
});
|
|
13235
14934
|
}); };
|
|
13236
|
-
var
|
|
14935
|
+
var deserializeAws_restJson1UpdateContactFlowNameCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13237
14936
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
13238
14937
|
var _j;
|
|
13239
14938
|
return __generator(this, function (_k) {
|
|
@@ -13248,10 +14947,10 @@ var deserializeAws_restJson1UpdateContactFlowContentCommandError = function (out
|
|
|
13248
14947
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
13249
14948
|
_b = errorCode;
|
|
13250
14949
|
switch (_b) {
|
|
13251
|
-
case "
|
|
13252
|
-
case "com.amazonaws.connect#
|
|
13253
|
-
case "
|
|
13254
|
-
case "com.amazonaws.connect#
|
|
14950
|
+
case "DuplicateResourceException": return [3, 2];
|
|
14951
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
|
|
14952
|
+
case "InternalServiceException": return [3, 4];
|
|
14953
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
13255
14954
|
case "InvalidParameterException": return [3, 6];
|
|
13256
14955
|
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
13257
14956
|
case "InvalidRequestException": return [3, 8];
|
|
@@ -13264,13 +14963,13 @@ var deserializeAws_restJson1UpdateContactFlowContentCommandError = function (out
|
|
|
13264
14963
|
return [3, 14];
|
|
13265
14964
|
case 2:
|
|
13266
14965
|
_c = [{}];
|
|
13267
|
-
return [4,
|
|
14966
|
+
return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
13268
14967
|
case 3:
|
|
13269
14968
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13270
14969
|
return [3, 15];
|
|
13271
14970
|
case 4:
|
|
13272
14971
|
_d = [{}];
|
|
13273
|
-
return [4,
|
|
14972
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
13274
14973
|
case 5:
|
|
13275
14974
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13276
14975
|
return [3, 15];
|
|
@@ -13311,13 +15010,13 @@ var deserializeAws_restJson1UpdateContactFlowContentCommandError = function (out
|
|
|
13311
15010
|
}
|
|
13312
15011
|
});
|
|
13313
15012
|
}); };
|
|
13314
|
-
export var
|
|
15013
|
+
export var deserializeAws_restJson1UpdateContactScheduleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13315
15014
|
var contents;
|
|
13316
15015
|
return __generator(this, function (_a) {
|
|
13317
15016
|
switch (_a.label) {
|
|
13318
15017
|
case 0:
|
|
13319
15018
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
13320
|
-
return [2,
|
|
15019
|
+
return [2, deserializeAws_restJson1UpdateContactScheduleCommandError(output, context)];
|
|
13321
15020
|
}
|
|
13322
15021
|
contents = {
|
|
13323
15022
|
$metadata: deserializeMetadata(output),
|
|
@@ -13329,7 +15028,7 @@ export var deserializeAws_restJson1UpdateContactFlowNameCommand = function (outp
|
|
|
13329
15028
|
}
|
|
13330
15029
|
});
|
|
13331
15030
|
}); };
|
|
13332
|
-
var
|
|
15031
|
+
var deserializeAws_restJson1UpdateContactScheduleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13333
15032
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
13334
15033
|
var _j;
|
|
13335
15034
|
return __generator(this, function (_k) {
|
|
@@ -13344,14 +15043,14 @@ var deserializeAws_restJson1UpdateContactFlowNameCommandError = function (output
|
|
|
13344
15043
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
13345
15044
|
_b = errorCode;
|
|
13346
15045
|
switch (_b) {
|
|
13347
|
-
case "
|
|
13348
|
-
case "com.amazonaws.connect#
|
|
13349
|
-
case "
|
|
13350
|
-
case "com.amazonaws.connect#
|
|
13351
|
-
case "
|
|
13352
|
-
case "com.amazonaws.connect#
|
|
13353
|
-
case "
|
|
13354
|
-
case "com.amazonaws.connect#
|
|
15046
|
+
case "InternalServiceException": return [3, 2];
|
|
15047
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
15048
|
+
case "InvalidParameterException": return [3, 4];
|
|
15049
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
15050
|
+
case "InvalidRequestException": return [3, 6];
|
|
15051
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
15052
|
+
case "LimitExceededException": return [3, 8];
|
|
15053
|
+
case "com.amazonaws.connect#LimitExceededException": return [3, 8];
|
|
13355
15054
|
case "ResourceNotFoundException": return [3, 10];
|
|
13356
15055
|
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
13357
15056
|
case "ThrottlingException": return [3, 12];
|
|
@@ -13360,25 +15059,25 @@ var deserializeAws_restJson1UpdateContactFlowNameCommandError = function (output
|
|
|
13360
15059
|
return [3, 14];
|
|
13361
15060
|
case 2:
|
|
13362
15061
|
_c = [{}];
|
|
13363
|
-
return [4,
|
|
15062
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
13364
15063
|
case 3:
|
|
13365
15064
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13366
15065
|
return [3, 15];
|
|
13367
15066
|
case 4:
|
|
13368
15067
|
_d = [{}];
|
|
13369
|
-
return [4,
|
|
15068
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
13370
15069
|
case 5:
|
|
13371
15070
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13372
15071
|
return [3, 15];
|
|
13373
15072
|
case 6:
|
|
13374
15073
|
_e = [{}];
|
|
13375
|
-
return [4,
|
|
15074
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
13376
15075
|
case 7:
|
|
13377
15076
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13378
15077
|
return [3, 15];
|
|
13379
15078
|
case 8:
|
|
13380
15079
|
_f = [{}];
|
|
13381
|
-
return [4,
|
|
15080
|
+
return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
13382
15081
|
case 9:
|
|
13383
15082
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13384
15083
|
return [3, 15];
|
|
@@ -15463,6 +17162,22 @@ var deserializeAws_restJson1DuplicateResourceExceptionResponse = function (parse
|
|
|
15463
17162
|
return [2, contents];
|
|
15464
17163
|
});
|
|
15465
17164
|
}); };
|
|
17165
|
+
var deserializeAws_restJson1IdempotencyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
17166
|
+
var contents, data;
|
|
17167
|
+
return __generator(this, function (_a) {
|
|
17168
|
+
contents = {
|
|
17169
|
+
name: "IdempotencyException",
|
|
17170
|
+
$fault: "client",
|
|
17171
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
17172
|
+
Message: undefined,
|
|
17173
|
+
};
|
|
17174
|
+
data = parsedOutput.body;
|
|
17175
|
+
if (data.Message !== undefined && data.Message !== null) {
|
|
17176
|
+
contents.Message = __expectString(data.Message);
|
|
17177
|
+
}
|
|
17178
|
+
return [2, contents];
|
|
17179
|
+
});
|
|
17180
|
+
}); };
|
|
15466
17181
|
var deserializeAws_restJson1InternalServiceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
15467
17182
|
var contents, data;
|
|
15468
17183
|
return __generator(this, function (_a) {
|
|
@@ -15495,6 +17210,22 @@ var deserializeAws_restJson1InvalidContactFlowExceptionResponse = function (pars
|
|
|
15495
17210
|
return [2, contents];
|
|
15496
17211
|
});
|
|
15497
17212
|
}); };
|
|
17213
|
+
var deserializeAws_restJson1InvalidContactFlowModuleExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
17214
|
+
var contents, data;
|
|
17215
|
+
return __generator(this, function (_a) {
|
|
17216
|
+
contents = {
|
|
17217
|
+
name: "InvalidContactFlowModuleException",
|
|
17218
|
+
$fault: "client",
|
|
17219
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
17220
|
+
Problems: undefined,
|
|
17221
|
+
};
|
|
17222
|
+
data = parsedOutput.body;
|
|
17223
|
+
if (data.Problems !== undefined && data.Problems !== null) {
|
|
17224
|
+
contents.Problems = deserializeAws_restJson1Problems(data.Problems, context);
|
|
17225
|
+
}
|
|
17226
|
+
return [2, contents];
|
|
17227
|
+
});
|
|
17228
|
+
}); };
|
|
15498
17229
|
var deserializeAws_restJson1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
15499
17230
|
var contents, data;
|
|
15500
17231
|
return __generator(this, function (_a) {
|
|
@@ -15966,6 +17697,14 @@ var serializeAws_restJson1VoiceRecordingConfiguration = function (input, context
|
|
|
15966
17697
|
return __assign({}, (input.VoiceRecordingTrack !== undefined &&
|
|
15967
17698
|
input.VoiceRecordingTrack !== null && { VoiceRecordingTrack: input.VoiceRecordingTrack }));
|
|
15968
17699
|
};
|
|
17700
|
+
var deserializeAws_restJson1AgentInfo = function (output, context) {
|
|
17701
|
+
return {
|
|
17702
|
+
ConnectedToAgentTimestamp: output.ConnectedToAgentTimestamp !== undefined && output.ConnectedToAgentTimestamp !== null
|
|
17703
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConnectedToAgentTimestamp)))
|
|
17704
|
+
: undefined,
|
|
17705
|
+
Id: __expectString(output.Id),
|
|
17706
|
+
};
|
|
17707
|
+
};
|
|
15969
17708
|
var deserializeAws_restJson1AgentStatus = function (output, context) {
|
|
15970
17709
|
return {
|
|
15971
17710
|
AgentStatusARN: __expectString(output.AgentStatusARN),
|
|
@@ -15998,6 +17737,13 @@ var deserializeAws_restJson1AgentStatusSummaryList = function (output, context)
|
|
|
15998
17737
|
return deserializeAws_restJson1AgentStatusSummary(entry, context);
|
|
15999
17738
|
});
|
|
16000
17739
|
};
|
|
17740
|
+
var deserializeAws_restJson1AttachmentReference = function (output, context) {
|
|
17741
|
+
return {
|
|
17742
|
+
Name: __expectString(output.Name),
|
|
17743
|
+
Status: __expectString(output.Status),
|
|
17744
|
+
Value: __expectString(output.Value),
|
|
17745
|
+
};
|
|
17746
|
+
};
|
|
16001
17747
|
var deserializeAws_restJson1Attribute = function (output, context) {
|
|
16002
17748
|
return {
|
|
16003
17749
|
AttributeType: __expectString(output.AttributeType),
|
|
@@ -16024,6 +17770,36 @@ var deserializeAws_restJson1AttributesList = function (output, context) {
|
|
|
16024
17770
|
return deserializeAws_restJson1Attribute(entry, context);
|
|
16025
17771
|
});
|
|
16026
17772
|
};
|
|
17773
|
+
var deserializeAws_restJson1Contact = function (output, context) {
|
|
17774
|
+
return {
|
|
17775
|
+
AgentInfo: output.AgentInfo !== undefined && output.AgentInfo !== null
|
|
17776
|
+
? deserializeAws_restJson1AgentInfo(output.AgentInfo, context)
|
|
17777
|
+
: undefined,
|
|
17778
|
+
Arn: __expectString(output.Arn),
|
|
17779
|
+
Channel: __expectString(output.Channel),
|
|
17780
|
+
Description: __expectString(output.Description),
|
|
17781
|
+
DisconnectTimestamp: output.DisconnectTimestamp !== undefined && output.DisconnectTimestamp !== null
|
|
17782
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisconnectTimestamp)))
|
|
17783
|
+
: undefined,
|
|
17784
|
+
Id: __expectString(output.Id),
|
|
17785
|
+
InitialContactId: __expectString(output.InitialContactId),
|
|
17786
|
+
InitiationMethod: __expectString(output.InitiationMethod),
|
|
17787
|
+
InitiationTimestamp: output.InitiationTimestamp !== undefined && output.InitiationTimestamp !== null
|
|
17788
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InitiationTimestamp)))
|
|
17789
|
+
: undefined,
|
|
17790
|
+
LastUpdateTimestamp: output.LastUpdateTimestamp !== undefined && output.LastUpdateTimestamp !== null
|
|
17791
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp)))
|
|
17792
|
+
: undefined,
|
|
17793
|
+
Name: __expectString(output.Name),
|
|
17794
|
+
PreviousContactId: __expectString(output.PreviousContactId),
|
|
17795
|
+
QueueInfo: output.QueueInfo !== undefined && output.QueueInfo !== null
|
|
17796
|
+
? deserializeAws_restJson1QueueInfo(output.QueueInfo, context)
|
|
17797
|
+
: undefined,
|
|
17798
|
+
ScheduledTimestamp: output.ScheduledTimestamp !== undefined && output.ScheduledTimestamp !== null
|
|
17799
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScheduledTimestamp)))
|
|
17800
|
+
: undefined,
|
|
17801
|
+
};
|
|
17802
|
+
};
|
|
16027
17803
|
var deserializeAws_restJson1ContactFlow = function (output, context) {
|
|
16028
17804
|
return {
|
|
16029
17805
|
Arn: __expectString(output.Arn),
|
|
@@ -16031,15 +17807,49 @@ var deserializeAws_restJson1ContactFlow = function (output, context) {
|
|
|
16031
17807
|
Description: __expectString(output.Description),
|
|
16032
17808
|
Id: __expectString(output.Id),
|
|
16033
17809
|
Name: __expectString(output.Name),
|
|
17810
|
+
State: __expectString(output.State),
|
|
16034
17811
|
Tags: output.Tags !== undefined && output.Tags !== null
|
|
16035
17812
|
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
16036
17813
|
: undefined,
|
|
16037
17814
|
Type: __expectString(output.Type),
|
|
16038
17815
|
};
|
|
16039
17816
|
};
|
|
17817
|
+
var deserializeAws_restJson1ContactFlowModule = function (output, context) {
|
|
17818
|
+
return {
|
|
17819
|
+
Arn: __expectString(output.Arn),
|
|
17820
|
+
Content: __expectString(output.Content),
|
|
17821
|
+
Description: __expectString(output.Description),
|
|
17822
|
+
Id: __expectString(output.Id),
|
|
17823
|
+
Name: __expectString(output.Name),
|
|
17824
|
+
State: __expectString(output.State),
|
|
17825
|
+
Status: __expectString(output.Status),
|
|
17826
|
+
Tags: output.Tags !== undefined && output.Tags !== null
|
|
17827
|
+
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
17828
|
+
: undefined,
|
|
17829
|
+
};
|
|
17830
|
+
};
|
|
17831
|
+
var deserializeAws_restJson1ContactFlowModulesSummaryList = function (output, context) {
|
|
17832
|
+
return (output || [])
|
|
17833
|
+
.filter(function (e) { return e != null; })
|
|
17834
|
+
.map(function (entry) {
|
|
17835
|
+
if (entry === null) {
|
|
17836
|
+
return null;
|
|
17837
|
+
}
|
|
17838
|
+
return deserializeAws_restJson1ContactFlowModuleSummary(entry, context);
|
|
17839
|
+
});
|
|
17840
|
+
};
|
|
17841
|
+
var deserializeAws_restJson1ContactFlowModuleSummary = function (output, context) {
|
|
17842
|
+
return {
|
|
17843
|
+
Arn: __expectString(output.Arn),
|
|
17844
|
+
Id: __expectString(output.Id),
|
|
17845
|
+
Name: __expectString(output.Name),
|
|
17846
|
+
State: __expectString(output.State),
|
|
17847
|
+
};
|
|
17848
|
+
};
|
|
16040
17849
|
var deserializeAws_restJson1ContactFlowSummary = function (output, context) {
|
|
16041
17850
|
return {
|
|
16042
17851
|
Arn: __expectString(output.Arn),
|
|
17852
|
+
ContactFlowState: __expectString(output.ContactFlowState),
|
|
16043
17853
|
ContactFlowType: __expectString(output.ContactFlowType),
|
|
16044
17854
|
Id: __expectString(output.Id),
|
|
16045
17855
|
Name: __expectString(output.Name),
|
|
@@ -16589,6 +18399,14 @@ var deserializeAws_restJson1Queue = function (output, context) {
|
|
|
16589
18399
|
: undefined,
|
|
16590
18400
|
};
|
|
16591
18401
|
};
|
|
18402
|
+
var deserializeAws_restJson1QueueInfo = function (output, context) {
|
|
18403
|
+
return {
|
|
18404
|
+
EnqueueTimestamp: output.EnqueueTimestamp !== undefined && output.EnqueueTimestamp !== null
|
|
18405
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnqueueTimestamp)))
|
|
18406
|
+
: undefined,
|
|
18407
|
+
Id: __expectString(output.Id),
|
|
18408
|
+
};
|
|
18409
|
+
};
|
|
16592
18410
|
var deserializeAws_restJson1QueueQuickConnectConfig = function (output, context) {
|
|
16593
18411
|
return {
|
|
16594
18412
|
ContactFlowId: __expectString(output.ContactFlowId),
|
|
@@ -16665,6 +18483,29 @@ var deserializeAws_restJson1QuickConnectSummaryList = function (output, context)
|
|
|
16665
18483
|
return deserializeAws_restJson1QuickConnectSummary(entry, context);
|
|
16666
18484
|
});
|
|
16667
18485
|
};
|
|
18486
|
+
var deserializeAws_restJson1ReferenceSummary = function (output, context) {
|
|
18487
|
+
if (output.Attachment !== undefined && output.Attachment !== null) {
|
|
18488
|
+
return {
|
|
18489
|
+
Attachment: deserializeAws_restJson1AttachmentReference(output.Attachment, context),
|
|
18490
|
+
};
|
|
18491
|
+
}
|
|
18492
|
+
if (output.Url !== undefined && output.Url !== null) {
|
|
18493
|
+
return {
|
|
18494
|
+
Url: deserializeAws_restJson1UrlReference(output.Url, context),
|
|
18495
|
+
};
|
|
18496
|
+
}
|
|
18497
|
+
return { $unknown: Object.entries(output)[0] };
|
|
18498
|
+
};
|
|
18499
|
+
var deserializeAws_restJson1ReferenceSummaryList = function (output, context) {
|
|
18500
|
+
return (output || [])
|
|
18501
|
+
.filter(function (e) { return e != null; })
|
|
18502
|
+
.map(function (entry) {
|
|
18503
|
+
if (entry === null) {
|
|
18504
|
+
return null;
|
|
18505
|
+
}
|
|
18506
|
+
return deserializeAws_restJson1ReferenceSummary(__expectUnion(entry), context);
|
|
18507
|
+
});
|
|
18508
|
+
};
|
|
16668
18509
|
var deserializeAws_restJson1RoutingProfile = function (output, context) {
|
|
16669
18510
|
return {
|
|
16670
18511
|
DefaultOutboundQueueId: __expectString(output.DefaultOutboundQueueId),
|
|
@@ -16801,6 +18642,12 @@ var deserializeAws_restJson1Threshold = function (output, context) {
|
|
|
16801
18642
|
ThresholdValue: __limitedParseDouble(output.ThresholdValue),
|
|
16802
18643
|
};
|
|
16803
18644
|
};
|
|
18645
|
+
var deserializeAws_restJson1UrlReference = function (output, context) {
|
|
18646
|
+
return {
|
|
18647
|
+
Name: __expectString(output.Name),
|
|
18648
|
+
Value: __expectString(output.Value),
|
|
18649
|
+
};
|
|
18650
|
+
};
|
|
16804
18651
|
var deserializeAws_restJson1UseCase = function (output, context) {
|
|
16805
18652
|
return {
|
|
16806
18653
|
UseCaseArn: __expectString(output.UseCaseArn),
|