@aws-sdk/client-connect 3.47.2 → 3.51.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 +38 -0
- package/README.md +2 -3
- package/dist-cjs/Connect.js +90 -0
- package/dist-cjs/commands/AssociateDefaultVocabularyCommand.js +36 -0
- package/dist-cjs/commands/CreateVocabularyCommand.js +36 -0
- package/dist-cjs/commands/DeleteVocabularyCommand.js +36 -0
- package/dist-cjs/commands/DescribeVocabularyCommand.js +36 -0
- package/dist-cjs/commands/ListDefaultVocabulariesCommand.js +36 -0
- package/dist-cjs/commands/SearchVocabulariesCommand.js +36 -0
- package/dist-cjs/commands/StartOutboundVoiceContactCommand.js +3 -3
- package/dist-cjs/commands/StartTaskContactCommand.js +3 -3
- package/dist-cjs/commands/StopContactCommand.js +3 -3
- package/dist-cjs/commands/StopContactRecordingCommand.js +3 -3
- package/dist-cjs/commands/StopContactStreamingCommand.js +3 -3
- package/dist-cjs/commands/SuspendContactRecordingCommand.js +3 -3
- package/dist-cjs/commands/index.js +6 -0
- package/dist-cjs/models/models_0.js +127 -95
- package/dist-cjs/models/models_1.js +91 -1
- package/dist-cjs/pagination/ListDefaultVocabulariesPaginator.js +35 -0
- package/dist-cjs/pagination/SearchVocabulariesPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +800 -7
- package/dist-es/Connect.js +90 -0
- package/dist-es/commands/AssociateDefaultVocabularyCommand.js +39 -0
- package/dist-es/commands/CreateVocabularyCommand.js +39 -0
- package/dist-es/commands/DeleteVocabularyCommand.js +39 -0
- package/dist-es/commands/DescribeVocabularyCommand.js +39 -0
- package/dist-es/commands/ListDefaultVocabulariesCommand.js +39 -0
- package/dist-es/commands/SearchVocabulariesCommand.js +39 -0
- package/dist-es/commands/StartOutboundVoiceContactCommand.js +1 -1
- package/dist-es/commands/StartTaskContactCommand.js +1 -1
- package/dist-es/commands/StopContactCommand.js +1 -1
- package/dist-es/commands/StopContactRecordingCommand.js +1 -1
- package/dist-es/commands/StopContactStreamingCommand.js +1 -1
- package/dist-es/commands/SuspendContactRecordingCommand.js +1 -1
- package/dist-es/commands/index.js +6 -0
- package/dist-es/models/models_0.js +91 -61
- package/dist-es/models/models_1.js +61 -0
- package/dist-es/pagination/ListDefaultVocabulariesPaginator.js +74 -0
- package/dist-es/pagination/SearchVocabulariesPaginator.js +74 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +948 -63
- package/dist-types/Connect.d.ts +63 -16
- package/dist-types/ConnectClient.d.ts +10 -5
- package/dist-types/commands/AssociateDefaultVocabularyCommand.d.ts +35 -0
- package/dist-types/commands/CreateIntegrationAssociationCommand.d.ts +1 -1
- package/dist-types/commands/CreateVocabularyCommand.d.ts +37 -0
- package/dist-types/commands/DeleteIntegrationAssociationCommand.d.ts +2 -2
- package/dist-types/commands/DeleteVocabularyCommand.d.ts +35 -0
- package/dist-types/commands/DescribeVocabularyCommand.d.ts +35 -0
- package/dist-types/commands/ListBotsCommand.d.ts +2 -2
- package/dist-types/commands/ListDefaultVocabulariesCommand.d.ts +35 -0
- package/dist-types/commands/ListIntegrationAssociationsCommand.d.ts +2 -2
- package/dist-types/commands/SearchVocabulariesCommand.d.ts +35 -0
- package/dist-types/commands/StartChatContactCommand.d.ts +4 -1
- package/dist-types/commands/StartContactStreamingCommand.d.ts +1 -1
- package/dist-types/commands/StartOutboundVoiceContactCommand.d.ts +4 -3
- package/dist-types/commands/StartTaskContactCommand.d.ts +1 -1
- package/dist-types/commands/StopContactCommand.d.ts +1 -1
- package/dist-types/commands/StopContactRecordingCommand.d.ts +1 -1
- package/dist-types/commands/StopContactStreamingCommand.d.ts +1 -1
- package/dist-types/commands/SuspendContactRecordingCommand.d.ts +1 -1
- package/dist-types/commands/TagResourceCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +6 -0
- package/dist-types/models/models_0.d.ts +445 -347
- package/dist-types/models/models_1.d.ts +337 -2
- package/dist-types/pagination/ListDefaultVocabulariesPaginator.d.ts +4 -0
- package/dist-types/pagination/SearchVocabulariesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -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/AssociateDefaultVocabularyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateVocabularyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteVocabularyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeVocabularyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListDefaultVocabulariesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/SearchVocabulariesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartOutboundVoiceContactCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StartTaskContactCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StopContactCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StopContactRecordingCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StopContactStreamingCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/SuspendContactRecordingCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/index.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +244 -182
- package/dist-types/ts3.4/models/models_1.d.ts +184 -1
- package/dist-types/ts3.4/pagination/ListDefaultVocabulariesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/SearchVocabulariesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +18 -0
- package/package.json +39 -33
|
@@ -72,6 +72,51 @@ export var serializeAws_restJson1AssociateBotCommand = function (input, context)
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
}); };
|
|
75
|
+
export var serializeAws_restJson1AssociateDefaultVocabularyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
77
|
+
return __generator(this, function (_c) {
|
|
78
|
+
switch (_c.label) {
|
|
79
|
+
case 0: return [4, context.endpoint()];
|
|
80
|
+
case 1:
|
|
81
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
82
|
+
headers = {
|
|
83
|
+
"content-type": "application/json",
|
|
84
|
+
};
|
|
85
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
86
|
+
"/default-vocabulary/{InstanceId}/{LanguageCode}";
|
|
87
|
+
if (input.InstanceId !== undefined) {
|
|
88
|
+
labelValue = input.InstanceId;
|
|
89
|
+
if (labelValue.length <= 0) {
|
|
90
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
91
|
+
}
|
|
92
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
96
|
+
}
|
|
97
|
+
if (input.LanguageCode !== undefined) {
|
|
98
|
+
labelValue = input.LanguageCode;
|
|
99
|
+
if (labelValue.length <= 0) {
|
|
100
|
+
throw new Error("Empty value provided for input HTTP label: LanguageCode.");
|
|
101
|
+
}
|
|
102
|
+
resolvedPath = resolvedPath.replace("{LanguageCode}", __extendedEncodeURIComponent(labelValue));
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
throw new Error("No value provided for input HTTP label: LanguageCode.");
|
|
106
|
+
}
|
|
107
|
+
body = JSON.stringify(__assign({}, (input.VocabularyId !== undefined && input.VocabularyId !== null && { VocabularyId: input.VocabularyId })));
|
|
108
|
+
return [2, new __HttpRequest({
|
|
109
|
+
protocol: protocol,
|
|
110
|
+
hostname: hostname,
|
|
111
|
+
port: port,
|
|
112
|
+
method: "PUT",
|
|
113
|
+
headers: headers,
|
|
114
|
+
path: resolvedPath,
|
|
115
|
+
body: body,
|
|
116
|
+
})];
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}); };
|
|
75
120
|
export var serializeAws_restJson1AssociateInstanceStorageConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
121
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
77
122
|
return __generator(this, function (_c) {
|
|
@@ -777,7 +822,7 @@ export var serializeAws_restJson1CreateUserHierarchyGroupCommand = function (inp
|
|
|
777
822
|
else {
|
|
778
823
|
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
779
824
|
}
|
|
780
|
-
body = JSON.stringify(__assign(__assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.ParentGroupId !== undefined && input.ParentGroupId !== null && { ParentGroupId: input.ParentGroupId })));
|
|
825
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.ParentGroupId !== undefined && input.ParentGroupId !== null && { ParentGroupId: input.ParentGroupId })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
781
826
|
return [2, new __HttpRequest({
|
|
782
827
|
protocol: protocol,
|
|
783
828
|
hostname: hostname,
|
|
@@ -790,6 +835,42 @@ export var serializeAws_restJson1CreateUserHierarchyGroupCommand = function (inp
|
|
|
790
835
|
}
|
|
791
836
|
});
|
|
792
837
|
}); };
|
|
838
|
+
export var serializeAws_restJson1CreateVocabularyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
839
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
840
|
+
var _c;
|
|
841
|
+
return __generator(this, function (_d) {
|
|
842
|
+
switch (_d.label) {
|
|
843
|
+
case 0: return [4, context.endpoint()];
|
|
844
|
+
case 1:
|
|
845
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
846
|
+
headers = {
|
|
847
|
+
"content-type": "application/json",
|
|
848
|
+
};
|
|
849
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/vocabulary/{InstanceId}";
|
|
850
|
+
if (input.InstanceId !== undefined) {
|
|
851
|
+
labelValue = input.InstanceId;
|
|
852
|
+
if (labelValue.length <= 0) {
|
|
853
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
854
|
+
}
|
|
855
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
856
|
+
}
|
|
857
|
+
else {
|
|
858
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
859
|
+
}
|
|
860
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Content !== undefined && input.Content !== null && { Content: input.Content })), (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })), (input.VocabularyName !== undefined &&
|
|
861
|
+
input.VocabularyName !== null && { VocabularyName: input.VocabularyName })));
|
|
862
|
+
return [2, new __HttpRequest({
|
|
863
|
+
protocol: protocol,
|
|
864
|
+
hostname: hostname,
|
|
865
|
+
port: port,
|
|
866
|
+
method: "POST",
|
|
867
|
+
headers: headers,
|
|
868
|
+
path: resolvedPath,
|
|
869
|
+
body: body,
|
|
870
|
+
})];
|
|
871
|
+
}
|
|
872
|
+
});
|
|
873
|
+
}); };
|
|
793
874
|
export var serializeAws_restJson1DeleteContactFlowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
794
875
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
795
876
|
return __generator(this, function (_c) {
|
|
@@ -1208,6 +1289,48 @@ export var serializeAws_restJson1DeleteUserHierarchyGroupCommand = function (inp
|
|
|
1208
1289
|
}
|
|
1209
1290
|
});
|
|
1210
1291
|
}); };
|
|
1292
|
+
export var serializeAws_restJson1DeleteVocabularyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1293
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1294
|
+
return __generator(this, function (_c) {
|
|
1295
|
+
switch (_c.label) {
|
|
1296
|
+
case 0: return [4, context.endpoint()];
|
|
1297
|
+
case 1:
|
|
1298
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1299
|
+
headers = {};
|
|
1300
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
1301
|
+
"/vocabulary-remove/{InstanceId}/{VocabularyId}";
|
|
1302
|
+
if (input.InstanceId !== undefined) {
|
|
1303
|
+
labelValue = input.InstanceId;
|
|
1304
|
+
if (labelValue.length <= 0) {
|
|
1305
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
1306
|
+
}
|
|
1307
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
1308
|
+
}
|
|
1309
|
+
else {
|
|
1310
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
1311
|
+
}
|
|
1312
|
+
if (input.VocabularyId !== undefined) {
|
|
1313
|
+
labelValue = input.VocabularyId;
|
|
1314
|
+
if (labelValue.length <= 0) {
|
|
1315
|
+
throw new Error("Empty value provided for input HTTP label: VocabularyId.");
|
|
1316
|
+
}
|
|
1317
|
+
resolvedPath = resolvedPath.replace("{VocabularyId}", __extendedEncodeURIComponent(labelValue));
|
|
1318
|
+
}
|
|
1319
|
+
else {
|
|
1320
|
+
throw new Error("No value provided for input HTTP label: VocabularyId.");
|
|
1321
|
+
}
|
|
1322
|
+
return [2, new __HttpRequest({
|
|
1323
|
+
protocol: protocol,
|
|
1324
|
+
hostname: hostname,
|
|
1325
|
+
port: port,
|
|
1326
|
+
method: "POST",
|
|
1327
|
+
headers: headers,
|
|
1328
|
+
path: resolvedPath,
|
|
1329
|
+
body: body,
|
|
1330
|
+
})];
|
|
1331
|
+
}
|
|
1332
|
+
});
|
|
1333
|
+
}); };
|
|
1211
1334
|
export var serializeAws_restJson1DescribeAgentStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1212
1335
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1213
1336
|
return __generator(this, function (_c) {
|
|
@@ -1815,6 +1938,47 @@ export var serializeAws_restJson1DescribeUserHierarchyStructureCommand = functio
|
|
|
1815
1938
|
}
|
|
1816
1939
|
});
|
|
1817
1940
|
}); };
|
|
1941
|
+
export var serializeAws_restJson1DescribeVocabularyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1942
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1943
|
+
return __generator(this, function (_c) {
|
|
1944
|
+
switch (_c.label) {
|
|
1945
|
+
case 0: return [4, context.endpoint()];
|
|
1946
|
+
case 1:
|
|
1947
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1948
|
+
headers = {};
|
|
1949
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/vocabulary/{InstanceId}/{VocabularyId}";
|
|
1950
|
+
if (input.InstanceId !== undefined) {
|
|
1951
|
+
labelValue = input.InstanceId;
|
|
1952
|
+
if (labelValue.length <= 0) {
|
|
1953
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
1954
|
+
}
|
|
1955
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
1956
|
+
}
|
|
1957
|
+
else {
|
|
1958
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
1959
|
+
}
|
|
1960
|
+
if (input.VocabularyId !== undefined) {
|
|
1961
|
+
labelValue = input.VocabularyId;
|
|
1962
|
+
if (labelValue.length <= 0) {
|
|
1963
|
+
throw new Error("Empty value provided for input HTTP label: VocabularyId.");
|
|
1964
|
+
}
|
|
1965
|
+
resolvedPath = resolvedPath.replace("{VocabularyId}", __extendedEncodeURIComponent(labelValue));
|
|
1966
|
+
}
|
|
1967
|
+
else {
|
|
1968
|
+
throw new Error("No value provided for input HTTP label: VocabularyId.");
|
|
1969
|
+
}
|
|
1970
|
+
return [2, new __HttpRequest({
|
|
1971
|
+
protocol: protocol,
|
|
1972
|
+
hostname: hostname,
|
|
1973
|
+
port: port,
|
|
1974
|
+
method: "GET",
|
|
1975
|
+
headers: headers,
|
|
1976
|
+
path: resolvedPath,
|
|
1977
|
+
body: body,
|
|
1978
|
+
})];
|
|
1979
|
+
}
|
|
1980
|
+
});
|
|
1981
|
+
}); };
|
|
1818
1982
|
export var serializeAws_restJson1DisassociateApprovedOriginCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1819
1983
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
1820
1984
|
return __generator(this, function (_c) {
|
|
@@ -2501,6 +2665,40 @@ export var serializeAws_restJson1ListContactReferencesCommand = function (input,
|
|
|
2501
2665
|
}
|
|
2502
2666
|
});
|
|
2503
2667
|
}); };
|
|
2668
|
+
export var serializeAws_restJson1ListDefaultVocabulariesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2669
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
2670
|
+
return __generator(this, function (_c) {
|
|
2671
|
+
switch (_c.label) {
|
|
2672
|
+
case 0: return [4, context.endpoint()];
|
|
2673
|
+
case 1:
|
|
2674
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2675
|
+
headers = {
|
|
2676
|
+
"content-type": "application/json",
|
|
2677
|
+
};
|
|
2678
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/default-vocabulary-summary/{InstanceId}";
|
|
2679
|
+
if (input.InstanceId !== undefined) {
|
|
2680
|
+
labelValue = input.InstanceId;
|
|
2681
|
+
if (labelValue.length <= 0) {
|
|
2682
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
2683
|
+
}
|
|
2684
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
2685
|
+
}
|
|
2686
|
+
else {
|
|
2687
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
2688
|
+
}
|
|
2689
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })));
|
|
2690
|
+
return [2, new __HttpRequest({
|
|
2691
|
+
protocol: protocol,
|
|
2692
|
+
hostname: hostname,
|
|
2693
|
+
port: port,
|
|
2694
|
+
method: "POST",
|
|
2695
|
+
headers: headers,
|
|
2696
|
+
path: resolvedPath,
|
|
2697
|
+
body: body,
|
|
2698
|
+
})];
|
|
2699
|
+
}
|
|
2700
|
+
});
|
|
2701
|
+
}); };
|
|
2504
2702
|
export var serializeAws_restJson1ListHoursOfOperationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2505
2703
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2506
2704
|
return __generator(this, function (_c) {
|
|
@@ -3259,6 +3457,41 @@ export var serializeAws_restJson1ResumeContactRecordingCommand = function (input
|
|
|
3259
3457
|
}
|
|
3260
3458
|
});
|
|
3261
3459
|
}); };
|
|
3460
|
+
export var serializeAws_restJson1SearchVocabulariesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3461
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
3462
|
+
return __generator(this, function (_c) {
|
|
3463
|
+
switch (_c.label) {
|
|
3464
|
+
case 0: return [4, context.endpoint()];
|
|
3465
|
+
case 1:
|
|
3466
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3467
|
+
headers = {
|
|
3468
|
+
"content-type": "application/json",
|
|
3469
|
+
};
|
|
3470
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/vocabulary-summary/{InstanceId}";
|
|
3471
|
+
if (input.InstanceId !== undefined) {
|
|
3472
|
+
labelValue = input.InstanceId;
|
|
3473
|
+
if (labelValue.length <= 0) {
|
|
3474
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
3475
|
+
}
|
|
3476
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
3477
|
+
}
|
|
3478
|
+
else {
|
|
3479
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3480
|
+
}
|
|
3481
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NameStartsWith !== undefined &&
|
|
3482
|
+
input.NameStartsWith !== null && { NameStartsWith: input.NameStartsWith })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.State !== undefined && input.State !== null && { State: input.State })));
|
|
3483
|
+
return [2, new __HttpRequest({
|
|
3484
|
+
protocol: protocol,
|
|
3485
|
+
hostname: hostname,
|
|
3486
|
+
port: port,
|
|
3487
|
+
method: "POST",
|
|
3488
|
+
headers: headers,
|
|
3489
|
+
path: resolvedPath,
|
|
3490
|
+
body: body,
|
|
3491
|
+
})];
|
|
3492
|
+
}
|
|
3493
|
+
});
|
|
3494
|
+
}); };
|
|
3262
3495
|
export var serializeAws_restJson1StartChatContactCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3263
3496
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
3264
3497
|
var _c;
|
|
@@ -3271,8 +3504,9 @@ export var serializeAws_restJson1StartChatContactCommand = function (input, cont
|
|
|
3271
3504
|
"content-type": "application/json",
|
|
3272
3505
|
};
|
|
3273
3506
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/chat";
|
|
3274
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Attributes !== undefined &&
|
|
3275
|
-
input.Attributes !== null && { Attributes: serializeAws_restJson1Attributes(input.Attributes, context) })),
|
|
3507
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Attributes !== undefined &&
|
|
3508
|
+
input.Attributes !== null && { Attributes: serializeAws_restJson1Attributes(input.Attributes, context) })), (input.ChatDurationInMinutes !== undefined &&
|
|
3509
|
+
input.ChatDurationInMinutes !== null && { ChatDurationInMinutes: input.ChatDurationInMinutes })), { ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId })), (input.InitialMessage !== undefined &&
|
|
3276
3510
|
input.InitialMessage !== null && {
|
|
3277
3511
|
InitialMessage: serializeAws_restJson1ChatMessage(input.InitialMessage, context),
|
|
3278
3512
|
})), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })), (input.ParticipantDetails !== undefined &&
|
|
@@ -5156,66 +5390,154 @@ var deserializeAws_restJson1AssociateBotCommandError = function (output, context
|
|
|
5156
5390
|
}
|
|
5157
5391
|
});
|
|
5158
5392
|
}); };
|
|
5159
|
-
export var
|
|
5160
|
-
var contents
|
|
5161
|
-
return __generator(this, function (
|
|
5162
|
-
switch (
|
|
5393
|
+
export var deserializeAws_restJson1AssociateDefaultVocabularyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5394
|
+
var contents;
|
|
5395
|
+
return __generator(this, function (_a) {
|
|
5396
|
+
switch (_a.label) {
|
|
5163
5397
|
case 0:
|
|
5164
5398
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5165
|
-
return [2,
|
|
5399
|
+
return [2, deserializeAws_restJson1AssociateDefaultVocabularyCommandError(output, context)];
|
|
5166
5400
|
}
|
|
5167
5401
|
contents = {
|
|
5168
5402
|
$metadata: deserializeMetadata(output),
|
|
5169
|
-
AssociationId: undefined,
|
|
5170
5403
|
};
|
|
5171
|
-
|
|
5172
|
-
_b = __expectObject;
|
|
5173
|
-
return [4, parseBody(output.body, context)];
|
|
5404
|
+
return [4, collectBody(output.body, context)];
|
|
5174
5405
|
case 1:
|
|
5175
|
-
|
|
5176
|
-
if (data.AssociationId !== undefined && data.AssociationId !== null) {
|
|
5177
|
-
contents.AssociationId = __expectString(data.AssociationId);
|
|
5178
|
-
}
|
|
5406
|
+
_a.sent();
|
|
5179
5407
|
return [2, Promise.resolve(contents)];
|
|
5180
5408
|
}
|
|
5181
5409
|
});
|
|
5182
5410
|
}); };
|
|
5183
|
-
var
|
|
5184
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g,
|
|
5185
|
-
var
|
|
5186
|
-
return __generator(this, function (
|
|
5187
|
-
switch (
|
|
5411
|
+
var deserializeAws_restJson1AssociateDefaultVocabularyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5412
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
5413
|
+
var _h;
|
|
5414
|
+
return __generator(this, function (_j) {
|
|
5415
|
+
switch (_j.label) {
|
|
5188
5416
|
case 0:
|
|
5189
5417
|
_a = [__assign({}, output)];
|
|
5190
|
-
|
|
5418
|
+
_h = {};
|
|
5191
5419
|
return [4, parseBody(output.body, context)];
|
|
5192
5420
|
case 1:
|
|
5193
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
5421
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
5194
5422
|
errorCode = "UnknownError";
|
|
5195
5423
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5196
5424
|
_b = errorCode;
|
|
5197
5425
|
switch (_b) {
|
|
5198
|
-
case "
|
|
5199
|
-
case "com.amazonaws.connect#
|
|
5200
|
-
case "
|
|
5201
|
-
case "com.amazonaws.connect#
|
|
5426
|
+
case "AccessDeniedException": return [3, 2];
|
|
5427
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
5428
|
+
case "InternalServiceException": return [3, 4];
|
|
5429
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
5202
5430
|
case "InvalidRequestException": return [3, 6];
|
|
5203
5431
|
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
5204
|
-
case "
|
|
5205
|
-
case "com.amazonaws.connect#
|
|
5206
|
-
case "
|
|
5207
|
-
case "com.amazonaws.connect#
|
|
5208
|
-
case "ThrottlingException": return [3, 12];
|
|
5209
|
-
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
5432
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
5433
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
5434
|
+
case "ThrottlingException": return [3, 10];
|
|
5435
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
5210
5436
|
}
|
|
5211
|
-
return [3,
|
|
5437
|
+
return [3, 12];
|
|
5212
5438
|
case 2:
|
|
5213
5439
|
_c = [{}];
|
|
5214
|
-
return [4,
|
|
5440
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
5215
5441
|
case 3:
|
|
5216
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
5217
|
-
return [3,
|
|
5218
|
-
case 4:
|
|
5442
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5443
|
+
return [3, 13];
|
|
5444
|
+
case 4:
|
|
5445
|
+
_d = [{}];
|
|
5446
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
5447
|
+
case 5:
|
|
5448
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5449
|
+
return [3, 13];
|
|
5450
|
+
case 6:
|
|
5451
|
+
_e = [{}];
|
|
5452
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
5453
|
+
case 7:
|
|
5454
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5455
|
+
return [3, 13];
|
|
5456
|
+
case 8:
|
|
5457
|
+
_f = [{}];
|
|
5458
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
5459
|
+
case 9:
|
|
5460
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5461
|
+
return [3, 13];
|
|
5462
|
+
case 10:
|
|
5463
|
+
_g = [{}];
|
|
5464
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5465
|
+
case 11:
|
|
5466
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5467
|
+
return [3, 13];
|
|
5468
|
+
case 12:
|
|
5469
|
+
parsedBody = parsedOutput.body;
|
|
5470
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5471
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
5472
|
+
_j.label = 13;
|
|
5473
|
+
case 13:
|
|
5474
|
+
message = response.message || response.Message || errorCode;
|
|
5475
|
+
response.message = message;
|
|
5476
|
+
delete response.Message;
|
|
5477
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
5478
|
+
}
|
|
5479
|
+
});
|
|
5480
|
+
}); };
|
|
5481
|
+
export var deserializeAws_restJson1AssociateInstanceStorageConfigCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5482
|
+
var contents, data, _a, _b;
|
|
5483
|
+
return __generator(this, function (_c) {
|
|
5484
|
+
switch (_c.label) {
|
|
5485
|
+
case 0:
|
|
5486
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5487
|
+
return [2, deserializeAws_restJson1AssociateInstanceStorageConfigCommandError(output, context)];
|
|
5488
|
+
}
|
|
5489
|
+
contents = {
|
|
5490
|
+
$metadata: deserializeMetadata(output),
|
|
5491
|
+
AssociationId: undefined,
|
|
5492
|
+
};
|
|
5493
|
+
_a = __expectNonNull;
|
|
5494
|
+
_b = __expectObject;
|
|
5495
|
+
return [4, parseBody(output.body, context)];
|
|
5496
|
+
case 1:
|
|
5497
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
5498
|
+
if (data.AssociationId !== undefined && data.AssociationId !== null) {
|
|
5499
|
+
contents.AssociationId = __expectString(data.AssociationId);
|
|
5500
|
+
}
|
|
5501
|
+
return [2, Promise.resolve(contents)];
|
|
5502
|
+
}
|
|
5503
|
+
});
|
|
5504
|
+
}); };
|
|
5505
|
+
var deserializeAws_restJson1AssociateInstanceStorageConfigCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5506
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
5507
|
+
var _j;
|
|
5508
|
+
return __generator(this, function (_k) {
|
|
5509
|
+
switch (_k.label) {
|
|
5510
|
+
case 0:
|
|
5511
|
+
_a = [__assign({}, output)];
|
|
5512
|
+
_j = {};
|
|
5513
|
+
return [4, parseBody(output.body, context)];
|
|
5514
|
+
case 1:
|
|
5515
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
5516
|
+
errorCode = "UnknownError";
|
|
5517
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5518
|
+
_b = errorCode;
|
|
5519
|
+
switch (_b) {
|
|
5520
|
+
case "InternalServiceException": return [3, 2];
|
|
5521
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
5522
|
+
case "InvalidParameterException": return [3, 4];
|
|
5523
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
5524
|
+
case "InvalidRequestException": return [3, 6];
|
|
5525
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
5526
|
+
case "ResourceConflictException": return [3, 8];
|
|
5527
|
+
case "com.amazonaws.connect#ResourceConflictException": return [3, 8];
|
|
5528
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
5529
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
5530
|
+
case "ThrottlingException": return [3, 12];
|
|
5531
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
5532
|
+
}
|
|
5533
|
+
return [3, 14];
|
|
5534
|
+
case 2:
|
|
5535
|
+
_c = [{}];
|
|
5536
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
5537
|
+
case 3:
|
|
5538
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5539
|
+
return [3, 15];
|
|
5540
|
+
case 4:
|
|
5219
5541
|
_d = [{}];
|
|
5220
5542
|
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
5221
5543
|
case 5:
|
|
@@ -7226,6 +7548,124 @@ var deserializeAws_restJson1CreateUserHierarchyGroupCommandError = function (out
|
|
|
7226
7548
|
}
|
|
7227
7549
|
});
|
|
7228
7550
|
}); };
|
|
7551
|
+
export var deserializeAws_restJson1CreateVocabularyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7552
|
+
var contents, data, _a, _b;
|
|
7553
|
+
return __generator(this, function (_c) {
|
|
7554
|
+
switch (_c.label) {
|
|
7555
|
+
case 0:
|
|
7556
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7557
|
+
return [2, deserializeAws_restJson1CreateVocabularyCommandError(output, context)];
|
|
7558
|
+
}
|
|
7559
|
+
contents = {
|
|
7560
|
+
$metadata: deserializeMetadata(output),
|
|
7561
|
+
State: undefined,
|
|
7562
|
+
VocabularyArn: undefined,
|
|
7563
|
+
VocabularyId: undefined,
|
|
7564
|
+
};
|
|
7565
|
+
_a = __expectNonNull;
|
|
7566
|
+
_b = __expectObject;
|
|
7567
|
+
return [4, parseBody(output.body, context)];
|
|
7568
|
+
case 1:
|
|
7569
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
7570
|
+
if (data.State !== undefined && data.State !== null) {
|
|
7571
|
+
contents.State = __expectString(data.State);
|
|
7572
|
+
}
|
|
7573
|
+
if (data.VocabularyArn !== undefined && data.VocabularyArn !== null) {
|
|
7574
|
+
contents.VocabularyArn = __expectString(data.VocabularyArn);
|
|
7575
|
+
}
|
|
7576
|
+
if (data.VocabularyId !== undefined && data.VocabularyId !== null) {
|
|
7577
|
+
contents.VocabularyId = __expectString(data.VocabularyId);
|
|
7578
|
+
}
|
|
7579
|
+
return [2, Promise.resolve(contents)];
|
|
7580
|
+
}
|
|
7581
|
+
});
|
|
7582
|
+
}); };
|
|
7583
|
+
var deserializeAws_restJson1CreateVocabularyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7584
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
7585
|
+
var _k;
|
|
7586
|
+
return __generator(this, function (_l) {
|
|
7587
|
+
switch (_l.label) {
|
|
7588
|
+
case 0:
|
|
7589
|
+
_a = [__assign({}, output)];
|
|
7590
|
+
_k = {};
|
|
7591
|
+
return [4, parseBody(output.body, context)];
|
|
7592
|
+
case 1:
|
|
7593
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
7594
|
+
errorCode = "UnknownError";
|
|
7595
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7596
|
+
_b = errorCode;
|
|
7597
|
+
switch (_b) {
|
|
7598
|
+
case "AccessDeniedException": return [3, 2];
|
|
7599
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
7600
|
+
case "InternalServiceException": return [3, 4];
|
|
7601
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
7602
|
+
case "InvalidRequestException": return [3, 6];
|
|
7603
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
7604
|
+
case "ResourceConflictException": return [3, 8];
|
|
7605
|
+
case "com.amazonaws.connect#ResourceConflictException": return [3, 8];
|
|
7606
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
7607
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
7608
|
+
case "ServiceQuotaExceededException": return [3, 12];
|
|
7609
|
+
case "com.amazonaws.connect#ServiceQuotaExceededException": return [3, 12];
|
|
7610
|
+
case "ThrottlingException": return [3, 14];
|
|
7611
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 14];
|
|
7612
|
+
}
|
|
7613
|
+
return [3, 16];
|
|
7614
|
+
case 2:
|
|
7615
|
+
_c = [{}];
|
|
7616
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
7617
|
+
case 3:
|
|
7618
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7619
|
+
return [3, 17];
|
|
7620
|
+
case 4:
|
|
7621
|
+
_d = [{}];
|
|
7622
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
7623
|
+
case 5:
|
|
7624
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7625
|
+
return [3, 17];
|
|
7626
|
+
case 6:
|
|
7627
|
+
_e = [{}];
|
|
7628
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
7629
|
+
case 7:
|
|
7630
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7631
|
+
return [3, 17];
|
|
7632
|
+
case 8:
|
|
7633
|
+
_f = [{}];
|
|
7634
|
+
return [4, deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context)];
|
|
7635
|
+
case 9:
|
|
7636
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7637
|
+
return [3, 17];
|
|
7638
|
+
case 10:
|
|
7639
|
+
_g = [{}];
|
|
7640
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7641
|
+
case 11:
|
|
7642
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7643
|
+
return [3, 17];
|
|
7644
|
+
case 12:
|
|
7645
|
+
_h = [{}];
|
|
7646
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
7647
|
+
case 13:
|
|
7648
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7649
|
+
return [3, 17];
|
|
7650
|
+
case 14:
|
|
7651
|
+
_j = [{}];
|
|
7652
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7653
|
+
case 15:
|
|
7654
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7655
|
+
return [3, 17];
|
|
7656
|
+
case 16:
|
|
7657
|
+
parsedBody = parsedOutput.body;
|
|
7658
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7659
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
7660
|
+
_l.label = 17;
|
|
7661
|
+
case 17:
|
|
7662
|
+
message = response.message || response.Message || errorCode;
|
|
7663
|
+
response.message = message;
|
|
7664
|
+
delete response.Message;
|
|
7665
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
7666
|
+
}
|
|
7667
|
+
});
|
|
7668
|
+
}); };
|
|
7229
7669
|
export var deserializeAws_restJson1DeleteContactFlowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7230
7670
|
var contents;
|
|
7231
7671
|
return __generator(this, function (_a) {
|
|
@@ -8114,6 +8554,116 @@ var deserializeAws_restJson1DeleteUserHierarchyGroupCommandError = function (out
|
|
|
8114
8554
|
}
|
|
8115
8555
|
});
|
|
8116
8556
|
}); };
|
|
8557
|
+
export var deserializeAws_restJson1DeleteVocabularyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8558
|
+
var contents, data, _a, _b;
|
|
8559
|
+
return __generator(this, function (_c) {
|
|
8560
|
+
switch (_c.label) {
|
|
8561
|
+
case 0:
|
|
8562
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
8563
|
+
return [2, deserializeAws_restJson1DeleteVocabularyCommandError(output, context)];
|
|
8564
|
+
}
|
|
8565
|
+
contents = {
|
|
8566
|
+
$metadata: deserializeMetadata(output),
|
|
8567
|
+
State: undefined,
|
|
8568
|
+
VocabularyArn: undefined,
|
|
8569
|
+
VocabularyId: undefined,
|
|
8570
|
+
};
|
|
8571
|
+
_a = __expectNonNull;
|
|
8572
|
+
_b = __expectObject;
|
|
8573
|
+
return [4, parseBody(output.body, context)];
|
|
8574
|
+
case 1:
|
|
8575
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
8576
|
+
if (data.State !== undefined && data.State !== null) {
|
|
8577
|
+
contents.State = __expectString(data.State);
|
|
8578
|
+
}
|
|
8579
|
+
if (data.VocabularyArn !== undefined && data.VocabularyArn !== null) {
|
|
8580
|
+
contents.VocabularyArn = __expectString(data.VocabularyArn);
|
|
8581
|
+
}
|
|
8582
|
+
if (data.VocabularyId !== undefined && data.VocabularyId !== null) {
|
|
8583
|
+
contents.VocabularyId = __expectString(data.VocabularyId);
|
|
8584
|
+
}
|
|
8585
|
+
return [2, Promise.resolve(contents)];
|
|
8586
|
+
}
|
|
8587
|
+
});
|
|
8588
|
+
}); };
|
|
8589
|
+
var deserializeAws_restJson1DeleteVocabularyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8590
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
8591
|
+
var _j;
|
|
8592
|
+
return __generator(this, function (_k) {
|
|
8593
|
+
switch (_k.label) {
|
|
8594
|
+
case 0:
|
|
8595
|
+
_a = [__assign({}, output)];
|
|
8596
|
+
_j = {};
|
|
8597
|
+
return [4, parseBody(output.body, context)];
|
|
8598
|
+
case 1:
|
|
8599
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
8600
|
+
errorCode = "UnknownError";
|
|
8601
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8602
|
+
_b = errorCode;
|
|
8603
|
+
switch (_b) {
|
|
8604
|
+
case "AccessDeniedException": return [3, 2];
|
|
8605
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
8606
|
+
case "InternalServiceException": return [3, 4];
|
|
8607
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
8608
|
+
case "InvalidRequestException": return [3, 6];
|
|
8609
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
8610
|
+
case "ResourceInUseException": return [3, 8];
|
|
8611
|
+
case "com.amazonaws.connect#ResourceInUseException": return [3, 8];
|
|
8612
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
8613
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
8614
|
+
case "ThrottlingException": return [3, 12];
|
|
8615
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
8616
|
+
}
|
|
8617
|
+
return [3, 14];
|
|
8618
|
+
case 2:
|
|
8619
|
+
_c = [{}];
|
|
8620
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
8621
|
+
case 3:
|
|
8622
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8623
|
+
return [3, 15];
|
|
8624
|
+
case 4:
|
|
8625
|
+
_d = [{}];
|
|
8626
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
8627
|
+
case 5:
|
|
8628
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8629
|
+
return [3, 15];
|
|
8630
|
+
case 6:
|
|
8631
|
+
_e = [{}];
|
|
8632
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
8633
|
+
case 7:
|
|
8634
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8635
|
+
return [3, 15];
|
|
8636
|
+
case 8:
|
|
8637
|
+
_f = [{}];
|
|
8638
|
+
return [4, deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context)];
|
|
8639
|
+
case 9:
|
|
8640
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8641
|
+
return [3, 15];
|
|
8642
|
+
case 10:
|
|
8643
|
+
_g = [{}];
|
|
8644
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8645
|
+
case 11:
|
|
8646
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8647
|
+
return [3, 15];
|
|
8648
|
+
case 12:
|
|
8649
|
+
_h = [{}];
|
|
8650
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
8651
|
+
case 13:
|
|
8652
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8653
|
+
return [3, 15];
|
|
8654
|
+
case 14:
|
|
8655
|
+
parsedBody = parsedOutput.body;
|
|
8656
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
8657
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
8658
|
+
_k.label = 15;
|
|
8659
|
+
case 15:
|
|
8660
|
+
message = response.message || response.Message || errorCode;
|
|
8661
|
+
response.message = message;
|
|
8662
|
+
delete response.Message;
|
|
8663
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
8664
|
+
}
|
|
8665
|
+
});
|
|
8666
|
+
}); };
|
|
8117
8667
|
export var deserializeAws_restJson1DescribeAgentStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8118
8668
|
var contents, data, _a, _b;
|
|
8119
8669
|
return __generator(this, function (_c) {
|
|
@@ -9172,7 +9722,101 @@ export var deserializeAws_restJson1DescribeSecurityProfileCommand = function (ou
|
|
|
9172
9722
|
}
|
|
9173
9723
|
});
|
|
9174
9724
|
}); };
|
|
9175
|
-
var deserializeAws_restJson1DescribeSecurityProfileCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9725
|
+
var deserializeAws_restJson1DescribeSecurityProfileCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9726
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
9727
|
+
var _h;
|
|
9728
|
+
return __generator(this, function (_j) {
|
|
9729
|
+
switch (_j.label) {
|
|
9730
|
+
case 0:
|
|
9731
|
+
_a = [__assign({}, output)];
|
|
9732
|
+
_h = {};
|
|
9733
|
+
return [4, parseBody(output.body, context)];
|
|
9734
|
+
case 1:
|
|
9735
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
9736
|
+
errorCode = "UnknownError";
|
|
9737
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
9738
|
+
_b = errorCode;
|
|
9739
|
+
switch (_b) {
|
|
9740
|
+
case "InternalServiceException": return [3, 2];
|
|
9741
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
9742
|
+
case "InvalidParameterException": return [3, 4];
|
|
9743
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
9744
|
+
case "InvalidRequestException": return [3, 6];
|
|
9745
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
9746
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
9747
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
9748
|
+
case "ThrottlingException": return [3, 10];
|
|
9749
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
9750
|
+
}
|
|
9751
|
+
return [3, 12];
|
|
9752
|
+
case 2:
|
|
9753
|
+
_c = [{}];
|
|
9754
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
9755
|
+
case 3:
|
|
9756
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9757
|
+
return [3, 13];
|
|
9758
|
+
case 4:
|
|
9759
|
+
_d = [{}];
|
|
9760
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
9761
|
+
case 5:
|
|
9762
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9763
|
+
return [3, 13];
|
|
9764
|
+
case 6:
|
|
9765
|
+
_e = [{}];
|
|
9766
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
9767
|
+
case 7:
|
|
9768
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9769
|
+
return [3, 13];
|
|
9770
|
+
case 8:
|
|
9771
|
+
_f = [{}];
|
|
9772
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
9773
|
+
case 9:
|
|
9774
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9775
|
+
return [3, 13];
|
|
9776
|
+
case 10:
|
|
9777
|
+
_g = [{}];
|
|
9778
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
9779
|
+
case 11:
|
|
9780
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9781
|
+
return [3, 13];
|
|
9782
|
+
case 12:
|
|
9783
|
+
parsedBody = parsedOutput.body;
|
|
9784
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
9785
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
9786
|
+
_j.label = 13;
|
|
9787
|
+
case 13:
|
|
9788
|
+
message = response.message || response.Message || errorCode;
|
|
9789
|
+
response.message = message;
|
|
9790
|
+
delete response.Message;
|
|
9791
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
9792
|
+
}
|
|
9793
|
+
});
|
|
9794
|
+
}); };
|
|
9795
|
+
export var deserializeAws_restJson1DescribeUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9796
|
+
var contents, data, _a, _b;
|
|
9797
|
+
return __generator(this, function (_c) {
|
|
9798
|
+
switch (_c.label) {
|
|
9799
|
+
case 0:
|
|
9800
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
9801
|
+
return [2, deserializeAws_restJson1DescribeUserCommandError(output, context)];
|
|
9802
|
+
}
|
|
9803
|
+
contents = {
|
|
9804
|
+
$metadata: deserializeMetadata(output),
|
|
9805
|
+
User: undefined,
|
|
9806
|
+
};
|
|
9807
|
+
_a = __expectNonNull;
|
|
9808
|
+
_b = __expectObject;
|
|
9809
|
+
return [4, parseBody(output.body, context)];
|
|
9810
|
+
case 1:
|
|
9811
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
9812
|
+
if (data.User !== undefined && data.User !== null) {
|
|
9813
|
+
contents.User = deserializeAws_restJson1User(data.User, context);
|
|
9814
|
+
}
|
|
9815
|
+
return [2, Promise.resolve(contents)];
|
|
9816
|
+
}
|
|
9817
|
+
});
|
|
9818
|
+
}); };
|
|
9819
|
+
var deserializeAws_restJson1DescribeUserCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9176
9820
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
9177
9821
|
var _h;
|
|
9178
9822
|
return __generator(this, function (_j) {
|
|
@@ -9242,31 +9886,31 @@ var deserializeAws_restJson1DescribeSecurityProfileCommandError = function (outp
|
|
|
9242
9886
|
}
|
|
9243
9887
|
});
|
|
9244
9888
|
}); };
|
|
9245
|
-
export var
|
|
9889
|
+
export var deserializeAws_restJson1DescribeUserHierarchyGroupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9246
9890
|
var contents, data, _a, _b;
|
|
9247
9891
|
return __generator(this, function (_c) {
|
|
9248
9892
|
switch (_c.label) {
|
|
9249
9893
|
case 0:
|
|
9250
9894
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
9251
|
-
return [2,
|
|
9895
|
+
return [2, deserializeAws_restJson1DescribeUserHierarchyGroupCommandError(output, context)];
|
|
9252
9896
|
}
|
|
9253
9897
|
contents = {
|
|
9254
9898
|
$metadata: deserializeMetadata(output),
|
|
9255
|
-
|
|
9899
|
+
HierarchyGroup: undefined,
|
|
9256
9900
|
};
|
|
9257
9901
|
_a = __expectNonNull;
|
|
9258
9902
|
_b = __expectObject;
|
|
9259
9903
|
return [4, parseBody(output.body, context)];
|
|
9260
9904
|
case 1:
|
|
9261
9905
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
9262
|
-
if (data.
|
|
9263
|
-
contents.
|
|
9906
|
+
if (data.HierarchyGroup !== undefined && data.HierarchyGroup !== null) {
|
|
9907
|
+
contents.HierarchyGroup = deserializeAws_restJson1HierarchyGroup(data.HierarchyGroup, context);
|
|
9264
9908
|
}
|
|
9265
9909
|
return [2, Promise.resolve(contents)];
|
|
9266
9910
|
}
|
|
9267
9911
|
});
|
|
9268
9912
|
}); };
|
|
9269
|
-
var
|
|
9913
|
+
var deserializeAws_restJson1DescribeUserHierarchyGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9270
9914
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
9271
9915
|
var _h;
|
|
9272
9916
|
return __generator(this, function (_j) {
|
|
@@ -9336,31 +9980,31 @@ var deserializeAws_restJson1DescribeUserCommandError = function (output, context
|
|
|
9336
9980
|
}
|
|
9337
9981
|
});
|
|
9338
9982
|
}); };
|
|
9339
|
-
export var
|
|
9983
|
+
export var deserializeAws_restJson1DescribeUserHierarchyStructureCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9340
9984
|
var contents, data, _a, _b;
|
|
9341
9985
|
return __generator(this, function (_c) {
|
|
9342
9986
|
switch (_c.label) {
|
|
9343
9987
|
case 0:
|
|
9344
9988
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
9345
|
-
return [2,
|
|
9989
|
+
return [2, deserializeAws_restJson1DescribeUserHierarchyStructureCommandError(output, context)];
|
|
9346
9990
|
}
|
|
9347
9991
|
contents = {
|
|
9348
9992
|
$metadata: deserializeMetadata(output),
|
|
9349
|
-
|
|
9993
|
+
HierarchyStructure: undefined,
|
|
9350
9994
|
};
|
|
9351
9995
|
_a = __expectNonNull;
|
|
9352
9996
|
_b = __expectObject;
|
|
9353
9997
|
return [4, parseBody(output.body, context)];
|
|
9354
9998
|
case 1:
|
|
9355
9999
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
9356
|
-
if (data.
|
|
9357
|
-
contents.
|
|
10000
|
+
if (data.HierarchyStructure !== undefined && data.HierarchyStructure !== null) {
|
|
10001
|
+
contents.HierarchyStructure = deserializeAws_restJson1HierarchyStructure(data.HierarchyStructure, context);
|
|
9358
10002
|
}
|
|
9359
10003
|
return [2, Promise.resolve(contents)];
|
|
9360
10004
|
}
|
|
9361
10005
|
});
|
|
9362
10006
|
}); };
|
|
9363
|
-
var
|
|
10007
|
+
var deserializeAws_restJson1DescribeUserHierarchyStructureCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9364
10008
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
9365
10009
|
var _h;
|
|
9366
10010
|
return __generator(this, function (_j) {
|
|
@@ -9430,31 +10074,31 @@ var deserializeAws_restJson1DescribeUserHierarchyGroupCommandError = function (o
|
|
|
9430
10074
|
}
|
|
9431
10075
|
});
|
|
9432
10076
|
}); };
|
|
9433
|
-
export var
|
|
10077
|
+
export var deserializeAws_restJson1DescribeVocabularyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9434
10078
|
var contents, data, _a, _b;
|
|
9435
10079
|
return __generator(this, function (_c) {
|
|
9436
10080
|
switch (_c.label) {
|
|
9437
10081
|
case 0:
|
|
9438
10082
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
9439
|
-
return [2,
|
|
10083
|
+
return [2, deserializeAws_restJson1DescribeVocabularyCommandError(output, context)];
|
|
9440
10084
|
}
|
|
9441
10085
|
contents = {
|
|
9442
10086
|
$metadata: deserializeMetadata(output),
|
|
9443
|
-
|
|
10087
|
+
Vocabulary: undefined,
|
|
9444
10088
|
};
|
|
9445
10089
|
_a = __expectNonNull;
|
|
9446
10090
|
_b = __expectObject;
|
|
9447
10091
|
return [4, parseBody(output.body, context)];
|
|
9448
10092
|
case 1:
|
|
9449
10093
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
9450
|
-
if (data.
|
|
9451
|
-
contents.
|
|
10094
|
+
if (data.Vocabulary !== undefined && data.Vocabulary !== null) {
|
|
10095
|
+
contents.Vocabulary = deserializeAws_restJson1Vocabulary(data.Vocabulary, context);
|
|
9452
10096
|
}
|
|
9453
10097
|
return [2, Promise.resolve(contents)];
|
|
9454
10098
|
}
|
|
9455
10099
|
});
|
|
9456
10100
|
}); };
|
|
9457
|
-
var
|
|
10101
|
+
var deserializeAws_restJson1DescribeVocabularyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9458
10102
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
9459
10103
|
var _h;
|
|
9460
10104
|
return __generator(this, function (_j) {
|
|
@@ -9469,10 +10113,10 @@ var deserializeAws_restJson1DescribeUserHierarchyStructureCommandError = functio
|
|
|
9469
10113
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
9470
10114
|
_b = errorCode;
|
|
9471
10115
|
switch (_b) {
|
|
9472
|
-
case "
|
|
9473
|
-
case "com.amazonaws.connect#
|
|
9474
|
-
case "
|
|
9475
|
-
case "com.amazonaws.connect#
|
|
10116
|
+
case "AccessDeniedException": return [3, 2];
|
|
10117
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
10118
|
+
case "InternalServiceException": return [3, 4];
|
|
10119
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
9476
10120
|
case "InvalidRequestException": return [3, 6];
|
|
9477
10121
|
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
9478
10122
|
case "ResourceNotFoundException": return [3, 8];
|
|
@@ -9483,13 +10127,13 @@ var deserializeAws_restJson1DescribeUserHierarchyStructureCommandError = functio
|
|
|
9483
10127
|
return [3, 12];
|
|
9484
10128
|
case 2:
|
|
9485
10129
|
_c = [{}];
|
|
9486
|
-
return [4,
|
|
10130
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
9487
10131
|
case 3:
|
|
9488
10132
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9489
10133
|
return [3, 13];
|
|
9490
10134
|
case 4:
|
|
9491
10135
|
_d = [{}];
|
|
9492
|
-
return [4,
|
|
10136
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
9493
10137
|
case 5:
|
|
9494
10138
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
9495
10139
|
return [3, 13];
|
|
@@ -11188,6 +11832,96 @@ var deserializeAws_restJson1ListContactReferencesCommandError = function (output
|
|
|
11188
11832
|
}
|
|
11189
11833
|
});
|
|
11190
11834
|
}); };
|
|
11835
|
+
export var deserializeAws_restJson1ListDefaultVocabulariesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11836
|
+
var contents, data, _a, _b;
|
|
11837
|
+
return __generator(this, function (_c) {
|
|
11838
|
+
switch (_c.label) {
|
|
11839
|
+
case 0:
|
|
11840
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
11841
|
+
return [2, deserializeAws_restJson1ListDefaultVocabulariesCommandError(output, context)];
|
|
11842
|
+
}
|
|
11843
|
+
contents = {
|
|
11844
|
+
$metadata: deserializeMetadata(output),
|
|
11845
|
+
DefaultVocabularyList: undefined,
|
|
11846
|
+
NextToken: undefined,
|
|
11847
|
+
};
|
|
11848
|
+
_a = __expectNonNull;
|
|
11849
|
+
_b = __expectObject;
|
|
11850
|
+
return [4, parseBody(output.body, context)];
|
|
11851
|
+
case 1:
|
|
11852
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
11853
|
+
if (data.DefaultVocabularyList !== undefined && data.DefaultVocabularyList !== null) {
|
|
11854
|
+
contents.DefaultVocabularyList = deserializeAws_restJson1DefaultVocabularyList(data.DefaultVocabularyList, context);
|
|
11855
|
+
}
|
|
11856
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
11857
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
11858
|
+
}
|
|
11859
|
+
return [2, Promise.resolve(contents)];
|
|
11860
|
+
}
|
|
11861
|
+
});
|
|
11862
|
+
}); };
|
|
11863
|
+
var deserializeAws_restJson1ListDefaultVocabulariesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11864
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
11865
|
+
var _g;
|
|
11866
|
+
return __generator(this, function (_h) {
|
|
11867
|
+
switch (_h.label) {
|
|
11868
|
+
case 0:
|
|
11869
|
+
_a = [__assign({}, output)];
|
|
11870
|
+
_g = {};
|
|
11871
|
+
return [4, parseBody(output.body, context)];
|
|
11872
|
+
case 1:
|
|
11873
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
11874
|
+
errorCode = "UnknownError";
|
|
11875
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
11876
|
+
_b = errorCode;
|
|
11877
|
+
switch (_b) {
|
|
11878
|
+
case "AccessDeniedException": return [3, 2];
|
|
11879
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
11880
|
+
case "InternalServiceException": return [3, 4];
|
|
11881
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
11882
|
+
case "InvalidRequestException": return [3, 6];
|
|
11883
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
11884
|
+
case "ThrottlingException": return [3, 8];
|
|
11885
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 8];
|
|
11886
|
+
}
|
|
11887
|
+
return [3, 10];
|
|
11888
|
+
case 2:
|
|
11889
|
+
_c = [{}];
|
|
11890
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
11891
|
+
case 3:
|
|
11892
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11893
|
+
return [3, 11];
|
|
11894
|
+
case 4:
|
|
11895
|
+
_d = [{}];
|
|
11896
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
11897
|
+
case 5:
|
|
11898
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11899
|
+
return [3, 11];
|
|
11900
|
+
case 6:
|
|
11901
|
+
_e = [{}];
|
|
11902
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
11903
|
+
case 7:
|
|
11904
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11905
|
+
return [3, 11];
|
|
11906
|
+
case 8:
|
|
11907
|
+
_f = [{}];
|
|
11908
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
11909
|
+
case 9:
|
|
11910
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
11911
|
+
return [3, 11];
|
|
11912
|
+
case 10:
|
|
11913
|
+
parsedBody = parsedOutput.body;
|
|
11914
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
11915
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
11916
|
+
_h.label = 11;
|
|
11917
|
+
case 11:
|
|
11918
|
+
message = response.message || response.Message || errorCode;
|
|
11919
|
+
response.message = message;
|
|
11920
|
+
delete response.Message;
|
|
11921
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
11922
|
+
}
|
|
11923
|
+
});
|
|
11924
|
+
}); };
|
|
11191
11925
|
export var deserializeAws_restJson1ListHoursOfOperationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11192
11926
|
var contents, data, _a, _b;
|
|
11193
11927
|
return __generator(this, function (_c) {
|
|
@@ -13274,6 +14008,96 @@ var deserializeAws_restJson1ResumeContactRecordingCommandError = function (outpu
|
|
|
13274
14008
|
}
|
|
13275
14009
|
});
|
|
13276
14010
|
}); };
|
|
14011
|
+
export var deserializeAws_restJson1SearchVocabulariesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14012
|
+
var contents, data, _a, _b;
|
|
14013
|
+
return __generator(this, function (_c) {
|
|
14014
|
+
switch (_c.label) {
|
|
14015
|
+
case 0:
|
|
14016
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14017
|
+
return [2, deserializeAws_restJson1SearchVocabulariesCommandError(output, context)];
|
|
14018
|
+
}
|
|
14019
|
+
contents = {
|
|
14020
|
+
$metadata: deserializeMetadata(output),
|
|
14021
|
+
NextToken: undefined,
|
|
14022
|
+
VocabularySummaryList: undefined,
|
|
14023
|
+
};
|
|
14024
|
+
_a = __expectNonNull;
|
|
14025
|
+
_b = __expectObject;
|
|
14026
|
+
return [4, parseBody(output.body, context)];
|
|
14027
|
+
case 1:
|
|
14028
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
14029
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
14030
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
14031
|
+
}
|
|
14032
|
+
if (data.VocabularySummaryList !== undefined && data.VocabularySummaryList !== null) {
|
|
14033
|
+
contents.VocabularySummaryList = deserializeAws_restJson1VocabularySummaryList(data.VocabularySummaryList, context);
|
|
14034
|
+
}
|
|
14035
|
+
return [2, Promise.resolve(contents)];
|
|
14036
|
+
}
|
|
14037
|
+
});
|
|
14038
|
+
}); };
|
|
14039
|
+
var deserializeAws_restJson1SearchVocabulariesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14040
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
14041
|
+
var _g;
|
|
14042
|
+
return __generator(this, function (_h) {
|
|
14043
|
+
switch (_h.label) {
|
|
14044
|
+
case 0:
|
|
14045
|
+
_a = [__assign({}, output)];
|
|
14046
|
+
_g = {};
|
|
14047
|
+
return [4, parseBody(output.body, context)];
|
|
14048
|
+
case 1:
|
|
14049
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
14050
|
+
errorCode = "UnknownError";
|
|
14051
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14052
|
+
_b = errorCode;
|
|
14053
|
+
switch (_b) {
|
|
14054
|
+
case "AccessDeniedException": return [3, 2];
|
|
14055
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
14056
|
+
case "InternalServiceException": return [3, 4];
|
|
14057
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
14058
|
+
case "InvalidRequestException": return [3, 6];
|
|
14059
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
14060
|
+
case "ThrottlingException": return [3, 8];
|
|
14061
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 8];
|
|
14062
|
+
}
|
|
14063
|
+
return [3, 10];
|
|
14064
|
+
case 2:
|
|
14065
|
+
_c = [{}];
|
|
14066
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
14067
|
+
case 3:
|
|
14068
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14069
|
+
return [3, 11];
|
|
14070
|
+
case 4:
|
|
14071
|
+
_d = [{}];
|
|
14072
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14073
|
+
case 5:
|
|
14074
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14075
|
+
return [3, 11];
|
|
14076
|
+
case 6:
|
|
14077
|
+
_e = [{}];
|
|
14078
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14079
|
+
case 7:
|
|
14080
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14081
|
+
return [3, 11];
|
|
14082
|
+
case 8:
|
|
14083
|
+
_f = [{}];
|
|
14084
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14085
|
+
case 9:
|
|
14086
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14087
|
+
return [3, 11];
|
|
14088
|
+
case 10:
|
|
14089
|
+
parsedBody = parsedOutput.body;
|
|
14090
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14091
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14092
|
+
_h.label = 11;
|
|
14093
|
+
case 11:
|
|
14094
|
+
message = response.message || response.Message || errorCode;
|
|
14095
|
+
response.message = message;
|
|
14096
|
+
delete response.Message;
|
|
14097
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14098
|
+
}
|
|
14099
|
+
});
|
|
14100
|
+
}); };
|
|
13277
14101
|
export var deserializeAws_restJson1StartChatContactCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13278
14102
|
var contents, data, _a, _b;
|
|
13279
14103
|
return __generator(this, function (_c) {
|
|
@@ -17921,6 +18745,24 @@ var deserializeAws_restJson1CurrentMetricResults = function (output, context) {
|
|
|
17921
18745
|
return deserializeAws_restJson1CurrentMetricResult(entry, context);
|
|
17922
18746
|
});
|
|
17923
18747
|
};
|
|
18748
|
+
var deserializeAws_restJson1DefaultVocabulary = function (output, context) {
|
|
18749
|
+
return {
|
|
18750
|
+
InstanceId: __expectString(output.InstanceId),
|
|
18751
|
+
LanguageCode: __expectString(output.LanguageCode),
|
|
18752
|
+
VocabularyId: __expectString(output.VocabularyId),
|
|
18753
|
+
VocabularyName: __expectString(output.VocabularyName),
|
|
18754
|
+
};
|
|
18755
|
+
};
|
|
18756
|
+
var deserializeAws_restJson1DefaultVocabularyList = function (output, context) {
|
|
18757
|
+
return (output || [])
|
|
18758
|
+
.filter(function (e) { return e != null; })
|
|
18759
|
+
.map(function (entry) {
|
|
18760
|
+
if (entry === null) {
|
|
18761
|
+
return null;
|
|
18762
|
+
}
|
|
18763
|
+
return deserializeAws_restJson1DefaultVocabulary(entry, context);
|
|
18764
|
+
});
|
|
18765
|
+
};
|
|
17924
18766
|
var deserializeAws_restJson1Dimensions = function (output, context) {
|
|
17925
18767
|
return {
|
|
17926
18768
|
Channel: __expectString(output.Channel),
|
|
@@ -17954,6 +18796,9 @@ var deserializeAws_restJson1HierarchyGroup = function (output, context) {
|
|
|
17954
18796
|
Id: __expectString(output.Id),
|
|
17955
18797
|
LevelId: __expectString(output.LevelId),
|
|
17956
18798
|
Name: __expectString(output.Name),
|
|
18799
|
+
Tags: output.Tags !== undefined && output.Tags !== null
|
|
18800
|
+
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
18801
|
+
: undefined,
|
|
17957
18802
|
};
|
|
17958
18803
|
};
|
|
17959
18804
|
var deserializeAws_restJson1HierarchyGroupSummary = function (output, context) {
|
|
@@ -18725,6 +19570,46 @@ var deserializeAws_restJson1UserSummaryList = function (output, context) {
|
|
|
18725
19570
|
return deserializeAws_restJson1UserSummary(entry, context);
|
|
18726
19571
|
});
|
|
18727
19572
|
};
|
|
19573
|
+
var deserializeAws_restJson1Vocabulary = function (output, context) {
|
|
19574
|
+
return {
|
|
19575
|
+
Arn: __expectString(output.Arn),
|
|
19576
|
+
Content: __expectString(output.Content),
|
|
19577
|
+
FailureReason: __expectString(output.FailureReason),
|
|
19578
|
+
Id: __expectString(output.Id),
|
|
19579
|
+
LanguageCode: __expectString(output.LanguageCode),
|
|
19580
|
+
LastModifiedTime: output.LastModifiedTime !== undefined && output.LastModifiedTime !== null
|
|
19581
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
|
|
19582
|
+
: undefined,
|
|
19583
|
+
Name: __expectString(output.Name),
|
|
19584
|
+
State: __expectString(output.State),
|
|
19585
|
+
Tags: output.Tags !== undefined && output.Tags !== null
|
|
19586
|
+
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
19587
|
+
: undefined,
|
|
19588
|
+
};
|
|
19589
|
+
};
|
|
19590
|
+
var deserializeAws_restJson1VocabularySummary = function (output, context) {
|
|
19591
|
+
return {
|
|
19592
|
+
Arn: __expectString(output.Arn),
|
|
19593
|
+
FailureReason: __expectString(output.FailureReason),
|
|
19594
|
+
Id: __expectString(output.Id),
|
|
19595
|
+
LanguageCode: __expectString(output.LanguageCode),
|
|
19596
|
+
LastModifiedTime: output.LastModifiedTime !== undefined && output.LastModifiedTime !== null
|
|
19597
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
|
|
19598
|
+
: undefined,
|
|
19599
|
+
Name: __expectString(output.Name),
|
|
19600
|
+
State: __expectString(output.State),
|
|
19601
|
+
};
|
|
19602
|
+
};
|
|
19603
|
+
var deserializeAws_restJson1VocabularySummaryList = function (output, context) {
|
|
19604
|
+
return (output || [])
|
|
19605
|
+
.filter(function (e) { return e != null; })
|
|
19606
|
+
.map(function (entry) {
|
|
19607
|
+
if (entry === null) {
|
|
19608
|
+
return null;
|
|
19609
|
+
}
|
|
19610
|
+
return deserializeAws_restJson1VocabularySummary(entry, context);
|
|
19611
|
+
});
|
|
19612
|
+
};
|
|
18728
19613
|
var deserializeMetadata = function (output) {
|
|
18729
19614
|
var _a;
|
|
18730
19615
|
return ({
|