@aws-sdk/client-connect 3.99.0 → 3.105.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 +31 -0
- package/dist-cjs/Connect.js +105 -0
- package/dist-cjs/ConnectClient.js +2 -0
- package/dist-cjs/commands/CreateTaskTemplateCommand.js +36 -0
- package/dist-cjs/commands/DeleteTaskTemplateCommand.js +36 -0
- package/dist-cjs/commands/GetCurrentUserDataCommand.js +36 -0
- package/dist-cjs/commands/GetTaskTemplateCommand.js +36 -0
- package/dist-cjs/commands/ListQueuesCommand.js +3 -3
- package/dist-cjs/commands/ListQuickConnectsCommand.js +3 -3
- package/dist-cjs/commands/ListRoutingProfileQueuesCommand.js +3 -3
- package/dist-cjs/commands/ListRoutingProfilesCommand.js +3 -3
- package/dist-cjs/commands/ListSecurityKeysCommand.js +3 -3
- package/dist-cjs/commands/ListSecurityProfilePermissionsCommand.js +3 -3
- package/dist-cjs/commands/ListSecurityProfilesCommand.js +3 -3
- package/dist-cjs/commands/ListTagsForResourceCommand.js +3 -3
- package/dist-cjs/commands/ListTaskTemplatesCommand.js +36 -0
- package/dist-cjs/commands/ListUseCasesCommand.js +3 -3
- package/dist-cjs/commands/ListUserHierarchyGroupsCommand.js +3 -3
- package/dist-cjs/commands/ListUsersCommand.js +3 -3
- package/dist-cjs/commands/PutUserStatusCommand.js +3 -3
- package/dist-cjs/commands/ReleasePhoneNumberCommand.js +2 -2
- package/dist-cjs/commands/ResumeContactRecordingCommand.js +3 -3
- package/dist-cjs/commands/TransferContactCommand.js +36 -0
- package/dist-cjs/commands/UpdateTaskTemplateCommand.js +36 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/models/models_0.js +283 -236
- package/dist-cjs/models/models_1.js +254 -2
- package/dist-cjs/pagination/GetCurrentUserDataPaginator.js +36 -0
- package/dist-cjs/pagination/ListTaskTemplatesPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1279 -34
- package/dist-es/Connect.js +105 -0
- package/dist-es/ConnectClient.js +2 -0
- package/dist-es/commands/CreateTaskTemplateCommand.js +39 -0
- package/dist-es/commands/DeleteTaskTemplateCommand.js +39 -0
- package/dist-es/commands/GetCurrentUserDataCommand.js +39 -0
- package/dist-es/commands/GetTaskTemplateCommand.js +39 -0
- package/dist-es/commands/ListQueuesCommand.js +1 -1
- package/dist-es/commands/ListQuickConnectsCommand.js +1 -1
- package/dist-es/commands/ListRoutingProfileQueuesCommand.js +1 -1
- package/dist-es/commands/ListRoutingProfilesCommand.js +1 -1
- package/dist-es/commands/ListSecurityKeysCommand.js +1 -1
- package/dist-es/commands/ListSecurityProfilePermissionsCommand.js +1 -1
- package/dist-es/commands/ListSecurityProfilesCommand.js +1 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +1 -1
- package/dist-es/commands/ListTaskTemplatesCommand.js +39 -0
- package/dist-es/commands/ListUseCasesCommand.js +1 -1
- package/dist-es/commands/ListUserHierarchyGroupsCommand.js +1 -1
- package/dist-es/commands/ListUsersCommand.js +1 -1
- package/dist-es/commands/PutUserStatusCommand.js +1 -1
- package/dist-es/commands/ReleasePhoneNumberCommand.js +1 -1
- package/dist-es/commands/ResumeContactRecordingCommand.js +1 -1
- package/dist-es/commands/TransferContactCommand.js +39 -0
- package/dist-es/commands/UpdateTaskTemplateCommand.js +39 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/models/models_0.js +214 -160
- package/dist-es/models/models_1.js +169 -0
- package/dist-es/pagination/GetCurrentUserDataPaginator.js +75 -0
- package/dist-es/pagination/ListTaskTemplatesPaginator.js +75 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +1440 -63
- package/dist-types/Connect.d.ts +104 -22
- package/dist-types/ConnectClient.d.ts +9 -2
- package/dist-types/commands/AssociateDefaultVocabularyCommand.d.ts +2 -1
- package/dist-types/commands/CreateTaskTemplateCommand.d.ts +35 -0
- package/dist-types/commands/DeleteTaskTemplateCommand.d.ts +35 -0
- package/dist-types/commands/DisassociatePhoneNumberContactFlowCommand.d.ts +2 -1
- package/dist-types/commands/GetCurrentUserDataCommand.d.ts +35 -0
- package/dist-types/commands/GetTaskTemplateCommand.d.ts +35 -0
- package/dist-types/commands/ListPhoneNumbersV2Command.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 +1 -1
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/dist-types/commands/ListTaskTemplatesCommand.d.ts +35 -0
- 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/PutUserStatusCommand.d.ts +5 -6
- package/dist-types/commands/ReleasePhoneNumberCommand.d.ts +1 -1
- package/dist-types/commands/ResumeContactRecordingCommand.d.ts +1 -1
- package/dist-types/commands/SearchVocabulariesCommand.d.ts +2 -1
- package/dist-types/commands/StartChatContactCommand.d.ts +3 -3
- package/dist-types/commands/StartContactRecordingCommand.d.ts +9 -7
- package/dist-types/commands/StopContactCommand.d.ts +3 -1
- package/dist-types/commands/TagResourceCommand.d.ts +2 -1
- package/dist-types/commands/TransferContactCommand.d.ts +58 -0
- package/dist-types/commands/UpdatePhoneNumberCommand.d.ts +2 -1
- package/dist-types/commands/UpdateTaskTemplateCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/models/models_0.d.ts +927 -850
- package/dist-types/models/models_1.d.ts +979 -50
- package/dist-types/pagination/GetCurrentUserDataPaginator.d.ts +4 -0
- package/dist-types/pagination/ListTaskTemplatesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +21 -0
- package/dist-types/ts3.4/Connect.d.ts +35 -0
- package/dist-types/ts3.4/ConnectClient.d.ts +9 -2
- package/dist-types/ts3.4/commands/CreateTaskTemplateCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteTaskTemplateCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetCurrentUserDataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetTaskTemplateCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListQueuesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListQuickConnectsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListRoutingProfileQueuesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListRoutingProfilesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListSecurityKeysCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListSecurityProfilePermissionsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListSecurityProfilesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListTaskTemplatesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListUseCasesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListUserHierarchyGroupsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListUsersCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/PutUserStatusCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ReleasePhoneNumberCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ResumeContactRecordingCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/TransferContactCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateTaskTemplateCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/models/models_0.d.ts +555 -517
- package/dist-types/ts3.4/models/models_1.d.ts +539 -26
- package/dist-types/ts3.4/pagination/GetCurrentUserDataPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListTaskTemplatesPaginator.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 +21 -0
- package/package.json +4 -3
|
@@ -3,7 +3,7 @@ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
|
3
3
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, 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
|
import { ConnectServiceException as __BaseException } from "../models/ConnectServiceException";
|
|
6
|
-
import { AccessDeniedException, ContactFlowNotPublishedException, DuplicateResourceException, IdempotencyException, InternalServiceException, InvalidContactFlowException, InvalidContactFlowModuleException, InvalidParameterException, InvalidRequestException, LimitExceededException, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UserNotFoundException, } from "../models/models_0";
|
|
6
|
+
import { AccessDeniedException, ContactFlowNotPublishedException, DuplicateResourceException, IdempotencyException, InternalServiceException, InvalidContactFlowException, InvalidContactFlowModuleException, InvalidParameterException, InvalidRequestException, LimitExceededException, PropertyValidationException, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UserNotFoundException, } from "../models/models_0";
|
|
7
7
|
import { ContactNotFoundException, DestinationNotAllowedException, OutboundContactNotPermittedException, } from "../models/models_1";
|
|
8
8
|
export var serializeAws_restJson1AssociateApprovedOriginCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9
9
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
@@ -776,6 +776,46 @@ export var serializeAws_restJson1CreateSecurityProfileCommand = function (input,
|
|
|
776
776
|
}
|
|
777
777
|
});
|
|
778
778
|
}); };
|
|
779
|
+
export var serializeAws_restJson1CreateTaskTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
780
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
781
|
+
var _c;
|
|
782
|
+
return __generator(this, function (_d) {
|
|
783
|
+
switch (_d.label) {
|
|
784
|
+
case 0: return [4, context.endpoint()];
|
|
785
|
+
case 1:
|
|
786
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
787
|
+
headers = {
|
|
788
|
+
"content-type": "application/json",
|
|
789
|
+
};
|
|
790
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/instance/{InstanceId}/task/template";
|
|
791
|
+
if (input.InstanceId !== undefined) {
|
|
792
|
+
labelValue = input.InstanceId;
|
|
793
|
+
if (labelValue.length <= 0) {
|
|
794
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
795
|
+
}
|
|
796
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
797
|
+
}
|
|
798
|
+
else {
|
|
799
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
800
|
+
}
|
|
801
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Constraints !== undefined &&
|
|
802
|
+
input.Constraints !== null && {
|
|
803
|
+
Constraints: serializeAws_restJson1TaskTemplateConstraints(input.Constraints, context),
|
|
804
|
+
})), (input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId })), (input.Defaults !== undefined &&
|
|
805
|
+
input.Defaults !== null && { Defaults: serializeAws_restJson1TaskTemplateDefaults(input.Defaults, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Fields !== undefined &&
|
|
806
|
+
input.Fields !== null && { Fields: serializeAws_restJson1TaskTemplateFields(input.Fields, context) })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Status !== undefined && input.Status !== null && { Status: input.Status })));
|
|
807
|
+
return [2, new __HttpRequest({
|
|
808
|
+
protocol: protocol,
|
|
809
|
+
hostname: hostname,
|
|
810
|
+
port: port,
|
|
811
|
+
method: "PUT",
|
|
812
|
+
headers: headers,
|
|
813
|
+
path: resolvedPath,
|
|
814
|
+
body: body,
|
|
815
|
+
})];
|
|
816
|
+
}
|
|
817
|
+
});
|
|
818
|
+
}); };
|
|
779
819
|
export var serializeAws_restJson1CreateUseCaseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
780
820
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
781
821
|
return __generator(this, function (_c) {
|
|
@@ -1218,6 +1258,48 @@ export var serializeAws_restJson1DeleteSecurityProfileCommand = function (input,
|
|
|
1218
1258
|
}
|
|
1219
1259
|
});
|
|
1220
1260
|
}); };
|
|
1261
|
+
export var serializeAws_restJson1DeleteTaskTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1262
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1263
|
+
return __generator(this, function (_c) {
|
|
1264
|
+
switch (_c.label) {
|
|
1265
|
+
case 0: return [4, context.endpoint()];
|
|
1266
|
+
case 1:
|
|
1267
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1268
|
+
headers = {};
|
|
1269
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
1270
|
+
"/instance/{InstanceId}/task/template/{TaskTemplateId}";
|
|
1271
|
+
if (input.InstanceId !== undefined) {
|
|
1272
|
+
labelValue = input.InstanceId;
|
|
1273
|
+
if (labelValue.length <= 0) {
|
|
1274
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
1275
|
+
}
|
|
1276
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
1277
|
+
}
|
|
1278
|
+
else {
|
|
1279
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
1280
|
+
}
|
|
1281
|
+
if (input.TaskTemplateId !== undefined) {
|
|
1282
|
+
labelValue = input.TaskTemplateId;
|
|
1283
|
+
if (labelValue.length <= 0) {
|
|
1284
|
+
throw new Error("Empty value provided for input HTTP label: TaskTemplateId.");
|
|
1285
|
+
}
|
|
1286
|
+
resolvedPath = resolvedPath.replace("{TaskTemplateId}", __extendedEncodeURIComponent(labelValue));
|
|
1287
|
+
}
|
|
1288
|
+
else {
|
|
1289
|
+
throw new Error("No value provided for input HTTP label: TaskTemplateId.");
|
|
1290
|
+
}
|
|
1291
|
+
return [2, new __HttpRequest({
|
|
1292
|
+
protocol: protocol,
|
|
1293
|
+
hostname: hostname,
|
|
1294
|
+
port: port,
|
|
1295
|
+
method: "DELETE",
|
|
1296
|
+
headers: headers,
|
|
1297
|
+
path: resolvedPath,
|
|
1298
|
+
body: body,
|
|
1299
|
+
})];
|
|
1300
|
+
}
|
|
1301
|
+
});
|
|
1302
|
+
}); };
|
|
1221
1303
|
export var serializeAws_restJson1DeleteUseCaseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1222
1304
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
|
|
1223
1305
|
return __generator(this, function (_c) {
|
|
@@ -2506,6 +2588,41 @@ export var serializeAws_restJson1GetCurrentMetricDataCommand = function (input,
|
|
|
2506
2588
|
}
|
|
2507
2589
|
});
|
|
2508
2590
|
}); };
|
|
2591
|
+
export var serializeAws_restJson1GetCurrentUserDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2592
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
2593
|
+
return __generator(this, function (_c) {
|
|
2594
|
+
switch (_c.label) {
|
|
2595
|
+
case 0: return [4, context.endpoint()];
|
|
2596
|
+
case 1:
|
|
2597
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2598
|
+
headers = {
|
|
2599
|
+
"content-type": "application/json",
|
|
2600
|
+
};
|
|
2601
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/metrics/userdata/{InstanceId}";
|
|
2602
|
+
if (input.InstanceId !== undefined) {
|
|
2603
|
+
labelValue = input.InstanceId;
|
|
2604
|
+
if (labelValue.length <= 0) {
|
|
2605
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
2606
|
+
}
|
|
2607
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
2608
|
+
}
|
|
2609
|
+
else {
|
|
2610
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
2611
|
+
}
|
|
2612
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Filters !== undefined &&
|
|
2613
|
+
input.Filters !== null && { Filters: serializeAws_restJson1UserDataFilters(input.Filters, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })));
|
|
2614
|
+
return [2, new __HttpRequest({
|
|
2615
|
+
protocol: protocol,
|
|
2616
|
+
hostname: hostname,
|
|
2617
|
+
port: port,
|
|
2618
|
+
method: "POST",
|
|
2619
|
+
headers: headers,
|
|
2620
|
+
path: resolvedPath,
|
|
2621
|
+
body: body,
|
|
2622
|
+
})];
|
|
2623
|
+
}
|
|
2624
|
+
});
|
|
2625
|
+
}); };
|
|
2509
2626
|
export var serializeAws_restJson1GetFederationTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2510
2627
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
2511
2628
|
return __generator(this, function (_c) {
|
|
@@ -2578,6 +2695,50 @@ export var serializeAws_restJson1GetMetricDataCommand = function (input, context
|
|
|
2578
2695
|
}
|
|
2579
2696
|
});
|
|
2580
2697
|
}); };
|
|
2698
|
+
export var serializeAws_restJson1GetTaskTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2699
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
2700
|
+
return __generator(this, function (_c) {
|
|
2701
|
+
switch (_c.label) {
|
|
2702
|
+
case 0: return [4, context.endpoint()];
|
|
2703
|
+
case 1:
|
|
2704
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2705
|
+
headers = {};
|
|
2706
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2707
|
+
"/instance/{InstanceId}/task/template/{TaskTemplateId}";
|
|
2708
|
+
if (input.InstanceId !== undefined) {
|
|
2709
|
+
labelValue = input.InstanceId;
|
|
2710
|
+
if (labelValue.length <= 0) {
|
|
2711
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
2712
|
+
}
|
|
2713
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
2714
|
+
}
|
|
2715
|
+
else {
|
|
2716
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
2717
|
+
}
|
|
2718
|
+
if (input.TaskTemplateId !== undefined) {
|
|
2719
|
+
labelValue = input.TaskTemplateId;
|
|
2720
|
+
if (labelValue.length <= 0) {
|
|
2721
|
+
throw new Error("Empty value provided for input HTTP label: TaskTemplateId.");
|
|
2722
|
+
}
|
|
2723
|
+
resolvedPath = resolvedPath.replace("{TaskTemplateId}", __extendedEncodeURIComponent(labelValue));
|
|
2724
|
+
}
|
|
2725
|
+
else {
|
|
2726
|
+
throw new Error("No value provided for input HTTP label: TaskTemplateId.");
|
|
2727
|
+
}
|
|
2728
|
+
query = __assign({}, (input.SnapshotVersion !== undefined && { snapshotVersion: input.SnapshotVersion }));
|
|
2729
|
+
return [2, new __HttpRequest({
|
|
2730
|
+
protocol: protocol,
|
|
2731
|
+
hostname: hostname,
|
|
2732
|
+
port: port,
|
|
2733
|
+
method: "GET",
|
|
2734
|
+
headers: headers,
|
|
2735
|
+
path: resolvedPath,
|
|
2736
|
+
query: query,
|
|
2737
|
+
body: body,
|
|
2738
|
+
})];
|
|
2739
|
+
}
|
|
2740
|
+
});
|
|
2741
|
+
}); };
|
|
2581
2742
|
export var serializeAws_restJson1ListAgentStatusesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2582
2743
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2583
2744
|
return __generator(this, function (_c) {
|
|
@@ -3481,6 +3642,39 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
|
|
|
3481
3642
|
}
|
|
3482
3643
|
});
|
|
3483
3644
|
}); };
|
|
3645
|
+
export var serializeAws_restJson1ListTaskTemplatesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3646
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
3647
|
+
return __generator(this, function (_c) {
|
|
3648
|
+
switch (_c.label) {
|
|
3649
|
+
case 0: return [4, context.endpoint()];
|
|
3650
|
+
case 1:
|
|
3651
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3652
|
+
headers = {};
|
|
3653
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/instance/{InstanceId}/task/template";
|
|
3654
|
+
if (input.InstanceId !== undefined) {
|
|
3655
|
+
labelValue = input.InstanceId;
|
|
3656
|
+
if (labelValue.length <= 0) {
|
|
3657
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
3658
|
+
}
|
|
3659
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
3660
|
+
}
|
|
3661
|
+
else {
|
|
3662
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3663
|
+
}
|
|
3664
|
+
query = __assign(__assign(__assign(__assign({}, (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.Status !== undefined && { status: input.Status })), (input.Name !== undefined && { name: input.Name }));
|
|
3665
|
+
return [2, new __HttpRequest({
|
|
3666
|
+
protocol: protocol,
|
|
3667
|
+
hostname: hostname,
|
|
3668
|
+
port: port,
|
|
3669
|
+
method: "GET",
|
|
3670
|
+
headers: headers,
|
|
3671
|
+
path: resolvedPath,
|
|
3672
|
+
query: query,
|
|
3673
|
+
body: body,
|
|
3674
|
+
})];
|
|
3675
|
+
}
|
|
3676
|
+
});
|
|
3677
|
+
}); };
|
|
3484
3678
|
export var serializeAws_restJson1ListUseCasesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3485
3679
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
3486
3680
|
return __generator(this, function (_c) {
|
|
@@ -3921,11 +4115,13 @@ export var serializeAws_restJson1StartTaskContactCommand = function (input, cont
|
|
|
3921
4115
|
"content-type": "application/json",
|
|
3922
4116
|
};
|
|
3923
4117
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/task";
|
|
3924
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Attributes !== undefined &&
|
|
4118
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Attributes !== undefined &&
|
|
3925
4119
|
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 &&
|
|
3926
|
-
input.PreviousContactId !== null && { PreviousContactId: input.PreviousContactId })), (input.
|
|
4120
|
+
input.PreviousContactId !== null && { PreviousContactId: input.PreviousContactId })), (input.QuickConnectId !== undefined &&
|
|
4121
|
+
input.QuickConnectId !== null && { QuickConnectId: input.QuickConnectId })), (input.References !== undefined &&
|
|
3927
4122
|
input.References !== null && { References: serializeAws_restJson1ContactReferences(input.References, context) })), (input.ScheduledTime !== undefined &&
|
|
3928
|
-
input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) }))
|
|
4123
|
+
input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) })), (input.TaskTemplateId !== undefined &&
|
|
4124
|
+
input.TaskTemplateId !== null && { TaskTemplateId: input.TaskTemplateId })));
|
|
3929
4125
|
return [2, new __HttpRequest({
|
|
3930
4126
|
protocol: protocol,
|
|
3931
4127
|
hostname: hostname,
|
|
@@ -4070,6 +4266,31 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
|
|
|
4070
4266
|
}
|
|
4071
4267
|
});
|
|
4072
4268
|
}); };
|
|
4269
|
+
export var serializeAws_restJson1TransferContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4270
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
4271
|
+
var _c;
|
|
4272
|
+
return __generator(this, function (_d) {
|
|
4273
|
+
switch (_d.label) {
|
|
4274
|
+
case 0: return [4, context.endpoint()];
|
|
4275
|
+
case 1:
|
|
4276
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
4277
|
+
headers = {
|
|
4278
|
+
"content-type": "application/json",
|
|
4279
|
+
};
|
|
4280
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/transfer";
|
|
4281
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId })), (input.ContactId !== undefined && input.ContactId !== null && { ContactId: input.ContactId })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })), (input.QueueId !== undefined && input.QueueId !== null && { QueueId: input.QueueId })), (input.UserId !== undefined && input.UserId !== null && { UserId: input.UserId })));
|
|
4282
|
+
return [2, new __HttpRequest({
|
|
4283
|
+
protocol: protocol,
|
|
4284
|
+
hostname: hostname,
|
|
4285
|
+
port: port,
|
|
4286
|
+
method: "POST",
|
|
4287
|
+
headers: headers,
|
|
4288
|
+
path: resolvedPath,
|
|
4289
|
+
body: body,
|
|
4290
|
+
})];
|
|
4291
|
+
}
|
|
4292
|
+
});
|
|
4293
|
+
}); };
|
|
4073
4294
|
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4074
4295
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
4075
4296
|
return __generator(this, function (_c) {
|
|
@@ -5200,6 +5421,56 @@ export var serializeAws_restJson1UpdateSecurityProfileCommand = function (input,
|
|
|
5200
5421
|
}
|
|
5201
5422
|
});
|
|
5202
5423
|
}); };
|
|
5424
|
+
export var serializeAws_restJson1UpdateTaskTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5425
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
5426
|
+
return __generator(this, function (_c) {
|
|
5427
|
+
switch (_c.label) {
|
|
5428
|
+
case 0: return [4, context.endpoint()];
|
|
5429
|
+
case 1:
|
|
5430
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
5431
|
+
headers = {
|
|
5432
|
+
"content-type": "application/json",
|
|
5433
|
+
};
|
|
5434
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
5435
|
+
"/instance/{InstanceId}/task/template/{TaskTemplateId}";
|
|
5436
|
+
if (input.TaskTemplateId !== undefined) {
|
|
5437
|
+
labelValue = input.TaskTemplateId;
|
|
5438
|
+
if (labelValue.length <= 0) {
|
|
5439
|
+
throw new Error("Empty value provided for input HTTP label: TaskTemplateId.");
|
|
5440
|
+
}
|
|
5441
|
+
resolvedPath = resolvedPath.replace("{TaskTemplateId}", __extendedEncodeURIComponent(labelValue));
|
|
5442
|
+
}
|
|
5443
|
+
else {
|
|
5444
|
+
throw new Error("No value provided for input HTTP label: TaskTemplateId.");
|
|
5445
|
+
}
|
|
5446
|
+
if (input.InstanceId !== undefined) {
|
|
5447
|
+
labelValue = input.InstanceId;
|
|
5448
|
+
if (labelValue.length <= 0) {
|
|
5449
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
5450
|
+
}
|
|
5451
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
5452
|
+
}
|
|
5453
|
+
else {
|
|
5454
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
5455
|
+
}
|
|
5456
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Constraints !== undefined &&
|
|
5457
|
+
input.Constraints !== null && {
|
|
5458
|
+
Constraints: serializeAws_restJson1TaskTemplateConstraints(input.Constraints, context),
|
|
5459
|
+
})), (input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId })), (input.Defaults !== undefined &&
|
|
5460
|
+
input.Defaults !== null && { Defaults: serializeAws_restJson1TaskTemplateDefaults(input.Defaults, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Fields !== undefined &&
|
|
5461
|
+
input.Fields !== null && { Fields: serializeAws_restJson1TaskTemplateFields(input.Fields, context) })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Status !== undefined && input.Status !== null && { Status: input.Status })));
|
|
5462
|
+
return [2, new __HttpRequest({
|
|
5463
|
+
protocol: protocol,
|
|
5464
|
+
hostname: hostname,
|
|
5465
|
+
port: port,
|
|
5466
|
+
method: "POST",
|
|
5467
|
+
headers: headers,
|
|
5468
|
+
path: resolvedPath,
|
|
5469
|
+
body: body,
|
|
5470
|
+
})];
|
|
5471
|
+
}
|
|
5472
|
+
});
|
|
5473
|
+
}); };
|
|
5203
5474
|
export var serializeAws_restJson1UpdateUserHierarchyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5204
5475
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
5205
5476
|
return __generator(this, function (_c) {
|
|
@@ -7154,35 +7425,35 @@ var deserializeAws_restJson1CreateSecurityProfileCommandError = function (output
|
|
|
7154
7425
|
}
|
|
7155
7426
|
});
|
|
7156
7427
|
}); };
|
|
7157
|
-
export var
|
|
7428
|
+
export var deserializeAws_restJson1CreateTaskTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7158
7429
|
var contents, data, _a, _b;
|
|
7159
7430
|
return __generator(this, function (_c) {
|
|
7160
7431
|
switch (_c.label) {
|
|
7161
7432
|
case 0:
|
|
7162
7433
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7163
|
-
return [2,
|
|
7434
|
+
return [2, deserializeAws_restJson1CreateTaskTemplateCommandError(output, context)];
|
|
7164
7435
|
}
|
|
7165
7436
|
contents = {
|
|
7166
7437
|
$metadata: deserializeMetadata(output),
|
|
7167
|
-
|
|
7168
|
-
|
|
7438
|
+
Arn: undefined,
|
|
7439
|
+
Id: undefined,
|
|
7169
7440
|
};
|
|
7170
7441
|
_a = __expectNonNull;
|
|
7171
7442
|
_b = __expectObject;
|
|
7172
7443
|
return [4, parseBody(output.body, context)];
|
|
7173
7444
|
case 1:
|
|
7174
7445
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7175
|
-
if (data.
|
|
7176
|
-
contents.
|
|
7446
|
+
if (data.Arn !== undefined && data.Arn !== null) {
|
|
7447
|
+
contents.Arn = __expectString(data.Arn);
|
|
7177
7448
|
}
|
|
7178
|
-
if (data.
|
|
7179
|
-
contents.
|
|
7449
|
+
if (data.Id !== undefined && data.Id !== null) {
|
|
7450
|
+
contents.Id = __expectString(data.Id);
|
|
7180
7451
|
}
|
|
7181
7452
|
return [2, Promise.resolve(contents)];
|
|
7182
7453
|
}
|
|
7183
7454
|
});
|
|
7184
7455
|
}); };
|
|
7185
|
-
var
|
|
7456
|
+
var deserializeAws_restJson1CreateTaskTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7186
7457
|
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
7187
7458
|
var _c;
|
|
7188
7459
|
return __generator(this, function (_d) {
|
|
@@ -7197,18 +7468,98 @@ var deserializeAws_restJson1CreateUseCaseCommandError = function (output, contex
|
|
|
7197
7468
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7198
7469
|
_b = errorCode;
|
|
7199
7470
|
switch (_b) {
|
|
7200
|
-
case "
|
|
7201
|
-
case "com.amazonaws.connect#
|
|
7202
|
-
case "
|
|
7203
|
-
case "com.amazonaws.connect#
|
|
7204
|
-
case "
|
|
7205
|
-
case "com.amazonaws.connect#
|
|
7471
|
+
case "InternalServiceException": return [3, 2];
|
|
7472
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
7473
|
+
case "InvalidParameterException": return [3, 4];
|
|
7474
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
7475
|
+
case "PropertyValidationException": return [3, 6];
|
|
7476
|
+
case "com.amazonaws.connect#PropertyValidationException": return [3, 6];
|
|
7206
7477
|
case "ResourceNotFoundException": return [3, 8];
|
|
7207
7478
|
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
7208
|
-
case "
|
|
7209
|
-
case "com.amazonaws.connect#
|
|
7479
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
7480
|
+
case "com.amazonaws.connect#ServiceQuotaExceededException": return [3, 10];
|
|
7481
|
+
case "ThrottlingException": return [3, 12];
|
|
7482
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
7210
7483
|
}
|
|
7211
|
-
return [3,
|
|
7484
|
+
return [3, 14];
|
|
7485
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
7486
|
+
case 3: throw _d.sent();
|
|
7487
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
7488
|
+
case 5: throw _d.sent();
|
|
7489
|
+
case 6: return [4, deserializeAws_restJson1PropertyValidationExceptionResponse(parsedOutput, context)];
|
|
7490
|
+
case 7: throw _d.sent();
|
|
7491
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7492
|
+
case 9: throw _d.sent();
|
|
7493
|
+
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
7494
|
+
case 11: throw _d.sent();
|
|
7495
|
+
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7496
|
+
case 13: throw _d.sent();
|
|
7497
|
+
case 14:
|
|
7498
|
+
parsedBody = parsedOutput.body;
|
|
7499
|
+
response = new __BaseException({
|
|
7500
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
7501
|
+
$fault: "client",
|
|
7502
|
+
$metadata: deserializeMetadata(output),
|
|
7503
|
+
});
|
|
7504
|
+
throw __decorateServiceException(response, parsedBody);
|
|
7505
|
+
}
|
|
7506
|
+
});
|
|
7507
|
+
}); };
|
|
7508
|
+
export var deserializeAws_restJson1CreateUseCaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7509
|
+
var contents, data, _a, _b;
|
|
7510
|
+
return __generator(this, function (_c) {
|
|
7511
|
+
switch (_c.label) {
|
|
7512
|
+
case 0:
|
|
7513
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7514
|
+
return [2, deserializeAws_restJson1CreateUseCaseCommandError(output, context)];
|
|
7515
|
+
}
|
|
7516
|
+
contents = {
|
|
7517
|
+
$metadata: deserializeMetadata(output),
|
|
7518
|
+
UseCaseArn: undefined,
|
|
7519
|
+
UseCaseId: undefined,
|
|
7520
|
+
};
|
|
7521
|
+
_a = __expectNonNull;
|
|
7522
|
+
_b = __expectObject;
|
|
7523
|
+
return [4, parseBody(output.body, context)];
|
|
7524
|
+
case 1:
|
|
7525
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7526
|
+
if (data.UseCaseArn !== undefined && data.UseCaseArn !== null) {
|
|
7527
|
+
contents.UseCaseArn = __expectString(data.UseCaseArn);
|
|
7528
|
+
}
|
|
7529
|
+
if (data.UseCaseId !== undefined && data.UseCaseId !== null) {
|
|
7530
|
+
contents.UseCaseId = __expectString(data.UseCaseId);
|
|
7531
|
+
}
|
|
7532
|
+
return [2, Promise.resolve(contents)];
|
|
7533
|
+
}
|
|
7534
|
+
});
|
|
7535
|
+
}); };
|
|
7536
|
+
var deserializeAws_restJson1CreateUseCaseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7537
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
7538
|
+
var _c;
|
|
7539
|
+
return __generator(this, function (_d) {
|
|
7540
|
+
switch (_d.label) {
|
|
7541
|
+
case 0:
|
|
7542
|
+
_a = [__assign({}, output)];
|
|
7543
|
+
_c = {};
|
|
7544
|
+
return [4, parseBody(output.body, context)];
|
|
7545
|
+
case 1:
|
|
7546
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
7547
|
+
errorCode = "UnknownError";
|
|
7548
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7549
|
+
_b = errorCode;
|
|
7550
|
+
switch (_b) {
|
|
7551
|
+
case "DuplicateResourceException": return [3, 2];
|
|
7552
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
|
|
7553
|
+
case "InternalServiceException": return [3, 4];
|
|
7554
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
7555
|
+
case "InvalidRequestException": return [3, 6];
|
|
7556
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
7557
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
7558
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
7559
|
+
case "ThrottlingException": return [3, 10];
|
|
7560
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
7561
|
+
}
|
|
7562
|
+
return [3, 12];
|
|
7212
7563
|
case 2: return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
7213
7564
|
case 3: throw _d.sent();
|
|
7214
7565
|
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
@@ -7952,6 +8303,72 @@ var deserializeAws_restJson1DeleteSecurityProfileCommandError = function (output
|
|
|
7952
8303
|
}
|
|
7953
8304
|
});
|
|
7954
8305
|
}); };
|
|
8306
|
+
export var deserializeAws_restJson1DeleteTaskTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8307
|
+
var contents;
|
|
8308
|
+
return __generator(this, function (_a) {
|
|
8309
|
+
switch (_a.label) {
|
|
8310
|
+
case 0:
|
|
8311
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
8312
|
+
return [2, deserializeAws_restJson1DeleteTaskTemplateCommandError(output, context)];
|
|
8313
|
+
}
|
|
8314
|
+
contents = {
|
|
8315
|
+
$metadata: deserializeMetadata(output),
|
|
8316
|
+
};
|
|
8317
|
+
return [4, collectBody(output.body, context)];
|
|
8318
|
+
case 1:
|
|
8319
|
+
_a.sent();
|
|
8320
|
+
return [2, Promise.resolve(contents)];
|
|
8321
|
+
}
|
|
8322
|
+
});
|
|
8323
|
+
}); };
|
|
8324
|
+
var deserializeAws_restJson1DeleteTaskTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8325
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
8326
|
+
var _c;
|
|
8327
|
+
return __generator(this, function (_d) {
|
|
8328
|
+
switch (_d.label) {
|
|
8329
|
+
case 0:
|
|
8330
|
+
_a = [__assign({}, output)];
|
|
8331
|
+
_c = {};
|
|
8332
|
+
return [4, parseBody(output.body, context)];
|
|
8333
|
+
case 1:
|
|
8334
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
8335
|
+
errorCode = "UnknownError";
|
|
8336
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8337
|
+
_b = errorCode;
|
|
8338
|
+
switch (_b) {
|
|
8339
|
+
case "InternalServiceException": return [3, 2];
|
|
8340
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
8341
|
+
case "InvalidParameterException": return [3, 4];
|
|
8342
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
8343
|
+
case "InvalidRequestException": return [3, 6];
|
|
8344
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
8345
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
8346
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
8347
|
+
case "ThrottlingException": return [3, 10];
|
|
8348
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
8349
|
+
}
|
|
8350
|
+
return [3, 12];
|
|
8351
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
8352
|
+
case 3: throw _d.sent();
|
|
8353
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
8354
|
+
case 5: throw _d.sent();
|
|
8355
|
+
case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
8356
|
+
case 7: throw _d.sent();
|
|
8357
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8358
|
+
case 9: throw _d.sent();
|
|
8359
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
8360
|
+
case 11: throw _d.sent();
|
|
8361
|
+
case 12:
|
|
8362
|
+
parsedBody = parsedOutput.body;
|
|
8363
|
+
response = new __BaseException({
|
|
8364
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
8365
|
+
$fault: "client",
|
|
8366
|
+
$metadata: deserializeMetadata(output),
|
|
8367
|
+
});
|
|
8368
|
+
throw __decorateServiceException(response, parsedBody);
|
|
8369
|
+
}
|
|
8370
|
+
});
|
|
8371
|
+
}); };
|
|
7955
8372
|
export var deserializeAws_restJson1DeleteUseCaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7956
8373
|
var contents;
|
|
7957
8374
|
return __generator(this, function (_a) {
|
|
@@ -10192,6 +10609,82 @@ var deserializeAws_restJson1GetCurrentMetricDataCommandError = function (output,
|
|
|
10192
10609
|
}
|
|
10193
10610
|
});
|
|
10194
10611
|
}); };
|
|
10612
|
+
export var deserializeAws_restJson1GetCurrentUserDataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10613
|
+
var contents, data, _a, _b;
|
|
10614
|
+
return __generator(this, function (_c) {
|
|
10615
|
+
switch (_c.label) {
|
|
10616
|
+
case 0:
|
|
10617
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
10618
|
+
return [2, deserializeAws_restJson1GetCurrentUserDataCommandError(output, context)];
|
|
10619
|
+
}
|
|
10620
|
+
contents = {
|
|
10621
|
+
$metadata: deserializeMetadata(output),
|
|
10622
|
+
NextToken: undefined,
|
|
10623
|
+
UserDataList: undefined,
|
|
10624
|
+
};
|
|
10625
|
+
_a = __expectNonNull;
|
|
10626
|
+
_b = __expectObject;
|
|
10627
|
+
return [4, parseBody(output.body, context)];
|
|
10628
|
+
case 1:
|
|
10629
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
10630
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
10631
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
10632
|
+
}
|
|
10633
|
+
if (data.UserDataList !== undefined && data.UserDataList !== null) {
|
|
10634
|
+
contents.UserDataList = deserializeAws_restJson1UserDataList(data.UserDataList, context);
|
|
10635
|
+
}
|
|
10636
|
+
return [2, Promise.resolve(contents)];
|
|
10637
|
+
}
|
|
10638
|
+
});
|
|
10639
|
+
}); };
|
|
10640
|
+
var deserializeAws_restJson1GetCurrentUserDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10641
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
10642
|
+
var _c;
|
|
10643
|
+
return __generator(this, function (_d) {
|
|
10644
|
+
switch (_d.label) {
|
|
10645
|
+
case 0:
|
|
10646
|
+
_a = [__assign({}, output)];
|
|
10647
|
+
_c = {};
|
|
10648
|
+
return [4, parseBody(output.body, context)];
|
|
10649
|
+
case 1:
|
|
10650
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
10651
|
+
errorCode = "UnknownError";
|
|
10652
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
10653
|
+
_b = errorCode;
|
|
10654
|
+
switch (_b) {
|
|
10655
|
+
case "InternalServiceException": return [3, 2];
|
|
10656
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
10657
|
+
case "InvalidParameterException": return [3, 4];
|
|
10658
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
10659
|
+
case "InvalidRequestException": return [3, 6];
|
|
10660
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
10661
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
10662
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
10663
|
+
case "ThrottlingException": return [3, 10];
|
|
10664
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
10665
|
+
}
|
|
10666
|
+
return [3, 12];
|
|
10667
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
10668
|
+
case 3: throw _d.sent();
|
|
10669
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
10670
|
+
case 5: throw _d.sent();
|
|
10671
|
+
case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
10672
|
+
case 7: throw _d.sent();
|
|
10673
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
10674
|
+
case 9: throw _d.sent();
|
|
10675
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
10676
|
+
case 11: throw _d.sent();
|
|
10677
|
+
case 12:
|
|
10678
|
+
parsedBody = parsedOutput.body;
|
|
10679
|
+
response = new __BaseException({
|
|
10680
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
10681
|
+
$fault: "client",
|
|
10682
|
+
$metadata: deserializeMetadata(output),
|
|
10683
|
+
});
|
|
10684
|
+
throw __decorateServiceException(response, parsedBody);
|
|
10685
|
+
}
|
|
10686
|
+
});
|
|
10687
|
+
}); };
|
|
10195
10688
|
export var deserializeAws_restJson1GetFederationTokenCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10196
10689
|
var contents, data, _a, _b;
|
|
10197
10690
|
return __generator(this, function (_c) {
|
|
@@ -10344,35 +10837,79 @@ var deserializeAws_restJson1GetMetricDataCommandError = function (output, contex
|
|
|
10344
10837
|
}
|
|
10345
10838
|
});
|
|
10346
10839
|
}); };
|
|
10347
|
-
export var
|
|
10840
|
+
export var deserializeAws_restJson1GetTaskTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10348
10841
|
var contents, data, _a, _b;
|
|
10349
10842
|
return __generator(this, function (_c) {
|
|
10350
10843
|
switch (_c.label) {
|
|
10351
10844
|
case 0:
|
|
10352
10845
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
10353
|
-
return [2,
|
|
10846
|
+
return [2, deserializeAws_restJson1GetTaskTemplateCommandError(output, context)];
|
|
10354
10847
|
}
|
|
10355
10848
|
contents = {
|
|
10356
10849
|
$metadata: deserializeMetadata(output),
|
|
10357
|
-
|
|
10358
|
-
|
|
10850
|
+
Arn: undefined,
|
|
10851
|
+
Constraints: undefined,
|
|
10852
|
+
ContactFlowId: undefined,
|
|
10853
|
+
CreatedTime: undefined,
|
|
10854
|
+
Defaults: undefined,
|
|
10855
|
+
Description: undefined,
|
|
10856
|
+
Fields: undefined,
|
|
10857
|
+
Id: undefined,
|
|
10858
|
+
InstanceId: undefined,
|
|
10859
|
+
LastModifiedTime: undefined,
|
|
10860
|
+
Name: undefined,
|
|
10861
|
+
Status: undefined,
|
|
10862
|
+
Tags: undefined,
|
|
10359
10863
|
};
|
|
10360
10864
|
_a = __expectNonNull;
|
|
10361
10865
|
_b = __expectObject;
|
|
10362
10866
|
return [4, parseBody(output.body, context)];
|
|
10363
10867
|
case 1:
|
|
10364
10868
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
10365
|
-
if (data.
|
|
10366
|
-
contents.
|
|
10869
|
+
if (data.Arn !== undefined && data.Arn !== null) {
|
|
10870
|
+
contents.Arn = __expectString(data.Arn);
|
|
10367
10871
|
}
|
|
10368
|
-
if (data.
|
|
10369
|
-
contents.
|
|
10872
|
+
if (data.Constraints !== undefined && data.Constraints !== null) {
|
|
10873
|
+
contents.Constraints = deserializeAws_restJson1TaskTemplateConstraints(data.Constraints, context);
|
|
10874
|
+
}
|
|
10875
|
+
if (data.ContactFlowId !== undefined && data.ContactFlowId !== null) {
|
|
10876
|
+
contents.ContactFlowId = __expectString(data.ContactFlowId);
|
|
10877
|
+
}
|
|
10878
|
+
if (data.CreatedTime !== undefined && data.CreatedTime !== null) {
|
|
10879
|
+
contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime)));
|
|
10880
|
+
}
|
|
10881
|
+
if (data.Defaults !== undefined && data.Defaults !== null) {
|
|
10882
|
+
contents.Defaults = deserializeAws_restJson1TaskTemplateDefaults(data.Defaults, context);
|
|
10883
|
+
}
|
|
10884
|
+
if (data.Description !== undefined && data.Description !== null) {
|
|
10885
|
+
contents.Description = __expectString(data.Description);
|
|
10886
|
+
}
|
|
10887
|
+
if (data.Fields !== undefined && data.Fields !== null) {
|
|
10888
|
+
contents.Fields = deserializeAws_restJson1TaskTemplateFields(data.Fields, context);
|
|
10889
|
+
}
|
|
10890
|
+
if (data.Id !== undefined && data.Id !== null) {
|
|
10891
|
+
contents.Id = __expectString(data.Id);
|
|
10892
|
+
}
|
|
10893
|
+
if (data.InstanceId !== undefined && data.InstanceId !== null) {
|
|
10894
|
+
contents.InstanceId = __expectString(data.InstanceId);
|
|
10895
|
+
}
|
|
10896
|
+
if (data.LastModifiedTime !== undefined && data.LastModifiedTime !== null) {
|
|
10897
|
+
contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime)));
|
|
10898
|
+
}
|
|
10899
|
+
if (data.Name !== undefined && data.Name !== null) {
|
|
10900
|
+
contents.Name = __expectString(data.Name);
|
|
10901
|
+
}
|
|
10902
|
+
if (data.Status !== undefined && data.Status !== null) {
|
|
10903
|
+
contents.Status = __expectString(data.Status);
|
|
10904
|
+
}
|
|
10905
|
+
if (data.Tags !== undefined && data.Tags !== null) {
|
|
10906
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
10370
10907
|
}
|
|
10371
10908
|
return [2, Promise.resolve(contents)];
|
|
10372
10909
|
}
|
|
10373
10910
|
});
|
|
10374
10911
|
}); };
|
|
10375
|
-
var
|
|
10912
|
+
var deserializeAws_restJson1GetTaskTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10376
10913
|
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
10377
10914
|
var _c;
|
|
10378
10915
|
return __generator(this, function (_d) {
|
|
@@ -10420,35 +10957,35 @@ var deserializeAws_restJson1ListAgentStatusesCommandError = function (output, co
|
|
|
10420
10957
|
}
|
|
10421
10958
|
});
|
|
10422
10959
|
}); };
|
|
10423
|
-
export var
|
|
10960
|
+
export var deserializeAws_restJson1ListAgentStatusesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10424
10961
|
var contents, data, _a, _b;
|
|
10425
10962
|
return __generator(this, function (_c) {
|
|
10426
10963
|
switch (_c.label) {
|
|
10427
10964
|
case 0:
|
|
10428
10965
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
10429
|
-
return [2,
|
|
10966
|
+
return [2, deserializeAws_restJson1ListAgentStatusesCommandError(output, context)];
|
|
10430
10967
|
}
|
|
10431
10968
|
contents = {
|
|
10432
10969
|
$metadata: deserializeMetadata(output),
|
|
10970
|
+
AgentStatusSummaryList: undefined,
|
|
10433
10971
|
NextToken: undefined,
|
|
10434
|
-
Origins: undefined,
|
|
10435
10972
|
};
|
|
10436
10973
|
_a = __expectNonNull;
|
|
10437
10974
|
_b = __expectObject;
|
|
10438
10975
|
return [4, parseBody(output.body, context)];
|
|
10439
10976
|
case 1:
|
|
10440
10977
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
10978
|
+
if (data.AgentStatusSummaryList !== undefined && data.AgentStatusSummaryList !== null) {
|
|
10979
|
+
contents.AgentStatusSummaryList = deserializeAws_restJson1AgentStatusSummaryList(data.AgentStatusSummaryList, context);
|
|
10980
|
+
}
|
|
10441
10981
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
10442
10982
|
contents.NextToken = __expectString(data.NextToken);
|
|
10443
10983
|
}
|
|
10444
|
-
if (data.Origins !== undefined && data.Origins !== null) {
|
|
10445
|
-
contents.Origins = deserializeAws_restJson1OriginsList(data.Origins, context);
|
|
10446
|
-
}
|
|
10447
10984
|
return [2, Promise.resolve(contents)];
|
|
10448
10985
|
}
|
|
10449
10986
|
});
|
|
10450
10987
|
}); };
|
|
10451
|
-
var
|
|
10988
|
+
var deserializeAws_restJson1ListAgentStatusesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10452
10989
|
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
10453
10990
|
var _c;
|
|
10454
10991
|
return __generator(this, function (_d) {
|
|
@@ -10496,7 +11033,83 @@ var deserializeAws_restJson1ListApprovedOriginsCommandError = function (output,
|
|
|
10496
11033
|
}
|
|
10497
11034
|
});
|
|
10498
11035
|
}); };
|
|
10499
|
-
export var
|
|
11036
|
+
export var deserializeAws_restJson1ListApprovedOriginsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11037
|
+
var contents, data, _a, _b;
|
|
11038
|
+
return __generator(this, function (_c) {
|
|
11039
|
+
switch (_c.label) {
|
|
11040
|
+
case 0:
|
|
11041
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
11042
|
+
return [2, deserializeAws_restJson1ListApprovedOriginsCommandError(output, context)];
|
|
11043
|
+
}
|
|
11044
|
+
contents = {
|
|
11045
|
+
$metadata: deserializeMetadata(output),
|
|
11046
|
+
NextToken: undefined,
|
|
11047
|
+
Origins: undefined,
|
|
11048
|
+
};
|
|
11049
|
+
_a = __expectNonNull;
|
|
11050
|
+
_b = __expectObject;
|
|
11051
|
+
return [4, parseBody(output.body, context)];
|
|
11052
|
+
case 1:
|
|
11053
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
11054
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
11055
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
11056
|
+
}
|
|
11057
|
+
if (data.Origins !== undefined && data.Origins !== null) {
|
|
11058
|
+
contents.Origins = deserializeAws_restJson1OriginsList(data.Origins, context);
|
|
11059
|
+
}
|
|
11060
|
+
return [2, Promise.resolve(contents)];
|
|
11061
|
+
}
|
|
11062
|
+
});
|
|
11063
|
+
}); };
|
|
11064
|
+
var deserializeAws_restJson1ListApprovedOriginsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11065
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
11066
|
+
var _c;
|
|
11067
|
+
return __generator(this, function (_d) {
|
|
11068
|
+
switch (_d.label) {
|
|
11069
|
+
case 0:
|
|
11070
|
+
_a = [__assign({}, output)];
|
|
11071
|
+
_c = {};
|
|
11072
|
+
return [4, parseBody(output.body, context)];
|
|
11073
|
+
case 1:
|
|
11074
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
11075
|
+
errorCode = "UnknownError";
|
|
11076
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
11077
|
+
_b = errorCode;
|
|
11078
|
+
switch (_b) {
|
|
11079
|
+
case "InternalServiceException": return [3, 2];
|
|
11080
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
11081
|
+
case "InvalidParameterException": return [3, 4];
|
|
11082
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
11083
|
+
case "InvalidRequestException": return [3, 6];
|
|
11084
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
11085
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
11086
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
11087
|
+
case "ThrottlingException": return [3, 10];
|
|
11088
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
11089
|
+
}
|
|
11090
|
+
return [3, 12];
|
|
11091
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
11092
|
+
case 3: throw _d.sent();
|
|
11093
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
11094
|
+
case 5: throw _d.sent();
|
|
11095
|
+
case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
11096
|
+
case 7: throw _d.sent();
|
|
11097
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
11098
|
+
case 9: throw _d.sent();
|
|
11099
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
11100
|
+
case 11: throw _d.sent();
|
|
11101
|
+
case 12:
|
|
11102
|
+
parsedBody = parsedOutput.body;
|
|
11103
|
+
response = new __BaseException({
|
|
11104
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
11105
|
+
$fault: "client",
|
|
11106
|
+
$metadata: deserializeMetadata(output),
|
|
11107
|
+
});
|
|
11108
|
+
throw __decorateServiceException(response, parsedBody);
|
|
11109
|
+
}
|
|
11110
|
+
});
|
|
11111
|
+
}); };
|
|
11112
|
+
export var deserializeAws_restJson1ListBotsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10500
11113
|
var contents, data, _a, _b;
|
|
10501
11114
|
return __generator(this, function (_c) {
|
|
10502
11115
|
switch (_c.label) {
|
|
@@ -12296,6 +12909,82 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
12296
12909
|
}
|
|
12297
12910
|
});
|
|
12298
12911
|
}); };
|
|
12912
|
+
export var deserializeAws_restJson1ListTaskTemplatesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12913
|
+
var contents, data, _a, _b;
|
|
12914
|
+
return __generator(this, function (_c) {
|
|
12915
|
+
switch (_c.label) {
|
|
12916
|
+
case 0:
|
|
12917
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12918
|
+
return [2, deserializeAws_restJson1ListTaskTemplatesCommandError(output, context)];
|
|
12919
|
+
}
|
|
12920
|
+
contents = {
|
|
12921
|
+
$metadata: deserializeMetadata(output),
|
|
12922
|
+
NextToken: undefined,
|
|
12923
|
+
TaskTemplates: undefined,
|
|
12924
|
+
};
|
|
12925
|
+
_a = __expectNonNull;
|
|
12926
|
+
_b = __expectObject;
|
|
12927
|
+
return [4, parseBody(output.body, context)];
|
|
12928
|
+
case 1:
|
|
12929
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
12930
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
12931
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
12932
|
+
}
|
|
12933
|
+
if (data.TaskTemplates !== undefined && data.TaskTemplates !== null) {
|
|
12934
|
+
contents.TaskTemplates = deserializeAws_restJson1TaskTemplateList(data.TaskTemplates, context);
|
|
12935
|
+
}
|
|
12936
|
+
return [2, Promise.resolve(contents)];
|
|
12937
|
+
}
|
|
12938
|
+
});
|
|
12939
|
+
}); };
|
|
12940
|
+
var deserializeAws_restJson1ListTaskTemplatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12941
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
12942
|
+
var _c;
|
|
12943
|
+
return __generator(this, function (_d) {
|
|
12944
|
+
switch (_d.label) {
|
|
12945
|
+
case 0:
|
|
12946
|
+
_a = [__assign({}, output)];
|
|
12947
|
+
_c = {};
|
|
12948
|
+
return [4, parseBody(output.body, context)];
|
|
12949
|
+
case 1:
|
|
12950
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
12951
|
+
errorCode = "UnknownError";
|
|
12952
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
12953
|
+
_b = errorCode;
|
|
12954
|
+
switch (_b) {
|
|
12955
|
+
case "InternalServiceException": return [3, 2];
|
|
12956
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
12957
|
+
case "InvalidParameterException": return [3, 4];
|
|
12958
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
12959
|
+
case "InvalidRequestException": return [3, 6];
|
|
12960
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
12961
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
12962
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
12963
|
+
case "ThrottlingException": return [3, 10];
|
|
12964
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
12965
|
+
}
|
|
12966
|
+
return [3, 12];
|
|
12967
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
12968
|
+
case 3: throw _d.sent();
|
|
12969
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
12970
|
+
case 5: throw _d.sent();
|
|
12971
|
+
case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
12972
|
+
case 7: throw _d.sent();
|
|
12973
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
12974
|
+
case 9: throw _d.sent();
|
|
12975
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
12976
|
+
case 11: throw _d.sent();
|
|
12977
|
+
case 12:
|
|
12978
|
+
parsedBody = parsedOutput.body;
|
|
12979
|
+
response = new __BaseException({
|
|
12980
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
12981
|
+
$fault: "client",
|
|
12982
|
+
$metadata: deserializeMetadata(output),
|
|
12983
|
+
});
|
|
12984
|
+
throw __decorateServiceException(response, parsedBody);
|
|
12985
|
+
}
|
|
12986
|
+
});
|
|
12987
|
+
}); };
|
|
12299
12988
|
export var deserializeAws_restJson1ListUseCasesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12300
12989
|
var contents, data, _a, _b;
|
|
12301
12990
|
return __generator(this, function (_c) {
|
|
@@ -13626,6 +14315,90 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
13626
14315
|
}
|
|
13627
14316
|
});
|
|
13628
14317
|
}); };
|
|
14318
|
+
export var deserializeAws_restJson1TransferContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14319
|
+
var contents, data, _a, _b;
|
|
14320
|
+
return __generator(this, function (_c) {
|
|
14321
|
+
switch (_c.label) {
|
|
14322
|
+
case 0:
|
|
14323
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14324
|
+
return [2, deserializeAws_restJson1TransferContactCommandError(output, context)];
|
|
14325
|
+
}
|
|
14326
|
+
contents = {
|
|
14327
|
+
$metadata: deserializeMetadata(output),
|
|
14328
|
+
ContactArn: undefined,
|
|
14329
|
+
ContactId: undefined,
|
|
14330
|
+
};
|
|
14331
|
+
_a = __expectNonNull;
|
|
14332
|
+
_b = __expectObject;
|
|
14333
|
+
return [4, parseBody(output.body, context)];
|
|
14334
|
+
case 1:
|
|
14335
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
14336
|
+
if (data.ContactArn !== undefined && data.ContactArn !== null) {
|
|
14337
|
+
contents.ContactArn = __expectString(data.ContactArn);
|
|
14338
|
+
}
|
|
14339
|
+
if (data.ContactId !== undefined && data.ContactId !== null) {
|
|
14340
|
+
contents.ContactId = __expectString(data.ContactId);
|
|
14341
|
+
}
|
|
14342
|
+
return [2, Promise.resolve(contents)];
|
|
14343
|
+
}
|
|
14344
|
+
});
|
|
14345
|
+
}); };
|
|
14346
|
+
var deserializeAws_restJson1TransferContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14347
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
14348
|
+
var _c;
|
|
14349
|
+
return __generator(this, function (_d) {
|
|
14350
|
+
switch (_d.label) {
|
|
14351
|
+
case 0:
|
|
14352
|
+
_a = [__assign({}, output)];
|
|
14353
|
+
_c = {};
|
|
14354
|
+
return [4, parseBody(output.body, context)];
|
|
14355
|
+
case 1:
|
|
14356
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
14357
|
+
errorCode = "UnknownError";
|
|
14358
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14359
|
+
_b = errorCode;
|
|
14360
|
+
switch (_b) {
|
|
14361
|
+
case "AccessDeniedException": return [3, 2];
|
|
14362
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
14363
|
+
case "IdempotencyException": return [3, 4];
|
|
14364
|
+
case "com.amazonaws.connect#IdempotencyException": return [3, 4];
|
|
14365
|
+
case "InternalServiceException": return [3, 6];
|
|
14366
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 6];
|
|
14367
|
+
case "InvalidRequestException": return [3, 8];
|
|
14368
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
14369
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
14370
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
14371
|
+
case "ServiceQuotaExceededException": return [3, 12];
|
|
14372
|
+
case "com.amazonaws.connect#ServiceQuotaExceededException": return [3, 12];
|
|
14373
|
+
case "ThrottlingException": return [3, 14];
|
|
14374
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 14];
|
|
14375
|
+
}
|
|
14376
|
+
return [3, 16];
|
|
14377
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
14378
|
+
case 3: throw _d.sent();
|
|
14379
|
+
case 4: return [4, deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context)];
|
|
14380
|
+
case 5: throw _d.sent();
|
|
14381
|
+
case 6: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14382
|
+
case 7: throw _d.sent();
|
|
14383
|
+
case 8: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14384
|
+
case 9: throw _d.sent();
|
|
14385
|
+
case 10: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14386
|
+
case 11: throw _d.sent();
|
|
14387
|
+
case 12: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
14388
|
+
case 13: throw _d.sent();
|
|
14389
|
+
case 14: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14390
|
+
case 15: throw _d.sent();
|
|
14391
|
+
case 16:
|
|
14392
|
+
parsedBody = parsedOutput.body;
|
|
14393
|
+
response = new __BaseException({
|
|
14394
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
14395
|
+
$fault: "client",
|
|
14396
|
+
$metadata: deserializeMetadata(output),
|
|
14397
|
+
});
|
|
14398
|
+
throw __decorateServiceException(response, parsedBody);
|
|
14399
|
+
}
|
|
14400
|
+
});
|
|
14401
|
+
}); };
|
|
13629
14402
|
export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13630
14403
|
var contents;
|
|
13631
14404
|
return __generator(this, function (_a) {
|
|
@@ -15404,38 +16177,158 @@ var deserializeAws_restJson1UpdateSecurityProfileCommandError = function (output
|
|
|
15404
16177
|
}
|
|
15405
16178
|
});
|
|
15406
16179
|
}); };
|
|
15407
|
-
export var
|
|
15408
|
-
var contents;
|
|
15409
|
-
return __generator(this, function (
|
|
15410
|
-
switch (
|
|
16180
|
+
export var deserializeAws_restJson1UpdateTaskTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16181
|
+
var contents, data, _a, _b;
|
|
16182
|
+
return __generator(this, function (_c) {
|
|
16183
|
+
switch (_c.label) {
|
|
15411
16184
|
case 0:
|
|
15412
16185
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
15413
|
-
return [2,
|
|
16186
|
+
return [2, deserializeAws_restJson1UpdateTaskTemplateCommandError(output, context)];
|
|
15414
16187
|
}
|
|
15415
16188
|
contents = {
|
|
15416
16189
|
$metadata: deserializeMetadata(output),
|
|
16190
|
+
Arn: undefined,
|
|
16191
|
+
Constraints: undefined,
|
|
16192
|
+
ContactFlowId: undefined,
|
|
16193
|
+
CreatedTime: undefined,
|
|
16194
|
+
Defaults: undefined,
|
|
16195
|
+
Description: undefined,
|
|
16196
|
+
Fields: undefined,
|
|
16197
|
+
Id: undefined,
|
|
16198
|
+
InstanceId: undefined,
|
|
16199
|
+
LastModifiedTime: undefined,
|
|
16200
|
+
Name: undefined,
|
|
16201
|
+
Status: undefined,
|
|
15417
16202
|
};
|
|
15418
|
-
|
|
15419
|
-
|
|
15420
|
-
_a.sent();
|
|
15421
|
-
return [2, Promise.resolve(contents)];
|
|
15422
|
-
}
|
|
15423
|
-
});
|
|
15424
|
-
}); };
|
|
15425
|
-
var deserializeAws_restJson1UpdateUserHierarchyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
15426
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
15427
|
-
var _c;
|
|
15428
|
-
return __generator(this, function (_d) {
|
|
15429
|
-
switch (_d.label) {
|
|
15430
|
-
case 0:
|
|
15431
|
-
_a = [__assign({}, output)];
|
|
15432
|
-
_c = {};
|
|
16203
|
+
_a = __expectNonNull;
|
|
16204
|
+
_b = __expectObject;
|
|
15433
16205
|
return [4, parseBody(output.body, context)];
|
|
15434
16206
|
case 1:
|
|
15435
|
-
|
|
15436
|
-
|
|
15437
|
-
|
|
15438
|
-
|
|
16207
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
16208
|
+
if (data.Arn !== undefined && data.Arn !== null) {
|
|
16209
|
+
contents.Arn = __expectString(data.Arn);
|
|
16210
|
+
}
|
|
16211
|
+
if (data.Constraints !== undefined && data.Constraints !== null) {
|
|
16212
|
+
contents.Constraints = deserializeAws_restJson1TaskTemplateConstraints(data.Constraints, context);
|
|
16213
|
+
}
|
|
16214
|
+
if (data.ContactFlowId !== undefined && data.ContactFlowId !== null) {
|
|
16215
|
+
contents.ContactFlowId = __expectString(data.ContactFlowId);
|
|
16216
|
+
}
|
|
16217
|
+
if (data.CreatedTime !== undefined && data.CreatedTime !== null) {
|
|
16218
|
+
contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime)));
|
|
16219
|
+
}
|
|
16220
|
+
if (data.Defaults !== undefined && data.Defaults !== null) {
|
|
16221
|
+
contents.Defaults = deserializeAws_restJson1TaskTemplateDefaults(data.Defaults, context);
|
|
16222
|
+
}
|
|
16223
|
+
if (data.Description !== undefined && data.Description !== null) {
|
|
16224
|
+
contents.Description = __expectString(data.Description);
|
|
16225
|
+
}
|
|
16226
|
+
if (data.Fields !== undefined && data.Fields !== null) {
|
|
16227
|
+
contents.Fields = deserializeAws_restJson1TaskTemplateFields(data.Fields, context);
|
|
16228
|
+
}
|
|
16229
|
+
if (data.Id !== undefined && data.Id !== null) {
|
|
16230
|
+
contents.Id = __expectString(data.Id);
|
|
16231
|
+
}
|
|
16232
|
+
if (data.InstanceId !== undefined && data.InstanceId !== null) {
|
|
16233
|
+
contents.InstanceId = __expectString(data.InstanceId);
|
|
16234
|
+
}
|
|
16235
|
+
if (data.LastModifiedTime !== undefined && data.LastModifiedTime !== null) {
|
|
16236
|
+
contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime)));
|
|
16237
|
+
}
|
|
16238
|
+
if (data.Name !== undefined && data.Name !== null) {
|
|
16239
|
+
contents.Name = __expectString(data.Name);
|
|
16240
|
+
}
|
|
16241
|
+
if (data.Status !== undefined && data.Status !== null) {
|
|
16242
|
+
contents.Status = __expectString(data.Status);
|
|
16243
|
+
}
|
|
16244
|
+
return [2, Promise.resolve(contents)];
|
|
16245
|
+
}
|
|
16246
|
+
});
|
|
16247
|
+
}); };
|
|
16248
|
+
var deserializeAws_restJson1UpdateTaskTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16249
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
16250
|
+
var _c;
|
|
16251
|
+
return __generator(this, function (_d) {
|
|
16252
|
+
switch (_d.label) {
|
|
16253
|
+
case 0:
|
|
16254
|
+
_a = [__assign({}, output)];
|
|
16255
|
+
_c = {};
|
|
16256
|
+
return [4, parseBody(output.body, context)];
|
|
16257
|
+
case 1:
|
|
16258
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
16259
|
+
errorCode = "UnknownError";
|
|
16260
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
16261
|
+
_b = errorCode;
|
|
16262
|
+
switch (_b) {
|
|
16263
|
+
case "InternalServiceException": return [3, 2];
|
|
16264
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
16265
|
+
case "InvalidParameterException": return [3, 4];
|
|
16266
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
16267
|
+
case "PropertyValidationException": return [3, 6];
|
|
16268
|
+
case "com.amazonaws.connect#PropertyValidationException": return [3, 6];
|
|
16269
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
16270
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
16271
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
16272
|
+
case "com.amazonaws.connect#ServiceQuotaExceededException": return [3, 10];
|
|
16273
|
+
case "ThrottlingException": return [3, 12];
|
|
16274
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
16275
|
+
}
|
|
16276
|
+
return [3, 14];
|
|
16277
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
16278
|
+
case 3: throw _d.sent();
|
|
16279
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
16280
|
+
case 5: throw _d.sent();
|
|
16281
|
+
case 6: return [4, deserializeAws_restJson1PropertyValidationExceptionResponse(parsedOutput, context)];
|
|
16282
|
+
case 7: throw _d.sent();
|
|
16283
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
16284
|
+
case 9: throw _d.sent();
|
|
16285
|
+
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
16286
|
+
case 11: throw _d.sent();
|
|
16287
|
+
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
16288
|
+
case 13: throw _d.sent();
|
|
16289
|
+
case 14:
|
|
16290
|
+
parsedBody = parsedOutput.body;
|
|
16291
|
+
response = new __BaseException({
|
|
16292
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
16293
|
+
$fault: "client",
|
|
16294
|
+
$metadata: deserializeMetadata(output),
|
|
16295
|
+
});
|
|
16296
|
+
throw __decorateServiceException(response, parsedBody);
|
|
16297
|
+
}
|
|
16298
|
+
});
|
|
16299
|
+
}); };
|
|
16300
|
+
export var deserializeAws_restJson1UpdateUserHierarchyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16301
|
+
var contents;
|
|
16302
|
+
return __generator(this, function (_a) {
|
|
16303
|
+
switch (_a.label) {
|
|
16304
|
+
case 0:
|
|
16305
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
16306
|
+
return [2, deserializeAws_restJson1UpdateUserHierarchyCommandError(output, context)];
|
|
16307
|
+
}
|
|
16308
|
+
contents = {
|
|
16309
|
+
$metadata: deserializeMetadata(output),
|
|
16310
|
+
};
|
|
16311
|
+
return [4, collectBody(output.body, context)];
|
|
16312
|
+
case 1:
|
|
16313
|
+
_a.sent();
|
|
16314
|
+
return [2, Promise.resolve(contents)];
|
|
16315
|
+
}
|
|
16316
|
+
});
|
|
16317
|
+
}); };
|
|
16318
|
+
var deserializeAws_restJson1UpdateUserHierarchyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16319
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
16320
|
+
var _c;
|
|
16321
|
+
return __generator(this, function (_d) {
|
|
16322
|
+
switch (_d.label) {
|
|
16323
|
+
case 0:
|
|
16324
|
+
_a = [__assign({}, output)];
|
|
16325
|
+
_c = {};
|
|
16326
|
+
return [4, parseBody(output.body, context)];
|
|
16327
|
+
case 1:
|
|
16328
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
16329
|
+
errorCode = "UnknownError";
|
|
16330
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
16331
|
+
_b = errorCode;
|
|
15439
16332
|
switch (_b) {
|
|
15440
16333
|
case "InternalServiceException": return [3, 2];
|
|
15441
16334
|
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
@@ -16030,6 +16923,21 @@ var deserializeAws_restJson1OutboundContactNotPermittedExceptionResponse = funct
|
|
|
16030
16923
|
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
16031
16924
|
});
|
|
16032
16925
|
}); };
|
|
16926
|
+
var deserializeAws_restJson1PropertyValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16927
|
+
var contents, data, exception;
|
|
16928
|
+
return __generator(this, function (_a) {
|
|
16929
|
+
contents = {};
|
|
16930
|
+
data = parsedOutput.body;
|
|
16931
|
+
if (data.Message !== undefined && data.Message !== null) {
|
|
16932
|
+
contents.Message = __expectString(data.Message);
|
|
16933
|
+
}
|
|
16934
|
+
if (data.PropertyList !== undefined && data.PropertyList !== null) {
|
|
16935
|
+
contents.PropertyList = deserializeAws_restJson1PropertyValidationExceptionPropertyList(data.PropertyList, context);
|
|
16936
|
+
}
|
|
16937
|
+
exception = new PropertyValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
16938
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
16939
|
+
});
|
|
16940
|
+
}); };
|
|
16033
16941
|
var deserializeAws_restJson1ResourceConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16034
16942
|
var contents, data, exception;
|
|
16035
16943
|
return __generator(this, function (_a) {
|
|
@@ -16142,6 +17050,12 @@ var serializeAws_restJson1ChatStreamingConfiguration = function (input, context)
|
|
|
16142
17050
|
return __assign({}, (input.StreamingEndpointArn !== undefined &&
|
|
16143
17051
|
input.StreamingEndpointArn !== null && { StreamingEndpointArn: input.StreamingEndpointArn }));
|
|
16144
17052
|
};
|
|
17053
|
+
var serializeAws_restJson1ContactFilter = function (input, context) {
|
|
17054
|
+
return __assign({}, (input.ContactStates !== undefined &&
|
|
17055
|
+
input.ContactStates !== null && {
|
|
17056
|
+
ContactStates: serializeAws_restJson1ContactStates(input.ContactStates, context),
|
|
17057
|
+
}));
|
|
17058
|
+
};
|
|
16145
17059
|
var serializeAws_restJson1ContactReferences = function (input, context) {
|
|
16146
17060
|
return Object.entries(input).reduce(function (acc, _a) {
|
|
16147
17061
|
var _b;
|
|
@@ -16152,6 +17066,16 @@ var serializeAws_restJson1ContactReferences = function (input, context) {
|
|
|
16152
17066
|
return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_restJson1Reference(value, context), _b));
|
|
16153
17067
|
}, {});
|
|
16154
17068
|
};
|
|
17069
|
+
var serializeAws_restJson1ContactStates = function (input, context) {
|
|
17070
|
+
return input
|
|
17071
|
+
.filter(function (e) { return e != null; })
|
|
17072
|
+
.map(function (entry) {
|
|
17073
|
+
if (entry === null) {
|
|
17074
|
+
return null;
|
|
17075
|
+
}
|
|
17076
|
+
return entry;
|
|
17077
|
+
});
|
|
17078
|
+
};
|
|
16155
17079
|
var serializeAws_restJson1ControlPlaneTagFilter = function (input, context) {
|
|
16156
17080
|
return __assign(__assign(__assign({}, (input.AndConditions !== undefined &&
|
|
16157
17081
|
input.AndConditions !== null && {
|
|
@@ -16258,6 +17182,20 @@ var serializeAws_restJson1InstanceStorageConfig = function (input, context) {
|
|
|
16258
17182
|
})), (input.S3Config !== undefined &&
|
|
16259
17183
|
input.S3Config !== null && { S3Config: serializeAws_restJson1S3Config(input.S3Config, context) })), (input.StorageType !== undefined && input.StorageType !== null && { StorageType: input.StorageType }));
|
|
16260
17184
|
};
|
|
17185
|
+
var serializeAws_restJson1InvisibleFieldInfo = function (input, context) {
|
|
17186
|
+
return __assign({}, (input.Id !== undefined &&
|
|
17187
|
+
input.Id !== null && { Id: serializeAws_restJson1TaskTemplateFieldIdentifier(input.Id, context) }));
|
|
17188
|
+
};
|
|
17189
|
+
var serializeAws_restJson1InvisibleTaskTemplateFields = function (input, context) {
|
|
17190
|
+
return input
|
|
17191
|
+
.filter(function (e) { return e != null; })
|
|
17192
|
+
.map(function (entry) {
|
|
17193
|
+
if (entry === null) {
|
|
17194
|
+
return null;
|
|
17195
|
+
}
|
|
17196
|
+
return serializeAws_restJson1InvisibleFieldInfo(entry, context);
|
|
17197
|
+
});
|
|
17198
|
+
};
|
|
16261
17199
|
var serializeAws_restJson1KinesisFirehoseConfig = function (input, context) {
|
|
16262
17200
|
return __assign({}, (input.FirehoseArn !== undefined && input.FirehoseArn !== null && { FirehoseArn: input.FirehoseArn }));
|
|
16263
17201
|
};
|
|
@@ -16368,9 +17306,37 @@ var serializeAws_restJson1QuickConnectsList = function (input, context) {
|
|
|
16368
17306
|
return entry;
|
|
16369
17307
|
});
|
|
16370
17308
|
};
|
|
17309
|
+
var serializeAws_restJson1ReadOnlyFieldInfo = function (input, context) {
|
|
17310
|
+
return __assign({}, (input.Id !== undefined &&
|
|
17311
|
+
input.Id !== null && { Id: serializeAws_restJson1TaskTemplateFieldIdentifier(input.Id, context) }));
|
|
17312
|
+
};
|
|
17313
|
+
var serializeAws_restJson1ReadOnlyTaskTemplateFields = function (input, context) {
|
|
17314
|
+
return input
|
|
17315
|
+
.filter(function (e) { return e != null; })
|
|
17316
|
+
.map(function (entry) {
|
|
17317
|
+
if (entry === null) {
|
|
17318
|
+
return null;
|
|
17319
|
+
}
|
|
17320
|
+
return serializeAws_restJson1ReadOnlyFieldInfo(entry, context);
|
|
17321
|
+
});
|
|
17322
|
+
};
|
|
16371
17323
|
var serializeAws_restJson1Reference = function (input, context) {
|
|
16372
17324
|
return __assign(__assign({}, (input.Type !== undefined && input.Type !== null && { Type: input.Type })), (input.Value !== undefined && input.Value !== null && { Value: input.Value }));
|
|
16373
17325
|
};
|
|
17326
|
+
var serializeAws_restJson1RequiredFieldInfo = function (input, context) {
|
|
17327
|
+
return __assign({}, (input.Id !== undefined &&
|
|
17328
|
+
input.Id !== null && { Id: serializeAws_restJson1TaskTemplateFieldIdentifier(input.Id, context) }));
|
|
17329
|
+
};
|
|
17330
|
+
var serializeAws_restJson1RequiredTaskTemplateFields = function (input, context) {
|
|
17331
|
+
return input
|
|
17332
|
+
.filter(function (e) { return e != null; })
|
|
17333
|
+
.map(function (entry) {
|
|
17334
|
+
if (entry === null) {
|
|
17335
|
+
return null;
|
|
17336
|
+
}
|
|
17337
|
+
return serializeAws_restJson1RequiredFieldInfo(entry, context);
|
|
17338
|
+
});
|
|
17339
|
+
};
|
|
16374
17340
|
var serializeAws_restJson1RoutingProfileQueueConfig = function (input, context) {
|
|
16375
17341
|
return __assign(__assign(__assign({}, (input.Delay !== undefined && input.Delay !== null && { Delay: input.Delay })), (input.Priority !== undefined && input.Priority !== null && { Priority: input.Priority })), (input.QueueReference !== undefined &&
|
|
16376
17342
|
input.QueueReference !== null && {
|
|
@@ -16416,6 +17382,16 @@ var serializeAws_restJson1SecurityProfileIds = function (input, context) {
|
|
|
16416
17382
|
return entry;
|
|
16417
17383
|
});
|
|
16418
17384
|
};
|
|
17385
|
+
var serializeAws_restJson1SingleSelectOptions = function (input, context) {
|
|
17386
|
+
return input
|
|
17387
|
+
.filter(function (e) { return e != null; })
|
|
17388
|
+
.map(function (entry) {
|
|
17389
|
+
if (entry === null) {
|
|
17390
|
+
return null;
|
|
17391
|
+
}
|
|
17392
|
+
return entry;
|
|
17393
|
+
});
|
|
17394
|
+
};
|
|
16419
17395
|
var serializeAws_restJson1StringCondition = function (input, context) {
|
|
16420
17396
|
return __assign(__assign(__assign({}, (input.ComparisonType !== undefined &&
|
|
16421
17397
|
input.ComparisonType !== null && { ComparisonType: input.ComparisonType })), (input.FieldName !== undefined && input.FieldName !== null && { FieldName: input.FieldName })), (input.Value !== undefined && input.Value !== null && { Value: input.Value }));
|
|
@@ -16463,10 +17439,69 @@ var serializeAws_restJson1TagOrConditionList = function (input, context) {
|
|
|
16463
17439
|
return serializeAws_restJson1TagAndConditionList(entry, context);
|
|
16464
17440
|
});
|
|
16465
17441
|
};
|
|
17442
|
+
var serializeAws_restJson1TaskTemplateConstraints = function (input, context) {
|
|
17443
|
+
return __assign(__assign(__assign({}, (input.InvisibleFields !== undefined &&
|
|
17444
|
+
input.InvisibleFields !== null && {
|
|
17445
|
+
InvisibleFields: serializeAws_restJson1InvisibleTaskTemplateFields(input.InvisibleFields, context),
|
|
17446
|
+
})), (input.ReadOnlyFields !== undefined &&
|
|
17447
|
+
input.ReadOnlyFields !== null && {
|
|
17448
|
+
ReadOnlyFields: serializeAws_restJson1ReadOnlyTaskTemplateFields(input.ReadOnlyFields, context),
|
|
17449
|
+
})), (input.RequiredFields !== undefined &&
|
|
17450
|
+
input.RequiredFields !== null && {
|
|
17451
|
+
RequiredFields: serializeAws_restJson1RequiredTaskTemplateFields(input.RequiredFields, context),
|
|
17452
|
+
}));
|
|
17453
|
+
};
|
|
17454
|
+
var serializeAws_restJson1TaskTemplateDefaultFieldValue = function (input, context) {
|
|
17455
|
+
return __assign(__assign({}, (input.DefaultValue !== undefined && input.DefaultValue !== null && { DefaultValue: input.DefaultValue })), (input.Id !== undefined &&
|
|
17456
|
+
input.Id !== null && { Id: serializeAws_restJson1TaskTemplateFieldIdentifier(input.Id, context) }));
|
|
17457
|
+
};
|
|
17458
|
+
var serializeAws_restJson1TaskTemplateDefaultFieldValueList = function (input, context) {
|
|
17459
|
+
return input
|
|
17460
|
+
.filter(function (e) { return e != null; })
|
|
17461
|
+
.map(function (entry) {
|
|
17462
|
+
if (entry === null) {
|
|
17463
|
+
return null;
|
|
17464
|
+
}
|
|
17465
|
+
return serializeAws_restJson1TaskTemplateDefaultFieldValue(entry, context);
|
|
17466
|
+
});
|
|
17467
|
+
};
|
|
17468
|
+
var serializeAws_restJson1TaskTemplateDefaults = function (input, context) {
|
|
17469
|
+
return __assign({}, (input.DefaultFieldValues !== undefined &&
|
|
17470
|
+
input.DefaultFieldValues !== null && {
|
|
17471
|
+
DefaultFieldValues: serializeAws_restJson1TaskTemplateDefaultFieldValueList(input.DefaultFieldValues, context),
|
|
17472
|
+
}));
|
|
17473
|
+
};
|
|
17474
|
+
var serializeAws_restJson1TaskTemplateField = function (input, context) {
|
|
17475
|
+
return __assign(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Id !== undefined &&
|
|
17476
|
+
input.Id !== null && { Id: serializeAws_restJson1TaskTemplateFieldIdentifier(input.Id, context) })), (input.SingleSelectOptions !== undefined &&
|
|
17477
|
+
input.SingleSelectOptions !== null && {
|
|
17478
|
+
SingleSelectOptions: serializeAws_restJson1SingleSelectOptions(input.SingleSelectOptions, context),
|
|
17479
|
+
})), (input.Type !== undefined && input.Type !== null && { Type: input.Type }));
|
|
17480
|
+
};
|
|
17481
|
+
var serializeAws_restJson1TaskTemplateFieldIdentifier = function (input, context) {
|
|
17482
|
+
return __assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name }));
|
|
17483
|
+
};
|
|
17484
|
+
var serializeAws_restJson1TaskTemplateFields = function (input, context) {
|
|
17485
|
+
return input
|
|
17486
|
+
.filter(function (e) { return e != null; })
|
|
17487
|
+
.map(function (entry) {
|
|
17488
|
+
if (entry === null) {
|
|
17489
|
+
return null;
|
|
17490
|
+
}
|
|
17491
|
+
return serializeAws_restJson1TaskTemplateField(entry, context);
|
|
17492
|
+
});
|
|
17493
|
+
};
|
|
16466
17494
|
var serializeAws_restJson1Threshold = function (input, context) {
|
|
16467
17495
|
return __assign(__assign({}, (input.Comparison !== undefined && input.Comparison !== null && { Comparison: input.Comparison })), (input.ThresholdValue !== undefined &&
|
|
16468
17496
|
input.ThresholdValue !== null && { ThresholdValue: __serializeFloat(input.ThresholdValue) }));
|
|
16469
17497
|
};
|
|
17498
|
+
var serializeAws_restJson1UserDataFilters = function (input, context) {
|
|
17499
|
+
return __assign(__assign({}, (input.ContactFilter !== undefined &&
|
|
17500
|
+
input.ContactFilter !== null && {
|
|
17501
|
+
ContactFilter: serializeAws_restJson1ContactFilter(input.ContactFilter, context),
|
|
17502
|
+
})), (input.Queues !== undefined &&
|
|
17503
|
+
input.Queues !== null && { Queues: serializeAws_restJson1Queues(input.Queues, context) }));
|
|
17504
|
+
};
|
|
16470
17505
|
var serializeAws_restJson1UserIdentityInfo = function (input, context) {
|
|
16471
17506
|
return __assign(__assign(__assign({}, (input.Email !== undefined && input.Email !== null && { Email: input.Email })), (input.FirstName !== undefined && input.FirstName !== null && { FirstName: input.FirstName })), (input.LastName !== undefined && input.LastName !== null && { LastName: input.LastName }));
|
|
16472
17507
|
};
|
|
@@ -16511,6 +17546,34 @@ var serializeAws_restJson1VoiceRecordingConfiguration = function (input, context
|
|
|
16511
17546
|
return __assign({}, (input.VoiceRecordingTrack !== undefined &&
|
|
16512
17547
|
input.VoiceRecordingTrack !== null && { VoiceRecordingTrack: input.VoiceRecordingTrack }));
|
|
16513
17548
|
};
|
|
17549
|
+
var deserializeAws_restJson1AgentContactReference = function (output, context) {
|
|
17550
|
+
return {
|
|
17551
|
+
AgentContactState: __expectString(output.AgentContactState),
|
|
17552
|
+
Channel: __expectString(output.Channel),
|
|
17553
|
+
ConnectedToAgentTimestamp: output.ConnectedToAgentTimestamp !== undefined && output.ConnectedToAgentTimestamp !== null
|
|
17554
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConnectedToAgentTimestamp)))
|
|
17555
|
+
: undefined,
|
|
17556
|
+
ContactId: __expectString(output.ContactId),
|
|
17557
|
+
InitiationMethod: __expectString(output.InitiationMethod),
|
|
17558
|
+
Queue: output.Queue !== undefined && output.Queue !== null
|
|
17559
|
+
? deserializeAws_restJson1QueueReference(output.Queue, context)
|
|
17560
|
+
: undefined,
|
|
17561
|
+
StateStartTimestamp: output.StateStartTimestamp !== undefined && output.StateStartTimestamp !== null
|
|
17562
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StateStartTimestamp)))
|
|
17563
|
+
: undefined,
|
|
17564
|
+
};
|
|
17565
|
+
};
|
|
17566
|
+
var deserializeAws_restJson1AgentContactReferenceList = function (output, context) {
|
|
17567
|
+
var retVal = (output || [])
|
|
17568
|
+
.filter(function (e) { return e != null; })
|
|
17569
|
+
.map(function (entry) {
|
|
17570
|
+
if (entry === null) {
|
|
17571
|
+
return null;
|
|
17572
|
+
}
|
|
17573
|
+
return deserializeAws_restJson1AgentContactReference(entry, context);
|
|
17574
|
+
});
|
|
17575
|
+
return retVal;
|
|
17576
|
+
};
|
|
16514
17577
|
var deserializeAws_restJson1AgentInfo = function (output, context) {
|
|
16515
17578
|
return {
|
|
16516
17579
|
ConnectedToAgentTimestamp: output.ConnectedToAgentTimestamp !== undefined && output.ConnectedToAgentTimestamp !== null
|
|
@@ -16533,6 +17596,14 @@ var deserializeAws_restJson1AgentStatus = function (output, context) {
|
|
|
16533
17596
|
Type: __expectString(output.Type),
|
|
16534
17597
|
};
|
|
16535
17598
|
};
|
|
17599
|
+
var deserializeAws_restJson1AgentStatusReference = function (output, context) {
|
|
17600
|
+
return {
|
|
17601
|
+
StatusArn: __expectString(output.StatusArn),
|
|
17602
|
+
StatusStartTimestamp: output.StatusStartTimestamp !== undefined && output.StatusStartTimestamp !== null
|
|
17603
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StatusStartTimestamp)))
|
|
17604
|
+
: undefined,
|
|
17605
|
+
};
|
|
17606
|
+
};
|
|
16536
17607
|
var deserializeAws_restJson1AgentStatusSummary = function (output, context) {
|
|
16537
17608
|
return {
|
|
16538
17609
|
Arn: __expectString(output.Arn),
|
|
@@ -16604,6 +17675,16 @@ var deserializeAws_restJson1AvailableNumberSummary = function (output, context)
|
|
|
16604
17675
|
PhoneNumberType: __expectString(output.PhoneNumberType),
|
|
16605
17676
|
};
|
|
16606
17677
|
};
|
|
17678
|
+
var deserializeAws_restJson1ChannelToCountMap = function (output, context) {
|
|
17679
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
17680
|
+
var _b;
|
|
17681
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
17682
|
+
if (value === null) {
|
|
17683
|
+
return acc;
|
|
17684
|
+
}
|
|
17685
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectInt32(value), _b));
|
|
17686
|
+
}, {});
|
|
17687
|
+
};
|
|
16607
17688
|
var deserializeAws_restJson1ClaimedPhoneNumberSummary = function (output, context) {
|
|
16608
17689
|
return {
|
|
16609
17690
|
PhoneNumber: __expectString(output.PhoneNumber),
|
|
@@ -16776,6 +17857,12 @@ var deserializeAws_restJson1CurrentMetricResults = function (output, context) {
|
|
|
16776
17857
|
});
|
|
16777
17858
|
return retVal;
|
|
16778
17859
|
};
|
|
17860
|
+
var deserializeAws_restJson1DateReference = function (output, context) {
|
|
17861
|
+
return {
|
|
17862
|
+
Name: __expectString(output.Name),
|
|
17863
|
+
Value: __expectString(output.Value),
|
|
17864
|
+
};
|
|
17865
|
+
};
|
|
16779
17866
|
var deserializeAws_restJson1DefaultVocabulary = function (output, context) {
|
|
16780
17867
|
return {
|
|
16781
17868
|
InstanceId: __expectString(output.InstanceId),
|
|
@@ -16803,6 +17890,12 @@ var deserializeAws_restJson1Dimensions = function (output, context) {
|
|
|
16803
17890
|
: undefined,
|
|
16804
17891
|
};
|
|
16805
17892
|
};
|
|
17893
|
+
var deserializeAws_restJson1EmailReference = function (output, context) {
|
|
17894
|
+
return {
|
|
17895
|
+
Name: __expectString(output.Name),
|
|
17896
|
+
Value: __expectString(output.Value),
|
|
17897
|
+
};
|
|
17898
|
+
};
|
|
16806
17899
|
var deserializeAws_restJson1EncryptionConfig = function (output, context) {
|
|
16807
17900
|
return {
|
|
16808
17901
|
EncryptionType: __expectString(output.EncryptionType),
|
|
@@ -16852,6 +17945,12 @@ var deserializeAws_restJson1HierarchyGroupSummaryList = function (output, contex
|
|
|
16852
17945
|
});
|
|
16853
17946
|
return retVal;
|
|
16854
17947
|
};
|
|
17948
|
+
var deserializeAws_restJson1HierarchyGroupSummaryReference = function (output, context) {
|
|
17949
|
+
return {
|
|
17950
|
+
Arn: __expectString(output.Arn),
|
|
17951
|
+
Id: __expectString(output.Id),
|
|
17952
|
+
};
|
|
17953
|
+
};
|
|
16855
17954
|
var deserializeAws_restJson1HierarchyLevel = function (output, context) {
|
|
16856
17955
|
return {
|
|
16857
17956
|
Arn: __expectString(output.Arn),
|
|
@@ -16878,6 +17977,25 @@ var deserializeAws_restJson1HierarchyPath = function (output, context) {
|
|
|
16878
17977
|
: undefined,
|
|
16879
17978
|
};
|
|
16880
17979
|
};
|
|
17980
|
+
var deserializeAws_restJson1HierarchyPathReference = function (output, context) {
|
|
17981
|
+
return {
|
|
17982
|
+
LevelFive: output.LevelFive !== undefined && output.LevelFive !== null
|
|
17983
|
+
? deserializeAws_restJson1HierarchyGroupSummaryReference(output.LevelFive, context)
|
|
17984
|
+
: undefined,
|
|
17985
|
+
LevelFour: output.LevelFour !== undefined && output.LevelFour !== null
|
|
17986
|
+
? deserializeAws_restJson1HierarchyGroupSummaryReference(output.LevelFour, context)
|
|
17987
|
+
: undefined,
|
|
17988
|
+
LevelOne: output.LevelOne !== undefined && output.LevelOne !== null
|
|
17989
|
+
? deserializeAws_restJson1HierarchyGroupSummaryReference(output.LevelOne, context)
|
|
17990
|
+
: undefined,
|
|
17991
|
+
LevelThree: output.LevelThree !== undefined && output.LevelThree !== null
|
|
17992
|
+
? deserializeAws_restJson1HierarchyGroupSummaryReference(output.LevelThree, context)
|
|
17993
|
+
: undefined,
|
|
17994
|
+
LevelTwo: output.LevelTwo !== undefined && output.LevelTwo !== null
|
|
17995
|
+
? deserializeAws_restJson1HierarchyGroupSummaryReference(output.LevelTwo, context)
|
|
17996
|
+
: undefined,
|
|
17997
|
+
};
|
|
17998
|
+
};
|
|
16881
17999
|
var deserializeAws_restJson1HierarchyStructure = function (output, context) {
|
|
16882
18000
|
return {
|
|
16883
18001
|
LevelFive: output.LevelFive !== undefined && output.LevelFive !== null
|
|
@@ -17109,6 +18227,24 @@ var deserializeAws_restJson1IntegrationAssociationSummaryList = function (output
|
|
|
17109
18227
|
});
|
|
17110
18228
|
return retVal;
|
|
17111
18229
|
};
|
|
18230
|
+
var deserializeAws_restJson1InvisibleFieldInfo = function (output, context) {
|
|
18231
|
+
return {
|
|
18232
|
+
Id: output.Id !== undefined && output.Id !== null
|
|
18233
|
+
? deserializeAws_restJson1TaskTemplateFieldIdentifier(output.Id, context)
|
|
18234
|
+
: undefined,
|
|
18235
|
+
};
|
|
18236
|
+
};
|
|
18237
|
+
var deserializeAws_restJson1InvisibleTaskTemplateFields = function (output, context) {
|
|
18238
|
+
var retVal = (output || [])
|
|
18239
|
+
.filter(function (e) { return e != null; })
|
|
18240
|
+
.map(function (entry) {
|
|
18241
|
+
if (entry === null) {
|
|
18242
|
+
return null;
|
|
18243
|
+
}
|
|
18244
|
+
return deserializeAws_restJson1InvisibleFieldInfo(entry, context);
|
|
18245
|
+
});
|
|
18246
|
+
return retVal;
|
|
18247
|
+
};
|
|
17112
18248
|
var deserializeAws_restJson1KinesisFirehoseConfig = function (output, context) {
|
|
17113
18249
|
return {
|
|
17114
18250
|
FirehoseArn: __expectString(output.FirehoseArn),
|
|
@@ -17209,6 +18345,12 @@ var deserializeAws_restJson1MediaConcurrency = function (output, context) {
|
|
|
17209
18345
|
Concurrency: __expectInt32(output.Concurrency),
|
|
17210
18346
|
};
|
|
17211
18347
|
};
|
|
18348
|
+
var deserializeAws_restJson1NumberReference = function (output, context) {
|
|
18349
|
+
return {
|
|
18350
|
+
Name: __expectString(output.Name),
|
|
18351
|
+
Value: __expectString(output.Value),
|
|
18352
|
+
};
|
|
18353
|
+
};
|
|
17212
18354
|
var deserializeAws_restJson1OriginsList = function (output, context) {
|
|
17213
18355
|
var retVal = (output || [])
|
|
17214
18356
|
.filter(function (e) { return e != null; })
|
|
@@ -17303,6 +18445,24 @@ var deserializeAws_restJson1PromptSummaryList = function (output, context) {
|
|
|
17303
18445
|
});
|
|
17304
18446
|
return retVal;
|
|
17305
18447
|
};
|
|
18448
|
+
var deserializeAws_restJson1PropertyValidationExceptionProperty = function (output, context) {
|
|
18449
|
+
return {
|
|
18450
|
+
Message: __expectString(output.Message),
|
|
18451
|
+
PropertyPath: __expectString(output.PropertyPath),
|
|
18452
|
+
Reason: __expectString(output.Reason),
|
|
18453
|
+
};
|
|
18454
|
+
};
|
|
18455
|
+
var deserializeAws_restJson1PropertyValidationExceptionPropertyList = function (output, context) {
|
|
18456
|
+
var retVal = (output || [])
|
|
18457
|
+
.filter(function (e) { return e != null; })
|
|
18458
|
+
.map(function (entry) {
|
|
18459
|
+
if (entry === null) {
|
|
18460
|
+
return null;
|
|
18461
|
+
}
|
|
18462
|
+
return deserializeAws_restJson1PropertyValidationExceptionProperty(entry, context);
|
|
18463
|
+
});
|
|
18464
|
+
return retVal;
|
|
18465
|
+
};
|
|
17306
18466
|
var deserializeAws_restJson1Queue = function (output, context) {
|
|
17307
18467
|
return {
|
|
17308
18468
|
Description: __expectString(output.Description),
|
|
@@ -17406,12 +18566,50 @@ var deserializeAws_restJson1QuickConnectSummaryList = function (output, context)
|
|
|
17406
18566
|
});
|
|
17407
18567
|
return retVal;
|
|
17408
18568
|
};
|
|
18569
|
+
var deserializeAws_restJson1ReadOnlyFieldInfo = function (output, context) {
|
|
18570
|
+
return {
|
|
18571
|
+
Id: output.Id !== undefined && output.Id !== null
|
|
18572
|
+
? deserializeAws_restJson1TaskTemplateFieldIdentifier(output.Id, context)
|
|
18573
|
+
: undefined,
|
|
18574
|
+
};
|
|
18575
|
+
};
|
|
18576
|
+
var deserializeAws_restJson1ReadOnlyTaskTemplateFields = function (output, context) {
|
|
18577
|
+
var retVal = (output || [])
|
|
18578
|
+
.filter(function (e) { return e != null; })
|
|
18579
|
+
.map(function (entry) {
|
|
18580
|
+
if (entry === null) {
|
|
18581
|
+
return null;
|
|
18582
|
+
}
|
|
18583
|
+
return deserializeAws_restJson1ReadOnlyFieldInfo(entry, context);
|
|
18584
|
+
});
|
|
18585
|
+
return retVal;
|
|
18586
|
+
};
|
|
17409
18587
|
var deserializeAws_restJson1ReferenceSummary = function (output, context) {
|
|
17410
18588
|
if (output.Attachment !== undefined && output.Attachment !== null) {
|
|
17411
18589
|
return {
|
|
17412
18590
|
Attachment: deserializeAws_restJson1AttachmentReference(output.Attachment, context),
|
|
17413
18591
|
};
|
|
17414
18592
|
}
|
|
18593
|
+
if (output.Date !== undefined && output.Date !== null) {
|
|
18594
|
+
return {
|
|
18595
|
+
Date: deserializeAws_restJson1DateReference(output.Date, context),
|
|
18596
|
+
};
|
|
18597
|
+
}
|
|
18598
|
+
if (output.Email !== undefined && output.Email !== null) {
|
|
18599
|
+
return {
|
|
18600
|
+
Email: deserializeAws_restJson1EmailReference(output.Email, context),
|
|
18601
|
+
};
|
|
18602
|
+
}
|
|
18603
|
+
if (output.Number !== undefined && output.Number !== null) {
|
|
18604
|
+
return {
|
|
18605
|
+
Number: deserializeAws_restJson1NumberReference(output.Number, context),
|
|
18606
|
+
};
|
|
18607
|
+
}
|
|
18608
|
+
if (output.String !== undefined && output.String !== null) {
|
|
18609
|
+
return {
|
|
18610
|
+
String: deserializeAws_restJson1StringReference(output.String, context),
|
|
18611
|
+
};
|
|
18612
|
+
}
|
|
17415
18613
|
if (output.Url !== undefined && output.Url !== null) {
|
|
17416
18614
|
return {
|
|
17417
18615
|
Url: deserializeAws_restJson1UrlReference(output.Url, context),
|
|
@@ -17430,6 +18628,24 @@ var deserializeAws_restJson1ReferenceSummaryList = function (output, context) {
|
|
|
17430
18628
|
});
|
|
17431
18629
|
return retVal;
|
|
17432
18630
|
};
|
|
18631
|
+
var deserializeAws_restJson1RequiredFieldInfo = function (output, context) {
|
|
18632
|
+
return {
|
|
18633
|
+
Id: output.Id !== undefined && output.Id !== null
|
|
18634
|
+
? deserializeAws_restJson1TaskTemplateFieldIdentifier(output.Id, context)
|
|
18635
|
+
: undefined,
|
|
18636
|
+
};
|
|
18637
|
+
};
|
|
18638
|
+
var deserializeAws_restJson1RequiredTaskTemplateFields = function (output, context) {
|
|
18639
|
+
var retVal = (output || [])
|
|
18640
|
+
.filter(function (e) { return e != null; })
|
|
18641
|
+
.map(function (entry) {
|
|
18642
|
+
if (entry === null) {
|
|
18643
|
+
return null;
|
|
18644
|
+
}
|
|
18645
|
+
return deserializeAws_restJson1RequiredFieldInfo(entry, context);
|
|
18646
|
+
});
|
|
18647
|
+
return retVal;
|
|
18648
|
+
};
|
|
17433
18649
|
var deserializeAws_restJson1RoutingProfile = function (output, context) {
|
|
17434
18650
|
return {
|
|
17435
18651
|
DefaultOutboundQueueId: __expectString(output.DefaultOutboundQueueId),
|
|
@@ -17467,6 +18683,12 @@ var deserializeAws_restJson1RoutingProfileQueueConfigSummaryList = function (out
|
|
|
17467
18683
|
});
|
|
17468
18684
|
return retVal;
|
|
17469
18685
|
};
|
|
18686
|
+
var deserializeAws_restJson1RoutingProfileReference = function (output, context) {
|
|
18687
|
+
return {
|
|
18688
|
+
Arn: __expectString(output.Arn),
|
|
18689
|
+
Id: __expectString(output.Id),
|
|
18690
|
+
};
|
|
18691
|
+
};
|
|
17470
18692
|
var deserializeAws_restJson1RoutingProfileSummary = function (output, context) {
|
|
17471
18693
|
return {
|
|
17472
18694
|
Arn: __expectString(output.Arn),
|
|
@@ -17555,6 +18777,23 @@ var deserializeAws_restJson1SecurityProfileSummaryList = function (output, conte
|
|
|
17555
18777
|
});
|
|
17556
18778
|
return retVal;
|
|
17557
18779
|
};
|
|
18780
|
+
var deserializeAws_restJson1SingleSelectOptions = function (output, context) {
|
|
18781
|
+
var retVal = (output || [])
|
|
18782
|
+
.filter(function (e) { return e != null; })
|
|
18783
|
+
.map(function (entry) {
|
|
18784
|
+
if (entry === null) {
|
|
18785
|
+
return null;
|
|
18786
|
+
}
|
|
18787
|
+
return __expectString(entry);
|
|
18788
|
+
});
|
|
18789
|
+
return retVal;
|
|
18790
|
+
};
|
|
18791
|
+
var deserializeAws_restJson1StringReference = function (output, context) {
|
|
18792
|
+
return {
|
|
18793
|
+
Name: __expectString(output.Name),
|
|
18794
|
+
Value: __expectString(output.Value),
|
|
18795
|
+
};
|
|
18796
|
+
};
|
|
17558
18797
|
var deserializeAws_restJson1TagMap = function (output, context) {
|
|
17559
18798
|
return Object.entries(output).reduce(function (acc, _a) {
|
|
17560
18799
|
var _b;
|
|
@@ -17565,6 +18804,99 @@ var deserializeAws_restJson1TagMap = function (output, context) {
|
|
|
17565
18804
|
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
17566
18805
|
}, {});
|
|
17567
18806
|
};
|
|
18807
|
+
var deserializeAws_restJson1TaskTemplateConstraints = function (output, context) {
|
|
18808
|
+
return {
|
|
18809
|
+
InvisibleFields: output.InvisibleFields !== undefined && output.InvisibleFields !== null
|
|
18810
|
+
? deserializeAws_restJson1InvisibleTaskTemplateFields(output.InvisibleFields, context)
|
|
18811
|
+
: undefined,
|
|
18812
|
+
ReadOnlyFields: output.ReadOnlyFields !== undefined && output.ReadOnlyFields !== null
|
|
18813
|
+
? deserializeAws_restJson1ReadOnlyTaskTemplateFields(output.ReadOnlyFields, context)
|
|
18814
|
+
: undefined,
|
|
18815
|
+
RequiredFields: output.RequiredFields !== undefined && output.RequiredFields !== null
|
|
18816
|
+
? deserializeAws_restJson1RequiredTaskTemplateFields(output.RequiredFields, context)
|
|
18817
|
+
: undefined,
|
|
18818
|
+
};
|
|
18819
|
+
};
|
|
18820
|
+
var deserializeAws_restJson1TaskTemplateDefaultFieldValue = function (output, context) {
|
|
18821
|
+
return {
|
|
18822
|
+
DefaultValue: __expectString(output.DefaultValue),
|
|
18823
|
+
Id: output.Id !== undefined && output.Id !== null
|
|
18824
|
+
? deserializeAws_restJson1TaskTemplateFieldIdentifier(output.Id, context)
|
|
18825
|
+
: undefined,
|
|
18826
|
+
};
|
|
18827
|
+
};
|
|
18828
|
+
var deserializeAws_restJson1TaskTemplateDefaultFieldValueList = function (output, context) {
|
|
18829
|
+
var retVal = (output || [])
|
|
18830
|
+
.filter(function (e) { return e != null; })
|
|
18831
|
+
.map(function (entry) {
|
|
18832
|
+
if (entry === null) {
|
|
18833
|
+
return null;
|
|
18834
|
+
}
|
|
18835
|
+
return deserializeAws_restJson1TaskTemplateDefaultFieldValue(entry, context);
|
|
18836
|
+
});
|
|
18837
|
+
return retVal;
|
|
18838
|
+
};
|
|
18839
|
+
var deserializeAws_restJson1TaskTemplateDefaults = function (output, context) {
|
|
18840
|
+
return {
|
|
18841
|
+
DefaultFieldValues: output.DefaultFieldValues !== undefined && output.DefaultFieldValues !== null
|
|
18842
|
+
? deserializeAws_restJson1TaskTemplateDefaultFieldValueList(output.DefaultFieldValues, context)
|
|
18843
|
+
: undefined,
|
|
18844
|
+
};
|
|
18845
|
+
};
|
|
18846
|
+
var deserializeAws_restJson1TaskTemplateField = function (output, context) {
|
|
18847
|
+
return {
|
|
18848
|
+
Description: __expectString(output.Description),
|
|
18849
|
+
Id: output.Id !== undefined && output.Id !== null
|
|
18850
|
+
? deserializeAws_restJson1TaskTemplateFieldIdentifier(output.Id, context)
|
|
18851
|
+
: undefined,
|
|
18852
|
+
SingleSelectOptions: output.SingleSelectOptions !== undefined && output.SingleSelectOptions !== null
|
|
18853
|
+
? deserializeAws_restJson1SingleSelectOptions(output.SingleSelectOptions, context)
|
|
18854
|
+
: undefined,
|
|
18855
|
+
Type: __expectString(output.Type),
|
|
18856
|
+
};
|
|
18857
|
+
};
|
|
18858
|
+
var deserializeAws_restJson1TaskTemplateFieldIdentifier = function (output, context) {
|
|
18859
|
+
return {
|
|
18860
|
+
Name: __expectString(output.Name),
|
|
18861
|
+
};
|
|
18862
|
+
};
|
|
18863
|
+
var deserializeAws_restJson1TaskTemplateFields = function (output, context) {
|
|
18864
|
+
var retVal = (output || [])
|
|
18865
|
+
.filter(function (e) { return e != null; })
|
|
18866
|
+
.map(function (entry) {
|
|
18867
|
+
if (entry === null) {
|
|
18868
|
+
return null;
|
|
18869
|
+
}
|
|
18870
|
+
return deserializeAws_restJson1TaskTemplateField(entry, context);
|
|
18871
|
+
});
|
|
18872
|
+
return retVal;
|
|
18873
|
+
};
|
|
18874
|
+
var deserializeAws_restJson1TaskTemplateList = function (output, context) {
|
|
18875
|
+
var retVal = (output || [])
|
|
18876
|
+
.filter(function (e) { return e != null; })
|
|
18877
|
+
.map(function (entry) {
|
|
18878
|
+
if (entry === null) {
|
|
18879
|
+
return null;
|
|
18880
|
+
}
|
|
18881
|
+
return deserializeAws_restJson1TaskTemplateMetadata(entry, context);
|
|
18882
|
+
});
|
|
18883
|
+
return retVal;
|
|
18884
|
+
};
|
|
18885
|
+
var deserializeAws_restJson1TaskTemplateMetadata = function (output, context) {
|
|
18886
|
+
return {
|
|
18887
|
+
Arn: __expectString(output.Arn),
|
|
18888
|
+
CreatedTime: output.CreatedTime !== undefined && output.CreatedTime !== null
|
|
18889
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime)))
|
|
18890
|
+
: undefined,
|
|
18891
|
+
Description: __expectString(output.Description),
|
|
18892
|
+
Id: __expectString(output.Id),
|
|
18893
|
+
LastModifiedTime: output.LastModifiedTime !== undefined && output.LastModifiedTime !== null
|
|
18894
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
|
|
18895
|
+
: undefined,
|
|
18896
|
+
Name: __expectString(output.Name),
|
|
18897
|
+
Status: __expectString(output.Status),
|
|
18898
|
+
};
|
|
18899
|
+
};
|
|
17568
18900
|
var deserializeAws_restJson1Threshold = function (output, context) {
|
|
17569
18901
|
return {
|
|
17570
18902
|
Comparison: __expectString(output.Comparison),
|
|
@@ -17617,6 +18949,45 @@ var deserializeAws_restJson1User = function (output, context) {
|
|
|
17617
18949
|
Username: __expectString(output.Username),
|
|
17618
18950
|
};
|
|
17619
18951
|
};
|
|
18952
|
+
var deserializeAws_restJson1UserData = function (output, context) {
|
|
18953
|
+
return {
|
|
18954
|
+
ActiveSlotsByChannel: output.ActiveSlotsByChannel !== undefined && output.ActiveSlotsByChannel !== null
|
|
18955
|
+
? deserializeAws_restJson1ChannelToCountMap(output.ActiveSlotsByChannel, context)
|
|
18956
|
+
: undefined,
|
|
18957
|
+
AvailableSlotsByChannel: output.AvailableSlotsByChannel !== undefined && output.AvailableSlotsByChannel !== null
|
|
18958
|
+
? deserializeAws_restJson1ChannelToCountMap(output.AvailableSlotsByChannel, context)
|
|
18959
|
+
: undefined,
|
|
18960
|
+
Contacts: output.Contacts !== undefined && output.Contacts !== null
|
|
18961
|
+
? deserializeAws_restJson1AgentContactReferenceList(output.Contacts, context)
|
|
18962
|
+
: undefined,
|
|
18963
|
+
HierarchyPath: output.HierarchyPath !== undefined && output.HierarchyPath !== null
|
|
18964
|
+
? deserializeAws_restJson1HierarchyPathReference(output.HierarchyPath, context)
|
|
18965
|
+
: undefined,
|
|
18966
|
+
MaxSlotsByChannel: output.MaxSlotsByChannel !== undefined && output.MaxSlotsByChannel !== null
|
|
18967
|
+
? deserializeAws_restJson1ChannelToCountMap(output.MaxSlotsByChannel, context)
|
|
18968
|
+
: undefined,
|
|
18969
|
+
RoutingProfile: output.RoutingProfile !== undefined && output.RoutingProfile !== null
|
|
18970
|
+
? deserializeAws_restJson1RoutingProfileReference(output.RoutingProfile, context)
|
|
18971
|
+
: undefined,
|
|
18972
|
+
Status: output.Status !== undefined && output.Status !== null
|
|
18973
|
+
? deserializeAws_restJson1AgentStatusReference(output.Status, context)
|
|
18974
|
+
: undefined,
|
|
18975
|
+
User: output.User !== undefined && output.User !== null
|
|
18976
|
+
? deserializeAws_restJson1UserReference(output.User, context)
|
|
18977
|
+
: undefined,
|
|
18978
|
+
};
|
|
18979
|
+
};
|
|
18980
|
+
var deserializeAws_restJson1UserDataList = function (output, context) {
|
|
18981
|
+
var retVal = (output || [])
|
|
18982
|
+
.filter(function (e) { return e != null; })
|
|
18983
|
+
.map(function (entry) {
|
|
18984
|
+
if (entry === null) {
|
|
18985
|
+
return null;
|
|
18986
|
+
}
|
|
18987
|
+
return deserializeAws_restJson1UserData(entry, context);
|
|
18988
|
+
});
|
|
18989
|
+
return retVal;
|
|
18990
|
+
};
|
|
17620
18991
|
var deserializeAws_restJson1UserIdentityInfo = function (output, context) {
|
|
17621
18992
|
return {
|
|
17622
18993
|
Email: __expectString(output.Email),
|
|
@@ -17644,6 +19015,12 @@ var deserializeAws_restJson1UserQuickConnectConfig = function (output, context)
|
|
|
17644
19015
|
UserId: __expectString(output.UserId),
|
|
17645
19016
|
};
|
|
17646
19017
|
};
|
|
19018
|
+
var deserializeAws_restJson1UserReference = function (output, context) {
|
|
19019
|
+
return {
|
|
19020
|
+
Arn: __expectString(output.Arn),
|
|
19021
|
+
Id: __expectString(output.Id),
|
|
19022
|
+
};
|
|
19023
|
+
};
|
|
17647
19024
|
var deserializeAws_restJson1UserSearchSummary = function (output, context) {
|
|
17648
19025
|
return {
|
|
17649
19026
|
Arn: __expectString(output.Arn),
|