@aws-sdk/client-connect 3.100.0 → 3.104.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 +11 -0
- package/dist-cjs/Connect.js +90 -0
- package/dist-cjs/commands/CreateTaskTemplateCommand.js +36 -0
- package/dist-cjs/commands/DeleteTaskTemplateCommand.js +36 -0
- package/dist-cjs/commands/GetTaskTemplateCommand.js +36 -0
- 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 +6 -0
- package/dist-cjs/models/models_0.js +183 -143
- package/dist-cjs/models/models_1.js +183 -2
- package/dist-cjs/pagination/ListTaskTemplatesPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1044 -38
- package/dist-es/Connect.js +90 -0
- package/dist-es/commands/CreateTaskTemplateCommand.js +39 -0
- package/dist-es/commands/DeleteTaskTemplateCommand.js +39 -0
- package/dist-es/commands/GetTaskTemplateCommand.js +39 -0
- 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 +6 -0
- package/dist-es/models/models_0.js +139 -92
- package/dist-es/models/models_1.js +120 -0
- package/dist-es/pagination/ListTaskTemplatesPaginator.js +75 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +1175 -54
- package/dist-types/Connect.d.ts +97 -22
- package/dist-types/ConnectClient.d.ts +8 -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/GetTaskTemplateCommand.d.ts +35 -0
- package/dist-types/commands/ListPhoneNumbersV2Command.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 +6 -0
- package/dist-types/models/models_0.d.ts +573 -470
- package/dist-types/models/models_1.d.ts +719 -26
- package/dist-types/pagination/ListTaskTemplatesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/ts3.4/Connect.d.ts +30 -0
- package/dist-types/ts3.4/ConnectClient.d.ts +8 -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/GetTaskTemplateCommand.d.ts +17 -0
- 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 +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +333 -254
- package/dist-types/ts3.4/models/models_1.d.ts +388 -2
- package/dist-types/ts3.4/pagination/ListTaskTemplatesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +18 -0
- package/package.json +1 -1
|
@@ -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) {
|
|
@@ -2578,6 +2660,50 @@ export var serializeAws_restJson1GetMetricDataCommand = function (input, context
|
|
|
2578
2660
|
}
|
|
2579
2661
|
});
|
|
2580
2662
|
}); };
|
|
2663
|
+
export var serializeAws_restJson1GetTaskTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2664
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
2665
|
+
return __generator(this, function (_c) {
|
|
2666
|
+
switch (_c.label) {
|
|
2667
|
+
case 0: return [4, context.endpoint()];
|
|
2668
|
+
case 1:
|
|
2669
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2670
|
+
headers = {};
|
|
2671
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2672
|
+
"/instance/{InstanceId}/task/template/{TaskTemplateId}";
|
|
2673
|
+
if (input.InstanceId !== undefined) {
|
|
2674
|
+
labelValue = input.InstanceId;
|
|
2675
|
+
if (labelValue.length <= 0) {
|
|
2676
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
2677
|
+
}
|
|
2678
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
2679
|
+
}
|
|
2680
|
+
else {
|
|
2681
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
2682
|
+
}
|
|
2683
|
+
if (input.TaskTemplateId !== undefined) {
|
|
2684
|
+
labelValue = input.TaskTemplateId;
|
|
2685
|
+
if (labelValue.length <= 0) {
|
|
2686
|
+
throw new Error("Empty value provided for input HTTP label: TaskTemplateId.");
|
|
2687
|
+
}
|
|
2688
|
+
resolvedPath = resolvedPath.replace("{TaskTemplateId}", __extendedEncodeURIComponent(labelValue));
|
|
2689
|
+
}
|
|
2690
|
+
else {
|
|
2691
|
+
throw new Error("No value provided for input HTTP label: TaskTemplateId.");
|
|
2692
|
+
}
|
|
2693
|
+
query = __assign({}, (input.SnapshotVersion !== undefined && { snapshotVersion: input.SnapshotVersion }));
|
|
2694
|
+
return [2, new __HttpRequest({
|
|
2695
|
+
protocol: protocol,
|
|
2696
|
+
hostname: hostname,
|
|
2697
|
+
port: port,
|
|
2698
|
+
method: "GET",
|
|
2699
|
+
headers: headers,
|
|
2700
|
+
path: resolvedPath,
|
|
2701
|
+
query: query,
|
|
2702
|
+
body: body,
|
|
2703
|
+
})];
|
|
2704
|
+
}
|
|
2705
|
+
});
|
|
2706
|
+
}); };
|
|
2581
2707
|
export var serializeAws_restJson1ListAgentStatusesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2582
2708
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2583
2709
|
return __generator(this, function (_c) {
|
|
@@ -3481,6 +3607,39 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
|
|
|
3481
3607
|
}
|
|
3482
3608
|
});
|
|
3483
3609
|
}); };
|
|
3610
|
+
export var serializeAws_restJson1ListTaskTemplatesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3611
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
3612
|
+
return __generator(this, function (_c) {
|
|
3613
|
+
switch (_c.label) {
|
|
3614
|
+
case 0: return [4, context.endpoint()];
|
|
3615
|
+
case 1:
|
|
3616
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3617
|
+
headers = {};
|
|
3618
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/instance/{InstanceId}/task/template";
|
|
3619
|
+
if (input.InstanceId !== undefined) {
|
|
3620
|
+
labelValue = input.InstanceId;
|
|
3621
|
+
if (labelValue.length <= 0) {
|
|
3622
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
3623
|
+
}
|
|
3624
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
3625
|
+
}
|
|
3626
|
+
else {
|
|
3627
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3628
|
+
}
|
|
3629
|
+
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 }));
|
|
3630
|
+
return [2, new __HttpRequest({
|
|
3631
|
+
protocol: protocol,
|
|
3632
|
+
hostname: hostname,
|
|
3633
|
+
port: port,
|
|
3634
|
+
method: "GET",
|
|
3635
|
+
headers: headers,
|
|
3636
|
+
path: resolvedPath,
|
|
3637
|
+
query: query,
|
|
3638
|
+
body: body,
|
|
3639
|
+
})];
|
|
3640
|
+
}
|
|
3641
|
+
});
|
|
3642
|
+
}); };
|
|
3484
3643
|
export var serializeAws_restJson1ListUseCasesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3485
3644
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
3486
3645
|
return __generator(this, function (_c) {
|
|
@@ -3921,11 +4080,13 @@ export var serializeAws_restJson1StartTaskContactCommand = function (input, cont
|
|
|
3921
4080
|
"content-type": "application/json",
|
|
3922
4081
|
};
|
|
3923
4082
|
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 &&
|
|
4083
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Attributes !== undefined &&
|
|
3925
4084
|
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.
|
|
4085
|
+
input.PreviousContactId !== null && { PreviousContactId: input.PreviousContactId })), (input.QuickConnectId !== undefined &&
|
|
4086
|
+
input.QuickConnectId !== null && { QuickConnectId: input.QuickConnectId })), (input.References !== undefined &&
|
|
3927
4087
|
input.References !== null && { References: serializeAws_restJson1ContactReferences(input.References, context) })), (input.ScheduledTime !== undefined &&
|
|
3928
|
-
input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) }))
|
|
4088
|
+
input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) })), (input.TaskTemplateId !== undefined &&
|
|
4089
|
+
input.TaskTemplateId !== null && { TaskTemplateId: input.TaskTemplateId })));
|
|
3929
4090
|
return [2, new __HttpRequest({
|
|
3930
4091
|
protocol: protocol,
|
|
3931
4092
|
hostname: hostname,
|
|
@@ -4070,6 +4231,31 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
|
|
|
4070
4231
|
}
|
|
4071
4232
|
});
|
|
4072
4233
|
}); };
|
|
4234
|
+
export var serializeAws_restJson1TransferContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4235
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
4236
|
+
var _c;
|
|
4237
|
+
return __generator(this, function (_d) {
|
|
4238
|
+
switch (_d.label) {
|
|
4239
|
+
case 0: return [4, context.endpoint()];
|
|
4240
|
+
case 1:
|
|
4241
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
4242
|
+
headers = {
|
|
4243
|
+
"content-type": "application/json",
|
|
4244
|
+
};
|
|
4245
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/transfer";
|
|
4246
|
+
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 })));
|
|
4247
|
+
return [2, new __HttpRequest({
|
|
4248
|
+
protocol: protocol,
|
|
4249
|
+
hostname: hostname,
|
|
4250
|
+
port: port,
|
|
4251
|
+
method: "POST",
|
|
4252
|
+
headers: headers,
|
|
4253
|
+
path: resolvedPath,
|
|
4254
|
+
body: body,
|
|
4255
|
+
})];
|
|
4256
|
+
}
|
|
4257
|
+
});
|
|
4258
|
+
}); };
|
|
4073
4259
|
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4074
4260
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
4075
4261
|
return __generator(this, function (_c) {
|
|
@@ -5200,6 +5386,56 @@ export var serializeAws_restJson1UpdateSecurityProfileCommand = function (input,
|
|
|
5200
5386
|
}
|
|
5201
5387
|
});
|
|
5202
5388
|
}); };
|
|
5389
|
+
export var serializeAws_restJson1UpdateTaskTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5390
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
5391
|
+
return __generator(this, function (_c) {
|
|
5392
|
+
switch (_c.label) {
|
|
5393
|
+
case 0: return [4, context.endpoint()];
|
|
5394
|
+
case 1:
|
|
5395
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
5396
|
+
headers = {
|
|
5397
|
+
"content-type": "application/json",
|
|
5398
|
+
};
|
|
5399
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
5400
|
+
"/instance/{InstanceId}/task/template/{TaskTemplateId}";
|
|
5401
|
+
if (input.TaskTemplateId !== undefined) {
|
|
5402
|
+
labelValue = input.TaskTemplateId;
|
|
5403
|
+
if (labelValue.length <= 0) {
|
|
5404
|
+
throw new Error("Empty value provided for input HTTP label: TaskTemplateId.");
|
|
5405
|
+
}
|
|
5406
|
+
resolvedPath = resolvedPath.replace("{TaskTemplateId}", __extendedEncodeURIComponent(labelValue));
|
|
5407
|
+
}
|
|
5408
|
+
else {
|
|
5409
|
+
throw new Error("No value provided for input HTTP label: TaskTemplateId.");
|
|
5410
|
+
}
|
|
5411
|
+
if (input.InstanceId !== undefined) {
|
|
5412
|
+
labelValue = input.InstanceId;
|
|
5413
|
+
if (labelValue.length <= 0) {
|
|
5414
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
5415
|
+
}
|
|
5416
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
5417
|
+
}
|
|
5418
|
+
else {
|
|
5419
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
5420
|
+
}
|
|
5421
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Constraints !== undefined &&
|
|
5422
|
+
input.Constraints !== null && {
|
|
5423
|
+
Constraints: serializeAws_restJson1TaskTemplateConstraints(input.Constraints, context),
|
|
5424
|
+
})), (input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId })), (input.Defaults !== undefined &&
|
|
5425
|
+
input.Defaults !== null && { Defaults: serializeAws_restJson1TaskTemplateDefaults(input.Defaults, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Fields !== undefined &&
|
|
5426
|
+
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 })));
|
|
5427
|
+
return [2, new __HttpRequest({
|
|
5428
|
+
protocol: protocol,
|
|
5429
|
+
hostname: hostname,
|
|
5430
|
+
port: port,
|
|
5431
|
+
method: "POST",
|
|
5432
|
+
headers: headers,
|
|
5433
|
+
path: resolvedPath,
|
|
5434
|
+
body: body,
|
|
5435
|
+
})];
|
|
5436
|
+
}
|
|
5437
|
+
});
|
|
5438
|
+
}); };
|
|
5203
5439
|
export var serializeAws_restJson1UpdateUserHierarchyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5204
5440
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
5205
5441
|
return __generator(this, function (_c) {
|
|
@@ -7154,35 +7390,35 @@ var deserializeAws_restJson1CreateSecurityProfileCommandError = function (output
|
|
|
7154
7390
|
}
|
|
7155
7391
|
});
|
|
7156
7392
|
}); };
|
|
7157
|
-
export var
|
|
7393
|
+
export var deserializeAws_restJson1CreateTaskTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7158
7394
|
var contents, data, _a, _b;
|
|
7159
7395
|
return __generator(this, function (_c) {
|
|
7160
7396
|
switch (_c.label) {
|
|
7161
7397
|
case 0:
|
|
7162
7398
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7163
|
-
return [2,
|
|
7399
|
+
return [2, deserializeAws_restJson1CreateTaskTemplateCommandError(output, context)];
|
|
7164
7400
|
}
|
|
7165
7401
|
contents = {
|
|
7166
7402
|
$metadata: deserializeMetadata(output),
|
|
7167
|
-
|
|
7168
|
-
|
|
7403
|
+
Arn: undefined,
|
|
7404
|
+
Id: undefined,
|
|
7169
7405
|
};
|
|
7170
7406
|
_a = __expectNonNull;
|
|
7171
7407
|
_b = __expectObject;
|
|
7172
7408
|
return [4, parseBody(output.body, context)];
|
|
7173
7409
|
case 1:
|
|
7174
7410
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7175
|
-
if (data.
|
|
7176
|
-
contents.
|
|
7411
|
+
if (data.Arn !== undefined && data.Arn !== null) {
|
|
7412
|
+
contents.Arn = __expectString(data.Arn);
|
|
7177
7413
|
}
|
|
7178
|
-
if (data.
|
|
7179
|
-
contents.
|
|
7414
|
+
if (data.Id !== undefined && data.Id !== null) {
|
|
7415
|
+
contents.Id = __expectString(data.Id);
|
|
7180
7416
|
}
|
|
7181
7417
|
return [2, Promise.resolve(contents)];
|
|
7182
7418
|
}
|
|
7183
7419
|
});
|
|
7184
7420
|
}); };
|
|
7185
|
-
var
|
|
7421
|
+
var deserializeAws_restJson1CreateTaskTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7186
7422
|
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
7187
7423
|
var _c;
|
|
7188
7424
|
return __generator(this, function (_d) {
|
|
@@ -7197,29 +7433,33 @@ var deserializeAws_restJson1CreateUseCaseCommandError = function (output, contex
|
|
|
7197
7433
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7198
7434
|
_b = errorCode;
|
|
7199
7435
|
switch (_b) {
|
|
7200
|
-
case "
|
|
7201
|
-
case "com.amazonaws.connect#
|
|
7202
|
-
case "
|
|
7203
|
-
case "com.amazonaws.connect#
|
|
7204
|
-
case "
|
|
7205
|
-
case "com.amazonaws.connect#
|
|
7436
|
+
case "InternalServiceException": return [3, 2];
|
|
7437
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
7438
|
+
case "InvalidParameterException": return [3, 4];
|
|
7439
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
7440
|
+
case "PropertyValidationException": return [3, 6];
|
|
7441
|
+
case "com.amazonaws.connect#PropertyValidationException": return [3, 6];
|
|
7206
7442
|
case "ResourceNotFoundException": return [3, 8];
|
|
7207
7443
|
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
7208
|
-
case "
|
|
7209
|
-
case "com.amazonaws.connect#
|
|
7444
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
7445
|
+
case "com.amazonaws.connect#ServiceQuotaExceededException": return [3, 10];
|
|
7446
|
+
case "ThrottlingException": return [3, 12];
|
|
7447
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
7210
7448
|
}
|
|
7211
|
-
return [3,
|
|
7212
|
-
case 2: return [4,
|
|
7449
|
+
return [3, 14];
|
|
7450
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
7213
7451
|
case 3: throw _d.sent();
|
|
7214
|
-
case 4: return [4,
|
|
7452
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
7215
7453
|
case 5: throw _d.sent();
|
|
7216
|
-
case 6: return [4,
|
|
7454
|
+
case 6: return [4, deserializeAws_restJson1PropertyValidationExceptionResponse(parsedOutput, context)];
|
|
7217
7455
|
case 7: throw _d.sent();
|
|
7218
7456
|
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7219
7457
|
case 9: throw _d.sent();
|
|
7220
|
-
case 10: return [4,
|
|
7458
|
+
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
7221
7459
|
case 11: throw _d.sent();
|
|
7222
|
-
case 12:
|
|
7460
|
+
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7461
|
+
case 13: throw _d.sent();
|
|
7462
|
+
case 14:
|
|
7223
7463
|
parsedBody = parsedOutput.body;
|
|
7224
7464
|
response = new __BaseException({
|
|
7225
7465
|
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
@@ -7230,35 +7470,35 @@ var deserializeAws_restJson1CreateUseCaseCommandError = function (output, contex
|
|
|
7230
7470
|
}
|
|
7231
7471
|
});
|
|
7232
7472
|
}); };
|
|
7233
|
-
export var
|
|
7473
|
+
export var deserializeAws_restJson1CreateUseCaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7234
7474
|
var contents, data, _a, _b;
|
|
7235
7475
|
return __generator(this, function (_c) {
|
|
7236
7476
|
switch (_c.label) {
|
|
7237
7477
|
case 0:
|
|
7238
7478
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7239
|
-
return [2,
|
|
7479
|
+
return [2, deserializeAws_restJson1CreateUseCaseCommandError(output, context)];
|
|
7240
7480
|
}
|
|
7241
7481
|
contents = {
|
|
7242
7482
|
$metadata: deserializeMetadata(output),
|
|
7243
|
-
|
|
7244
|
-
|
|
7483
|
+
UseCaseArn: undefined,
|
|
7484
|
+
UseCaseId: undefined,
|
|
7245
7485
|
};
|
|
7246
7486
|
_a = __expectNonNull;
|
|
7247
7487
|
_b = __expectObject;
|
|
7248
7488
|
return [4, parseBody(output.body, context)];
|
|
7249
7489
|
case 1:
|
|
7250
7490
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7251
|
-
if (data.
|
|
7252
|
-
contents.
|
|
7491
|
+
if (data.UseCaseArn !== undefined && data.UseCaseArn !== null) {
|
|
7492
|
+
contents.UseCaseArn = __expectString(data.UseCaseArn);
|
|
7253
7493
|
}
|
|
7254
|
-
if (data.
|
|
7255
|
-
contents.
|
|
7494
|
+
if (data.UseCaseId !== undefined && data.UseCaseId !== null) {
|
|
7495
|
+
contents.UseCaseId = __expectString(data.UseCaseId);
|
|
7256
7496
|
}
|
|
7257
7497
|
return [2, Promise.resolve(contents)];
|
|
7258
7498
|
}
|
|
7259
7499
|
});
|
|
7260
7500
|
}); };
|
|
7261
|
-
var
|
|
7501
|
+
var deserializeAws_restJson1CreateUseCaseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7262
7502
|
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
7263
7503
|
var _c;
|
|
7264
7504
|
return __generator(this, function (_d) {
|
|
@@ -7277,7 +7517,83 @@ var deserializeAws_restJson1CreateUserCommandError = function (output, context)
|
|
|
7277
7517
|
case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
|
|
7278
7518
|
case "InternalServiceException": return [3, 4];
|
|
7279
7519
|
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
7280
|
-
case "
|
|
7520
|
+
case "InvalidRequestException": return [3, 6];
|
|
7521
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
7522
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
7523
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
7524
|
+
case "ThrottlingException": return [3, 10];
|
|
7525
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
7526
|
+
}
|
|
7527
|
+
return [3, 12];
|
|
7528
|
+
case 2: return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
7529
|
+
case 3: throw _d.sent();
|
|
7530
|
+
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
7531
|
+
case 5: throw _d.sent();
|
|
7532
|
+
case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
7533
|
+
case 7: throw _d.sent();
|
|
7534
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7535
|
+
case 9: throw _d.sent();
|
|
7536
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7537
|
+
case 11: throw _d.sent();
|
|
7538
|
+
case 12:
|
|
7539
|
+
parsedBody = parsedOutput.body;
|
|
7540
|
+
response = new __BaseException({
|
|
7541
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
7542
|
+
$fault: "client",
|
|
7543
|
+
$metadata: deserializeMetadata(output),
|
|
7544
|
+
});
|
|
7545
|
+
throw __decorateServiceException(response, parsedBody);
|
|
7546
|
+
}
|
|
7547
|
+
});
|
|
7548
|
+
}); };
|
|
7549
|
+
export var deserializeAws_restJson1CreateUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7550
|
+
var contents, data, _a, _b;
|
|
7551
|
+
return __generator(this, function (_c) {
|
|
7552
|
+
switch (_c.label) {
|
|
7553
|
+
case 0:
|
|
7554
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7555
|
+
return [2, deserializeAws_restJson1CreateUserCommandError(output, context)];
|
|
7556
|
+
}
|
|
7557
|
+
contents = {
|
|
7558
|
+
$metadata: deserializeMetadata(output),
|
|
7559
|
+
UserArn: undefined,
|
|
7560
|
+
UserId: undefined,
|
|
7561
|
+
};
|
|
7562
|
+
_a = __expectNonNull;
|
|
7563
|
+
_b = __expectObject;
|
|
7564
|
+
return [4, parseBody(output.body, context)];
|
|
7565
|
+
case 1:
|
|
7566
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7567
|
+
if (data.UserArn !== undefined && data.UserArn !== null) {
|
|
7568
|
+
contents.UserArn = __expectString(data.UserArn);
|
|
7569
|
+
}
|
|
7570
|
+
if (data.UserId !== undefined && data.UserId !== null) {
|
|
7571
|
+
contents.UserId = __expectString(data.UserId);
|
|
7572
|
+
}
|
|
7573
|
+
return [2, Promise.resolve(contents)];
|
|
7574
|
+
}
|
|
7575
|
+
});
|
|
7576
|
+
}); };
|
|
7577
|
+
var deserializeAws_restJson1CreateUserCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7578
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
7579
|
+
var _c;
|
|
7580
|
+
return __generator(this, function (_d) {
|
|
7581
|
+
switch (_d.label) {
|
|
7582
|
+
case 0:
|
|
7583
|
+
_a = [__assign({}, output)];
|
|
7584
|
+
_c = {};
|
|
7585
|
+
return [4, parseBody(output.body, context)];
|
|
7586
|
+
case 1:
|
|
7587
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
7588
|
+
errorCode = "UnknownError";
|
|
7589
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7590
|
+
_b = errorCode;
|
|
7591
|
+
switch (_b) {
|
|
7592
|
+
case "DuplicateResourceException": return [3, 2];
|
|
7593
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
|
|
7594
|
+
case "InternalServiceException": return [3, 4];
|
|
7595
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
7596
|
+
case "InvalidParameterException": return [3, 6];
|
|
7281
7597
|
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
7282
7598
|
case "InvalidRequestException": return [3, 8];
|
|
7283
7599
|
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
@@ -7952,6 +8268,72 @@ var deserializeAws_restJson1DeleteSecurityProfileCommandError = function (output
|
|
|
7952
8268
|
}
|
|
7953
8269
|
});
|
|
7954
8270
|
}); };
|
|
8271
|
+
export var deserializeAws_restJson1DeleteTaskTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8272
|
+
var contents;
|
|
8273
|
+
return __generator(this, function (_a) {
|
|
8274
|
+
switch (_a.label) {
|
|
8275
|
+
case 0:
|
|
8276
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
8277
|
+
return [2, deserializeAws_restJson1DeleteTaskTemplateCommandError(output, context)];
|
|
8278
|
+
}
|
|
8279
|
+
contents = {
|
|
8280
|
+
$metadata: deserializeMetadata(output),
|
|
8281
|
+
};
|
|
8282
|
+
return [4, collectBody(output.body, context)];
|
|
8283
|
+
case 1:
|
|
8284
|
+
_a.sent();
|
|
8285
|
+
return [2, Promise.resolve(contents)];
|
|
8286
|
+
}
|
|
8287
|
+
});
|
|
8288
|
+
}); };
|
|
8289
|
+
var deserializeAws_restJson1DeleteTaskTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8290
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
8291
|
+
var _c;
|
|
8292
|
+
return __generator(this, function (_d) {
|
|
8293
|
+
switch (_d.label) {
|
|
8294
|
+
case 0:
|
|
8295
|
+
_a = [__assign({}, output)];
|
|
8296
|
+
_c = {};
|
|
8297
|
+
return [4, parseBody(output.body, context)];
|
|
8298
|
+
case 1:
|
|
8299
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
8300
|
+
errorCode = "UnknownError";
|
|
8301
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8302
|
+
_b = errorCode;
|
|
8303
|
+
switch (_b) {
|
|
8304
|
+
case "InternalServiceException": return [3, 2];
|
|
8305
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
8306
|
+
case "InvalidParameterException": return [3, 4];
|
|
8307
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
8308
|
+
case "InvalidRequestException": return [3, 6];
|
|
8309
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
8310
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
8311
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
8312
|
+
case "ThrottlingException": return [3, 10];
|
|
8313
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
8314
|
+
}
|
|
8315
|
+
return [3, 12];
|
|
8316
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
8317
|
+
case 3: throw _d.sent();
|
|
8318
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
8319
|
+
case 5: throw _d.sent();
|
|
8320
|
+
case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
8321
|
+
case 7: throw _d.sent();
|
|
8322
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8323
|
+
case 9: throw _d.sent();
|
|
8324
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
8325
|
+
case 11: throw _d.sent();
|
|
8326
|
+
case 12:
|
|
8327
|
+
parsedBody = parsedOutput.body;
|
|
8328
|
+
response = new __BaseException({
|
|
8329
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
8330
|
+
$fault: "client",
|
|
8331
|
+
$metadata: deserializeMetadata(output),
|
|
8332
|
+
});
|
|
8333
|
+
throw __decorateServiceException(response, parsedBody);
|
|
8334
|
+
}
|
|
8335
|
+
});
|
|
8336
|
+
}); };
|
|
7955
8337
|
export var deserializeAws_restJson1DeleteUseCaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7956
8338
|
var contents;
|
|
7957
8339
|
return __generator(this, function (_a) {
|
|
@@ -10344,6 +10726,126 @@ var deserializeAws_restJson1GetMetricDataCommandError = function (output, contex
|
|
|
10344
10726
|
}
|
|
10345
10727
|
});
|
|
10346
10728
|
}); };
|
|
10729
|
+
export var deserializeAws_restJson1GetTaskTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10730
|
+
var contents, data, _a, _b;
|
|
10731
|
+
return __generator(this, function (_c) {
|
|
10732
|
+
switch (_c.label) {
|
|
10733
|
+
case 0:
|
|
10734
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
10735
|
+
return [2, deserializeAws_restJson1GetTaskTemplateCommandError(output, context)];
|
|
10736
|
+
}
|
|
10737
|
+
contents = {
|
|
10738
|
+
$metadata: deserializeMetadata(output),
|
|
10739
|
+
Arn: undefined,
|
|
10740
|
+
Constraints: undefined,
|
|
10741
|
+
ContactFlowId: undefined,
|
|
10742
|
+
CreatedTime: undefined,
|
|
10743
|
+
Defaults: undefined,
|
|
10744
|
+
Description: undefined,
|
|
10745
|
+
Fields: undefined,
|
|
10746
|
+
Id: undefined,
|
|
10747
|
+
InstanceId: undefined,
|
|
10748
|
+
LastModifiedTime: undefined,
|
|
10749
|
+
Name: undefined,
|
|
10750
|
+
Status: undefined,
|
|
10751
|
+
Tags: undefined,
|
|
10752
|
+
};
|
|
10753
|
+
_a = __expectNonNull;
|
|
10754
|
+
_b = __expectObject;
|
|
10755
|
+
return [4, parseBody(output.body, context)];
|
|
10756
|
+
case 1:
|
|
10757
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
10758
|
+
if (data.Arn !== undefined && data.Arn !== null) {
|
|
10759
|
+
contents.Arn = __expectString(data.Arn);
|
|
10760
|
+
}
|
|
10761
|
+
if (data.Constraints !== undefined && data.Constraints !== null) {
|
|
10762
|
+
contents.Constraints = deserializeAws_restJson1TaskTemplateConstraints(data.Constraints, context);
|
|
10763
|
+
}
|
|
10764
|
+
if (data.ContactFlowId !== undefined && data.ContactFlowId !== null) {
|
|
10765
|
+
contents.ContactFlowId = __expectString(data.ContactFlowId);
|
|
10766
|
+
}
|
|
10767
|
+
if (data.CreatedTime !== undefined && data.CreatedTime !== null) {
|
|
10768
|
+
contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime)));
|
|
10769
|
+
}
|
|
10770
|
+
if (data.Defaults !== undefined && data.Defaults !== null) {
|
|
10771
|
+
contents.Defaults = deserializeAws_restJson1TaskTemplateDefaults(data.Defaults, context);
|
|
10772
|
+
}
|
|
10773
|
+
if (data.Description !== undefined && data.Description !== null) {
|
|
10774
|
+
contents.Description = __expectString(data.Description);
|
|
10775
|
+
}
|
|
10776
|
+
if (data.Fields !== undefined && data.Fields !== null) {
|
|
10777
|
+
contents.Fields = deserializeAws_restJson1TaskTemplateFields(data.Fields, context);
|
|
10778
|
+
}
|
|
10779
|
+
if (data.Id !== undefined && data.Id !== null) {
|
|
10780
|
+
contents.Id = __expectString(data.Id);
|
|
10781
|
+
}
|
|
10782
|
+
if (data.InstanceId !== undefined && data.InstanceId !== null) {
|
|
10783
|
+
contents.InstanceId = __expectString(data.InstanceId);
|
|
10784
|
+
}
|
|
10785
|
+
if (data.LastModifiedTime !== undefined && data.LastModifiedTime !== null) {
|
|
10786
|
+
contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime)));
|
|
10787
|
+
}
|
|
10788
|
+
if (data.Name !== undefined && data.Name !== null) {
|
|
10789
|
+
contents.Name = __expectString(data.Name);
|
|
10790
|
+
}
|
|
10791
|
+
if (data.Status !== undefined && data.Status !== null) {
|
|
10792
|
+
contents.Status = __expectString(data.Status);
|
|
10793
|
+
}
|
|
10794
|
+
if (data.Tags !== undefined && data.Tags !== null) {
|
|
10795
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
10796
|
+
}
|
|
10797
|
+
return [2, Promise.resolve(contents)];
|
|
10798
|
+
}
|
|
10799
|
+
});
|
|
10800
|
+
}); };
|
|
10801
|
+
var deserializeAws_restJson1GetTaskTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10802
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
10803
|
+
var _c;
|
|
10804
|
+
return __generator(this, function (_d) {
|
|
10805
|
+
switch (_d.label) {
|
|
10806
|
+
case 0:
|
|
10807
|
+
_a = [__assign({}, output)];
|
|
10808
|
+
_c = {};
|
|
10809
|
+
return [4, parseBody(output.body, context)];
|
|
10810
|
+
case 1:
|
|
10811
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
10812
|
+
errorCode = "UnknownError";
|
|
10813
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
10814
|
+
_b = errorCode;
|
|
10815
|
+
switch (_b) {
|
|
10816
|
+
case "InternalServiceException": return [3, 2];
|
|
10817
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
10818
|
+
case "InvalidParameterException": return [3, 4];
|
|
10819
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
10820
|
+
case "InvalidRequestException": return [3, 6];
|
|
10821
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
10822
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
10823
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
10824
|
+
case "ThrottlingException": return [3, 10];
|
|
10825
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
10826
|
+
}
|
|
10827
|
+
return [3, 12];
|
|
10828
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
10829
|
+
case 3: throw _d.sent();
|
|
10830
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
10831
|
+
case 5: throw _d.sent();
|
|
10832
|
+
case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
10833
|
+
case 7: throw _d.sent();
|
|
10834
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
10835
|
+
case 9: throw _d.sent();
|
|
10836
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
10837
|
+
case 11: throw _d.sent();
|
|
10838
|
+
case 12:
|
|
10839
|
+
parsedBody = parsedOutput.body;
|
|
10840
|
+
response = new __BaseException({
|
|
10841
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
10842
|
+
$fault: "client",
|
|
10843
|
+
$metadata: deserializeMetadata(output),
|
|
10844
|
+
});
|
|
10845
|
+
throw __decorateServiceException(response, parsedBody);
|
|
10846
|
+
}
|
|
10847
|
+
});
|
|
10848
|
+
}); };
|
|
10347
10849
|
export var deserializeAws_restJson1ListAgentStatusesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10348
10850
|
var contents, data, _a, _b;
|
|
10349
10851
|
return __generator(this, function (_c) {
|
|
@@ -12296,18 +12798,18 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
12296
12798
|
}
|
|
12297
12799
|
});
|
|
12298
12800
|
}); };
|
|
12299
|
-
export var
|
|
12801
|
+
export var deserializeAws_restJson1ListTaskTemplatesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12300
12802
|
var contents, data, _a, _b;
|
|
12301
12803
|
return __generator(this, function (_c) {
|
|
12302
12804
|
switch (_c.label) {
|
|
12303
12805
|
case 0:
|
|
12304
12806
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12305
|
-
return [2,
|
|
12807
|
+
return [2, deserializeAws_restJson1ListTaskTemplatesCommandError(output, context)];
|
|
12306
12808
|
}
|
|
12307
12809
|
contents = {
|
|
12308
12810
|
$metadata: deserializeMetadata(output),
|
|
12309
12811
|
NextToken: undefined,
|
|
12310
|
-
|
|
12812
|
+
TaskTemplates: undefined,
|
|
12311
12813
|
};
|
|
12312
12814
|
_a = __expectNonNull;
|
|
12313
12815
|
_b = __expectObject;
|
|
@@ -12317,14 +12819,14 @@ export var deserializeAws_restJson1ListUseCasesCommand = function (output, conte
|
|
|
12317
12819
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
12318
12820
|
contents.NextToken = __expectString(data.NextToken);
|
|
12319
12821
|
}
|
|
12320
|
-
if (data.
|
|
12321
|
-
contents.
|
|
12822
|
+
if (data.TaskTemplates !== undefined && data.TaskTemplates !== null) {
|
|
12823
|
+
contents.TaskTemplates = deserializeAws_restJson1TaskTemplateList(data.TaskTemplates, context);
|
|
12322
12824
|
}
|
|
12323
12825
|
return [2, Promise.resolve(contents)];
|
|
12324
12826
|
}
|
|
12325
12827
|
});
|
|
12326
12828
|
}); };
|
|
12327
|
-
var
|
|
12829
|
+
var deserializeAws_restJson1ListTaskTemplatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12328
12830
|
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
12329
12831
|
var _c;
|
|
12330
12832
|
return __generator(this, function (_d) {
|
|
@@ -12341,23 +12843,99 @@ var deserializeAws_restJson1ListUseCasesCommandError = function (output, context
|
|
|
12341
12843
|
switch (_b) {
|
|
12342
12844
|
case "InternalServiceException": return [3, 2];
|
|
12343
12845
|
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
12344
|
-
case "
|
|
12345
|
-
case "com.amazonaws.connect#
|
|
12346
|
-
case "
|
|
12347
|
-
case "com.amazonaws.connect#
|
|
12348
|
-
case "
|
|
12349
|
-
case "com.amazonaws.connect#
|
|
12846
|
+
case "InvalidParameterException": return [3, 4];
|
|
12847
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
12848
|
+
case "InvalidRequestException": return [3, 6];
|
|
12849
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
12850
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
12851
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
12852
|
+
case "ThrottlingException": return [3, 10];
|
|
12853
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
12350
12854
|
}
|
|
12351
|
-
return [3,
|
|
12855
|
+
return [3, 12];
|
|
12352
12856
|
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
12353
12857
|
case 3: throw _d.sent();
|
|
12354
|
-
case 4: return [4,
|
|
12858
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
12355
12859
|
case 5: throw _d.sent();
|
|
12356
|
-
case 6: return [4,
|
|
12860
|
+
case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
12357
12861
|
case 7: throw _d.sent();
|
|
12358
|
-
case 8: return [4,
|
|
12862
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
12359
12863
|
case 9: throw _d.sent();
|
|
12360
|
-
case 10:
|
|
12864
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
12865
|
+
case 11: throw _d.sent();
|
|
12866
|
+
case 12:
|
|
12867
|
+
parsedBody = parsedOutput.body;
|
|
12868
|
+
response = new __BaseException({
|
|
12869
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
12870
|
+
$fault: "client",
|
|
12871
|
+
$metadata: deserializeMetadata(output),
|
|
12872
|
+
});
|
|
12873
|
+
throw __decorateServiceException(response, parsedBody);
|
|
12874
|
+
}
|
|
12875
|
+
});
|
|
12876
|
+
}); };
|
|
12877
|
+
export var deserializeAws_restJson1ListUseCasesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12878
|
+
var contents, data, _a, _b;
|
|
12879
|
+
return __generator(this, function (_c) {
|
|
12880
|
+
switch (_c.label) {
|
|
12881
|
+
case 0:
|
|
12882
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12883
|
+
return [2, deserializeAws_restJson1ListUseCasesCommandError(output, context)];
|
|
12884
|
+
}
|
|
12885
|
+
contents = {
|
|
12886
|
+
$metadata: deserializeMetadata(output),
|
|
12887
|
+
NextToken: undefined,
|
|
12888
|
+
UseCaseSummaryList: undefined,
|
|
12889
|
+
};
|
|
12890
|
+
_a = __expectNonNull;
|
|
12891
|
+
_b = __expectObject;
|
|
12892
|
+
return [4, parseBody(output.body, context)];
|
|
12893
|
+
case 1:
|
|
12894
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
12895
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
12896
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
12897
|
+
}
|
|
12898
|
+
if (data.UseCaseSummaryList !== undefined && data.UseCaseSummaryList !== null) {
|
|
12899
|
+
contents.UseCaseSummaryList = deserializeAws_restJson1UseCaseSummaryList(data.UseCaseSummaryList, context);
|
|
12900
|
+
}
|
|
12901
|
+
return [2, Promise.resolve(contents)];
|
|
12902
|
+
}
|
|
12903
|
+
});
|
|
12904
|
+
}); };
|
|
12905
|
+
var deserializeAws_restJson1ListUseCasesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12906
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
12907
|
+
var _c;
|
|
12908
|
+
return __generator(this, function (_d) {
|
|
12909
|
+
switch (_d.label) {
|
|
12910
|
+
case 0:
|
|
12911
|
+
_a = [__assign({}, output)];
|
|
12912
|
+
_c = {};
|
|
12913
|
+
return [4, parseBody(output.body, context)];
|
|
12914
|
+
case 1:
|
|
12915
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
12916
|
+
errorCode = "UnknownError";
|
|
12917
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
12918
|
+
_b = errorCode;
|
|
12919
|
+
switch (_b) {
|
|
12920
|
+
case "InternalServiceException": return [3, 2];
|
|
12921
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
12922
|
+
case "InvalidRequestException": return [3, 4];
|
|
12923
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 4];
|
|
12924
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
12925
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 6];
|
|
12926
|
+
case "ThrottlingException": return [3, 8];
|
|
12927
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 8];
|
|
12928
|
+
}
|
|
12929
|
+
return [3, 10];
|
|
12930
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
12931
|
+
case 3: throw _d.sent();
|
|
12932
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
12933
|
+
case 5: throw _d.sent();
|
|
12934
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
12935
|
+
case 7: throw _d.sent();
|
|
12936
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
12937
|
+
case 9: throw _d.sent();
|
|
12938
|
+
case 10:
|
|
12361
12939
|
parsedBody = parsedOutput.body;
|
|
12362
12940
|
response = new __BaseException({
|
|
12363
12941
|
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
@@ -13626,6 +14204,90 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
13626
14204
|
}
|
|
13627
14205
|
});
|
|
13628
14206
|
}); };
|
|
14207
|
+
export var deserializeAws_restJson1TransferContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14208
|
+
var contents, data, _a, _b;
|
|
14209
|
+
return __generator(this, function (_c) {
|
|
14210
|
+
switch (_c.label) {
|
|
14211
|
+
case 0:
|
|
14212
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14213
|
+
return [2, deserializeAws_restJson1TransferContactCommandError(output, context)];
|
|
14214
|
+
}
|
|
14215
|
+
contents = {
|
|
14216
|
+
$metadata: deserializeMetadata(output),
|
|
14217
|
+
ContactArn: undefined,
|
|
14218
|
+
ContactId: undefined,
|
|
14219
|
+
};
|
|
14220
|
+
_a = __expectNonNull;
|
|
14221
|
+
_b = __expectObject;
|
|
14222
|
+
return [4, parseBody(output.body, context)];
|
|
14223
|
+
case 1:
|
|
14224
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
14225
|
+
if (data.ContactArn !== undefined && data.ContactArn !== null) {
|
|
14226
|
+
contents.ContactArn = __expectString(data.ContactArn);
|
|
14227
|
+
}
|
|
14228
|
+
if (data.ContactId !== undefined && data.ContactId !== null) {
|
|
14229
|
+
contents.ContactId = __expectString(data.ContactId);
|
|
14230
|
+
}
|
|
14231
|
+
return [2, Promise.resolve(contents)];
|
|
14232
|
+
}
|
|
14233
|
+
});
|
|
14234
|
+
}); };
|
|
14235
|
+
var deserializeAws_restJson1TransferContactCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14236
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
14237
|
+
var _c;
|
|
14238
|
+
return __generator(this, function (_d) {
|
|
14239
|
+
switch (_d.label) {
|
|
14240
|
+
case 0:
|
|
14241
|
+
_a = [__assign({}, output)];
|
|
14242
|
+
_c = {};
|
|
14243
|
+
return [4, parseBody(output.body, context)];
|
|
14244
|
+
case 1:
|
|
14245
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
14246
|
+
errorCode = "UnknownError";
|
|
14247
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14248
|
+
_b = errorCode;
|
|
14249
|
+
switch (_b) {
|
|
14250
|
+
case "AccessDeniedException": return [3, 2];
|
|
14251
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
14252
|
+
case "IdempotencyException": return [3, 4];
|
|
14253
|
+
case "com.amazonaws.connect#IdempotencyException": return [3, 4];
|
|
14254
|
+
case "InternalServiceException": return [3, 6];
|
|
14255
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 6];
|
|
14256
|
+
case "InvalidRequestException": return [3, 8];
|
|
14257
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
14258
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
14259
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
14260
|
+
case "ServiceQuotaExceededException": return [3, 12];
|
|
14261
|
+
case "com.amazonaws.connect#ServiceQuotaExceededException": return [3, 12];
|
|
14262
|
+
case "ThrottlingException": return [3, 14];
|
|
14263
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 14];
|
|
14264
|
+
}
|
|
14265
|
+
return [3, 16];
|
|
14266
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
14267
|
+
case 3: throw _d.sent();
|
|
14268
|
+
case 4: return [4, deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context)];
|
|
14269
|
+
case 5: throw _d.sent();
|
|
14270
|
+
case 6: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14271
|
+
case 7: throw _d.sent();
|
|
14272
|
+
case 8: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14273
|
+
case 9: throw _d.sent();
|
|
14274
|
+
case 10: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14275
|
+
case 11: throw _d.sent();
|
|
14276
|
+
case 12: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
14277
|
+
case 13: throw _d.sent();
|
|
14278
|
+
case 14: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14279
|
+
case 15: throw _d.sent();
|
|
14280
|
+
case 16:
|
|
14281
|
+
parsedBody = parsedOutput.body;
|
|
14282
|
+
response = new __BaseException({
|
|
14283
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
14284
|
+
$fault: "client",
|
|
14285
|
+
$metadata: deserializeMetadata(output),
|
|
14286
|
+
});
|
|
14287
|
+
throw __decorateServiceException(response, parsedBody);
|
|
14288
|
+
}
|
|
14289
|
+
});
|
|
14290
|
+
}); };
|
|
13629
14291
|
export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13630
14292
|
var contents;
|
|
13631
14293
|
return __generator(this, function (_a) {
|
|
@@ -15404,6 +16066,126 @@ var deserializeAws_restJson1UpdateSecurityProfileCommandError = function (output
|
|
|
15404
16066
|
}
|
|
15405
16067
|
});
|
|
15406
16068
|
}); };
|
|
16069
|
+
export var deserializeAws_restJson1UpdateTaskTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16070
|
+
var contents, data, _a, _b;
|
|
16071
|
+
return __generator(this, function (_c) {
|
|
16072
|
+
switch (_c.label) {
|
|
16073
|
+
case 0:
|
|
16074
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
16075
|
+
return [2, deserializeAws_restJson1UpdateTaskTemplateCommandError(output, context)];
|
|
16076
|
+
}
|
|
16077
|
+
contents = {
|
|
16078
|
+
$metadata: deserializeMetadata(output),
|
|
16079
|
+
Arn: undefined,
|
|
16080
|
+
Constraints: undefined,
|
|
16081
|
+
ContactFlowId: undefined,
|
|
16082
|
+
CreatedTime: undefined,
|
|
16083
|
+
Defaults: undefined,
|
|
16084
|
+
Description: undefined,
|
|
16085
|
+
Fields: undefined,
|
|
16086
|
+
Id: undefined,
|
|
16087
|
+
InstanceId: undefined,
|
|
16088
|
+
LastModifiedTime: undefined,
|
|
16089
|
+
Name: undefined,
|
|
16090
|
+
Status: undefined,
|
|
16091
|
+
};
|
|
16092
|
+
_a = __expectNonNull;
|
|
16093
|
+
_b = __expectObject;
|
|
16094
|
+
return [4, parseBody(output.body, context)];
|
|
16095
|
+
case 1:
|
|
16096
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
16097
|
+
if (data.Arn !== undefined && data.Arn !== null) {
|
|
16098
|
+
contents.Arn = __expectString(data.Arn);
|
|
16099
|
+
}
|
|
16100
|
+
if (data.Constraints !== undefined && data.Constraints !== null) {
|
|
16101
|
+
contents.Constraints = deserializeAws_restJson1TaskTemplateConstraints(data.Constraints, context);
|
|
16102
|
+
}
|
|
16103
|
+
if (data.ContactFlowId !== undefined && data.ContactFlowId !== null) {
|
|
16104
|
+
contents.ContactFlowId = __expectString(data.ContactFlowId);
|
|
16105
|
+
}
|
|
16106
|
+
if (data.CreatedTime !== undefined && data.CreatedTime !== null) {
|
|
16107
|
+
contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime)));
|
|
16108
|
+
}
|
|
16109
|
+
if (data.Defaults !== undefined && data.Defaults !== null) {
|
|
16110
|
+
contents.Defaults = deserializeAws_restJson1TaskTemplateDefaults(data.Defaults, context);
|
|
16111
|
+
}
|
|
16112
|
+
if (data.Description !== undefined && data.Description !== null) {
|
|
16113
|
+
contents.Description = __expectString(data.Description);
|
|
16114
|
+
}
|
|
16115
|
+
if (data.Fields !== undefined && data.Fields !== null) {
|
|
16116
|
+
contents.Fields = deserializeAws_restJson1TaskTemplateFields(data.Fields, context);
|
|
16117
|
+
}
|
|
16118
|
+
if (data.Id !== undefined && data.Id !== null) {
|
|
16119
|
+
contents.Id = __expectString(data.Id);
|
|
16120
|
+
}
|
|
16121
|
+
if (data.InstanceId !== undefined && data.InstanceId !== null) {
|
|
16122
|
+
contents.InstanceId = __expectString(data.InstanceId);
|
|
16123
|
+
}
|
|
16124
|
+
if (data.LastModifiedTime !== undefined && data.LastModifiedTime !== null) {
|
|
16125
|
+
contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime)));
|
|
16126
|
+
}
|
|
16127
|
+
if (data.Name !== undefined && data.Name !== null) {
|
|
16128
|
+
contents.Name = __expectString(data.Name);
|
|
16129
|
+
}
|
|
16130
|
+
if (data.Status !== undefined && data.Status !== null) {
|
|
16131
|
+
contents.Status = __expectString(data.Status);
|
|
16132
|
+
}
|
|
16133
|
+
return [2, Promise.resolve(contents)];
|
|
16134
|
+
}
|
|
16135
|
+
});
|
|
16136
|
+
}); };
|
|
16137
|
+
var deserializeAws_restJson1UpdateTaskTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16138
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
16139
|
+
var _c;
|
|
16140
|
+
return __generator(this, function (_d) {
|
|
16141
|
+
switch (_d.label) {
|
|
16142
|
+
case 0:
|
|
16143
|
+
_a = [__assign({}, output)];
|
|
16144
|
+
_c = {};
|
|
16145
|
+
return [4, parseBody(output.body, context)];
|
|
16146
|
+
case 1:
|
|
16147
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
16148
|
+
errorCode = "UnknownError";
|
|
16149
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
16150
|
+
_b = errorCode;
|
|
16151
|
+
switch (_b) {
|
|
16152
|
+
case "InternalServiceException": return [3, 2];
|
|
16153
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
16154
|
+
case "InvalidParameterException": return [3, 4];
|
|
16155
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
16156
|
+
case "PropertyValidationException": return [3, 6];
|
|
16157
|
+
case "com.amazonaws.connect#PropertyValidationException": return [3, 6];
|
|
16158
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
16159
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
16160
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
16161
|
+
case "com.amazonaws.connect#ServiceQuotaExceededException": return [3, 10];
|
|
16162
|
+
case "ThrottlingException": return [3, 12];
|
|
16163
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
16164
|
+
}
|
|
16165
|
+
return [3, 14];
|
|
16166
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
16167
|
+
case 3: throw _d.sent();
|
|
16168
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
16169
|
+
case 5: throw _d.sent();
|
|
16170
|
+
case 6: return [4, deserializeAws_restJson1PropertyValidationExceptionResponse(parsedOutput, context)];
|
|
16171
|
+
case 7: throw _d.sent();
|
|
16172
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
16173
|
+
case 9: throw _d.sent();
|
|
16174
|
+
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
16175
|
+
case 11: throw _d.sent();
|
|
16176
|
+
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
16177
|
+
case 13: throw _d.sent();
|
|
16178
|
+
case 14:
|
|
16179
|
+
parsedBody = parsedOutput.body;
|
|
16180
|
+
response = new __BaseException({
|
|
16181
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
16182
|
+
$fault: "client",
|
|
16183
|
+
$metadata: deserializeMetadata(output),
|
|
16184
|
+
});
|
|
16185
|
+
throw __decorateServiceException(response, parsedBody);
|
|
16186
|
+
}
|
|
16187
|
+
});
|
|
16188
|
+
}); };
|
|
15407
16189
|
export var deserializeAws_restJson1UpdateUserHierarchyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
15408
16190
|
var contents;
|
|
15409
16191
|
return __generator(this, function (_a) {
|
|
@@ -16030,6 +16812,21 @@ var deserializeAws_restJson1OutboundContactNotPermittedExceptionResponse = funct
|
|
|
16030
16812
|
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
16031
16813
|
});
|
|
16032
16814
|
}); };
|
|
16815
|
+
var deserializeAws_restJson1PropertyValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16816
|
+
var contents, data, exception;
|
|
16817
|
+
return __generator(this, function (_a) {
|
|
16818
|
+
contents = {};
|
|
16819
|
+
data = parsedOutput.body;
|
|
16820
|
+
if (data.Message !== undefined && data.Message !== null) {
|
|
16821
|
+
contents.Message = __expectString(data.Message);
|
|
16822
|
+
}
|
|
16823
|
+
if (data.PropertyList !== undefined && data.PropertyList !== null) {
|
|
16824
|
+
contents.PropertyList = deserializeAws_restJson1PropertyValidationExceptionPropertyList(data.PropertyList, context);
|
|
16825
|
+
}
|
|
16826
|
+
exception = new PropertyValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
16827
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
16828
|
+
});
|
|
16829
|
+
}); };
|
|
16033
16830
|
var deserializeAws_restJson1ResourceConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16034
16831
|
var contents, data, exception;
|
|
16035
16832
|
return __generator(this, function (_a) {
|
|
@@ -16258,6 +17055,20 @@ var serializeAws_restJson1InstanceStorageConfig = function (input, context) {
|
|
|
16258
17055
|
})), (input.S3Config !== undefined &&
|
|
16259
17056
|
input.S3Config !== null && { S3Config: serializeAws_restJson1S3Config(input.S3Config, context) })), (input.StorageType !== undefined && input.StorageType !== null && { StorageType: input.StorageType }));
|
|
16260
17057
|
};
|
|
17058
|
+
var serializeAws_restJson1InvisibleFieldInfo = function (input, context) {
|
|
17059
|
+
return __assign({}, (input.Id !== undefined &&
|
|
17060
|
+
input.Id !== null && { Id: serializeAws_restJson1TaskTemplateFieldIdentifier(input.Id, context) }));
|
|
17061
|
+
};
|
|
17062
|
+
var serializeAws_restJson1InvisibleTaskTemplateFields = function (input, context) {
|
|
17063
|
+
return input
|
|
17064
|
+
.filter(function (e) { return e != null; })
|
|
17065
|
+
.map(function (entry) {
|
|
17066
|
+
if (entry === null) {
|
|
17067
|
+
return null;
|
|
17068
|
+
}
|
|
17069
|
+
return serializeAws_restJson1InvisibleFieldInfo(entry, context);
|
|
17070
|
+
});
|
|
17071
|
+
};
|
|
16261
17072
|
var serializeAws_restJson1KinesisFirehoseConfig = function (input, context) {
|
|
16262
17073
|
return __assign({}, (input.FirehoseArn !== undefined && input.FirehoseArn !== null && { FirehoseArn: input.FirehoseArn }));
|
|
16263
17074
|
};
|
|
@@ -16368,9 +17179,37 @@ var serializeAws_restJson1QuickConnectsList = function (input, context) {
|
|
|
16368
17179
|
return entry;
|
|
16369
17180
|
});
|
|
16370
17181
|
};
|
|
17182
|
+
var serializeAws_restJson1ReadOnlyFieldInfo = function (input, context) {
|
|
17183
|
+
return __assign({}, (input.Id !== undefined &&
|
|
17184
|
+
input.Id !== null && { Id: serializeAws_restJson1TaskTemplateFieldIdentifier(input.Id, context) }));
|
|
17185
|
+
};
|
|
17186
|
+
var serializeAws_restJson1ReadOnlyTaskTemplateFields = function (input, context) {
|
|
17187
|
+
return input
|
|
17188
|
+
.filter(function (e) { return e != null; })
|
|
17189
|
+
.map(function (entry) {
|
|
17190
|
+
if (entry === null) {
|
|
17191
|
+
return null;
|
|
17192
|
+
}
|
|
17193
|
+
return serializeAws_restJson1ReadOnlyFieldInfo(entry, context);
|
|
17194
|
+
});
|
|
17195
|
+
};
|
|
16371
17196
|
var serializeAws_restJson1Reference = function (input, context) {
|
|
16372
17197
|
return __assign(__assign({}, (input.Type !== undefined && input.Type !== null && { Type: input.Type })), (input.Value !== undefined && input.Value !== null && { Value: input.Value }));
|
|
16373
17198
|
};
|
|
17199
|
+
var serializeAws_restJson1RequiredFieldInfo = function (input, context) {
|
|
17200
|
+
return __assign({}, (input.Id !== undefined &&
|
|
17201
|
+
input.Id !== null && { Id: serializeAws_restJson1TaskTemplateFieldIdentifier(input.Id, context) }));
|
|
17202
|
+
};
|
|
17203
|
+
var serializeAws_restJson1RequiredTaskTemplateFields = function (input, context) {
|
|
17204
|
+
return input
|
|
17205
|
+
.filter(function (e) { return e != null; })
|
|
17206
|
+
.map(function (entry) {
|
|
17207
|
+
if (entry === null) {
|
|
17208
|
+
return null;
|
|
17209
|
+
}
|
|
17210
|
+
return serializeAws_restJson1RequiredFieldInfo(entry, context);
|
|
17211
|
+
});
|
|
17212
|
+
};
|
|
16374
17213
|
var serializeAws_restJson1RoutingProfileQueueConfig = function (input, context) {
|
|
16375
17214
|
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
17215
|
input.QueueReference !== null && {
|
|
@@ -16416,6 +17255,16 @@ var serializeAws_restJson1SecurityProfileIds = function (input, context) {
|
|
|
16416
17255
|
return entry;
|
|
16417
17256
|
});
|
|
16418
17257
|
};
|
|
17258
|
+
var serializeAws_restJson1SingleSelectOptions = function (input, context) {
|
|
17259
|
+
return input
|
|
17260
|
+
.filter(function (e) { return e != null; })
|
|
17261
|
+
.map(function (entry) {
|
|
17262
|
+
if (entry === null) {
|
|
17263
|
+
return null;
|
|
17264
|
+
}
|
|
17265
|
+
return entry;
|
|
17266
|
+
});
|
|
17267
|
+
};
|
|
16419
17268
|
var serializeAws_restJson1StringCondition = function (input, context) {
|
|
16420
17269
|
return __assign(__assign(__assign({}, (input.ComparisonType !== undefined &&
|
|
16421
17270
|
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,6 +17312,58 @@ var serializeAws_restJson1TagOrConditionList = function (input, context) {
|
|
|
16463
17312
|
return serializeAws_restJson1TagAndConditionList(entry, context);
|
|
16464
17313
|
});
|
|
16465
17314
|
};
|
|
17315
|
+
var serializeAws_restJson1TaskTemplateConstraints = function (input, context) {
|
|
17316
|
+
return __assign(__assign(__assign({}, (input.InvisibleFields !== undefined &&
|
|
17317
|
+
input.InvisibleFields !== null && {
|
|
17318
|
+
InvisibleFields: serializeAws_restJson1InvisibleTaskTemplateFields(input.InvisibleFields, context),
|
|
17319
|
+
})), (input.ReadOnlyFields !== undefined &&
|
|
17320
|
+
input.ReadOnlyFields !== null && {
|
|
17321
|
+
ReadOnlyFields: serializeAws_restJson1ReadOnlyTaskTemplateFields(input.ReadOnlyFields, context),
|
|
17322
|
+
})), (input.RequiredFields !== undefined &&
|
|
17323
|
+
input.RequiredFields !== null && {
|
|
17324
|
+
RequiredFields: serializeAws_restJson1RequiredTaskTemplateFields(input.RequiredFields, context),
|
|
17325
|
+
}));
|
|
17326
|
+
};
|
|
17327
|
+
var serializeAws_restJson1TaskTemplateDefaultFieldValue = function (input, context) {
|
|
17328
|
+
return __assign(__assign({}, (input.DefaultValue !== undefined && input.DefaultValue !== null && { DefaultValue: input.DefaultValue })), (input.Id !== undefined &&
|
|
17329
|
+
input.Id !== null && { Id: serializeAws_restJson1TaskTemplateFieldIdentifier(input.Id, context) }));
|
|
17330
|
+
};
|
|
17331
|
+
var serializeAws_restJson1TaskTemplateDefaultFieldValueList = function (input, context) {
|
|
17332
|
+
return input
|
|
17333
|
+
.filter(function (e) { return e != null; })
|
|
17334
|
+
.map(function (entry) {
|
|
17335
|
+
if (entry === null) {
|
|
17336
|
+
return null;
|
|
17337
|
+
}
|
|
17338
|
+
return serializeAws_restJson1TaskTemplateDefaultFieldValue(entry, context);
|
|
17339
|
+
});
|
|
17340
|
+
};
|
|
17341
|
+
var serializeAws_restJson1TaskTemplateDefaults = function (input, context) {
|
|
17342
|
+
return __assign({}, (input.DefaultFieldValues !== undefined &&
|
|
17343
|
+
input.DefaultFieldValues !== null && {
|
|
17344
|
+
DefaultFieldValues: serializeAws_restJson1TaskTemplateDefaultFieldValueList(input.DefaultFieldValues, context),
|
|
17345
|
+
}));
|
|
17346
|
+
};
|
|
17347
|
+
var serializeAws_restJson1TaskTemplateField = function (input, context) {
|
|
17348
|
+
return __assign(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Id !== undefined &&
|
|
17349
|
+
input.Id !== null && { Id: serializeAws_restJson1TaskTemplateFieldIdentifier(input.Id, context) })), (input.SingleSelectOptions !== undefined &&
|
|
17350
|
+
input.SingleSelectOptions !== null && {
|
|
17351
|
+
SingleSelectOptions: serializeAws_restJson1SingleSelectOptions(input.SingleSelectOptions, context),
|
|
17352
|
+
})), (input.Type !== undefined && input.Type !== null && { Type: input.Type }));
|
|
17353
|
+
};
|
|
17354
|
+
var serializeAws_restJson1TaskTemplateFieldIdentifier = function (input, context) {
|
|
17355
|
+
return __assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name }));
|
|
17356
|
+
};
|
|
17357
|
+
var serializeAws_restJson1TaskTemplateFields = function (input, context) {
|
|
17358
|
+
return input
|
|
17359
|
+
.filter(function (e) { return e != null; })
|
|
17360
|
+
.map(function (entry) {
|
|
17361
|
+
if (entry === null) {
|
|
17362
|
+
return null;
|
|
17363
|
+
}
|
|
17364
|
+
return serializeAws_restJson1TaskTemplateField(entry, context);
|
|
17365
|
+
});
|
|
17366
|
+
};
|
|
16466
17367
|
var serializeAws_restJson1Threshold = function (input, context) {
|
|
16467
17368
|
return __assign(__assign({}, (input.Comparison !== undefined && input.Comparison !== null && { Comparison: input.Comparison })), (input.ThresholdValue !== undefined &&
|
|
16468
17369
|
input.ThresholdValue !== null && { ThresholdValue: __serializeFloat(input.ThresholdValue) }));
|
|
@@ -16776,6 +17677,12 @@ var deserializeAws_restJson1CurrentMetricResults = function (output, context) {
|
|
|
16776
17677
|
});
|
|
16777
17678
|
return retVal;
|
|
16778
17679
|
};
|
|
17680
|
+
var deserializeAws_restJson1DateReference = function (output, context) {
|
|
17681
|
+
return {
|
|
17682
|
+
Name: __expectString(output.Name),
|
|
17683
|
+
Value: __expectString(output.Value),
|
|
17684
|
+
};
|
|
17685
|
+
};
|
|
16779
17686
|
var deserializeAws_restJson1DefaultVocabulary = function (output, context) {
|
|
16780
17687
|
return {
|
|
16781
17688
|
InstanceId: __expectString(output.InstanceId),
|
|
@@ -16803,6 +17710,12 @@ var deserializeAws_restJson1Dimensions = function (output, context) {
|
|
|
16803
17710
|
: undefined,
|
|
16804
17711
|
};
|
|
16805
17712
|
};
|
|
17713
|
+
var deserializeAws_restJson1EmailReference = function (output, context) {
|
|
17714
|
+
return {
|
|
17715
|
+
Name: __expectString(output.Name),
|
|
17716
|
+
Value: __expectString(output.Value),
|
|
17717
|
+
};
|
|
17718
|
+
};
|
|
16806
17719
|
var deserializeAws_restJson1EncryptionConfig = function (output, context) {
|
|
16807
17720
|
return {
|
|
16808
17721
|
EncryptionType: __expectString(output.EncryptionType),
|
|
@@ -17109,6 +18022,24 @@ var deserializeAws_restJson1IntegrationAssociationSummaryList = function (output
|
|
|
17109
18022
|
});
|
|
17110
18023
|
return retVal;
|
|
17111
18024
|
};
|
|
18025
|
+
var deserializeAws_restJson1InvisibleFieldInfo = function (output, context) {
|
|
18026
|
+
return {
|
|
18027
|
+
Id: output.Id !== undefined && output.Id !== null
|
|
18028
|
+
? deserializeAws_restJson1TaskTemplateFieldIdentifier(output.Id, context)
|
|
18029
|
+
: undefined,
|
|
18030
|
+
};
|
|
18031
|
+
};
|
|
18032
|
+
var deserializeAws_restJson1InvisibleTaskTemplateFields = function (output, context) {
|
|
18033
|
+
var retVal = (output || [])
|
|
18034
|
+
.filter(function (e) { return e != null; })
|
|
18035
|
+
.map(function (entry) {
|
|
18036
|
+
if (entry === null) {
|
|
18037
|
+
return null;
|
|
18038
|
+
}
|
|
18039
|
+
return deserializeAws_restJson1InvisibleFieldInfo(entry, context);
|
|
18040
|
+
});
|
|
18041
|
+
return retVal;
|
|
18042
|
+
};
|
|
17112
18043
|
var deserializeAws_restJson1KinesisFirehoseConfig = function (output, context) {
|
|
17113
18044
|
return {
|
|
17114
18045
|
FirehoseArn: __expectString(output.FirehoseArn),
|
|
@@ -17209,6 +18140,12 @@ var deserializeAws_restJson1MediaConcurrency = function (output, context) {
|
|
|
17209
18140
|
Concurrency: __expectInt32(output.Concurrency),
|
|
17210
18141
|
};
|
|
17211
18142
|
};
|
|
18143
|
+
var deserializeAws_restJson1NumberReference = function (output, context) {
|
|
18144
|
+
return {
|
|
18145
|
+
Name: __expectString(output.Name),
|
|
18146
|
+
Value: __expectString(output.Value),
|
|
18147
|
+
};
|
|
18148
|
+
};
|
|
17212
18149
|
var deserializeAws_restJson1OriginsList = function (output, context) {
|
|
17213
18150
|
var retVal = (output || [])
|
|
17214
18151
|
.filter(function (e) { return e != null; })
|
|
@@ -17303,6 +18240,24 @@ var deserializeAws_restJson1PromptSummaryList = function (output, context) {
|
|
|
17303
18240
|
});
|
|
17304
18241
|
return retVal;
|
|
17305
18242
|
};
|
|
18243
|
+
var deserializeAws_restJson1PropertyValidationExceptionProperty = function (output, context) {
|
|
18244
|
+
return {
|
|
18245
|
+
Message: __expectString(output.Message),
|
|
18246
|
+
PropertyPath: __expectString(output.PropertyPath),
|
|
18247
|
+
Reason: __expectString(output.Reason),
|
|
18248
|
+
};
|
|
18249
|
+
};
|
|
18250
|
+
var deserializeAws_restJson1PropertyValidationExceptionPropertyList = function (output, context) {
|
|
18251
|
+
var retVal = (output || [])
|
|
18252
|
+
.filter(function (e) { return e != null; })
|
|
18253
|
+
.map(function (entry) {
|
|
18254
|
+
if (entry === null) {
|
|
18255
|
+
return null;
|
|
18256
|
+
}
|
|
18257
|
+
return deserializeAws_restJson1PropertyValidationExceptionProperty(entry, context);
|
|
18258
|
+
});
|
|
18259
|
+
return retVal;
|
|
18260
|
+
};
|
|
17306
18261
|
var deserializeAws_restJson1Queue = function (output, context) {
|
|
17307
18262
|
return {
|
|
17308
18263
|
Description: __expectString(output.Description),
|
|
@@ -17406,12 +18361,50 @@ var deserializeAws_restJson1QuickConnectSummaryList = function (output, context)
|
|
|
17406
18361
|
});
|
|
17407
18362
|
return retVal;
|
|
17408
18363
|
};
|
|
18364
|
+
var deserializeAws_restJson1ReadOnlyFieldInfo = function (output, context) {
|
|
18365
|
+
return {
|
|
18366
|
+
Id: output.Id !== undefined && output.Id !== null
|
|
18367
|
+
? deserializeAws_restJson1TaskTemplateFieldIdentifier(output.Id, context)
|
|
18368
|
+
: undefined,
|
|
18369
|
+
};
|
|
18370
|
+
};
|
|
18371
|
+
var deserializeAws_restJson1ReadOnlyTaskTemplateFields = function (output, context) {
|
|
18372
|
+
var retVal = (output || [])
|
|
18373
|
+
.filter(function (e) { return e != null; })
|
|
18374
|
+
.map(function (entry) {
|
|
18375
|
+
if (entry === null) {
|
|
18376
|
+
return null;
|
|
18377
|
+
}
|
|
18378
|
+
return deserializeAws_restJson1ReadOnlyFieldInfo(entry, context);
|
|
18379
|
+
});
|
|
18380
|
+
return retVal;
|
|
18381
|
+
};
|
|
17409
18382
|
var deserializeAws_restJson1ReferenceSummary = function (output, context) {
|
|
17410
18383
|
if (output.Attachment !== undefined && output.Attachment !== null) {
|
|
17411
18384
|
return {
|
|
17412
18385
|
Attachment: deserializeAws_restJson1AttachmentReference(output.Attachment, context),
|
|
17413
18386
|
};
|
|
17414
18387
|
}
|
|
18388
|
+
if (output.Date !== undefined && output.Date !== null) {
|
|
18389
|
+
return {
|
|
18390
|
+
Date: deserializeAws_restJson1DateReference(output.Date, context),
|
|
18391
|
+
};
|
|
18392
|
+
}
|
|
18393
|
+
if (output.Email !== undefined && output.Email !== null) {
|
|
18394
|
+
return {
|
|
18395
|
+
Email: deserializeAws_restJson1EmailReference(output.Email, context),
|
|
18396
|
+
};
|
|
18397
|
+
}
|
|
18398
|
+
if (output.Number !== undefined && output.Number !== null) {
|
|
18399
|
+
return {
|
|
18400
|
+
Number: deserializeAws_restJson1NumberReference(output.Number, context),
|
|
18401
|
+
};
|
|
18402
|
+
}
|
|
18403
|
+
if (output.String !== undefined && output.String !== null) {
|
|
18404
|
+
return {
|
|
18405
|
+
String: deserializeAws_restJson1StringReference(output.String, context),
|
|
18406
|
+
};
|
|
18407
|
+
}
|
|
17415
18408
|
if (output.Url !== undefined && output.Url !== null) {
|
|
17416
18409
|
return {
|
|
17417
18410
|
Url: deserializeAws_restJson1UrlReference(output.Url, context),
|
|
@@ -17430,6 +18423,24 @@ var deserializeAws_restJson1ReferenceSummaryList = function (output, context) {
|
|
|
17430
18423
|
});
|
|
17431
18424
|
return retVal;
|
|
17432
18425
|
};
|
|
18426
|
+
var deserializeAws_restJson1RequiredFieldInfo = function (output, context) {
|
|
18427
|
+
return {
|
|
18428
|
+
Id: output.Id !== undefined && output.Id !== null
|
|
18429
|
+
? deserializeAws_restJson1TaskTemplateFieldIdentifier(output.Id, context)
|
|
18430
|
+
: undefined,
|
|
18431
|
+
};
|
|
18432
|
+
};
|
|
18433
|
+
var deserializeAws_restJson1RequiredTaskTemplateFields = function (output, context) {
|
|
18434
|
+
var retVal = (output || [])
|
|
18435
|
+
.filter(function (e) { return e != null; })
|
|
18436
|
+
.map(function (entry) {
|
|
18437
|
+
if (entry === null) {
|
|
18438
|
+
return null;
|
|
18439
|
+
}
|
|
18440
|
+
return deserializeAws_restJson1RequiredFieldInfo(entry, context);
|
|
18441
|
+
});
|
|
18442
|
+
return retVal;
|
|
18443
|
+
};
|
|
17433
18444
|
var deserializeAws_restJson1RoutingProfile = function (output, context) {
|
|
17434
18445
|
return {
|
|
17435
18446
|
DefaultOutboundQueueId: __expectString(output.DefaultOutboundQueueId),
|
|
@@ -17555,6 +18566,23 @@ var deserializeAws_restJson1SecurityProfileSummaryList = function (output, conte
|
|
|
17555
18566
|
});
|
|
17556
18567
|
return retVal;
|
|
17557
18568
|
};
|
|
18569
|
+
var deserializeAws_restJson1SingleSelectOptions = function (output, context) {
|
|
18570
|
+
var retVal = (output || [])
|
|
18571
|
+
.filter(function (e) { return e != null; })
|
|
18572
|
+
.map(function (entry) {
|
|
18573
|
+
if (entry === null) {
|
|
18574
|
+
return null;
|
|
18575
|
+
}
|
|
18576
|
+
return __expectString(entry);
|
|
18577
|
+
});
|
|
18578
|
+
return retVal;
|
|
18579
|
+
};
|
|
18580
|
+
var deserializeAws_restJson1StringReference = function (output, context) {
|
|
18581
|
+
return {
|
|
18582
|
+
Name: __expectString(output.Name),
|
|
18583
|
+
Value: __expectString(output.Value),
|
|
18584
|
+
};
|
|
18585
|
+
};
|
|
17558
18586
|
var deserializeAws_restJson1TagMap = function (output, context) {
|
|
17559
18587
|
return Object.entries(output).reduce(function (acc, _a) {
|
|
17560
18588
|
var _b;
|
|
@@ -17565,6 +18593,99 @@ var deserializeAws_restJson1TagMap = function (output, context) {
|
|
|
17565
18593
|
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
17566
18594
|
}, {});
|
|
17567
18595
|
};
|
|
18596
|
+
var deserializeAws_restJson1TaskTemplateConstraints = function (output, context) {
|
|
18597
|
+
return {
|
|
18598
|
+
InvisibleFields: output.InvisibleFields !== undefined && output.InvisibleFields !== null
|
|
18599
|
+
? deserializeAws_restJson1InvisibleTaskTemplateFields(output.InvisibleFields, context)
|
|
18600
|
+
: undefined,
|
|
18601
|
+
ReadOnlyFields: output.ReadOnlyFields !== undefined && output.ReadOnlyFields !== null
|
|
18602
|
+
? deserializeAws_restJson1ReadOnlyTaskTemplateFields(output.ReadOnlyFields, context)
|
|
18603
|
+
: undefined,
|
|
18604
|
+
RequiredFields: output.RequiredFields !== undefined && output.RequiredFields !== null
|
|
18605
|
+
? deserializeAws_restJson1RequiredTaskTemplateFields(output.RequiredFields, context)
|
|
18606
|
+
: undefined,
|
|
18607
|
+
};
|
|
18608
|
+
};
|
|
18609
|
+
var deserializeAws_restJson1TaskTemplateDefaultFieldValue = function (output, context) {
|
|
18610
|
+
return {
|
|
18611
|
+
DefaultValue: __expectString(output.DefaultValue),
|
|
18612
|
+
Id: output.Id !== undefined && output.Id !== null
|
|
18613
|
+
? deserializeAws_restJson1TaskTemplateFieldIdentifier(output.Id, context)
|
|
18614
|
+
: undefined,
|
|
18615
|
+
};
|
|
18616
|
+
};
|
|
18617
|
+
var deserializeAws_restJson1TaskTemplateDefaultFieldValueList = function (output, context) {
|
|
18618
|
+
var retVal = (output || [])
|
|
18619
|
+
.filter(function (e) { return e != null; })
|
|
18620
|
+
.map(function (entry) {
|
|
18621
|
+
if (entry === null) {
|
|
18622
|
+
return null;
|
|
18623
|
+
}
|
|
18624
|
+
return deserializeAws_restJson1TaskTemplateDefaultFieldValue(entry, context);
|
|
18625
|
+
});
|
|
18626
|
+
return retVal;
|
|
18627
|
+
};
|
|
18628
|
+
var deserializeAws_restJson1TaskTemplateDefaults = function (output, context) {
|
|
18629
|
+
return {
|
|
18630
|
+
DefaultFieldValues: output.DefaultFieldValues !== undefined && output.DefaultFieldValues !== null
|
|
18631
|
+
? deserializeAws_restJson1TaskTemplateDefaultFieldValueList(output.DefaultFieldValues, context)
|
|
18632
|
+
: undefined,
|
|
18633
|
+
};
|
|
18634
|
+
};
|
|
18635
|
+
var deserializeAws_restJson1TaskTemplateField = function (output, context) {
|
|
18636
|
+
return {
|
|
18637
|
+
Description: __expectString(output.Description),
|
|
18638
|
+
Id: output.Id !== undefined && output.Id !== null
|
|
18639
|
+
? deserializeAws_restJson1TaskTemplateFieldIdentifier(output.Id, context)
|
|
18640
|
+
: undefined,
|
|
18641
|
+
SingleSelectOptions: output.SingleSelectOptions !== undefined && output.SingleSelectOptions !== null
|
|
18642
|
+
? deserializeAws_restJson1SingleSelectOptions(output.SingleSelectOptions, context)
|
|
18643
|
+
: undefined,
|
|
18644
|
+
Type: __expectString(output.Type),
|
|
18645
|
+
};
|
|
18646
|
+
};
|
|
18647
|
+
var deserializeAws_restJson1TaskTemplateFieldIdentifier = function (output, context) {
|
|
18648
|
+
return {
|
|
18649
|
+
Name: __expectString(output.Name),
|
|
18650
|
+
};
|
|
18651
|
+
};
|
|
18652
|
+
var deserializeAws_restJson1TaskTemplateFields = function (output, context) {
|
|
18653
|
+
var retVal = (output || [])
|
|
18654
|
+
.filter(function (e) { return e != null; })
|
|
18655
|
+
.map(function (entry) {
|
|
18656
|
+
if (entry === null) {
|
|
18657
|
+
return null;
|
|
18658
|
+
}
|
|
18659
|
+
return deserializeAws_restJson1TaskTemplateField(entry, context);
|
|
18660
|
+
});
|
|
18661
|
+
return retVal;
|
|
18662
|
+
};
|
|
18663
|
+
var deserializeAws_restJson1TaskTemplateList = function (output, context) {
|
|
18664
|
+
var retVal = (output || [])
|
|
18665
|
+
.filter(function (e) { return e != null; })
|
|
18666
|
+
.map(function (entry) {
|
|
18667
|
+
if (entry === null) {
|
|
18668
|
+
return null;
|
|
18669
|
+
}
|
|
18670
|
+
return deserializeAws_restJson1TaskTemplateMetadata(entry, context);
|
|
18671
|
+
});
|
|
18672
|
+
return retVal;
|
|
18673
|
+
};
|
|
18674
|
+
var deserializeAws_restJson1TaskTemplateMetadata = function (output, context) {
|
|
18675
|
+
return {
|
|
18676
|
+
Arn: __expectString(output.Arn),
|
|
18677
|
+
CreatedTime: output.CreatedTime !== undefined && output.CreatedTime !== null
|
|
18678
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime)))
|
|
18679
|
+
: undefined,
|
|
18680
|
+
Description: __expectString(output.Description),
|
|
18681
|
+
Id: __expectString(output.Id),
|
|
18682
|
+
LastModifiedTime: output.LastModifiedTime !== undefined && output.LastModifiedTime !== null
|
|
18683
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
|
|
18684
|
+
: undefined,
|
|
18685
|
+
Name: __expectString(output.Name),
|
|
18686
|
+
Status: __expectString(output.Status),
|
|
18687
|
+
};
|
|
18688
|
+
};
|
|
17568
18689
|
var deserializeAws_restJson1Threshold = function (output, context) {
|
|
17569
18690
|
return {
|
|
17570
18691
|
Comparison: __expectString(output.Comparison),
|