@aws-sdk/client-connect 3.42.0 → 3.47.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 +50 -0
- package/README.md +2 -4
- package/dist-cjs/Connect.js +120 -0
- package/dist-cjs/commands/CreateContactFlowModuleCommand.js +36 -0
- package/dist-cjs/commands/DeleteContactFlowCommand.js +36 -0
- package/dist-cjs/commands/DeleteContactFlowModuleCommand.js +36 -0
- package/dist-cjs/commands/DescribeContactFlowModuleCommand.js +36 -0
- package/dist-cjs/commands/ListContactFlowModulesCommand.js +36 -0
- package/dist-cjs/commands/TagResourceCommand.js +2 -2
- package/dist-cjs/commands/UntagResourceCommand.js +2 -2
- package/dist-cjs/commands/UpdateAgentStatusCommand.js +2 -2
- package/dist-cjs/commands/UpdateContactAttributesCommand.js +3 -3
- package/dist-cjs/commands/UpdateContactCommand.js +3 -3
- package/dist-cjs/commands/UpdateContactFlowContentCommand.js +2 -2
- package/dist-cjs/commands/UpdateContactFlowMetadataCommand.js +36 -0
- package/dist-cjs/commands/UpdateContactFlowModuleContentCommand.js +36 -0
- package/dist-cjs/commands/UpdateContactFlowModuleMetadataCommand.js +36 -0
- package/dist-cjs/commands/UpdateContactFlowNameCommand.js +2 -2
- package/dist-cjs/commands/UpdateContactScheduleCommand.js +3 -3
- package/dist-cjs/commands/UpdateHoursOfOperationCommand.js +2 -2
- package/dist-cjs/commands/UpdateInstanceAttributeCommand.js +2 -2
- package/dist-cjs/commands/UpdateInstanceStorageConfigCommand.js +2 -2
- package/dist-cjs/commands/UpdateQueueHoursOfOperationCommand.js +2 -2
- package/dist-cjs/commands/UpdateQueueMaxContactsCommand.js +2 -2
- package/dist-cjs/commands/index.js +8 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +84 -201
- package/dist-cjs/models/models_1.js +127 -1
- package/dist-cjs/pagination/ListContactFlowModulesPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1271 -167
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +9 -3
- package/dist-es/Connect.js +120 -0
- package/dist-es/commands/CreateContactFlowModuleCommand.js +39 -0
- package/dist-es/commands/DeleteContactFlowCommand.js +39 -0
- package/dist-es/commands/DeleteContactFlowModuleCommand.js +39 -0
- package/dist-es/commands/DescribeContactFlowModuleCommand.js +39 -0
- package/dist-es/commands/ListContactFlowModulesCommand.js +39 -0
- package/dist-es/commands/TagResourceCommand.js +1 -1
- package/dist-es/commands/UntagResourceCommand.js +1 -1
- package/dist-es/commands/UpdateAgentStatusCommand.js +1 -1
- package/dist-es/commands/UpdateContactAttributesCommand.js +1 -1
- package/dist-es/commands/UpdateContactCommand.js +1 -1
- package/dist-es/commands/UpdateContactFlowContentCommand.js +1 -1
- package/dist-es/commands/UpdateContactFlowMetadataCommand.js +39 -0
- package/dist-es/commands/UpdateContactFlowModuleContentCommand.js +39 -0
- package/dist-es/commands/UpdateContactFlowModuleMetadataCommand.js +39 -0
- package/dist-es/commands/UpdateContactFlowNameCommand.js +1 -1
- package/dist-es/commands/UpdateContactScheduleCommand.js +1 -1
- package/dist-es/commands/UpdateHoursOfOperationCommand.js +1 -1
- package/dist-es/commands/UpdateInstanceAttributeCommand.js +1 -1
- package/dist-es/commands/UpdateInstanceStorageConfigCommand.js +1 -1
- package/dist-es/commands/UpdateQueueHoursOfOperationCommand.js +1 -1
- package/dist-es/commands/UpdateQueueMaxContactsCommand.js +1 -1
- package/dist-es/commands/index.js +8 -0
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +59 -132
- package/dist-es/models/models_1.js +84 -0
- package/dist-es/pagination/ListContactFlowModulesPaginator.js +74 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +1423 -192
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -6
- package/dist-types/Connect.d.ts +78 -21
- package/dist-types/ConnectClient.d.ts +18 -8
- package/dist-types/commands/CreateContactFlowModuleCommand.d.ts +35 -0
- package/dist-types/commands/CreateHoursOfOperationCommand.d.ts +2 -1
- package/dist-types/commands/DeleteContactFlowCommand.d.ts +35 -0
- package/dist-types/commands/DeleteContactFlowModuleCommand.d.ts +35 -0
- package/dist-types/commands/DeleteHoursOfOperationCommand.d.ts +2 -1
- package/dist-types/commands/DescribeContactCommand.d.ts +2 -1
- package/dist-types/commands/DescribeContactFlowModuleCommand.d.ts +35 -0
- package/dist-types/commands/DescribeHoursOfOperationCommand.d.ts +2 -1
- package/dist-types/commands/ListBotsCommand.d.ts +2 -2
- package/dist-types/commands/ListContactFlowModulesCommand.d.ts +35 -0
- package/dist-types/commands/StartContactStreamingCommand.d.ts +1 -1
- package/dist-types/commands/StartOutboundVoiceContactCommand.d.ts +2 -3
- package/dist-types/commands/StartTaskContactCommand.d.ts +1 -2
- package/dist-types/commands/TagResourceCommand.d.ts +3 -3
- package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UpdateAgentStatusCommand.d.ts +1 -1
- package/dist-types/commands/UpdateContactAttributesCommand.d.ts +1 -1
- package/dist-types/commands/UpdateContactCommand.d.ts +2 -2
- package/dist-types/commands/UpdateContactFlowContentCommand.d.ts +1 -1
- package/dist-types/commands/UpdateContactFlowMetadataCommand.d.ts +35 -0
- package/dist-types/commands/UpdateContactFlowModuleContentCommand.d.ts +35 -0
- package/dist-types/commands/UpdateContactFlowModuleMetadataCommand.d.ts +35 -0
- package/dist-types/commands/UpdateContactFlowNameCommand.d.ts +1 -1
- package/dist-types/commands/UpdateContactScheduleCommand.d.ts +1 -1
- package/dist-types/commands/UpdateHoursOfOperationCommand.d.ts +3 -2
- package/dist-types/commands/UpdateInstanceAttributeCommand.d.ts +1 -1
- package/dist-types/commands/UpdateInstanceStorageConfigCommand.d.ts +1 -1
- package/dist-types/commands/UpdateQueueHoursOfOperationCommand.d.ts +1 -1
- package/dist-types/commands/UpdateQueueMaxContactsCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +8 -0
- package/dist-types/models/models_0.d.ts +291 -461
- package/dist-types/models/models_1.d.ts +429 -1
- package/dist-types/pagination/ListContactFlowModulesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +24 -0
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/Connect.d.ts +40 -0
- package/dist-types/ts3.4/ConnectClient.d.ts +13 -3
- package/dist-types/ts3.4/commands/CreateContactFlowModuleCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteContactFlowCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteContactFlowModuleCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeContactFlowModuleCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListContactFlowModulesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateAgentStatusCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateContactAttributesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateContactCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateContactFlowContentCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateContactFlowMetadataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateContactFlowModuleContentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateContactFlowModuleMetadataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateContactFlowNameCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateContactScheduleCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateHoursOfOperationCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateInstanceAttributeCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateInstanceStorageConfigCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateQueueHoursOfOperationCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateQueueMaxContactsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/index.d.ts +8 -0
- package/dist-types/ts3.4/models/models_0.d.ts +164 -264
- package/dist-types/ts3.4/models/models_1.d.ts +255 -1
- package/dist-types/ts3.4/pagination/ListContactFlowModulesPaginator.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 +24 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +38 -45
|
@@ -376,6 +376,41 @@ export var serializeAws_restJson1CreateContactFlowCommand = function (input, con
|
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
378
|
}); };
|
|
379
|
+
export var serializeAws_restJson1CreateContactFlowModuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
380
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
381
|
+
var _c;
|
|
382
|
+
return __generator(this, function (_d) {
|
|
383
|
+
switch (_d.label) {
|
|
384
|
+
case 0: return [4, context.endpoint()];
|
|
385
|
+
case 1:
|
|
386
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
387
|
+
headers = {
|
|
388
|
+
"content-type": "application/json",
|
|
389
|
+
};
|
|
390
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact-flow-modules/{InstanceId}";
|
|
391
|
+
if (input.InstanceId !== undefined) {
|
|
392
|
+
labelValue = input.InstanceId;
|
|
393
|
+
if (labelValue.length <= 0) {
|
|
394
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
395
|
+
}
|
|
396
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
400
|
+
}
|
|
401
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Content !== undefined && input.Content !== null && { Content: input.Content })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
402
|
+
return [2, new __HttpRequest({
|
|
403
|
+
protocol: protocol,
|
|
404
|
+
hostname: hostname,
|
|
405
|
+
port: port,
|
|
406
|
+
method: "PUT",
|
|
407
|
+
headers: headers,
|
|
408
|
+
path: resolvedPath,
|
|
409
|
+
body: body,
|
|
410
|
+
})];
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
}); };
|
|
379
414
|
export var serializeAws_restJson1CreateHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
380
415
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
381
416
|
return __generator(this, function (_c) {
|
|
@@ -755,6 +790,90 @@ export var serializeAws_restJson1CreateUserHierarchyGroupCommand = function (inp
|
|
|
755
790
|
}
|
|
756
791
|
});
|
|
757
792
|
}); };
|
|
793
|
+
export var serializeAws_restJson1DeleteContactFlowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
794
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
795
|
+
return __generator(this, function (_c) {
|
|
796
|
+
switch (_c.label) {
|
|
797
|
+
case 0: return [4, context.endpoint()];
|
|
798
|
+
case 1:
|
|
799
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
800
|
+
headers = {};
|
|
801
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
802
|
+
"/contact-flows/{InstanceId}/{ContactFlowId}";
|
|
803
|
+
if (input.InstanceId !== undefined) {
|
|
804
|
+
labelValue = input.InstanceId;
|
|
805
|
+
if (labelValue.length <= 0) {
|
|
806
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
807
|
+
}
|
|
808
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
809
|
+
}
|
|
810
|
+
else {
|
|
811
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
812
|
+
}
|
|
813
|
+
if (input.ContactFlowId !== undefined) {
|
|
814
|
+
labelValue = input.ContactFlowId;
|
|
815
|
+
if (labelValue.length <= 0) {
|
|
816
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowId.");
|
|
817
|
+
}
|
|
818
|
+
resolvedPath = resolvedPath.replace("{ContactFlowId}", __extendedEncodeURIComponent(labelValue));
|
|
819
|
+
}
|
|
820
|
+
else {
|
|
821
|
+
throw new Error("No value provided for input HTTP label: ContactFlowId.");
|
|
822
|
+
}
|
|
823
|
+
return [2, new __HttpRequest({
|
|
824
|
+
protocol: protocol,
|
|
825
|
+
hostname: hostname,
|
|
826
|
+
port: port,
|
|
827
|
+
method: "DELETE",
|
|
828
|
+
headers: headers,
|
|
829
|
+
path: resolvedPath,
|
|
830
|
+
body: body,
|
|
831
|
+
})];
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
}); };
|
|
835
|
+
export var serializeAws_restJson1DeleteContactFlowModuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
836
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
837
|
+
return __generator(this, function (_c) {
|
|
838
|
+
switch (_c.label) {
|
|
839
|
+
case 0: return [4, context.endpoint()];
|
|
840
|
+
case 1:
|
|
841
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
842
|
+
headers = {};
|
|
843
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
844
|
+
"/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}";
|
|
845
|
+
if (input.InstanceId !== undefined) {
|
|
846
|
+
labelValue = input.InstanceId;
|
|
847
|
+
if (labelValue.length <= 0) {
|
|
848
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
849
|
+
}
|
|
850
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
851
|
+
}
|
|
852
|
+
else {
|
|
853
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
854
|
+
}
|
|
855
|
+
if (input.ContactFlowModuleId !== undefined) {
|
|
856
|
+
labelValue = input.ContactFlowModuleId;
|
|
857
|
+
if (labelValue.length <= 0) {
|
|
858
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
|
|
859
|
+
}
|
|
860
|
+
resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
|
|
861
|
+
}
|
|
862
|
+
else {
|
|
863
|
+
throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
|
|
864
|
+
}
|
|
865
|
+
return [2, new __HttpRequest({
|
|
866
|
+
protocol: protocol,
|
|
867
|
+
hostname: hostname,
|
|
868
|
+
port: port,
|
|
869
|
+
method: "DELETE",
|
|
870
|
+
headers: headers,
|
|
871
|
+
path: resolvedPath,
|
|
872
|
+
body: body,
|
|
873
|
+
})];
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
}); };
|
|
758
877
|
export var serializeAws_restJson1DeleteHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
759
878
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
760
879
|
return __generator(this, function (_c) {
|
|
@@ -1214,6 +1333,48 @@ export var serializeAws_restJson1DescribeContactFlowCommand = function (input, c
|
|
|
1214
1333
|
}
|
|
1215
1334
|
});
|
|
1216
1335
|
}); };
|
|
1336
|
+
export var serializeAws_restJson1DescribeContactFlowModuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1337
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1338
|
+
return __generator(this, function (_c) {
|
|
1339
|
+
switch (_c.label) {
|
|
1340
|
+
case 0: return [4, context.endpoint()];
|
|
1341
|
+
case 1:
|
|
1342
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1343
|
+
headers = {};
|
|
1344
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
1345
|
+
"/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}";
|
|
1346
|
+
if (input.InstanceId !== undefined) {
|
|
1347
|
+
labelValue = input.InstanceId;
|
|
1348
|
+
if (labelValue.length <= 0) {
|
|
1349
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
1350
|
+
}
|
|
1351
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
1352
|
+
}
|
|
1353
|
+
else {
|
|
1354
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
1355
|
+
}
|
|
1356
|
+
if (input.ContactFlowModuleId !== undefined) {
|
|
1357
|
+
labelValue = input.ContactFlowModuleId;
|
|
1358
|
+
if (labelValue.length <= 0) {
|
|
1359
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
|
|
1360
|
+
}
|
|
1361
|
+
resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
|
|
1362
|
+
}
|
|
1363
|
+
else {
|
|
1364
|
+
throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
|
|
1365
|
+
}
|
|
1366
|
+
return [2, new __HttpRequest({
|
|
1367
|
+
protocol: protocol,
|
|
1368
|
+
hostname: hostname,
|
|
1369
|
+
port: port,
|
|
1370
|
+
method: "GET",
|
|
1371
|
+
headers: headers,
|
|
1372
|
+
path: resolvedPath,
|
|
1373
|
+
body: body,
|
|
1374
|
+
})];
|
|
1375
|
+
}
|
|
1376
|
+
});
|
|
1377
|
+
}); };
|
|
1217
1378
|
export var serializeAws_restJson1DescribeHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1218
1379
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1219
1380
|
return __generator(this, function (_c) {
|
|
@@ -2225,6 +2386,40 @@ export var serializeAws_restJson1ListBotsCommand = function (input, context) { r
|
|
|
2225
2386
|
}
|
|
2226
2387
|
});
|
|
2227
2388
|
}); };
|
|
2389
|
+
export var serializeAws_restJson1ListContactFlowModulesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2390
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2391
|
+
return __generator(this, function (_c) {
|
|
2392
|
+
switch (_c.label) {
|
|
2393
|
+
case 0: return [4, context.endpoint()];
|
|
2394
|
+
case 1:
|
|
2395
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2396
|
+
headers = {};
|
|
2397
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2398
|
+
"/contact-flow-modules-summary/{InstanceId}";
|
|
2399
|
+
if (input.InstanceId !== undefined) {
|
|
2400
|
+
labelValue = input.InstanceId;
|
|
2401
|
+
if (labelValue.length <= 0) {
|
|
2402
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
2403
|
+
}
|
|
2404
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
2405
|
+
}
|
|
2406
|
+
else {
|
|
2407
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
2408
|
+
}
|
|
2409
|
+
query = __assign(__assign(__assign({}, (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.ContactFlowModuleState !== undefined && { state: input.ContactFlowModuleState }));
|
|
2410
|
+
return [2, new __HttpRequest({
|
|
2411
|
+
protocol: protocol,
|
|
2412
|
+
hostname: hostname,
|
|
2413
|
+
port: port,
|
|
2414
|
+
method: "GET",
|
|
2415
|
+
headers: headers,
|
|
2416
|
+
path: resolvedPath,
|
|
2417
|
+
query: query,
|
|
2418
|
+
body: body,
|
|
2419
|
+
})];
|
|
2420
|
+
}
|
|
2421
|
+
});
|
|
2422
|
+
}); };
|
|
2228
2423
|
export var serializeAws_restJson1ListContactFlowsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2229
2424
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2230
2425
|
return __generator(this, function (_c) {
|
|
@@ -3539,7 +3734,7 @@ export var serializeAws_restJson1UpdateContactFlowContentCommand = function (inp
|
|
|
3539
3734
|
}
|
|
3540
3735
|
});
|
|
3541
3736
|
}); };
|
|
3542
|
-
export var
|
|
3737
|
+
export var serializeAws_restJson1UpdateContactFlowMetadataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3543
3738
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3544
3739
|
return __generator(this, function (_c) {
|
|
3545
3740
|
switch (_c.label) {
|
|
@@ -3550,7 +3745,7 @@ export var serializeAws_restJson1UpdateContactFlowNameCommand = function (input,
|
|
|
3550
3745
|
"content-type": "application/json",
|
|
3551
3746
|
};
|
|
3552
3747
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
3553
|
-
"/contact-flows/{InstanceId}/{ContactFlowId}/
|
|
3748
|
+
"/contact-flows/{InstanceId}/{ContactFlowId}/metadata";
|
|
3554
3749
|
if (input.InstanceId !== undefined) {
|
|
3555
3750
|
labelValue = input.InstanceId;
|
|
3556
3751
|
if (labelValue.length <= 0) {
|
|
@@ -3571,32 +3766,8 @@ export var serializeAws_restJson1UpdateContactFlowNameCommand = function (input,
|
|
|
3571
3766
|
else {
|
|
3572
3767
|
throw new Error("No value provided for input HTTP label: ContactFlowId.");
|
|
3573
3768
|
}
|
|
3574
|
-
body = JSON.stringify(__assign(__assign(
|
|
3575
|
-
|
|
3576
|
-
protocol: protocol,
|
|
3577
|
-
hostname: hostname,
|
|
3578
|
-
port: port,
|
|
3579
|
-
method: "POST",
|
|
3580
|
-
headers: headers,
|
|
3581
|
-
path: resolvedPath,
|
|
3582
|
-
body: body,
|
|
3583
|
-
})];
|
|
3584
|
-
}
|
|
3585
|
-
});
|
|
3586
|
-
}); };
|
|
3587
|
-
export var serializeAws_restJson1UpdateContactScheduleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3588
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
3589
|
-
return __generator(this, function (_c) {
|
|
3590
|
-
switch (_c.label) {
|
|
3591
|
-
case 0: return [4, context.endpoint()];
|
|
3592
|
-
case 1:
|
|
3593
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3594
|
-
headers = {
|
|
3595
|
-
"content-type": "application/json",
|
|
3596
|
-
};
|
|
3597
|
-
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/schedule";
|
|
3598
|
-
body = JSON.stringify(__assign(__assign(__assign({}, (input.ContactId !== undefined && input.ContactId !== null && { ContactId: input.ContactId })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })), (input.ScheduledTime !== undefined &&
|
|
3599
|
-
input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) })));
|
|
3769
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.ContactFlowState !== undefined &&
|
|
3770
|
+
input.ContactFlowState !== null && { ContactFlowState: input.ContactFlowState })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })));
|
|
3600
3771
|
return [2, new __HttpRequest({
|
|
3601
3772
|
protocol: protocol,
|
|
3602
3773
|
hostname: hostname,
|
|
@@ -3609,7 +3780,7 @@ export var serializeAws_restJson1UpdateContactScheduleCommand = function (input,
|
|
|
3609
3780
|
}
|
|
3610
3781
|
});
|
|
3611
3782
|
}); };
|
|
3612
|
-
export var
|
|
3783
|
+
export var serializeAws_restJson1UpdateContactFlowModuleContentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3613
3784
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3614
3785
|
return __generator(this, function (_c) {
|
|
3615
3786
|
switch (_c.label) {
|
|
@@ -3620,7 +3791,7 @@ export var serializeAws_restJson1UpdateHoursOfOperationCommand = function (input
|
|
|
3620
3791
|
"content-type": "application/json",
|
|
3621
3792
|
};
|
|
3622
3793
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
3623
|
-
"/
|
|
3794
|
+
"/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/content";
|
|
3624
3795
|
if (input.InstanceId !== undefined) {
|
|
3625
3796
|
labelValue = input.InstanceId;
|
|
3626
3797
|
if (labelValue.length <= 0) {
|
|
@@ -3631,18 +3802,17 @@ export var serializeAws_restJson1UpdateHoursOfOperationCommand = function (input
|
|
|
3631
3802
|
else {
|
|
3632
3803
|
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3633
3804
|
}
|
|
3634
|
-
if (input.
|
|
3635
|
-
labelValue = input.
|
|
3805
|
+
if (input.ContactFlowModuleId !== undefined) {
|
|
3806
|
+
labelValue = input.ContactFlowModuleId;
|
|
3636
3807
|
if (labelValue.length <= 0) {
|
|
3637
|
-
throw new Error("Empty value provided for input HTTP label:
|
|
3808
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
|
|
3638
3809
|
}
|
|
3639
|
-
resolvedPath = resolvedPath.replace("{
|
|
3810
|
+
resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
|
|
3640
3811
|
}
|
|
3641
3812
|
else {
|
|
3642
|
-
throw new Error("No value provided for input HTTP label:
|
|
3813
|
+
throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
|
|
3643
3814
|
}
|
|
3644
|
-
body = JSON.stringify(__assign(
|
|
3645
|
-
input.Config !== null && { Config: serializeAws_restJson1HoursOfOperationConfigList(input.Config, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.TimeZone !== undefined && input.TimeZone !== null && { TimeZone: input.TimeZone })));
|
|
3815
|
+
body = JSON.stringify(__assign({}, (input.Content !== undefined && input.Content !== null && { Content: input.Content })));
|
|
3646
3816
|
return [2, new __HttpRequest({
|
|
3647
3817
|
protocol: protocol,
|
|
3648
3818
|
hostname: hostname,
|
|
@@ -3655,7 +3825,7 @@ export var serializeAws_restJson1UpdateHoursOfOperationCommand = function (input
|
|
|
3655
3825
|
}
|
|
3656
3826
|
});
|
|
3657
3827
|
}); };
|
|
3658
|
-
export var
|
|
3828
|
+
export var serializeAws_restJson1UpdateContactFlowModuleMetadataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3659
3829
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3660
3830
|
return __generator(this, function (_c) {
|
|
3661
3831
|
switch (_c.label) {
|
|
@@ -3666,7 +3836,7 @@ export var serializeAws_restJson1UpdateInstanceAttributeCommand = function (inpu
|
|
|
3666
3836
|
"content-type": "application/json",
|
|
3667
3837
|
};
|
|
3668
3838
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
3669
|
-
"/
|
|
3839
|
+
"/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/metadata";
|
|
3670
3840
|
if (input.InstanceId !== undefined) {
|
|
3671
3841
|
labelValue = input.InstanceId;
|
|
3672
3842
|
if (labelValue.length <= 0) {
|
|
@@ -3677,17 +3847,17 @@ export var serializeAws_restJson1UpdateInstanceAttributeCommand = function (inpu
|
|
|
3677
3847
|
else {
|
|
3678
3848
|
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3679
3849
|
}
|
|
3680
|
-
if (input.
|
|
3681
|
-
labelValue = input.
|
|
3850
|
+
if (input.ContactFlowModuleId !== undefined) {
|
|
3851
|
+
labelValue = input.ContactFlowModuleId;
|
|
3682
3852
|
if (labelValue.length <= 0) {
|
|
3683
|
-
throw new Error("Empty value provided for input HTTP label:
|
|
3853
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowModuleId.");
|
|
3684
3854
|
}
|
|
3685
|
-
resolvedPath = resolvedPath.replace("{
|
|
3855
|
+
resolvedPath = resolvedPath.replace("{ContactFlowModuleId}", __extendedEncodeURIComponent(labelValue));
|
|
3686
3856
|
}
|
|
3687
3857
|
else {
|
|
3688
|
-
throw new Error("No value provided for input HTTP label:
|
|
3858
|
+
throw new Error("No value provided for input HTTP label: ContactFlowModuleId.");
|
|
3689
3859
|
}
|
|
3690
|
-
body = JSON.stringify(__assign({}, (input.
|
|
3860
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.State !== undefined && input.State !== null && { State: input.State })));
|
|
3691
3861
|
return [2, new __HttpRequest({
|
|
3692
3862
|
protocol: protocol,
|
|
3693
3863
|
hostname: hostname,
|
|
@@ -3700,8 +3870,8 @@ export var serializeAws_restJson1UpdateInstanceAttributeCommand = function (inpu
|
|
|
3700
3870
|
}
|
|
3701
3871
|
});
|
|
3702
3872
|
}); };
|
|
3703
|
-
export var
|
|
3704
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue,
|
|
3873
|
+
export var serializeAws_restJson1UpdateContactFlowNameCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3874
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3705
3875
|
return __generator(this, function (_c) {
|
|
3706
3876
|
switch (_c.label) {
|
|
3707
3877
|
case 0: return [4, context.endpoint()];
|
|
@@ -3711,7 +3881,7 @@ export var serializeAws_restJson1UpdateInstanceStorageConfigCommand = function (
|
|
|
3711
3881
|
"content-type": "application/json",
|
|
3712
3882
|
};
|
|
3713
3883
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
3714
|
-
"/
|
|
3884
|
+
"/contact-flows/{InstanceId}/{ContactFlowId}/name";
|
|
3715
3885
|
if (input.InstanceId !== undefined) {
|
|
3716
3886
|
labelValue = input.InstanceId;
|
|
3717
3887
|
if (labelValue.length <= 0) {
|
|
@@ -3722,21 +3892,17 @@ export var serializeAws_restJson1UpdateInstanceStorageConfigCommand = function (
|
|
|
3722
3892
|
else {
|
|
3723
3893
|
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3724
3894
|
}
|
|
3725
|
-
if (input.
|
|
3726
|
-
labelValue = input.
|
|
3895
|
+
if (input.ContactFlowId !== undefined) {
|
|
3896
|
+
labelValue = input.ContactFlowId;
|
|
3727
3897
|
if (labelValue.length <= 0) {
|
|
3728
|
-
throw new Error("Empty value provided for input HTTP label:
|
|
3898
|
+
throw new Error("Empty value provided for input HTTP label: ContactFlowId.");
|
|
3729
3899
|
}
|
|
3730
|
-
resolvedPath = resolvedPath.replace("{
|
|
3900
|
+
resolvedPath = resolvedPath.replace("{ContactFlowId}", __extendedEncodeURIComponent(labelValue));
|
|
3731
3901
|
}
|
|
3732
3902
|
else {
|
|
3733
|
-
throw new Error("No value provided for input HTTP label:
|
|
3903
|
+
throw new Error("No value provided for input HTTP label: ContactFlowId.");
|
|
3734
3904
|
}
|
|
3735
|
-
|
|
3736
|
-
body = JSON.stringify(__assign({}, (input.StorageConfig !== undefined &&
|
|
3737
|
-
input.StorageConfig !== null && {
|
|
3738
|
-
StorageConfig: serializeAws_restJson1InstanceStorageConfig(input.StorageConfig, context),
|
|
3739
|
-
})));
|
|
3905
|
+
body = JSON.stringify(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })));
|
|
3740
3906
|
return [2, new __HttpRequest({
|
|
3741
3907
|
protocol: protocol,
|
|
3742
3908
|
hostname: hostname,
|
|
@@ -3744,14 +3910,13 @@ export var serializeAws_restJson1UpdateInstanceStorageConfigCommand = function (
|
|
|
3744
3910
|
method: "POST",
|
|
3745
3911
|
headers: headers,
|
|
3746
3912
|
path: resolvedPath,
|
|
3747
|
-
query: query,
|
|
3748
3913
|
body: body,
|
|
3749
3914
|
})];
|
|
3750
3915
|
}
|
|
3751
3916
|
});
|
|
3752
3917
|
}); };
|
|
3753
|
-
export var
|
|
3754
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
3918
|
+
export var serializeAws_restJson1UpdateContactScheduleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3919
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
3755
3920
|
return __generator(this, function (_c) {
|
|
3756
3921
|
switch (_c.label) {
|
|
3757
3922
|
case 0: return [4, context.endpoint()];
|
|
@@ -3760,15 +3925,181 @@ export var serializeAws_restJson1UpdateQueueHoursOfOperationCommand = function (
|
|
|
3760
3925
|
headers = {
|
|
3761
3926
|
"content-type": "application/json",
|
|
3762
3927
|
};
|
|
3763
|
-
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3928
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/contact/schedule";
|
|
3929
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.ContactId !== undefined && input.ContactId !== null && { ContactId: input.ContactId })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })), (input.ScheduledTime !== undefined &&
|
|
3930
|
+
input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) })));
|
|
3931
|
+
return [2, new __HttpRequest({
|
|
3932
|
+
protocol: protocol,
|
|
3933
|
+
hostname: hostname,
|
|
3934
|
+
port: port,
|
|
3935
|
+
method: "POST",
|
|
3936
|
+
headers: headers,
|
|
3937
|
+
path: resolvedPath,
|
|
3938
|
+
body: body,
|
|
3939
|
+
})];
|
|
3940
|
+
}
|
|
3941
|
+
});
|
|
3942
|
+
}); };
|
|
3943
|
+
export var serializeAws_restJson1UpdateHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3944
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3945
|
+
return __generator(this, function (_c) {
|
|
3946
|
+
switch (_c.label) {
|
|
3947
|
+
case 0: return [4, context.endpoint()];
|
|
3948
|
+
case 1:
|
|
3949
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3950
|
+
headers = {
|
|
3951
|
+
"content-type": "application/json",
|
|
3952
|
+
};
|
|
3953
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
3954
|
+
"/hours-of-operations/{InstanceId}/{HoursOfOperationId}";
|
|
3955
|
+
if (input.InstanceId !== undefined) {
|
|
3956
|
+
labelValue = input.InstanceId;
|
|
3957
|
+
if (labelValue.length <= 0) {
|
|
3958
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
3959
|
+
}
|
|
3960
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
3961
|
+
}
|
|
3962
|
+
else {
|
|
3963
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3964
|
+
}
|
|
3965
|
+
if (input.HoursOfOperationId !== undefined) {
|
|
3966
|
+
labelValue = input.HoursOfOperationId;
|
|
3967
|
+
if (labelValue.length <= 0) {
|
|
3968
|
+
throw new Error("Empty value provided for input HTTP label: HoursOfOperationId.");
|
|
3969
|
+
}
|
|
3970
|
+
resolvedPath = resolvedPath.replace("{HoursOfOperationId}", __extendedEncodeURIComponent(labelValue));
|
|
3971
|
+
}
|
|
3972
|
+
else {
|
|
3973
|
+
throw new Error("No value provided for input HTTP label: HoursOfOperationId.");
|
|
3974
|
+
}
|
|
3975
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Config !== undefined &&
|
|
3976
|
+
input.Config !== null && { Config: serializeAws_restJson1HoursOfOperationConfigList(input.Config, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.TimeZone !== undefined && input.TimeZone !== null && { TimeZone: input.TimeZone })));
|
|
3977
|
+
return [2, new __HttpRequest({
|
|
3978
|
+
protocol: protocol,
|
|
3979
|
+
hostname: hostname,
|
|
3980
|
+
port: port,
|
|
3981
|
+
method: "POST",
|
|
3982
|
+
headers: headers,
|
|
3983
|
+
path: resolvedPath,
|
|
3984
|
+
body: body,
|
|
3985
|
+
})];
|
|
3986
|
+
}
|
|
3987
|
+
});
|
|
3988
|
+
}); };
|
|
3989
|
+
export var serializeAws_restJson1UpdateInstanceAttributeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3990
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
3991
|
+
return __generator(this, function (_c) {
|
|
3992
|
+
switch (_c.label) {
|
|
3993
|
+
case 0: return [4, context.endpoint()];
|
|
3994
|
+
case 1:
|
|
3995
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3996
|
+
headers = {
|
|
3997
|
+
"content-type": "application/json",
|
|
3998
|
+
};
|
|
3999
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
4000
|
+
"/instance/{InstanceId}/attribute/{AttributeType}";
|
|
4001
|
+
if (input.InstanceId !== undefined) {
|
|
4002
|
+
labelValue = input.InstanceId;
|
|
4003
|
+
if (labelValue.length <= 0) {
|
|
4004
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
4005
|
+
}
|
|
4006
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
4007
|
+
}
|
|
4008
|
+
else {
|
|
4009
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
4010
|
+
}
|
|
4011
|
+
if (input.AttributeType !== undefined) {
|
|
4012
|
+
labelValue = input.AttributeType;
|
|
4013
|
+
if (labelValue.length <= 0) {
|
|
4014
|
+
throw new Error("Empty value provided for input HTTP label: AttributeType.");
|
|
4015
|
+
}
|
|
4016
|
+
resolvedPath = resolvedPath.replace("{AttributeType}", __extendedEncodeURIComponent(labelValue));
|
|
4017
|
+
}
|
|
4018
|
+
else {
|
|
4019
|
+
throw new Error("No value provided for input HTTP label: AttributeType.");
|
|
4020
|
+
}
|
|
4021
|
+
body = JSON.stringify(__assign({}, (input.Value !== undefined && input.Value !== null && { Value: input.Value })));
|
|
4022
|
+
return [2, new __HttpRequest({
|
|
4023
|
+
protocol: protocol,
|
|
4024
|
+
hostname: hostname,
|
|
4025
|
+
port: port,
|
|
4026
|
+
method: "POST",
|
|
4027
|
+
headers: headers,
|
|
4028
|
+
path: resolvedPath,
|
|
4029
|
+
body: body,
|
|
4030
|
+
})];
|
|
4031
|
+
}
|
|
4032
|
+
});
|
|
4033
|
+
}); };
|
|
4034
|
+
export var serializeAws_restJson1UpdateInstanceStorageConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4035
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
4036
|
+
return __generator(this, function (_c) {
|
|
4037
|
+
switch (_c.label) {
|
|
4038
|
+
case 0: return [4, context.endpoint()];
|
|
4039
|
+
case 1:
|
|
4040
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
4041
|
+
headers = {
|
|
4042
|
+
"content-type": "application/json",
|
|
4043
|
+
};
|
|
4044
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
4045
|
+
"/instance/{InstanceId}/storage-config/{AssociationId}";
|
|
4046
|
+
if (input.InstanceId !== undefined) {
|
|
4047
|
+
labelValue = input.InstanceId;
|
|
4048
|
+
if (labelValue.length <= 0) {
|
|
4049
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
4050
|
+
}
|
|
4051
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
4052
|
+
}
|
|
4053
|
+
else {
|
|
4054
|
+
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
4055
|
+
}
|
|
4056
|
+
if (input.AssociationId !== undefined) {
|
|
4057
|
+
labelValue = input.AssociationId;
|
|
4058
|
+
if (labelValue.length <= 0) {
|
|
4059
|
+
throw new Error("Empty value provided for input HTTP label: AssociationId.");
|
|
4060
|
+
}
|
|
4061
|
+
resolvedPath = resolvedPath.replace("{AssociationId}", __extendedEncodeURIComponent(labelValue));
|
|
4062
|
+
}
|
|
4063
|
+
else {
|
|
4064
|
+
throw new Error("No value provided for input HTTP label: AssociationId.");
|
|
4065
|
+
}
|
|
4066
|
+
query = __assign({}, (input.ResourceType !== undefined && { resourceType: input.ResourceType }));
|
|
4067
|
+
body = JSON.stringify(__assign({}, (input.StorageConfig !== undefined &&
|
|
4068
|
+
input.StorageConfig !== null && {
|
|
4069
|
+
StorageConfig: serializeAws_restJson1InstanceStorageConfig(input.StorageConfig, context),
|
|
4070
|
+
})));
|
|
4071
|
+
return [2, new __HttpRequest({
|
|
4072
|
+
protocol: protocol,
|
|
4073
|
+
hostname: hostname,
|
|
4074
|
+
port: port,
|
|
4075
|
+
method: "POST",
|
|
4076
|
+
headers: headers,
|
|
4077
|
+
path: resolvedPath,
|
|
4078
|
+
query: query,
|
|
4079
|
+
body: body,
|
|
4080
|
+
})];
|
|
4081
|
+
}
|
|
4082
|
+
});
|
|
4083
|
+
}); };
|
|
4084
|
+
export var serializeAws_restJson1UpdateQueueHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4085
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
4086
|
+
return __generator(this, function (_c) {
|
|
4087
|
+
switch (_c.label) {
|
|
4088
|
+
case 0: return [4, context.endpoint()];
|
|
4089
|
+
case 1:
|
|
4090
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
4091
|
+
headers = {
|
|
4092
|
+
"content-type": "application/json",
|
|
4093
|
+
};
|
|
4094
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
4095
|
+
"/queues/{InstanceId}/{QueueId}/hours-of-operation";
|
|
4096
|
+
if (input.InstanceId !== undefined) {
|
|
4097
|
+
labelValue = input.InstanceId;
|
|
4098
|
+
if (labelValue.length <= 0) {
|
|
4099
|
+
throw new Error("Empty value provided for input HTTP label: InstanceId.");
|
|
4100
|
+
}
|
|
4101
|
+
resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
4102
|
+
}
|
|
3772
4103
|
else {
|
|
3773
4104
|
throw new Error("No value provided for input HTTP label: InstanceId.");
|
|
3774
4105
|
}
|
|
@@ -5665,6 +5996,144 @@ var deserializeAws_restJson1CreateContactFlowCommandError = function (output, co
|
|
|
5665
5996
|
}
|
|
5666
5997
|
});
|
|
5667
5998
|
}); };
|
|
5999
|
+
export var deserializeAws_restJson1CreateContactFlowModuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6000
|
+
var contents, data, _a, _b;
|
|
6001
|
+
return __generator(this, function (_c) {
|
|
6002
|
+
switch (_c.label) {
|
|
6003
|
+
case 0:
|
|
6004
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6005
|
+
return [2, deserializeAws_restJson1CreateContactFlowModuleCommandError(output, context)];
|
|
6006
|
+
}
|
|
6007
|
+
contents = {
|
|
6008
|
+
$metadata: deserializeMetadata(output),
|
|
6009
|
+
Arn: undefined,
|
|
6010
|
+
Id: undefined,
|
|
6011
|
+
};
|
|
6012
|
+
_a = __expectNonNull;
|
|
6013
|
+
_b = __expectObject;
|
|
6014
|
+
return [4, parseBody(output.body, context)];
|
|
6015
|
+
case 1:
|
|
6016
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
6017
|
+
if (data.Arn !== undefined && data.Arn !== null) {
|
|
6018
|
+
contents.Arn = __expectString(data.Arn);
|
|
6019
|
+
}
|
|
6020
|
+
if (data.Id !== undefined && data.Id !== null) {
|
|
6021
|
+
contents.Id = __expectString(data.Id);
|
|
6022
|
+
}
|
|
6023
|
+
return [2, Promise.resolve(contents)];
|
|
6024
|
+
}
|
|
6025
|
+
});
|
|
6026
|
+
}); };
|
|
6027
|
+
var deserializeAws_restJson1CreateContactFlowModuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6028
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, parsedBody, message;
|
|
6029
|
+
var _o;
|
|
6030
|
+
return __generator(this, function (_p) {
|
|
6031
|
+
switch (_p.label) {
|
|
6032
|
+
case 0:
|
|
6033
|
+
_a = [__assign({}, output)];
|
|
6034
|
+
_o = {};
|
|
6035
|
+
return [4, parseBody(output.body, context)];
|
|
6036
|
+
case 1:
|
|
6037
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_o.body = _p.sent(), _o)]));
|
|
6038
|
+
errorCode = "UnknownError";
|
|
6039
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6040
|
+
_b = errorCode;
|
|
6041
|
+
switch (_b) {
|
|
6042
|
+
case "AccessDeniedException": return [3, 2];
|
|
6043
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
6044
|
+
case "DuplicateResourceException": return [3, 4];
|
|
6045
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 4];
|
|
6046
|
+
case "IdempotencyException": return [3, 6];
|
|
6047
|
+
case "com.amazonaws.connect#IdempotencyException": return [3, 6];
|
|
6048
|
+
case "InternalServiceException": return [3, 8];
|
|
6049
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 8];
|
|
6050
|
+
case "InvalidContactFlowModuleException": return [3, 10];
|
|
6051
|
+
case "com.amazonaws.connect#InvalidContactFlowModuleException": return [3, 10];
|
|
6052
|
+
case "InvalidParameterException": return [3, 12];
|
|
6053
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 12];
|
|
6054
|
+
case "InvalidRequestException": return [3, 14];
|
|
6055
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 14];
|
|
6056
|
+
case "LimitExceededException": return [3, 16];
|
|
6057
|
+
case "com.amazonaws.connect#LimitExceededException": return [3, 16];
|
|
6058
|
+
case "ResourceNotFoundException": return [3, 18];
|
|
6059
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 18];
|
|
6060
|
+
case "ThrottlingException": return [3, 20];
|
|
6061
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 20];
|
|
6062
|
+
}
|
|
6063
|
+
return [3, 22];
|
|
6064
|
+
case 2:
|
|
6065
|
+
_c = [{}];
|
|
6066
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
6067
|
+
case 3:
|
|
6068
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6069
|
+
return [3, 23];
|
|
6070
|
+
case 4:
|
|
6071
|
+
_d = [{}];
|
|
6072
|
+
return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
6073
|
+
case 5:
|
|
6074
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6075
|
+
return [3, 23];
|
|
6076
|
+
case 6:
|
|
6077
|
+
_e = [{}];
|
|
6078
|
+
return [4, deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context)];
|
|
6079
|
+
case 7:
|
|
6080
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6081
|
+
return [3, 23];
|
|
6082
|
+
case 8:
|
|
6083
|
+
_f = [{}];
|
|
6084
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
6085
|
+
case 9:
|
|
6086
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6087
|
+
return [3, 23];
|
|
6088
|
+
case 10:
|
|
6089
|
+
_g = [{}];
|
|
6090
|
+
return [4, deserializeAws_restJson1InvalidContactFlowModuleExceptionResponse(parsedOutput, context)];
|
|
6091
|
+
case 11:
|
|
6092
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6093
|
+
return [3, 23];
|
|
6094
|
+
case 12:
|
|
6095
|
+
_h = [{}];
|
|
6096
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
6097
|
+
case 13:
|
|
6098
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6099
|
+
return [3, 23];
|
|
6100
|
+
case 14:
|
|
6101
|
+
_j = [{}];
|
|
6102
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
6103
|
+
case 15:
|
|
6104
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6105
|
+
return [3, 23];
|
|
6106
|
+
case 16:
|
|
6107
|
+
_k = [{}];
|
|
6108
|
+
return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
6109
|
+
case 17:
|
|
6110
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6111
|
+
return [3, 23];
|
|
6112
|
+
case 18:
|
|
6113
|
+
_l = [{}];
|
|
6114
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
6115
|
+
case 19:
|
|
6116
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6117
|
+
return [3, 23];
|
|
6118
|
+
case 20:
|
|
6119
|
+
_m = [{}];
|
|
6120
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
6121
|
+
case 21:
|
|
6122
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6123
|
+
return [3, 23];
|
|
6124
|
+
case 22:
|
|
6125
|
+
parsedBody = parsedOutput.body;
|
|
6126
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
6127
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
6128
|
+
_p.label = 23;
|
|
6129
|
+
case 23:
|
|
6130
|
+
message = response.message || response.Message || errorCode;
|
|
6131
|
+
response.message = message;
|
|
6132
|
+
delete response.Message;
|
|
6133
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
6134
|
+
}
|
|
6135
|
+
});
|
|
6136
|
+
}); };
|
|
5668
6137
|
export var deserializeAws_restJson1CreateHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5669
6138
|
var contents, data, _a, _b;
|
|
5670
6139
|
return __generator(this, function (_c) {
|
|
@@ -6671,85 +7140,277 @@ export var deserializeAws_restJson1CreateUserHierarchyGroupCommand = function (o
|
|
|
6671
7140
|
}
|
|
6672
7141
|
});
|
|
6673
7142
|
}); };
|
|
6674
|
-
var deserializeAws_restJson1CreateUserHierarchyGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6675
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
6676
|
-
var _k;
|
|
6677
|
-
return __generator(this, function (_l) {
|
|
6678
|
-
switch (_l.label) {
|
|
7143
|
+
var deserializeAws_restJson1CreateUserHierarchyGroupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7144
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
7145
|
+
var _k;
|
|
7146
|
+
return __generator(this, function (_l) {
|
|
7147
|
+
switch (_l.label) {
|
|
7148
|
+
case 0:
|
|
7149
|
+
_a = [__assign({}, output)];
|
|
7150
|
+
_k = {};
|
|
7151
|
+
return [4, parseBody(output.body, context)];
|
|
7152
|
+
case 1:
|
|
7153
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
7154
|
+
errorCode = "UnknownError";
|
|
7155
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7156
|
+
_b = errorCode;
|
|
7157
|
+
switch (_b) {
|
|
7158
|
+
case "DuplicateResourceException": return [3, 2];
|
|
7159
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
|
|
7160
|
+
case "InternalServiceException": return [3, 4];
|
|
7161
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
7162
|
+
case "InvalidParameterException": return [3, 6];
|
|
7163
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
7164
|
+
case "InvalidRequestException": return [3, 8];
|
|
7165
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
7166
|
+
case "LimitExceededException": return [3, 10];
|
|
7167
|
+
case "com.amazonaws.connect#LimitExceededException": return [3, 10];
|
|
7168
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
7169
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
|
|
7170
|
+
case "ThrottlingException": return [3, 14];
|
|
7171
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 14];
|
|
7172
|
+
}
|
|
7173
|
+
return [3, 16];
|
|
7174
|
+
case 2:
|
|
7175
|
+
_c = [{}];
|
|
7176
|
+
return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
7177
|
+
case 3:
|
|
7178
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7179
|
+
return [3, 17];
|
|
7180
|
+
case 4:
|
|
7181
|
+
_d = [{}];
|
|
7182
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
7183
|
+
case 5:
|
|
7184
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7185
|
+
return [3, 17];
|
|
7186
|
+
case 6:
|
|
7187
|
+
_e = [{}];
|
|
7188
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
7189
|
+
case 7:
|
|
7190
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7191
|
+
return [3, 17];
|
|
7192
|
+
case 8:
|
|
7193
|
+
_f = [{}];
|
|
7194
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
7195
|
+
case 9:
|
|
7196
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7197
|
+
return [3, 17];
|
|
7198
|
+
case 10:
|
|
7199
|
+
_g = [{}];
|
|
7200
|
+
return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
7201
|
+
case 11:
|
|
7202
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7203
|
+
return [3, 17];
|
|
7204
|
+
case 12:
|
|
7205
|
+
_h = [{}];
|
|
7206
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7207
|
+
case 13:
|
|
7208
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7209
|
+
return [3, 17];
|
|
7210
|
+
case 14:
|
|
7211
|
+
_j = [{}];
|
|
7212
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7213
|
+
case 15:
|
|
7214
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7215
|
+
return [3, 17];
|
|
7216
|
+
case 16:
|
|
7217
|
+
parsedBody = parsedOutput.body;
|
|
7218
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7219
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
7220
|
+
_l.label = 17;
|
|
7221
|
+
case 17:
|
|
7222
|
+
message = response.message || response.Message || errorCode;
|
|
7223
|
+
response.message = message;
|
|
7224
|
+
delete response.Message;
|
|
7225
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
7226
|
+
}
|
|
7227
|
+
});
|
|
7228
|
+
}); };
|
|
7229
|
+
export var deserializeAws_restJson1DeleteContactFlowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7230
|
+
var contents;
|
|
7231
|
+
return __generator(this, function (_a) {
|
|
7232
|
+
switch (_a.label) {
|
|
7233
|
+
case 0:
|
|
7234
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7235
|
+
return [2, deserializeAws_restJson1DeleteContactFlowCommandError(output, context)];
|
|
7236
|
+
}
|
|
7237
|
+
contents = {
|
|
7238
|
+
$metadata: deserializeMetadata(output),
|
|
7239
|
+
};
|
|
7240
|
+
return [4, collectBody(output.body, context)];
|
|
7241
|
+
case 1:
|
|
7242
|
+
_a.sent();
|
|
7243
|
+
return [2, Promise.resolve(contents)];
|
|
7244
|
+
}
|
|
7245
|
+
});
|
|
7246
|
+
}); };
|
|
7247
|
+
var deserializeAws_restJson1DeleteContactFlowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7248
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
7249
|
+
var _j;
|
|
7250
|
+
return __generator(this, function (_k) {
|
|
7251
|
+
switch (_k.label) {
|
|
7252
|
+
case 0:
|
|
7253
|
+
_a = [__assign({}, output)];
|
|
7254
|
+
_j = {};
|
|
7255
|
+
return [4, parseBody(output.body, context)];
|
|
7256
|
+
case 1:
|
|
7257
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
7258
|
+
errorCode = "UnknownError";
|
|
7259
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7260
|
+
_b = errorCode;
|
|
7261
|
+
switch (_b) {
|
|
7262
|
+
case "AccessDeniedException": return [3, 2];
|
|
7263
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
7264
|
+
case "InternalServiceException": return [3, 4];
|
|
7265
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
7266
|
+
case "InvalidParameterException": return [3, 6];
|
|
7267
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
7268
|
+
case "InvalidRequestException": return [3, 8];
|
|
7269
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
7270
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
7271
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
7272
|
+
case "ThrottlingException": return [3, 12];
|
|
7273
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
7274
|
+
}
|
|
7275
|
+
return [3, 14];
|
|
7276
|
+
case 2:
|
|
7277
|
+
_c = [{}];
|
|
7278
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
7279
|
+
case 3:
|
|
7280
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7281
|
+
return [3, 15];
|
|
7282
|
+
case 4:
|
|
7283
|
+
_d = [{}];
|
|
7284
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
7285
|
+
case 5:
|
|
7286
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7287
|
+
return [3, 15];
|
|
7288
|
+
case 6:
|
|
7289
|
+
_e = [{}];
|
|
7290
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
7291
|
+
case 7:
|
|
7292
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7293
|
+
return [3, 15];
|
|
7294
|
+
case 8:
|
|
7295
|
+
_f = [{}];
|
|
7296
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
7297
|
+
case 9:
|
|
7298
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7299
|
+
return [3, 15];
|
|
7300
|
+
case 10:
|
|
7301
|
+
_g = [{}];
|
|
7302
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
7303
|
+
case 11:
|
|
7304
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7305
|
+
return [3, 15];
|
|
7306
|
+
case 12:
|
|
7307
|
+
_h = [{}];
|
|
7308
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
7309
|
+
case 13:
|
|
7310
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7311
|
+
return [3, 15];
|
|
7312
|
+
case 14:
|
|
7313
|
+
parsedBody = parsedOutput.body;
|
|
7314
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
7315
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
7316
|
+
_k.label = 15;
|
|
7317
|
+
case 15:
|
|
7318
|
+
message = response.message || response.Message || errorCode;
|
|
7319
|
+
response.message = message;
|
|
7320
|
+
delete response.Message;
|
|
7321
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
7322
|
+
}
|
|
7323
|
+
});
|
|
7324
|
+
}); };
|
|
7325
|
+
export var deserializeAws_restJson1DeleteContactFlowModuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7326
|
+
var contents;
|
|
7327
|
+
return __generator(this, function (_a) {
|
|
7328
|
+
switch (_a.label) {
|
|
7329
|
+
case 0:
|
|
7330
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7331
|
+
return [2, deserializeAws_restJson1DeleteContactFlowModuleCommandError(output, context)];
|
|
7332
|
+
}
|
|
7333
|
+
contents = {
|
|
7334
|
+
$metadata: deserializeMetadata(output),
|
|
7335
|
+
};
|
|
7336
|
+
return [4, collectBody(output.body, context)];
|
|
7337
|
+
case 1:
|
|
7338
|
+
_a.sent();
|
|
7339
|
+
return [2, Promise.resolve(contents)];
|
|
7340
|
+
}
|
|
7341
|
+
});
|
|
7342
|
+
}); };
|
|
7343
|
+
var deserializeAws_restJson1DeleteContactFlowModuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7344
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
7345
|
+
var _j;
|
|
7346
|
+
return __generator(this, function (_k) {
|
|
7347
|
+
switch (_k.label) {
|
|
6679
7348
|
case 0:
|
|
6680
7349
|
_a = [__assign({}, output)];
|
|
6681
|
-
|
|
7350
|
+
_j = {};
|
|
6682
7351
|
return [4, parseBody(output.body, context)];
|
|
6683
7352
|
case 1:
|
|
6684
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
7353
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
6685
7354
|
errorCode = "UnknownError";
|
|
6686
7355
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6687
7356
|
_b = errorCode;
|
|
6688
7357
|
switch (_b) {
|
|
6689
|
-
case "
|
|
6690
|
-
case "com.amazonaws.connect#
|
|
7358
|
+
case "AccessDeniedException": return [3, 2];
|
|
7359
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
6691
7360
|
case "InternalServiceException": return [3, 4];
|
|
6692
7361
|
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
6693
7362
|
case "InvalidParameterException": return [3, 6];
|
|
6694
7363
|
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
6695
7364
|
case "InvalidRequestException": return [3, 8];
|
|
6696
7365
|
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
6697
|
-
case "
|
|
6698
|
-
case "com.amazonaws.connect#
|
|
6699
|
-
case "
|
|
6700
|
-
case "com.amazonaws.connect#
|
|
6701
|
-
case "ThrottlingException": return [3, 14];
|
|
6702
|
-
case "com.amazonaws.connect#ThrottlingException": return [3, 14];
|
|
7366
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
7367
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
7368
|
+
case "ThrottlingException": return [3, 12];
|
|
7369
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
6703
7370
|
}
|
|
6704
|
-
return [3,
|
|
7371
|
+
return [3, 14];
|
|
6705
7372
|
case 2:
|
|
6706
7373
|
_c = [{}];
|
|
6707
|
-
return [4,
|
|
7374
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
6708
7375
|
case 3:
|
|
6709
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
6710
|
-
return [3,
|
|
7376
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7377
|
+
return [3, 15];
|
|
6711
7378
|
case 4:
|
|
6712
7379
|
_d = [{}];
|
|
6713
7380
|
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
6714
7381
|
case 5:
|
|
6715
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
6716
|
-
return [3,
|
|
7382
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7383
|
+
return [3, 15];
|
|
6717
7384
|
case 6:
|
|
6718
7385
|
_e = [{}];
|
|
6719
7386
|
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
6720
7387
|
case 7:
|
|
6721
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
6722
|
-
return [3,
|
|
7388
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7389
|
+
return [3, 15];
|
|
6723
7390
|
case 8:
|
|
6724
7391
|
_f = [{}];
|
|
6725
7392
|
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
6726
7393
|
case 9:
|
|
6727
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
6728
|
-
return [3,
|
|
7394
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7395
|
+
return [3, 15];
|
|
6729
7396
|
case 10:
|
|
6730
7397
|
_g = [{}];
|
|
6731
|
-
return [4,
|
|
7398
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
6732
7399
|
case 11:
|
|
6733
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(
|
|
6734
|
-
return [3,
|
|
7400
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7401
|
+
return [3, 15];
|
|
6735
7402
|
case 12:
|
|
6736
7403
|
_h = [{}];
|
|
6737
|
-
return [4,
|
|
7404
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
6738
7405
|
case 13:
|
|
6739
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(
|
|
6740
|
-
return [3,
|
|
7406
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
7407
|
+
return [3, 15];
|
|
6741
7408
|
case 14:
|
|
6742
|
-
_j = [{}];
|
|
6743
|
-
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
6744
|
-
case 15:
|
|
6745
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
6746
|
-
return [3, 17];
|
|
6747
|
-
case 16:
|
|
6748
7409
|
parsedBody = parsedOutput.body;
|
|
6749
7410
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
6750
7411
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
6751
|
-
|
|
6752
|
-
case
|
|
7412
|
+
_k.label = 15;
|
|
7413
|
+
case 15:
|
|
6753
7414
|
message = response.message || response.Message || errorCode;
|
|
6754
7415
|
response.message = message;
|
|
6755
7416
|
delete response.Message;
|
|
@@ -7743,6 +8404,108 @@ var deserializeAws_restJson1DescribeContactFlowCommandError = function (output,
|
|
|
7743
8404
|
}
|
|
7744
8405
|
});
|
|
7745
8406
|
}); };
|
|
8407
|
+
export var deserializeAws_restJson1DescribeContactFlowModuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8408
|
+
var contents, data, _a, _b;
|
|
8409
|
+
return __generator(this, function (_c) {
|
|
8410
|
+
switch (_c.label) {
|
|
8411
|
+
case 0:
|
|
8412
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
8413
|
+
return [2, deserializeAws_restJson1DescribeContactFlowModuleCommandError(output, context)];
|
|
8414
|
+
}
|
|
8415
|
+
contents = {
|
|
8416
|
+
$metadata: deserializeMetadata(output),
|
|
8417
|
+
ContactFlowModule: undefined,
|
|
8418
|
+
};
|
|
8419
|
+
_a = __expectNonNull;
|
|
8420
|
+
_b = __expectObject;
|
|
8421
|
+
return [4, parseBody(output.body, context)];
|
|
8422
|
+
case 1:
|
|
8423
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
8424
|
+
if (data.ContactFlowModule !== undefined && data.ContactFlowModule !== null) {
|
|
8425
|
+
contents.ContactFlowModule = deserializeAws_restJson1ContactFlowModule(data.ContactFlowModule, context);
|
|
8426
|
+
}
|
|
8427
|
+
return [2, Promise.resolve(contents)];
|
|
8428
|
+
}
|
|
8429
|
+
});
|
|
8430
|
+
}); };
|
|
8431
|
+
var deserializeAws_restJson1DescribeContactFlowModuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8432
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
8433
|
+
var _j;
|
|
8434
|
+
return __generator(this, function (_k) {
|
|
8435
|
+
switch (_k.label) {
|
|
8436
|
+
case 0:
|
|
8437
|
+
_a = [__assign({}, output)];
|
|
8438
|
+
_j = {};
|
|
8439
|
+
return [4, parseBody(output.body, context)];
|
|
8440
|
+
case 1:
|
|
8441
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
8442
|
+
errorCode = "UnknownError";
|
|
8443
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8444
|
+
_b = errorCode;
|
|
8445
|
+
switch (_b) {
|
|
8446
|
+
case "AccessDeniedException": return [3, 2];
|
|
8447
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
8448
|
+
case "InternalServiceException": return [3, 4];
|
|
8449
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
8450
|
+
case "InvalidParameterException": return [3, 6];
|
|
8451
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
8452
|
+
case "InvalidRequestException": return [3, 8];
|
|
8453
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
8454
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
8455
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
8456
|
+
case "ThrottlingException": return [3, 12];
|
|
8457
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
8458
|
+
}
|
|
8459
|
+
return [3, 14];
|
|
8460
|
+
case 2:
|
|
8461
|
+
_c = [{}];
|
|
8462
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
8463
|
+
case 3:
|
|
8464
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8465
|
+
return [3, 15];
|
|
8466
|
+
case 4:
|
|
8467
|
+
_d = [{}];
|
|
8468
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
8469
|
+
case 5:
|
|
8470
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8471
|
+
return [3, 15];
|
|
8472
|
+
case 6:
|
|
8473
|
+
_e = [{}];
|
|
8474
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
8475
|
+
case 7:
|
|
8476
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8477
|
+
return [3, 15];
|
|
8478
|
+
case 8:
|
|
8479
|
+
_f = [{}];
|
|
8480
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
8481
|
+
case 9:
|
|
8482
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8483
|
+
return [3, 15];
|
|
8484
|
+
case 10:
|
|
8485
|
+
_g = [{}];
|
|
8486
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8487
|
+
case 11:
|
|
8488
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8489
|
+
return [3, 15];
|
|
8490
|
+
case 12:
|
|
8491
|
+
_h = [{}];
|
|
8492
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
8493
|
+
case 13:
|
|
8494
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
8495
|
+
return [3, 15];
|
|
8496
|
+
case 14:
|
|
8497
|
+
parsedBody = parsedOutput.body;
|
|
8498
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
8499
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
8500
|
+
_k.label = 15;
|
|
8501
|
+
case 15:
|
|
8502
|
+
message = response.message || response.Message || errorCode;
|
|
8503
|
+
response.message = message;
|
|
8504
|
+
delete response.Message;
|
|
8505
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
8506
|
+
}
|
|
8507
|
+
});
|
|
8508
|
+
}); };
|
|
7746
8509
|
export var deserializeAws_restJson1DescribeHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7747
8510
|
var contents, data, _a, _b;
|
|
7748
8511
|
return __generator(this, function (_c) {
|
|
@@ -10024,8 +10787,98 @@ var deserializeAws_restJson1ListApprovedOriginsCommandError = function (output,
|
|
|
10024
10787
|
parsedBody = parsedOutput.body;
|
|
10025
10788
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
10026
10789
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
10027
|
-
_j.label = 13;
|
|
10028
|
-
case 13:
|
|
10790
|
+
_j.label = 13;
|
|
10791
|
+
case 13:
|
|
10792
|
+
message = response.message || response.Message || errorCode;
|
|
10793
|
+
response.message = message;
|
|
10794
|
+
delete response.Message;
|
|
10795
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
10796
|
+
}
|
|
10797
|
+
});
|
|
10798
|
+
}); };
|
|
10799
|
+
export var deserializeAws_restJson1ListBotsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10800
|
+
var contents, data, _a, _b;
|
|
10801
|
+
return __generator(this, function (_c) {
|
|
10802
|
+
switch (_c.label) {
|
|
10803
|
+
case 0:
|
|
10804
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
10805
|
+
return [2, deserializeAws_restJson1ListBotsCommandError(output, context)];
|
|
10806
|
+
}
|
|
10807
|
+
contents = {
|
|
10808
|
+
$metadata: deserializeMetadata(output),
|
|
10809
|
+
LexBots: undefined,
|
|
10810
|
+
NextToken: undefined,
|
|
10811
|
+
};
|
|
10812
|
+
_a = __expectNonNull;
|
|
10813
|
+
_b = __expectObject;
|
|
10814
|
+
return [4, parseBody(output.body, context)];
|
|
10815
|
+
case 1:
|
|
10816
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
10817
|
+
if (data.LexBots !== undefined && data.LexBots !== null) {
|
|
10818
|
+
contents.LexBots = deserializeAws_restJson1LexBotConfigList(data.LexBots, context);
|
|
10819
|
+
}
|
|
10820
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
10821
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
10822
|
+
}
|
|
10823
|
+
return [2, Promise.resolve(contents)];
|
|
10824
|
+
}
|
|
10825
|
+
});
|
|
10826
|
+
}); };
|
|
10827
|
+
var deserializeAws_restJson1ListBotsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10828
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
10829
|
+
var _g;
|
|
10830
|
+
return __generator(this, function (_h) {
|
|
10831
|
+
switch (_h.label) {
|
|
10832
|
+
case 0:
|
|
10833
|
+
_a = [__assign({}, output)];
|
|
10834
|
+
_g = {};
|
|
10835
|
+
return [4, parseBody(output.body, context)];
|
|
10836
|
+
case 1:
|
|
10837
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
10838
|
+
errorCode = "UnknownError";
|
|
10839
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
10840
|
+
_b = errorCode;
|
|
10841
|
+
switch (_b) {
|
|
10842
|
+
case "InternalServiceException": return [3, 2];
|
|
10843
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
10844
|
+
case "InvalidRequestException": return [3, 4];
|
|
10845
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 4];
|
|
10846
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
10847
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 6];
|
|
10848
|
+
case "ThrottlingException": return [3, 8];
|
|
10849
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 8];
|
|
10850
|
+
}
|
|
10851
|
+
return [3, 10];
|
|
10852
|
+
case 2:
|
|
10853
|
+
_c = [{}];
|
|
10854
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
10855
|
+
case 3:
|
|
10856
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10857
|
+
return [3, 11];
|
|
10858
|
+
case 4:
|
|
10859
|
+
_d = [{}];
|
|
10860
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
10861
|
+
case 5:
|
|
10862
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10863
|
+
return [3, 11];
|
|
10864
|
+
case 6:
|
|
10865
|
+
_e = [{}];
|
|
10866
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
10867
|
+
case 7:
|
|
10868
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10869
|
+
return [3, 11];
|
|
10870
|
+
case 8:
|
|
10871
|
+
_f = [{}];
|
|
10872
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
10873
|
+
case 9:
|
|
10874
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10875
|
+
return [3, 11];
|
|
10876
|
+
case 10:
|
|
10877
|
+
parsedBody = parsedOutput.body;
|
|
10878
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
10879
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
10880
|
+
_h.label = 11;
|
|
10881
|
+
case 11:
|
|
10029
10882
|
message = response.message || response.Message || errorCode;
|
|
10030
10883
|
response.message = message;
|
|
10031
10884
|
delete response.Message;
|
|
@@ -10033,17 +10886,17 @@ var deserializeAws_restJson1ListApprovedOriginsCommandError = function (output,
|
|
|
10033
10886
|
}
|
|
10034
10887
|
});
|
|
10035
10888
|
}); };
|
|
10036
|
-
export var
|
|
10889
|
+
export var deserializeAws_restJson1ListContactFlowModulesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10037
10890
|
var contents, data, _a, _b;
|
|
10038
10891
|
return __generator(this, function (_c) {
|
|
10039
10892
|
switch (_c.label) {
|
|
10040
10893
|
case 0:
|
|
10041
10894
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
10042
|
-
return [2,
|
|
10895
|
+
return [2, deserializeAws_restJson1ListContactFlowModulesCommandError(output, context)];
|
|
10043
10896
|
}
|
|
10044
10897
|
contents = {
|
|
10045
10898
|
$metadata: deserializeMetadata(output),
|
|
10046
|
-
|
|
10899
|
+
ContactFlowModulesSummaryList: undefined,
|
|
10047
10900
|
NextToken: undefined,
|
|
10048
10901
|
};
|
|
10049
10902
|
_a = __expectNonNull;
|
|
@@ -10051,8 +10904,8 @@ export var deserializeAws_restJson1ListBotsCommand = function (output, context)
|
|
|
10051
10904
|
return [4, parseBody(output.body, context)];
|
|
10052
10905
|
case 1:
|
|
10053
10906
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
10054
|
-
if (data.
|
|
10055
|
-
contents.
|
|
10907
|
+
if (data.ContactFlowModulesSummaryList !== undefined && data.ContactFlowModulesSummaryList !== null) {
|
|
10908
|
+
contents.ContactFlowModulesSummaryList = deserializeAws_restJson1ContactFlowModulesSummaryList(data.ContactFlowModulesSummaryList, context);
|
|
10056
10909
|
}
|
|
10057
10910
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
10058
10911
|
contents.NextToken = __expectString(data.NextToken);
|
|
@@ -10061,61 +10914,77 @@ export var deserializeAws_restJson1ListBotsCommand = function (output, context)
|
|
|
10061
10914
|
}
|
|
10062
10915
|
});
|
|
10063
10916
|
}); };
|
|
10064
|
-
var
|
|
10065
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
10066
|
-
var
|
|
10067
|
-
return __generator(this, function (
|
|
10068
|
-
switch (
|
|
10917
|
+
var deserializeAws_restJson1ListContactFlowModulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10918
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
10919
|
+
var _j;
|
|
10920
|
+
return __generator(this, function (_k) {
|
|
10921
|
+
switch (_k.label) {
|
|
10069
10922
|
case 0:
|
|
10070
10923
|
_a = [__assign({}, output)];
|
|
10071
|
-
|
|
10924
|
+
_j = {};
|
|
10072
10925
|
return [4, parseBody(output.body, context)];
|
|
10073
10926
|
case 1:
|
|
10074
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
10927
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
10075
10928
|
errorCode = "UnknownError";
|
|
10076
10929
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
10077
10930
|
_b = errorCode;
|
|
10078
10931
|
switch (_b) {
|
|
10079
|
-
case "
|
|
10080
|
-
case "com.amazonaws.connect#
|
|
10081
|
-
case "
|
|
10082
|
-
case "com.amazonaws.connect#
|
|
10083
|
-
case "
|
|
10084
|
-
case "com.amazonaws.connect#
|
|
10085
|
-
case "
|
|
10086
|
-
case "com.amazonaws.connect#
|
|
10932
|
+
case "AccessDeniedException": return [3, 2];
|
|
10933
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
10934
|
+
case "InternalServiceException": return [3, 4];
|
|
10935
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
10936
|
+
case "InvalidParameterException": return [3, 6];
|
|
10937
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
10938
|
+
case "InvalidRequestException": return [3, 8];
|
|
10939
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
10940
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
10941
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
10942
|
+
case "ThrottlingException": return [3, 12];
|
|
10943
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
10087
10944
|
}
|
|
10088
|
-
return [3,
|
|
10945
|
+
return [3, 14];
|
|
10089
10946
|
case 2:
|
|
10090
10947
|
_c = [{}];
|
|
10091
|
-
return [4,
|
|
10948
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
10092
10949
|
case 3:
|
|
10093
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
10094
|
-
return [3,
|
|
10950
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10951
|
+
return [3, 15];
|
|
10095
10952
|
case 4:
|
|
10096
10953
|
_d = [{}];
|
|
10097
|
-
return [4,
|
|
10954
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
10098
10955
|
case 5:
|
|
10099
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
10100
|
-
return [3,
|
|
10956
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10957
|
+
return [3, 15];
|
|
10101
10958
|
case 6:
|
|
10102
10959
|
_e = [{}];
|
|
10103
|
-
return [4,
|
|
10960
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
10104
10961
|
case 7:
|
|
10105
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
10106
|
-
return [3,
|
|
10962
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10963
|
+
return [3, 15];
|
|
10107
10964
|
case 8:
|
|
10108
10965
|
_f = [{}];
|
|
10109
|
-
return [4,
|
|
10966
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
10110
10967
|
case 9:
|
|
10111
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
10112
|
-
return [3,
|
|
10968
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10969
|
+
return [3, 15];
|
|
10113
10970
|
case 10:
|
|
10971
|
+
_g = [{}];
|
|
10972
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
10973
|
+
case 11:
|
|
10974
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10975
|
+
return [3, 15];
|
|
10976
|
+
case 12:
|
|
10977
|
+
_h = [{}];
|
|
10978
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
10979
|
+
case 13:
|
|
10980
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
10981
|
+
return [3, 15];
|
|
10982
|
+
case 14:
|
|
10114
10983
|
parsedBody = parsedOutput.body;
|
|
10115
10984
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
10116
10985
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
10117
|
-
|
|
10118
|
-
case
|
|
10986
|
+
_k.label = 15;
|
|
10987
|
+
case 15:
|
|
10119
10988
|
message = response.message || response.Message || errorCode;
|
|
10120
10989
|
response.message = message;
|
|
10121
10990
|
delete response.Message;
|
|
@@ -13564,8 +14433,184 @@ var deserializeAws_restJson1UpdateContactCommandError = function (output, contex
|
|
|
13564
14433
|
parsedBody = parsedOutput.body;
|
|
13565
14434
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
13566
14435
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
13567
|
-
_j.label = 13;
|
|
13568
|
-
case 13:
|
|
14436
|
+
_j.label = 13;
|
|
14437
|
+
case 13:
|
|
14438
|
+
message = response.message || response.Message || errorCode;
|
|
14439
|
+
response.message = message;
|
|
14440
|
+
delete response.Message;
|
|
14441
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14442
|
+
}
|
|
14443
|
+
});
|
|
14444
|
+
}); };
|
|
14445
|
+
export var deserializeAws_restJson1UpdateContactAttributesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14446
|
+
var contents;
|
|
14447
|
+
return __generator(this, function (_a) {
|
|
14448
|
+
switch (_a.label) {
|
|
14449
|
+
case 0:
|
|
14450
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14451
|
+
return [2, deserializeAws_restJson1UpdateContactAttributesCommandError(output, context)];
|
|
14452
|
+
}
|
|
14453
|
+
contents = {
|
|
14454
|
+
$metadata: deserializeMetadata(output),
|
|
14455
|
+
};
|
|
14456
|
+
return [4, collectBody(output.body, context)];
|
|
14457
|
+
case 1:
|
|
14458
|
+
_a.sent();
|
|
14459
|
+
return [2, Promise.resolve(contents)];
|
|
14460
|
+
}
|
|
14461
|
+
});
|
|
14462
|
+
}); };
|
|
14463
|
+
var deserializeAws_restJson1UpdateContactAttributesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14464
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
14465
|
+
var _g;
|
|
14466
|
+
return __generator(this, function (_h) {
|
|
14467
|
+
switch (_h.label) {
|
|
14468
|
+
case 0:
|
|
14469
|
+
_a = [__assign({}, output)];
|
|
14470
|
+
_g = {};
|
|
14471
|
+
return [4, parseBody(output.body, context)];
|
|
14472
|
+
case 1:
|
|
14473
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
14474
|
+
errorCode = "UnknownError";
|
|
14475
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14476
|
+
_b = errorCode;
|
|
14477
|
+
switch (_b) {
|
|
14478
|
+
case "InternalServiceException": return [3, 2];
|
|
14479
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
14480
|
+
case "InvalidParameterException": return [3, 4];
|
|
14481
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
14482
|
+
case "InvalidRequestException": return [3, 6];
|
|
14483
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
14484
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
14485
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
14486
|
+
}
|
|
14487
|
+
return [3, 10];
|
|
14488
|
+
case 2:
|
|
14489
|
+
_c = [{}];
|
|
14490
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14491
|
+
case 3:
|
|
14492
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14493
|
+
return [3, 11];
|
|
14494
|
+
case 4:
|
|
14495
|
+
_d = [{}];
|
|
14496
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
14497
|
+
case 5:
|
|
14498
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14499
|
+
return [3, 11];
|
|
14500
|
+
case 6:
|
|
14501
|
+
_e = [{}];
|
|
14502
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14503
|
+
case 7:
|
|
14504
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14505
|
+
return [3, 11];
|
|
14506
|
+
case 8:
|
|
14507
|
+
_f = [{}];
|
|
14508
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14509
|
+
case 9:
|
|
14510
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14511
|
+
return [3, 11];
|
|
14512
|
+
case 10:
|
|
14513
|
+
parsedBody = parsedOutput.body;
|
|
14514
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14515
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14516
|
+
_h.label = 11;
|
|
14517
|
+
case 11:
|
|
14518
|
+
message = response.message || response.Message || errorCode;
|
|
14519
|
+
response.message = message;
|
|
14520
|
+
delete response.Message;
|
|
14521
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14522
|
+
}
|
|
14523
|
+
});
|
|
14524
|
+
}); };
|
|
14525
|
+
export var deserializeAws_restJson1UpdateContactFlowContentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14526
|
+
var contents;
|
|
14527
|
+
return __generator(this, function (_a) {
|
|
14528
|
+
switch (_a.label) {
|
|
14529
|
+
case 0:
|
|
14530
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14531
|
+
return [2, deserializeAws_restJson1UpdateContactFlowContentCommandError(output, context)];
|
|
14532
|
+
}
|
|
14533
|
+
contents = {
|
|
14534
|
+
$metadata: deserializeMetadata(output),
|
|
14535
|
+
};
|
|
14536
|
+
return [4, collectBody(output.body, context)];
|
|
14537
|
+
case 1:
|
|
14538
|
+
_a.sent();
|
|
14539
|
+
return [2, Promise.resolve(contents)];
|
|
14540
|
+
}
|
|
14541
|
+
});
|
|
14542
|
+
}); };
|
|
14543
|
+
var deserializeAws_restJson1UpdateContactFlowContentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14544
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
14545
|
+
var _j;
|
|
14546
|
+
return __generator(this, function (_k) {
|
|
14547
|
+
switch (_k.label) {
|
|
14548
|
+
case 0:
|
|
14549
|
+
_a = [__assign({}, output)];
|
|
14550
|
+
_j = {};
|
|
14551
|
+
return [4, parseBody(output.body, context)];
|
|
14552
|
+
case 1:
|
|
14553
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
14554
|
+
errorCode = "UnknownError";
|
|
14555
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14556
|
+
_b = errorCode;
|
|
14557
|
+
switch (_b) {
|
|
14558
|
+
case "InternalServiceException": return [3, 2];
|
|
14559
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
14560
|
+
case "InvalidContactFlowException": return [3, 4];
|
|
14561
|
+
case "com.amazonaws.connect#InvalidContactFlowException": return [3, 4];
|
|
14562
|
+
case "InvalidParameterException": return [3, 6];
|
|
14563
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
14564
|
+
case "InvalidRequestException": return [3, 8];
|
|
14565
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
14566
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
14567
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
14568
|
+
case "ThrottlingException": return [3, 12];
|
|
14569
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
14570
|
+
}
|
|
14571
|
+
return [3, 14];
|
|
14572
|
+
case 2:
|
|
14573
|
+
_c = [{}];
|
|
14574
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14575
|
+
case 3:
|
|
14576
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14577
|
+
return [3, 15];
|
|
14578
|
+
case 4:
|
|
14579
|
+
_d = [{}];
|
|
14580
|
+
return [4, deserializeAws_restJson1InvalidContactFlowExceptionResponse(parsedOutput, context)];
|
|
14581
|
+
case 5:
|
|
14582
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14583
|
+
return [3, 15];
|
|
14584
|
+
case 6:
|
|
14585
|
+
_e = [{}];
|
|
14586
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
14587
|
+
case 7:
|
|
14588
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14589
|
+
return [3, 15];
|
|
14590
|
+
case 8:
|
|
14591
|
+
_f = [{}];
|
|
14592
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14593
|
+
case 9:
|
|
14594
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14595
|
+
return [3, 15];
|
|
14596
|
+
case 10:
|
|
14597
|
+
_g = [{}];
|
|
14598
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14599
|
+
case 11:
|
|
14600
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14601
|
+
return [3, 15];
|
|
14602
|
+
case 12:
|
|
14603
|
+
_h = [{}];
|
|
14604
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14605
|
+
case 13:
|
|
14606
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14607
|
+
return [3, 15];
|
|
14608
|
+
case 14:
|
|
14609
|
+
parsedBody = parsedOutput.body;
|
|
14610
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14611
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14612
|
+
_k.label = 15;
|
|
14613
|
+
case 15:
|
|
13569
14614
|
message = response.message || response.Message || errorCode;
|
|
13570
14615
|
response.message = message;
|
|
13571
14616
|
delete response.Message;
|
|
@@ -13573,13 +14618,13 @@ var deserializeAws_restJson1UpdateContactCommandError = function (output, contex
|
|
|
13573
14618
|
}
|
|
13574
14619
|
});
|
|
13575
14620
|
}); };
|
|
13576
|
-
export var
|
|
14621
|
+
export var deserializeAws_restJson1UpdateContactFlowMetadataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13577
14622
|
var contents;
|
|
13578
14623
|
return __generator(this, function (_a) {
|
|
13579
14624
|
switch (_a.label) {
|
|
13580
14625
|
case 0:
|
|
13581
14626
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
13582
|
-
return [2,
|
|
14627
|
+
return [2, deserializeAws_restJson1UpdateContactFlowMetadataCommandError(output, context)];
|
|
13583
14628
|
}
|
|
13584
14629
|
contents = {
|
|
13585
14630
|
$metadata: deserializeMetadata(output),
|
|
@@ -13591,61 +14636,77 @@ export var deserializeAws_restJson1UpdateContactAttributesCommand = function (ou
|
|
|
13591
14636
|
}
|
|
13592
14637
|
});
|
|
13593
14638
|
}); };
|
|
13594
|
-
var
|
|
13595
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
13596
|
-
var
|
|
13597
|
-
return __generator(this, function (
|
|
13598
|
-
switch (
|
|
14639
|
+
var deserializeAws_restJson1UpdateContactFlowMetadataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14640
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
14641
|
+
var _j;
|
|
14642
|
+
return __generator(this, function (_k) {
|
|
14643
|
+
switch (_k.label) {
|
|
13599
14644
|
case 0:
|
|
13600
14645
|
_a = [__assign({}, output)];
|
|
13601
|
-
|
|
14646
|
+
_j = {};
|
|
13602
14647
|
return [4, parseBody(output.body, context)];
|
|
13603
14648
|
case 1:
|
|
13604
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
14649
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
13605
14650
|
errorCode = "UnknownError";
|
|
13606
14651
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
13607
14652
|
_b = errorCode;
|
|
13608
14653
|
switch (_b) {
|
|
13609
|
-
case "
|
|
13610
|
-
case "com.amazonaws.connect#
|
|
13611
|
-
case "
|
|
13612
|
-
case "com.amazonaws.connect#
|
|
13613
|
-
case "
|
|
13614
|
-
case "com.amazonaws.connect#
|
|
13615
|
-
case "
|
|
13616
|
-
case "com.amazonaws.connect#
|
|
14654
|
+
case "DuplicateResourceException": return [3, 2];
|
|
14655
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 2];
|
|
14656
|
+
case "InternalServiceException": return [3, 4];
|
|
14657
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
14658
|
+
case "InvalidParameterException": return [3, 6];
|
|
14659
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
14660
|
+
case "InvalidRequestException": return [3, 8];
|
|
14661
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
14662
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
14663
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
14664
|
+
case "ThrottlingException": return [3, 12];
|
|
14665
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
13617
14666
|
}
|
|
13618
|
-
return [3,
|
|
14667
|
+
return [3, 14];
|
|
13619
14668
|
case 2:
|
|
13620
14669
|
_c = [{}];
|
|
13621
|
-
return [4,
|
|
14670
|
+
return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
13622
14671
|
case 3:
|
|
13623
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
13624
|
-
return [3,
|
|
14672
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14673
|
+
return [3, 15];
|
|
13625
14674
|
case 4:
|
|
13626
14675
|
_d = [{}];
|
|
13627
|
-
return [4,
|
|
14676
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
13628
14677
|
case 5:
|
|
13629
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
13630
|
-
return [3,
|
|
14678
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14679
|
+
return [3, 15];
|
|
13631
14680
|
case 6:
|
|
13632
14681
|
_e = [{}];
|
|
13633
|
-
return [4,
|
|
14682
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
13634
14683
|
case 7:
|
|
13635
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
13636
|
-
return [3,
|
|
14684
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14685
|
+
return [3, 15];
|
|
13637
14686
|
case 8:
|
|
13638
14687
|
_f = [{}];
|
|
13639
|
-
return [4,
|
|
14688
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
13640
14689
|
case 9:
|
|
13641
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
13642
|
-
return [3,
|
|
14690
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14691
|
+
return [3, 15];
|
|
13643
14692
|
case 10:
|
|
14693
|
+
_g = [{}];
|
|
14694
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14695
|
+
case 11:
|
|
14696
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14697
|
+
return [3, 15];
|
|
14698
|
+
case 12:
|
|
14699
|
+
_h = [{}];
|
|
14700
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14701
|
+
case 13:
|
|
14702
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14703
|
+
return [3, 15];
|
|
14704
|
+
case 14:
|
|
13644
14705
|
parsedBody = parsedOutput.body;
|
|
13645
14706
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
13646
14707
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
13647
|
-
|
|
13648
|
-
case
|
|
14708
|
+
_k.label = 15;
|
|
14709
|
+
case 15:
|
|
13649
14710
|
message = response.message || response.Message || errorCode;
|
|
13650
14711
|
response.message = message;
|
|
13651
14712
|
delete response.Message;
|
|
@@ -13653,13 +14714,13 @@ var deserializeAws_restJson1UpdateContactAttributesCommandError = function (outp
|
|
|
13653
14714
|
}
|
|
13654
14715
|
});
|
|
13655
14716
|
}); };
|
|
13656
|
-
export var
|
|
14717
|
+
export var deserializeAws_restJson1UpdateContactFlowModuleContentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13657
14718
|
var contents;
|
|
13658
14719
|
return __generator(this, function (_a) {
|
|
13659
14720
|
switch (_a.label) {
|
|
13660
14721
|
case 0:
|
|
13661
14722
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
13662
|
-
return [2,
|
|
14723
|
+
return [2, deserializeAws_restJson1UpdateContactFlowModuleContentCommandError(output, context)];
|
|
13663
14724
|
}
|
|
13664
14725
|
contents = {
|
|
13665
14726
|
$metadata: deserializeMetadata(output),
|
|
@@ -13671,7 +14732,7 @@ export var deserializeAws_restJson1UpdateContactFlowContentCommand = function (o
|
|
|
13671
14732
|
}
|
|
13672
14733
|
});
|
|
13673
14734
|
}); };
|
|
13674
|
-
var
|
|
14735
|
+
var deserializeAws_restJson1UpdateContactFlowModuleContentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13675
14736
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
13676
14737
|
var _j;
|
|
13677
14738
|
return __generator(this, function (_k) {
|
|
@@ -13686,12 +14747,12 @@ var deserializeAws_restJson1UpdateContactFlowContentCommandError = function (out
|
|
|
13686
14747
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
13687
14748
|
_b = errorCode;
|
|
13688
14749
|
switch (_b) {
|
|
13689
|
-
case "
|
|
13690
|
-
case "com.amazonaws.connect#
|
|
13691
|
-
case "
|
|
13692
|
-
case "com.amazonaws.connect#
|
|
13693
|
-
case "
|
|
13694
|
-
case "com.amazonaws.connect#
|
|
14750
|
+
case "AccessDeniedException": return [3, 2];
|
|
14751
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
14752
|
+
case "InternalServiceException": return [3, 4];
|
|
14753
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
14754
|
+
case "InvalidContactFlowModuleException": return [3, 6];
|
|
14755
|
+
case "com.amazonaws.connect#InvalidContactFlowModuleException": return [3, 6];
|
|
13695
14756
|
case "InvalidRequestException": return [3, 8];
|
|
13696
14757
|
case "com.amazonaws.connect#InvalidRequestException": return [3, 8];
|
|
13697
14758
|
case "ResourceNotFoundException": return [3, 10];
|
|
@@ -13702,19 +14763,19 @@ var deserializeAws_restJson1UpdateContactFlowContentCommandError = function (out
|
|
|
13702
14763
|
return [3, 14];
|
|
13703
14764
|
case 2:
|
|
13704
14765
|
_c = [{}];
|
|
13705
|
-
return [4,
|
|
14766
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
13706
14767
|
case 3:
|
|
13707
14768
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13708
14769
|
return [3, 15];
|
|
13709
14770
|
case 4:
|
|
13710
14771
|
_d = [{}];
|
|
13711
|
-
return [4,
|
|
14772
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
13712
14773
|
case 5:
|
|
13713
14774
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13714
14775
|
return [3, 15];
|
|
13715
14776
|
case 6:
|
|
13716
14777
|
_e = [{}];
|
|
13717
|
-
return [4,
|
|
14778
|
+
return [4, deserializeAws_restJson1InvalidContactFlowModuleExceptionResponse(parsedOutput, context)];
|
|
13718
14779
|
case 7:
|
|
13719
14780
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
13720
14781
|
return [3, 15];
|
|
@@ -13749,6 +14810,110 @@ var deserializeAws_restJson1UpdateContactFlowContentCommandError = function (out
|
|
|
13749
14810
|
}
|
|
13750
14811
|
});
|
|
13751
14812
|
}); };
|
|
14813
|
+
export var deserializeAws_restJson1UpdateContactFlowModuleMetadataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14814
|
+
var contents;
|
|
14815
|
+
return __generator(this, function (_a) {
|
|
14816
|
+
switch (_a.label) {
|
|
14817
|
+
case 0:
|
|
14818
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14819
|
+
return [2, deserializeAws_restJson1UpdateContactFlowModuleMetadataCommandError(output, context)];
|
|
14820
|
+
}
|
|
14821
|
+
contents = {
|
|
14822
|
+
$metadata: deserializeMetadata(output),
|
|
14823
|
+
};
|
|
14824
|
+
return [4, collectBody(output.body, context)];
|
|
14825
|
+
case 1:
|
|
14826
|
+
_a.sent();
|
|
14827
|
+
return [2, Promise.resolve(contents)];
|
|
14828
|
+
}
|
|
14829
|
+
});
|
|
14830
|
+
}); };
|
|
14831
|
+
var deserializeAws_restJson1UpdateContactFlowModuleMetadataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14832
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
14833
|
+
var _k;
|
|
14834
|
+
return __generator(this, function (_l) {
|
|
14835
|
+
switch (_l.label) {
|
|
14836
|
+
case 0:
|
|
14837
|
+
_a = [__assign({}, output)];
|
|
14838
|
+
_k = {};
|
|
14839
|
+
return [4, parseBody(output.body, context)];
|
|
14840
|
+
case 1:
|
|
14841
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
14842
|
+
errorCode = "UnknownError";
|
|
14843
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14844
|
+
_b = errorCode;
|
|
14845
|
+
switch (_b) {
|
|
14846
|
+
case "AccessDeniedException": return [3, 2];
|
|
14847
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
14848
|
+
case "DuplicateResourceException": return [3, 4];
|
|
14849
|
+
case "com.amazonaws.connect#DuplicateResourceException": return [3, 4];
|
|
14850
|
+
case "InternalServiceException": return [3, 6];
|
|
14851
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 6];
|
|
14852
|
+
case "InvalidParameterException": return [3, 8];
|
|
14853
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 8];
|
|
14854
|
+
case "InvalidRequestException": return [3, 10];
|
|
14855
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 10];
|
|
14856
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
14857
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
|
|
14858
|
+
case "ThrottlingException": return [3, 14];
|
|
14859
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 14];
|
|
14860
|
+
}
|
|
14861
|
+
return [3, 16];
|
|
14862
|
+
case 2:
|
|
14863
|
+
_c = [{}];
|
|
14864
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
14865
|
+
case 3:
|
|
14866
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14867
|
+
return [3, 17];
|
|
14868
|
+
case 4:
|
|
14869
|
+
_d = [{}];
|
|
14870
|
+
return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
|
|
14871
|
+
case 5:
|
|
14872
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14873
|
+
return [3, 17];
|
|
14874
|
+
case 6:
|
|
14875
|
+
_e = [{}];
|
|
14876
|
+
return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14877
|
+
case 7:
|
|
14878
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14879
|
+
return [3, 17];
|
|
14880
|
+
case 8:
|
|
14881
|
+
_f = [{}];
|
|
14882
|
+
return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
14883
|
+
case 9:
|
|
14884
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14885
|
+
return [3, 17];
|
|
14886
|
+
case 10:
|
|
14887
|
+
_g = [{}];
|
|
14888
|
+
return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
14889
|
+
case 11:
|
|
14890
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14891
|
+
return [3, 17];
|
|
14892
|
+
case 12:
|
|
14893
|
+
_h = [{}];
|
|
14894
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14895
|
+
case 13:
|
|
14896
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14897
|
+
return [3, 17];
|
|
14898
|
+
case 14:
|
|
14899
|
+
_j = [{}];
|
|
14900
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14901
|
+
case 15:
|
|
14902
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
14903
|
+
return [3, 17];
|
|
14904
|
+
case 16:
|
|
14905
|
+
parsedBody = parsedOutput.body;
|
|
14906
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
14907
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
14908
|
+
_l.label = 17;
|
|
14909
|
+
case 17:
|
|
14910
|
+
message = response.message || response.Message || errorCode;
|
|
14911
|
+
response.message = message;
|
|
14912
|
+
delete response.Message;
|
|
14913
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
14914
|
+
}
|
|
14915
|
+
});
|
|
14916
|
+
}); };
|
|
13752
14917
|
export var deserializeAws_restJson1UpdateContactFlowNameCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13753
14918
|
var contents;
|
|
13754
14919
|
return __generator(this, function (_a) {
|
|
@@ -15997,6 +17162,22 @@ var deserializeAws_restJson1DuplicateResourceExceptionResponse = function (parse
|
|
|
15997
17162
|
return [2, contents];
|
|
15998
17163
|
});
|
|
15999
17164
|
}); };
|
|
17165
|
+
var deserializeAws_restJson1IdempotencyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
17166
|
+
var contents, data;
|
|
17167
|
+
return __generator(this, function (_a) {
|
|
17168
|
+
contents = {
|
|
17169
|
+
name: "IdempotencyException",
|
|
17170
|
+
$fault: "client",
|
|
17171
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
17172
|
+
Message: undefined,
|
|
17173
|
+
};
|
|
17174
|
+
data = parsedOutput.body;
|
|
17175
|
+
if (data.Message !== undefined && data.Message !== null) {
|
|
17176
|
+
contents.Message = __expectString(data.Message);
|
|
17177
|
+
}
|
|
17178
|
+
return [2, contents];
|
|
17179
|
+
});
|
|
17180
|
+
}); };
|
|
16000
17181
|
var deserializeAws_restJson1InternalServiceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16001
17182
|
var contents, data;
|
|
16002
17183
|
return __generator(this, function (_a) {
|
|
@@ -16029,6 +17210,22 @@ var deserializeAws_restJson1InvalidContactFlowExceptionResponse = function (pars
|
|
|
16029
17210
|
return [2, contents];
|
|
16030
17211
|
});
|
|
16031
17212
|
}); };
|
|
17213
|
+
var deserializeAws_restJson1InvalidContactFlowModuleExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
17214
|
+
var contents, data;
|
|
17215
|
+
return __generator(this, function (_a) {
|
|
17216
|
+
contents = {
|
|
17217
|
+
name: "InvalidContactFlowModuleException",
|
|
17218
|
+
$fault: "client",
|
|
17219
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
17220
|
+
Problems: undefined,
|
|
17221
|
+
};
|
|
17222
|
+
data = parsedOutput.body;
|
|
17223
|
+
if (data.Problems !== undefined && data.Problems !== null) {
|
|
17224
|
+
contents.Problems = deserializeAws_restJson1Problems(data.Problems, context);
|
|
17225
|
+
}
|
|
17226
|
+
return [2, contents];
|
|
17227
|
+
});
|
|
17228
|
+
}); };
|
|
16032
17229
|
var deserializeAws_restJson1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
16033
17230
|
var contents, data;
|
|
16034
17231
|
return __generator(this, function (_a) {
|
|
@@ -16610,15 +17807,49 @@ var deserializeAws_restJson1ContactFlow = function (output, context) {
|
|
|
16610
17807
|
Description: __expectString(output.Description),
|
|
16611
17808
|
Id: __expectString(output.Id),
|
|
16612
17809
|
Name: __expectString(output.Name),
|
|
17810
|
+
State: __expectString(output.State),
|
|
16613
17811
|
Tags: output.Tags !== undefined && output.Tags !== null
|
|
16614
17812
|
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
16615
17813
|
: undefined,
|
|
16616
17814
|
Type: __expectString(output.Type),
|
|
16617
17815
|
};
|
|
16618
17816
|
};
|
|
17817
|
+
var deserializeAws_restJson1ContactFlowModule = function (output, context) {
|
|
17818
|
+
return {
|
|
17819
|
+
Arn: __expectString(output.Arn),
|
|
17820
|
+
Content: __expectString(output.Content),
|
|
17821
|
+
Description: __expectString(output.Description),
|
|
17822
|
+
Id: __expectString(output.Id),
|
|
17823
|
+
Name: __expectString(output.Name),
|
|
17824
|
+
State: __expectString(output.State),
|
|
17825
|
+
Status: __expectString(output.Status),
|
|
17826
|
+
Tags: output.Tags !== undefined && output.Tags !== null
|
|
17827
|
+
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
17828
|
+
: undefined,
|
|
17829
|
+
};
|
|
17830
|
+
};
|
|
17831
|
+
var deserializeAws_restJson1ContactFlowModulesSummaryList = function (output, context) {
|
|
17832
|
+
return (output || [])
|
|
17833
|
+
.filter(function (e) { return e != null; })
|
|
17834
|
+
.map(function (entry) {
|
|
17835
|
+
if (entry === null) {
|
|
17836
|
+
return null;
|
|
17837
|
+
}
|
|
17838
|
+
return deserializeAws_restJson1ContactFlowModuleSummary(entry, context);
|
|
17839
|
+
});
|
|
17840
|
+
};
|
|
17841
|
+
var deserializeAws_restJson1ContactFlowModuleSummary = function (output, context) {
|
|
17842
|
+
return {
|
|
17843
|
+
Arn: __expectString(output.Arn),
|
|
17844
|
+
Id: __expectString(output.Id),
|
|
17845
|
+
Name: __expectString(output.Name),
|
|
17846
|
+
State: __expectString(output.State),
|
|
17847
|
+
};
|
|
17848
|
+
};
|
|
16619
17849
|
var deserializeAws_restJson1ContactFlowSummary = function (output, context) {
|
|
16620
17850
|
return {
|
|
16621
17851
|
Arn: __expectString(output.Arn),
|
|
17852
|
+
ContactFlowState: __expectString(output.ContactFlowState),
|
|
16622
17853
|
ContactFlowType: __expectString(output.ContactFlowType),
|
|
16623
17854
|
Id: __expectString(output.Id),
|
|
16624
17855
|
Name: __expectString(output.Name),
|