@aws-sdk/client-connect 3.62.0 → 3.74.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 +27 -0
- package/README.md +2 -2
- package/dist-cjs/Connect.js +120 -0
- package/dist-cjs/commands/AssociatePhoneNumberContactFlowCommand.js +36 -0
- package/dist-cjs/commands/ClaimPhoneNumberCommand.js +36 -0
- package/dist-cjs/commands/DescribePhoneNumberCommand.js +36 -0
- package/dist-cjs/commands/DisassociatePhoneNumberContactFlowCommand.js +36 -0
- package/dist-cjs/commands/ListPhoneNumbersV2Command.js +36 -0
- package/dist-cjs/commands/ReleasePhoneNumberCommand.js +36 -0
- package/dist-cjs/commands/SearchAvailablePhoneNumbersCommand.js +37 -0
- package/dist-cjs/commands/SearchVocabulariesCommand.js +3 -3
- package/dist-cjs/commands/StartChatContactCommand.js +3 -3
- package/dist-cjs/commands/StartContactRecordingCommand.js +3 -3
- package/dist-cjs/commands/StartContactStreamingCommand.js +3 -3
- package/dist-cjs/commands/UpdatePhoneNumberCommand.js +36 -0
- package/dist-cjs/commands/index.js +8 -0
- package/dist-cjs/models/models_0.js +795 -803
- package/dist-cjs/models/models_1.js +118 -2
- package/dist-cjs/pagination/ListPhoneNumbersV2Paginator.js +35 -0
- package/dist-cjs/pagination/SearchAvailablePhoneNumbersPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +744 -12
- package/dist-es/Connect.js +120 -0
- package/dist-es/commands/AssociatePhoneNumberContactFlowCommand.js +39 -0
- package/dist-es/commands/ClaimPhoneNumberCommand.js +39 -0
- package/dist-es/commands/DescribePhoneNumberCommand.js +39 -0
- package/dist-es/commands/DisassociatePhoneNumberContactFlowCommand.js +39 -0
- package/dist-es/commands/ListPhoneNumbersV2Command.js +39 -0
- package/dist-es/commands/ReleasePhoneNumberCommand.js +39 -0
- package/dist-es/commands/SearchAvailablePhoneNumbersCommand.js +40 -0
- package/dist-es/commands/SearchVocabulariesCommand.js +1 -1
- package/dist-es/commands/StartChatContactCommand.js +1 -1
- package/dist-es/commands/StartContactRecordingCommand.js +1 -1
- package/dist-es/commands/StartContactStreamingCommand.js +1 -1
- package/dist-es/commands/UpdatePhoneNumberCommand.js +39 -0
- package/dist-es/commands/index.js +8 -0
- package/dist-es/models/models_0.js +320 -329
- package/dist-es/models/models_1.js +83 -0
- package/dist-es/pagination/ListPhoneNumbersV2Paginator.js +74 -0
- package/dist-es/pagination/SearchAvailablePhoneNumbersPaginator.js +74 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +960 -36
- package/dist-types/Connect.d.ts +59 -1
- package/dist-types/ConnectClient.d.ts +10 -2
- package/dist-types/commands/AssociatePhoneNumberContactFlowCommand.d.ts +35 -0
- package/dist-types/commands/ClaimPhoneNumberCommand.d.ts +35 -0
- package/dist-types/commands/DescribePhoneNumberCommand.d.ts +35 -0
- package/dist-types/commands/DisassociatePhoneNumberContactFlowCommand.d.ts +35 -0
- package/dist-types/commands/ListPhoneNumbersV2Command.d.ts +37 -0
- package/dist-types/commands/ReleasePhoneNumberCommand.d.ts +35 -0
- package/dist-types/commands/SearchAvailablePhoneNumbersCommand.d.ts +36 -0
- package/dist-types/commands/SearchVocabulariesCommand.d.ts +1 -1
- package/dist-types/commands/StartChatContactCommand.d.ts +1 -1
- package/dist-types/commands/StartContactRecordingCommand.d.ts +1 -1
- package/dist-types/commands/StartContactStreamingCommand.d.ts +1 -1
- package/dist-types/commands/TagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UpdatePhoneNumberCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +8 -0
- package/dist-types/models/models_0.d.ts +778 -763
- package/dist-types/models/models_1.d.ts +377 -1
- package/dist-types/pagination/ListPhoneNumbersV2Paginator.d.ts +4 -0
- package/dist-types/pagination/SearchAvailablePhoneNumbersPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +24 -0
- package/dist-types/ts3.4/Connect.d.ts +40 -0
- package/dist-types/ts3.4/ConnectClient.d.ts +10 -2
- package/dist-types/ts3.4/commands/AssociatePhoneNumberContactFlowCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ClaimPhoneNumberCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribePhoneNumberCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DisassociatePhoneNumberContactFlowCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListPhoneNumbersV2Command.d.ts +17 -0
- package/dist-types/ts3.4/commands/ReleasePhoneNumberCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/SearchAvailablePhoneNumbersCommand.d.ts +18 -0
- package/dist-types/ts3.4/commands/SearchVocabulariesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StartChatContactCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StartContactRecordingCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StartContactStreamingCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdatePhoneNumberCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +8 -0
- package/dist-types/ts3.4/models/models_0.d.ts +767 -749
- package/dist-types/ts3.4/models/models_1.d.ts +212 -1
- package/dist-types/ts3.4/pagination/ListPhoneNumbersV2Paginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/SearchAvailablePhoneNumbersPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
- package/package.json +7 -7
|
@@ -3,8 +3,8 @@ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
|
3
3
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { ConnectServiceException as __BaseException } from "../models/ConnectServiceException";
|
|
6
|
-
import { AccessDeniedException, ContactFlowNotPublishedException,
|
|
7
|
-
import { ContactNotFoundException, OutboundContactNotPermittedException, } from "../models/models_1";
|
|
6
|
+
import { AccessDeniedException, ContactFlowNotPublishedException, DuplicateResourceException, IdempotencyException, InternalServiceException, InvalidContactFlowException, InvalidContactFlowModuleException, InvalidParameterException, InvalidRequestException, LimitExceededException, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UserNotFoundException, } from "../models/models_0";
|
|
7
|
+
import { ContactNotFoundException, DestinationNotAllowedException, OutboundContactNotPermittedException, } from "../models/models_1";
|
|
8
8
|
export var serializeAws_restJson1AssociateApprovedOriginCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9
9
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
10
10
|
return __generator(this, function (_c) {
|
|
@@ -226,6 +226,41 @@ export var serializeAws_restJson1AssociateLexBotCommand = function (input, conte
|
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
228
|
}); };
|
|
229
|
+
export var serializeAws_restJson1AssociatePhoneNumberContactFlowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
230
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
231
|
+
return __generator(this, function (_c) {
|
|
232
|
+
switch (_c.label) {
|
|
233
|
+
case 0: return [4, context.endpoint()];
|
|
234
|
+
case 1:
|
|
235
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
236
|
+
headers = {
|
|
237
|
+
"content-type": "application/json",
|
|
238
|
+
};
|
|
239
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
240
|
+
"/phone-number/{PhoneNumberId}/contact-flow";
|
|
241
|
+
if (input.PhoneNumberId !== undefined) {
|
|
242
|
+
labelValue = input.PhoneNumberId;
|
|
243
|
+
if (labelValue.length <= 0) {
|
|
244
|
+
throw new Error("Empty value provided for input HTTP label: PhoneNumberId.");
|
|
245
|
+
}
|
|
246
|
+
resolvedPath = resolvedPath.replace("{PhoneNumberId}", __extendedEncodeURIComponent(labelValue));
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
throw new Error("No value provided for input HTTP label: PhoneNumberId.");
|
|
250
|
+
}
|
|
251
|
+
body = JSON.stringify(__assign(__assign({}, (input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId })), (input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId })));
|
|
252
|
+
return [2, new __HttpRequest({
|
|
253
|
+
protocol: protocol,
|
|
254
|
+
hostname: hostname,
|
|
255
|
+
port: port,
|
|
256
|
+
method: "PUT",
|
|
257
|
+
headers: headers,
|
|
258
|
+
path: resolvedPath,
|
|
259
|
+
body: body,
|
|
260
|
+
})];
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}); };
|
|
229
264
|
export var serializeAws_restJson1AssociateQueueQuickConnectsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
230
265
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
231
266
|
return __generator(this, function (_c) {
|
|
@@ -356,6 +391,32 @@ export var serializeAws_restJson1AssociateSecurityKeyCommand = function (input,
|
|
|
356
391
|
}
|
|
357
392
|
});
|
|
358
393
|
}); };
|
|
394
|
+
export var serializeAws_restJson1ClaimPhoneNumberCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
395
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
396
|
+
var _c;
|
|
397
|
+
return __generator(this, function (_d) {
|
|
398
|
+
switch (_d.label) {
|
|
399
|
+
case 0: return [4, context.endpoint()];
|
|
400
|
+
case 1:
|
|
401
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
402
|
+
headers = {
|
|
403
|
+
"content-type": "application/json",
|
|
404
|
+
};
|
|
405
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/phone-number/claim";
|
|
406
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.PhoneNumber !== undefined && input.PhoneNumber !== null && { PhoneNumber: input.PhoneNumber })), (input.PhoneNumberDescription !== undefined &&
|
|
407
|
+
input.PhoneNumberDescription !== null && { PhoneNumberDescription: input.PhoneNumberDescription })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })), (input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn })));
|
|
408
|
+
return [2, new __HttpRequest({
|
|
409
|
+
protocol: protocol,
|
|
410
|
+
hostname: hostname,
|
|
411
|
+
port: port,
|
|
412
|
+
method: "POST",
|
|
413
|
+
headers: headers,
|
|
414
|
+
path: resolvedPath,
|
|
415
|
+
body: body,
|
|
416
|
+
})];
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
}); };
|
|
359
420
|
export var serializeAws_restJson1CreateAgentStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
360
421
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
361
422
|
return __generator(this, function (_c) {
|
|
@@ -1660,6 +1721,37 @@ export var serializeAws_restJson1DescribeInstanceStorageConfigCommand = function
|
|
|
1660
1721
|
}
|
|
1661
1722
|
});
|
|
1662
1723
|
}); };
|
|
1724
|
+
export var serializeAws_restJson1DescribePhoneNumberCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1725
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
1726
|
+
return __generator(this, function (_c) {
|
|
1727
|
+
switch (_c.label) {
|
|
1728
|
+
case 0: return [4, context.endpoint()];
|
|
1729
|
+
case 1:
|
|
1730
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1731
|
+
headers = {};
|
|
1732
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/phone-number/{PhoneNumberId}";
|
|
1733
|
+
if (input.PhoneNumberId !== undefined) {
|
|
1734
|
+
labelValue = input.PhoneNumberId;
|
|
1735
|
+
if (labelValue.length <= 0) {
|
|
1736
|
+
throw new Error("Empty value provided for input HTTP label: PhoneNumberId.");
|
|
1737
|
+
}
|
|
1738
|
+
resolvedPath = resolvedPath.replace("{PhoneNumberId}", __extendedEncodeURIComponent(labelValue));
|
|
1739
|
+
}
|
|
1740
|
+
else {
|
|
1741
|
+
throw new Error("No value provided for input HTTP label: PhoneNumberId.");
|
|
1742
|
+
}
|
|
1743
|
+
return [2, new __HttpRequest({
|
|
1744
|
+
protocol: protocol,
|
|
1745
|
+
hostname: hostname,
|
|
1746
|
+
port: port,
|
|
1747
|
+
method: "GET",
|
|
1748
|
+
headers: headers,
|
|
1749
|
+
path: resolvedPath,
|
|
1750
|
+
body: body,
|
|
1751
|
+
})];
|
|
1752
|
+
}
|
|
1753
|
+
});
|
|
1754
|
+
}); };
|
|
1663
1755
|
export var serializeAws_restJson1DescribeQueueCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1664
1756
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1665
1757
|
return __generator(this, function (_c) {
|
|
@@ -2161,6 +2253,40 @@ export var serializeAws_restJson1DisassociateLexBotCommand = function (input, co
|
|
|
2161
2253
|
}
|
|
2162
2254
|
});
|
|
2163
2255
|
}); };
|
|
2256
|
+
export var serializeAws_restJson1DisassociatePhoneNumberContactFlowCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2257
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2258
|
+
return __generator(this, function (_c) {
|
|
2259
|
+
switch (_c.label) {
|
|
2260
|
+
case 0: return [4, context.endpoint()];
|
|
2261
|
+
case 1:
|
|
2262
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2263
|
+
headers = {};
|
|
2264
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
2265
|
+
"/phone-number/{PhoneNumberId}/contact-flow";
|
|
2266
|
+
if (input.PhoneNumberId !== undefined) {
|
|
2267
|
+
labelValue = input.PhoneNumberId;
|
|
2268
|
+
if (labelValue.length <= 0) {
|
|
2269
|
+
throw new Error("Empty value provided for input HTTP label: PhoneNumberId.");
|
|
2270
|
+
}
|
|
2271
|
+
resolvedPath = resolvedPath.replace("{PhoneNumberId}", __extendedEncodeURIComponent(labelValue));
|
|
2272
|
+
}
|
|
2273
|
+
else {
|
|
2274
|
+
throw new Error("No value provided for input HTTP label: PhoneNumberId.");
|
|
2275
|
+
}
|
|
2276
|
+
query = __assign({}, (input.InstanceId !== undefined && { instanceId: input.InstanceId }));
|
|
2277
|
+
return [2, new __HttpRequest({
|
|
2278
|
+
protocol: protocol,
|
|
2279
|
+
hostname: hostname,
|
|
2280
|
+
port: port,
|
|
2281
|
+
method: "DELETE",
|
|
2282
|
+
headers: headers,
|
|
2283
|
+
path: resolvedPath,
|
|
2284
|
+
query: query,
|
|
2285
|
+
body: body,
|
|
2286
|
+
})];
|
|
2287
|
+
}
|
|
2288
|
+
});
|
|
2289
|
+
}); };
|
|
2164
2290
|
export var serializeAws_restJson1DisassociateQueueQuickConnectsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2165
2291
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
2166
2292
|
return __generator(this, function (_c) {
|
|
@@ -2961,6 +3087,37 @@ export var serializeAws_restJson1ListPhoneNumbersCommand = function (input, cont
|
|
|
2961
3087
|
}
|
|
2962
3088
|
});
|
|
2963
3089
|
}); };
|
|
3090
|
+
export var serializeAws_restJson1ListPhoneNumbersV2Command = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3091
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
3092
|
+
return __generator(this, function (_c) {
|
|
3093
|
+
switch (_c.label) {
|
|
3094
|
+
case 0: return [4, context.endpoint()];
|
|
3095
|
+
case 1:
|
|
3096
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3097
|
+
headers = {
|
|
3098
|
+
"content-type": "application/json",
|
|
3099
|
+
};
|
|
3100
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/phone-number/list";
|
|
3101
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.PhoneNumberCountryCodes !== undefined &&
|
|
3102
|
+
input.PhoneNumberCountryCodes !== null && {
|
|
3103
|
+
PhoneNumberCountryCodes: serializeAws_restJson1PhoneNumberCountryCodes(input.PhoneNumberCountryCodes, context),
|
|
3104
|
+
})), (input.PhoneNumberPrefix !== undefined &&
|
|
3105
|
+
input.PhoneNumberPrefix !== null && { PhoneNumberPrefix: input.PhoneNumberPrefix })), (input.PhoneNumberTypes !== undefined &&
|
|
3106
|
+
input.PhoneNumberTypes !== null && {
|
|
3107
|
+
PhoneNumberTypes: serializeAws_restJson1PhoneNumberTypes(input.PhoneNumberTypes, context),
|
|
3108
|
+
})), (input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn })));
|
|
3109
|
+
return [2, new __HttpRequest({
|
|
3110
|
+
protocol: protocol,
|
|
3111
|
+
hostname: hostname,
|
|
3112
|
+
port: port,
|
|
3113
|
+
method: "POST",
|
|
3114
|
+
headers: headers,
|
|
3115
|
+
path: resolvedPath,
|
|
3116
|
+
body: body,
|
|
3117
|
+
})];
|
|
3118
|
+
}
|
|
3119
|
+
});
|
|
3120
|
+
}); };
|
|
2964
3121
|
export var serializeAws_restJson1ListPromptsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2965
3122
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
2966
3123
|
return __generator(this, function (_c) {
|
|
@@ -3435,6 +3592,39 @@ export var serializeAws_restJson1ListUsersCommand = function (input, context) {
|
|
|
3435
3592
|
}
|
|
3436
3593
|
});
|
|
3437
3594
|
}); };
|
|
3595
|
+
export var serializeAws_restJson1ReleasePhoneNumberCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3596
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
3597
|
+
return __generator(this, function (_c) {
|
|
3598
|
+
switch (_c.label) {
|
|
3599
|
+
case 0: return [4, context.endpoint()];
|
|
3600
|
+
case 1:
|
|
3601
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3602
|
+
headers = {};
|
|
3603
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/phone-number/{PhoneNumberId}";
|
|
3604
|
+
if (input.PhoneNumberId !== undefined) {
|
|
3605
|
+
labelValue = input.PhoneNumberId;
|
|
3606
|
+
if (labelValue.length <= 0) {
|
|
3607
|
+
throw new Error("Empty value provided for input HTTP label: PhoneNumberId.");
|
|
3608
|
+
}
|
|
3609
|
+
resolvedPath = resolvedPath.replace("{PhoneNumberId}", __extendedEncodeURIComponent(labelValue));
|
|
3610
|
+
}
|
|
3611
|
+
else {
|
|
3612
|
+
throw new Error("No value provided for input HTTP label: PhoneNumberId.");
|
|
3613
|
+
}
|
|
3614
|
+
query = __assign({}, (input.ClientToken !== undefined && { clientToken: input.ClientToken }));
|
|
3615
|
+
return [2, new __HttpRequest({
|
|
3616
|
+
protocol: protocol,
|
|
3617
|
+
hostname: hostname,
|
|
3618
|
+
port: port,
|
|
3619
|
+
method: "DELETE",
|
|
3620
|
+
headers: headers,
|
|
3621
|
+
path: resolvedPath,
|
|
3622
|
+
query: query,
|
|
3623
|
+
body: body,
|
|
3624
|
+
})];
|
|
3625
|
+
}
|
|
3626
|
+
});
|
|
3627
|
+
}); };
|
|
3438
3628
|
export var serializeAws_restJson1ResumeContactRecordingCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3439
3629
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
3440
3630
|
return __generator(this, function (_c) {
|
|
@@ -3460,6 +3650,33 @@ export var serializeAws_restJson1ResumeContactRecordingCommand = function (input
|
|
|
3460
3650
|
}
|
|
3461
3651
|
});
|
|
3462
3652
|
}); };
|
|
3653
|
+
export var serializeAws_restJson1SearchAvailablePhoneNumbersCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3654
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
3655
|
+
return __generator(this, function (_c) {
|
|
3656
|
+
switch (_c.label) {
|
|
3657
|
+
case 0: return [4, context.endpoint()];
|
|
3658
|
+
case 1:
|
|
3659
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
3660
|
+
headers = {
|
|
3661
|
+
"content-type": "application/json",
|
|
3662
|
+
};
|
|
3663
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/phone-number/search-available";
|
|
3664
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.PhoneNumberCountryCode !== undefined &&
|
|
3665
|
+
input.PhoneNumberCountryCode !== null && { PhoneNumberCountryCode: input.PhoneNumberCountryCode })), (input.PhoneNumberPrefix !== undefined &&
|
|
3666
|
+
input.PhoneNumberPrefix !== null && { PhoneNumberPrefix: input.PhoneNumberPrefix })), (input.PhoneNumberType !== undefined &&
|
|
3667
|
+
input.PhoneNumberType !== null && { PhoneNumberType: input.PhoneNumberType })), (input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn })));
|
|
3668
|
+
return [2, new __HttpRequest({
|
|
3669
|
+
protocol: protocol,
|
|
3670
|
+
hostname: hostname,
|
|
3671
|
+
port: port,
|
|
3672
|
+
method: "POST",
|
|
3673
|
+
headers: headers,
|
|
3674
|
+
path: resolvedPath,
|
|
3675
|
+
body: body,
|
|
3676
|
+
})];
|
|
3677
|
+
}
|
|
3678
|
+
});
|
|
3679
|
+
}); };
|
|
3463
3680
|
export var serializeAws_restJson1SearchVocabulariesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3464
3681
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
3465
3682
|
return __generator(this, function (_c) {
|
|
@@ -4321,6 +4538,41 @@ export var serializeAws_restJson1UpdateInstanceStorageConfigCommand = function (
|
|
|
4321
4538
|
}
|
|
4322
4539
|
});
|
|
4323
4540
|
}); };
|
|
4541
|
+
export var serializeAws_restJson1UpdatePhoneNumberCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4542
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
4543
|
+
var _c;
|
|
4544
|
+
return __generator(this, function (_d) {
|
|
4545
|
+
switch (_d.label) {
|
|
4546
|
+
case 0: return [4, context.endpoint()];
|
|
4547
|
+
case 1:
|
|
4548
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
4549
|
+
headers = {
|
|
4550
|
+
"content-type": "application/json",
|
|
4551
|
+
};
|
|
4552
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/phone-number/{PhoneNumberId}";
|
|
4553
|
+
if (input.PhoneNumberId !== undefined) {
|
|
4554
|
+
labelValue = input.PhoneNumberId;
|
|
4555
|
+
if (labelValue.length <= 0) {
|
|
4556
|
+
throw new Error("Empty value provided for input HTTP label: PhoneNumberId.");
|
|
4557
|
+
}
|
|
4558
|
+
resolvedPath = resolvedPath.replace("{PhoneNumberId}", __extendedEncodeURIComponent(labelValue));
|
|
4559
|
+
}
|
|
4560
|
+
else {
|
|
4561
|
+
throw new Error("No value provided for input HTTP label: PhoneNumberId.");
|
|
4562
|
+
}
|
|
4563
|
+
body = JSON.stringify(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn })));
|
|
4564
|
+
return [2, new __HttpRequest({
|
|
4565
|
+
protocol: protocol,
|
|
4566
|
+
hostname: hostname,
|
|
4567
|
+
port: port,
|
|
4568
|
+
method: "PUT",
|
|
4569
|
+
headers: headers,
|
|
4570
|
+
path: resolvedPath,
|
|
4571
|
+
body: body,
|
|
4572
|
+
})];
|
|
4573
|
+
}
|
|
4574
|
+
});
|
|
4575
|
+
}); };
|
|
4324
4576
|
export var serializeAws_restJson1UpdateQueueHoursOfOperationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4325
4577
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
4326
4578
|
return __generator(this, function (_c) {
|
|
@@ -5626,6 +5878,72 @@ var deserializeAws_restJson1AssociateLexBotCommandError = function (output, cont
|
|
|
5626
5878
|
}
|
|
5627
5879
|
});
|
|
5628
5880
|
}); };
|
|
5881
|
+
export var deserializeAws_restJson1AssociatePhoneNumberContactFlowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5882
|
+
var contents;
|
|
5883
|
+
return __generator(this, function (_a) {
|
|
5884
|
+
switch (_a.label) {
|
|
5885
|
+
case 0:
|
|
5886
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5887
|
+
return [2, deserializeAws_restJson1AssociatePhoneNumberContactFlowCommandError(output, context)];
|
|
5888
|
+
}
|
|
5889
|
+
contents = {
|
|
5890
|
+
$metadata: deserializeMetadata(output),
|
|
5891
|
+
};
|
|
5892
|
+
return [4, collectBody(output.body, context)];
|
|
5893
|
+
case 1:
|
|
5894
|
+
_a.sent();
|
|
5895
|
+
return [2, Promise.resolve(contents)];
|
|
5896
|
+
}
|
|
5897
|
+
});
|
|
5898
|
+
}); };
|
|
5899
|
+
var deserializeAws_restJson1AssociatePhoneNumberContactFlowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5900
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
5901
|
+
var _c;
|
|
5902
|
+
return __generator(this, function (_d) {
|
|
5903
|
+
switch (_d.label) {
|
|
5904
|
+
case 0:
|
|
5905
|
+
_a = [__assign({}, output)];
|
|
5906
|
+
_c = {};
|
|
5907
|
+
return [4, parseBody(output.body, context)];
|
|
5908
|
+
case 1:
|
|
5909
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
5910
|
+
errorCode = "UnknownError";
|
|
5911
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5912
|
+
_b = errorCode;
|
|
5913
|
+
switch (_b) {
|
|
5914
|
+
case "AccessDeniedException": return [3, 2];
|
|
5915
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
5916
|
+
case "InternalServiceException": return [3, 4];
|
|
5917
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
5918
|
+
case "InvalidParameterException": return [3, 6];
|
|
5919
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
5920
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
5921
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
5922
|
+
case "ThrottlingException": return [3, 10];
|
|
5923
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
5924
|
+
}
|
|
5925
|
+
return [3, 12];
|
|
5926
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
5927
|
+
case 3: throw _d.sent();
|
|
5928
|
+
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
5929
|
+
case 5: throw _d.sent();
|
|
5930
|
+
case 6: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
5931
|
+
case 7: throw _d.sent();
|
|
5932
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
5933
|
+
case 9: throw _d.sent();
|
|
5934
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
5935
|
+
case 11: throw _d.sent();
|
|
5936
|
+
case 12:
|
|
5937
|
+
parsedBody = parsedOutput.body;
|
|
5938
|
+
response = new __BaseException({
|
|
5939
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
5940
|
+
$fault: "client",
|
|
5941
|
+
$metadata: deserializeMetadata(output),
|
|
5942
|
+
});
|
|
5943
|
+
throw __decorateServiceException(response, parsedBody);
|
|
5944
|
+
}
|
|
5945
|
+
});
|
|
5946
|
+
}); };
|
|
5629
5947
|
export var deserializeAws_restJson1AssociateQueueQuickConnectsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5630
5948
|
var contents;
|
|
5631
5949
|
return __generator(this, function (_a) {
|
|
@@ -5842,6 +6160,86 @@ var deserializeAws_restJson1AssociateSecurityKeyCommandError = function (output,
|
|
|
5842
6160
|
}
|
|
5843
6161
|
});
|
|
5844
6162
|
}); };
|
|
6163
|
+
export var deserializeAws_restJson1ClaimPhoneNumberCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6164
|
+
var contents, data, _a, _b;
|
|
6165
|
+
return __generator(this, function (_c) {
|
|
6166
|
+
switch (_c.label) {
|
|
6167
|
+
case 0:
|
|
6168
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6169
|
+
return [2, deserializeAws_restJson1ClaimPhoneNumberCommandError(output, context)];
|
|
6170
|
+
}
|
|
6171
|
+
contents = {
|
|
6172
|
+
$metadata: deserializeMetadata(output),
|
|
6173
|
+
PhoneNumberArn: undefined,
|
|
6174
|
+
PhoneNumberId: undefined,
|
|
6175
|
+
};
|
|
6176
|
+
_a = __expectNonNull;
|
|
6177
|
+
_b = __expectObject;
|
|
6178
|
+
return [4, parseBody(output.body, context)];
|
|
6179
|
+
case 1:
|
|
6180
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
6181
|
+
if (data.PhoneNumberArn !== undefined && data.PhoneNumberArn !== null) {
|
|
6182
|
+
contents.PhoneNumberArn = __expectString(data.PhoneNumberArn);
|
|
6183
|
+
}
|
|
6184
|
+
if (data.PhoneNumberId !== undefined && data.PhoneNumberId !== null) {
|
|
6185
|
+
contents.PhoneNumberId = __expectString(data.PhoneNumberId);
|
|
6186
|
+
}
|
|
6187
|
+
return [2, Promise.resolve(contents)];
|
|
6188
|
+
}
|
|
6189
|
+
});
|
|
6190
|
+
}); };
|
|
6191
|
+
var deserializeAws_restJson1ClaimPhoneNumberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
6192
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
6193
|
+
var _c;
|
|
6194
|
+
return __generator(this, function (_d) {
|
|
6195
|
+
switch (_d.label) {
|
|
6196
|
+
case 0:
|
|
6197
|
+
_a = [__assign({}, output)];
|
|
6198
|
+
_c = {};
|
|
6199
|
+
return [4, parseBody(output.body, context)];
|
|
6200
|
+
case 1:
|
|
6201
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
6202
|
+
errorCode = "UnknownError";
|
|
6203
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6204
|
+
_b = errorCode;
|
|
6205
|
+
switch (_b) {
|
|
6206
|
+
case "AccessDeniedException": return [3, 2];
|
|
6207
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
6208
|
+
case "IdempotencyException": return [3, 4];
|
|
6209
|
+
case "com.amazonaws.connect#IdempotencyException": return [3, 4];
|
|
6210
|
+
case "InternalServiceException": return [3, 6];
|
|
6211
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 6];
|
|
6212
|
+
case "InvalidParameterException": return [3, 8];
|
|
6213
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 8];
|
|
6214
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
6215
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 10];
|
|
6216
|
+
case "ThrottlingException": return [3, 12];
|
|
6217
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 12];
|
|
6218
|
+
}
|
|
6219
|
+
return [3, 14];
|
|
6220
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
6221
|
+
case 3: throw _d.sent();
|
|
6222
|
+
case 4: return [4, deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context)];
|
|
6223
|
+
case 5: throw _d.sent();
|
|
6224
|
+
case 6: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
6225
|
+
case 7: throw _d.sent();
|
|
6226
|
+
case 8: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
6227
|
+
case 9: throw _d.sent();
|
|
6228
|
+
case 10: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
6229
|
+
case 11: throw _d.sent();
|
|
6230
|
+
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
6231
|
+
case 13: throw _d.sent();
|
|
6232
|
+
case 14:
|
|
6233
|
+
parsedBody = parsedOutput.body;
|
|
6234
|
+
response = new __BaseException({
|
|
6235
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
6236
|
+
$fault: "client",
|
|
6237
|
+
$metadata: deserializeMetadata(output),
|
|
6238
|
+
});
|
|
6239
|
+
throw __decorateServiceException(response, parsedBody);
|
|
6240
|
+
}
|
|
6241
|
+
});
|
|
6242
|
+
}); };
|
|
5845
6243
|
export var deserializeAws_restJson1CreateAgentStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5846
6244
|
var contents, data, _a, _b;
|
|
5847
6245
|
return __generator(this, function (_c) {
|
|
@@ -8338,6 +8736,78 @@ var deserializeAws_restJson1DescribeInstanceStorageConfigCommandError = function
|
|
|
8338
8736
|
}
|
|
8339
8737
|
});
|
|
8340
8738
|
}); };
|
|
8739
|
+
export var deserializeAws_restJson1DescribePhoneNumberCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8740
|
+
var contents, data, _a, _b;
|
|
8741
|
+
return __generator(this, function (_c) {
|
|
8742
|
+
switch (_c.label) {
|
|
8743
|
+
case 0:
|
|
8744
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
8745
|
+
return [2, deserializeAws_restJson1DescribePhoneNumberCommandError(output, context)];
|
|
8746
|
+
}
|
|
8747
|
+
contents = {
|
|
8748
|
+
$metadata: deserializeMetadata(output),
|
|
8749
|
+
ClaimedPhoneNumberSummary: undefined,
|
|
8750
|
+
};
|
|
8751
|
+
_a = __expectNonNull;
|
|
8752
|
+
_b = __expectObject;
|
|
8753
|
+
return [4, parseBody(output.body, context)];
|
|
8754
|
+
case 1:
|
|
8755
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
8756
|
+
if (data.ClaimedPhoneNumberSummary !== undefined && data.ClaimedPhoneNumberSummary !== null) {
|
|
8757
|
+
contents.ClaimedPhoneNumberSummary = deserializeAws_restJson1ClaimedPhoneNumberSummary(data.ClaimedPhoneNumberSummary, context);
|
|
8758
|
+
}
|
|
8759
|
+
return [2, Promise.resolve(contents)];
|
|
8760
|
+
}
|
|
8761
|
+
});
|
|
8762
|
+
}); };
|
|
8763
|
+
var deserializeAws_restJson1DescribePhoneNumberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8764
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
8765
|
+
var _c;
|
|
8766
|
+
return __generator(this, function (_d) {
|
|
8767
|
+
switch (_d.label) {
|
|
8768
|
+
case 0:
|
|
8769
|
+
_a = [__assign({}, output)];
|
|
8770
|
+
_c = {};
|
|
8771
|
+
return [4, parseBody(output.body, context)];
|
|
8772
|
+
case 1:
|
|
8773
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
8774
|
+
errorCode = "UnknownError";
|
|
8775
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
8776
|
+
_b = errorCode;
|
|
8777
|
+
switch (_b) {
|
|
8778
|
+
case "AccessDeniedException": return [3, 2];
|
|
8779
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
8780
|
+
case "InternalServiceException": return [3, 4];
|
|
8781
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
8782
|
+
case "InvalidParameterException": return [3, 6];
|
|
8783
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
8784
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
8785
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
8786
|
+
case "ThrottlingException": return [3, 10];
|
|
8787
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
8788
|
+
}
|
|
8789
|
+
return [3, 12];
|
|
8790
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
8791
|
+
case 3: throw _d.sent();
|
|
8792
|
+
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
8793
|
+
case 5: throw _d.sent();
|
|
8794
|
+
case 6: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
8795
|
+
case 7: throw _d.sent();
|
|
8796
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
8797
|
+
case 9: throw _d.sent();
|
|
8798
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
8799
|
+
case 11: throw _d.sent();
|
|
8800
|
+
case 12:
|
|
8801
|
+
parsedBody = parsedOutput.body;
|
|
8802
|
+
response = new __BaseException({
|
|
8803
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
8804
|
+
$fault: "client",
|
|
8805
|
+
$metadata: deserializeMetadata(output),
|
|
8806
|
+
});
|
|
8807
|
+
throw __decorateServiceException(response, parsedBody);
|
|
8808
|
+
}
|
|
8809
|
+
});
|
|
8810
|
+
}); };
|
|
8341
8811
|
export var deserializeAws_restJson1DescribeQueueCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8342
8812
|
var contents, data, _a, _b;
|
|
8343
8813
|
return __generator(this, function (_c) {
|
|
@@ -9240,6 +9710,72 @@ var deserializeAws_restJson1DisassociateLexBotCommandError = function (output, c
|
|
|
9240
9710
|
}
|
|
9241
9711
|
});
|
|
9242
9712
|
}); };
|
|
9713
|
+
export var deserializeAws_restJson1DisassociatePhoneNumberContactFlowCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9714
|
+
var contents;
|
|
9715
|
+
return __generator(this, function (_a) {
|
|
9716
|
+
switch (_a.label) {
|
|
9717
|
+
case 0:
|
|
9718
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
9719
|
+
return [2, deserializeAws_restJson1DisassociatePhoneNumberContactFlowCommandError(output, context)];
|
|
9720
|
+
}
|
|
9721
|
+
contents = {
|
|
9722
|
+
$metadata: deserializeMetadata(output),
|
|
9723
|
+
};
|
|
9724
|
+
return [4, collectBody(output.body, context)];
|
|
9725
|
+
case 1:
|
|
9726
|
+
_a.sent();
|
|
9727
|
+
return [2, Promise.resolve(contents)];
|
|
9728
|
+
}
|
|
9729
|
+
});
|
|
9730
|
+
}); };
|
|
9731
|
+
var deserializeAws_restJson1DisassociatePhoneNumberContactFlowCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9732
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
9733
|
+
var _c;
|
|
9734
|
+
return __generator(this, function (_d) {
|
|
9735
|
+
switch (_d.label) {
|
|
9736
|
+
case 0:
|
|
9737
|
+
_a = [__assign({}, output)];
|
|
9738
|
+
_c = {};
|
|
9739
|
+
return [4, parseBody(output.body, context)];
|
|
9740
|
+
case 1:
|
|
9741
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
9742
|
+
errorCode = "UnknownError";
|
|
9743
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
9744
|
+
_b = errorCode;
|
|
9745
|
+
switch (_b) {
|
|
9746
|
+
case "AccessDeniedException": return [3, 2];
|
|
9747
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
9748
|
+
case "InternalServiceException": return [3, 4];
|
|
9749
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
9750
|
+
case "InvalidParameterException": return [3, 6];
|
|
9751
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
9752
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
9753
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
9754
|
+
case "ThrottlingException": return [3, 10];
|
|
9755
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
9756
|
+
}
|
|
9757
|
+
return [3, 12];
|
|
9758
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
9759
|
+
case 3: throw _d.sent();
|
|
9760
|
+
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
9761
|
+
case 5: throw _d.sent();
|
|
9762
|
+
case 6: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
9763
|
+
case 7: throw _d.sent();
|
|
9764
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
9765
|
+
case 9: throw _d.sent();
|
|
9766
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
9767
|
+
case 11: throw _d.sent();
|
|
9768
|
+
case 12:
|
|
9769
|
+
parsedBody = parsedOutput.body;
|
|
9770
|
+
response = new __BaseException({
|
|
9771
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
9772
|
+
$fault: "client",
|
|
9773
|
+
$metadata: deserializeMetadata(output),
|
|
9774
|
+
});
|
|
9775
|
+
throw __decorateServiceException(response, parsedBody);
|
|
9776
|
+
}
|
|
9777
|
+
});
|
|
9778
|
+
}); };
|
|
9243
9779
|
export var deserializeAws_restJson1DisassociateQueueQuickConnectsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
9244
9780
|
var contents;
|
|
9245
9781
|
return __generator(this, function (_a) {
|
|
@@ -10854,35 +11390,35 @@ var deserializeAws_restJson1ListPhoneNumbersCommandError = function (output, con
|
|
|
10854
11390
|
}
|
|
10855
11391
|
});
|
|
10856
11392
|
}); };
|
|
10857
|
-
export var
|
|
11393
|
+
export var deserializeAws_restJson1ListPhoneNumbersV2Command = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10858
11394
|
var contents, data, _a, _b;
|
|
10859
11395
|
return __generator(this, function (_c) {
|
|
10860
11396
|
switch (_c.label) {
|
|
10861
11397
|
case 0:
|
|
10862
11398
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
10863
|
-
return [2,
|
|
11399
|
+
return [2, deserializeAws_restJson1ListPhoneNumbersV2CommandError(output, context)];
|
|
10864
11400
|
}
|
|
10865
11401
|
contents = {
|
|
10866
11402
|
$metadata: deserializeMetadata(output),
|
|
11403
|
+
ListPhoneNumbersSummaryList: undefined,
|
|
10867
11404
|
NextToken: undefined,
|
|
10868
|
-
PromptSummaryList: undefined,
|
|
10869
11405
|
};
|
|
10870
11406
|
_a = __expectNonNull;
|
|
10871
11407
|
_b = __expectObject;
|
|
10872
11408
|
return [4, parseBody(output.body, context)];
|
|
10873
11409
|
case 1:
|
|
10874
11410
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
11411
|
+
if (data.ListPhoneNumbersSummaryList !== undefined && data.ListPhoneNumbersSummaryList !== null) {
|
|
11412
|
+
contents.ListPhoneNumbersSummaryList = deserializeAws_restJson1ListPhoneNumbersSummaryList(data.ListPhoneNumbersSummaryList, context);
|
|
11413
|
+
}
|
|
10875
11414
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
10876
11415
|
contents.NextToken = __expectString(data.NextToken);
|
|
10877
11416
|
}
|
|
10878
|
-
if (data.PromptSummaryList !== undefined && data.PromptSummaryList !== null) {
|
|
10879
|
-
contents.PromptSummaryList = deserializeAws_restJson1PromptSummaryList(data.PromptSummaryList, context);
|
|
10880
|
-
}
|
|
10881
11417
|
return [2, Promise.resolve(contents)];
|
|
10882
11418
|
}
|
|
10883
11419
|
});
|
|
10884
11420
|
}); };
|
|
10885
|
-
var
|
|
11421
|
+
var deserializeAws_restJson1ListPhoneNumbersV2CommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10886
11422
|
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
10887
11423
|
var _c;
|
|
10888
11424
|
return __generator(this, function (_d) {
|
|
@@ -10897,23 +11433,23 @@ var deserializeAws_restJson1ListPromptsCommandError = function (output, context)
|
|
|
10897
11433
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
10898
11434
|
_b = errorCode;
|
|
10899
11435
|
switch (_b) {
|
|
10900
|
-
case "
|
|
10901
|
-
case "com.amazonaws.connect#
|
|
10902
|
-
case "
|
|
10903
|
-
case "com.amazonaws.connect#
|
|
10904
|
-
case "
|
|
10905
|
-
case "com.amazonaws.connect#
|
|
11436
|
+
case "AccessDeniedException": return [3, 2];
|
|
11437
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
11438
|
+
case "InternalServiceException": return [3, 4];
|
|
11439
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
11440
|
+
case "InvalidParameterException": return [3, 6];
|
|
11441
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
10906
11442
|
case "ResourceNotFoundException": return [3, 8];
|
|
10907
11443
|
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
10908
11444
|
case "ThrottlingException": return [3, 10];
|
|
10909
11445
|
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
10910
11446
|
}
|
|
10911
11447
|
return [3, 12];
|
|
10912
|
-
case 2: return [4,
|
|
11448
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
10913
11449
|
case 3: throw _d.sent();
|
|
10914
|
-
case 4: return [4,
|
|
11450
|
+
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
10915
11451
|
case 5: throw _d.sent();
|
|
10916
|
-
case 6: return [4,
|
|
11452
|
+
case 6: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
10917
11453
|
case 7: throw _d.sent();
|
|
10918
11454
|
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
10919
11455
|
case 9: throw _d.sent();
|
|
@@ -10930,18 +11466,18 @@ var deserializeAws_restJson1ListPromptsCommandError = function (output, context)
|
|
|
10930
11466
|
}
|
|
10931
11467
|
});
|
|
10932
11468
|
}); };
|
|
10933
|
-
export var
|
|
11469
|
+
export var deserializeAws_restJson1ListPromptsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10934
11470
|
var contents, data, _a, _b;
|
|
10935
11471
|
return __generator(this, function (_c) {
|
|
10936
11472
|
switch (_c.label) {
|
|
10937
11473
|
case 0:
|
|
10938
11474
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
10939
|
-
return [2,
|
|
11475
|
+
return [2, deserializeAws_restJson1ListPromptsCommandError(output, context)];
|
|
10940
11476
|
}
|
|
10941
11477
|
contents = {
|
|
10942
11478
|
$metadata: deserializeMetadata(output),
|
|
10943
11479
|
NextToken: undefined,
|
|
10944
|
-
|
|
11480
|
+
PromptSummaryList: undefined,
|
|
10945
11481
|
};
|
|
10946
11482
|
_a = __expectNonNull;
|
|
10947
11483
|
_b = __expectObject;
|
|
@@ -10951,14 +11487,14 @@ export var deserializeAws_restJson1ListQueueQuickConnectsCommand = function (out
|
|
|
10951
11487
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
10952
11488
|
contents.NextToken = __expectString(data.NextToken);
|
|
10953
11489
|
}
|
|
10954
|
-
if (data.
|
|
10955
|
-
contents.
|
|
11490
|
+
if (data.PromptSummaryList !== undefined && data.PromptSummaryList !== null) {
|
|
11491
|
+
contents.PromptSummaryList = deserializeAws_restJson1PromptSummaryList(data.PromptSummaryList, context);
|
|
10956
11492
|
}
|
|
10957
11493
|
return [2, Promise.resolve(contents)];
|
|
10958
11494
|
}
|
|
10959
11495
|
});
|
|
10960
11496
|
}); };
|
|
10961
|
-
var
|
|
11497
|
+
var deserializeAws_restJson1ListPromptsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
10962
11498
|
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
10963
11499
|
var _c;
|
|
10964
11500
|
return __generator(this, function (_d) {
|
|
@@ -11006,18 +11542,18 @@ var deserializeAws_restJson1ListQueueQuickConnectsCommandError = function (outpu
|
|
|
11006
11542
|
}
|
|
11007
11543
|
});
|
|
11008
11544
|
}); };
|
|
11009
|
-
export var
|
|
11545
|
+
export var deserializeAws_restJson1ListQueueQuickConnectsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11010
11546
|
var contents, data, _a, _b;
|
|
11011
11547
|
return __generator(this, function (_c) {
|
|
11012
11548
|
switch (_c.label) {
|
|
11013
11549
|
case 0:
|
|
11014
11550
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
11015
|
-
return [2,
|
|
11551
|
+
return [2, deserializeAws_restJson1ListQueueQuickConnectsCommandError(output, context)];
|
|
11016
11552
|
}
|
|
11017
11553
|
contents = {
|
|
11018
11554
|
$metadata: deserializeMetadata(output),
|
|
11019
11555
|
NextToken: undefined,
|
|
11020
|
-
|
|
11556
|
+
QuickConnectSummaryList: undefined,
|
|
11021
11557
|
};
|
|
11022
11558
|
_a = __expectNonNull;
|
|
11023
11559
|
_b = __expectObject;
|
|
@@ -11027,14 +11563,14 @@ export var deserializeAws_restJson1ListQueuesCommand = function (output, context
|
|
|
11027
11563
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
11028
11564
|
contents.NextToken = __expectString(data.NextToken);
|
|
11029
11565
|
}
|
|
11030
|
-
if (data.
|
|
11031
|
-
contents.
|
|
11566
|
+
if (data.QuickConnectSummaryList !== undefined && data.QuickConnectSummaryList !== null) {
|
|
11567
|
+
contents.QuickConnectSummaryList = deserializeAws_restJson1QuickConnectSummaryList(data.QuickConnectSummaryList, context);
|
|
11032
11568
|
}
|
|
11033
11569
|
return [2, Promise.resolve(contents)];
|
|
11034
11570
|
}
|
|
11035
11571
|
});
|
|
11036
11572
|
}); };
|
|
11037
|
-
var
|
|
11573
|
+
var deserializeAws_restJson1ListQueueQuickConnectsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11038
11574
|
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
11039
11575
|
var _c;
|
|
11040
11576
|
return __generator(this, function (_d) {
|
|
@@ -11082,18 +11618,18 @@ var deserializeAws_restJson1ListQueuesCommandError = function (output, context)
|
|
|
11082
11618
|
}
|
|
11083
11619
|
});
|
|
11084
11620
|
}); };
|
|
11085
|
-
export var
|
|
11621
|
+
export var deserializeAws_restJson1ListQueuesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11086
11622
|
var contents, data, _a, _b;
|
|
11087
11623
|
return __generator(this, function (_c) {
|
|
11088
11624
|
switch (_c.label) {
|
|
11089
11625
|
case 0:
|
|
11090
11626
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
11091
|
-
return [2,
|
|
11627
|
+
return [2, deserializeAws_restJson1ListQueuesCommandError(output, context)];
|
|
11092
11628
|
}
|
|
11093
11629
|
contents = {
|
|
11094
11630
|
$metadata: deserializeMetadata(output),
|
|
11095
11631
|
NextToken: undefined,
|
|
11096
|
-
|
|
11632
|
+
QueueSummaryList: undefined,
|
|
11097
11633
|
};
|
|
11098
11634
|
_a = __expectNonNull;
|
|
11099
11635
|
_b = __expectObject;
|
|
@@ -11103,9 +11639,85 @@ export var deserializeAws_restJson1ListQuickConnectsCommand = function (output,
|
|
|
11103
11639
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
11104
11640
|
contents.NextToken = __expectString(data.NextToken);
|
|
11105
11641
|
}
|
|
11106
|
-
if (data.
|
|
11107
|
-
contents.
|
|
11108
|
-
}
|
|
11642
|
+
if (data.QueueSummaryList !== undefined && data.QueueSummaryList !== null) {
|
|
11643
|
+
contents.QueueSummaryList = deserializeAws_restJson1QueueSummaryList(data.QueueSummaryList, context);
|
|
11644
|
+
}
|
|
11645
|
+
return [2, Promise.resolve(contents)];
|
|
11646
|
+
}
|
|
11647
|
+
});
|
|
11648
|
+
}); };
|
|
11649
|
+
var deserializeAws_restJson1ListQueuesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11650
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
11651
|
+
var _c;
|
|
11652
|
+
return __generator(this, function (_d) {
|
|
11653
|
+
switch (_d.label) {
|
|
11654
|
+
case 0:
|
|
11655
|
+
_a = [__assign({}, output)];
|
|
11656
|
+
_c = {};
|
|
11657
|
+
return [4, parseBody(output.body, context)];
|
|
11658
|
+
case 1:
|
|
11659
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
11660
|
+
errorCode = "UnknownError";
|
|
11661
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
11662
|
+
_b = errorCode;
|
|
11663
|
+
switch (_b) {
|
|
11664
|
+
case "InternalServiceException": return [3, 2];
|
|
11665
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 2];
|
|
11666
|
+
case "InvalidParameterException": return [3, 4];
|
|
11667
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 4];
|
|
11668
|
+
case "InvalidRequestException": return [3, 6];
|
|
11669
|
+
case "com.amazonaws.connect#InvalidRequestException": return [3, 6];
|
|
11670
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
11671
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 8];
|
|
11672
|
+
case "ThrottlingException": return [3, 10];
|
|
11673
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 10];
|
|
11674
|
+
}
|
|
11675
|
+
return [3, 12];
|
|
11676
|
+
case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
11677
|
+
case 3: throw _d.sent();
|
|
11678
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
11679
|
+
case 5: throw _d.sent();
|
|
11680
|
+
case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
11681
|
+
case 7: throw _d.sent();
|
|
11682
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
11683
|
+
case 9: throw _d.sent();
|
|
11684
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
11685
|
+
case 11: throw _d.sent();
|
|
11686
|
+
case 12:
|
|
11687
|
+
parsedBody = parsedOutput.body;
|
|
11688
|
+
response = new __BaseException({
|
|
11689
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
11690
|
+
$fault: "client",
|
|
11691
|
+
$metadata: deserializeMetadata(output),
|
|
11692
|
+
});
|
|
11693
|
+
throw __decorateServiceException(response, parsedBody);
|
|
11694
|
+
}
|
|
11695
|
+
});
|
|
11696
|
+
}); };
|
|
11697
|
+
export var deserializeAws_restJson1ListQuickConnectsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11698
|
+
var contents, data, _a, _b;
|
|
11699
|
+
return __generator(this, function (_c) {
|
|
11700
|
+
switch (_c.label) {
|
|
11701
|
+
case 0:
|
|
11702
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
11703
|
+
return [2, deserializeAws_restJson1ListQuickConnectsCommandError(output, context)];
|
|
11704
|
+
}
|
|
11705
|
+
contents = {
|
|
11706
|
+
$metadata: deserializeMetadata(output),
|
|
11707
|
+
NextToken: undefined,
|
|
11708
|
+
QuickConnectSummaryList: undefined,
|
|
11709
|
+
};
|
|
11710
|
+
_a = __expectNonNull;
|
|
11711
|
+
_b = __expectObject;
|
|
11712
|
+
return [4, parseBody(output.body, context)];
|
|
11713
|
+
case 1:
|
|
11714
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
11715
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
11716
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
11717
|
+
}
|
|
11718
|
+
if (data.QuickConnectSummaryList !== undefined && data.QuickConnectSummaryList !== null) {
|
|
11719
|
+
contents.QuickConnectSummaryList = deserializeAws_restJson1QuickConnectSummaryList(data.QuickConnectSummaryList, context);
|
|
11720
|
+
}
|
|
11109
11721
|
return [2, Promise.resolve(contents)];
|
|
11110
11722
|
}
|
|
11111
11723
|
});
|
|
@@ -11834,6 +12446,80 @@ var deserializeAws_restJson1ListUsersCommandError = function (output, context) {
|
|
|
11834
12446
|
}
|
|
11835
12447
|
});
|
|
11836
12448
|
}); };
|
|
12449
|
+
export var deserializeAws_restJson1ReleasePhoneNumberCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12450
|
+
var contents;
|
|
12451
|
+
return __generator(this, function (_a) {
|
|
12452
|
+
switch (_a.label) {
|
|
12453
|
+
case 0:
|
|
12454
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12455
|
+
return [2, deserializeAws_restJson1ReleasePhoneNumberCommandError(output, context)];
|
|
12456
|
+
}
|
|
12457
|
+
contents = {
|
|
12458
|
+
$metadata: deserializeMetadata(output),
|
|
12459
|
+
};
|
|
12460
|
+
return [4, collectBody(output.body, context)];
|
|
12461
|
+
case 1:
|
|
12462
|
+
_a.sent();
|
|
12463
|
+
return [2, Promise.resolve(contents)];
|
|
12464
|
+
}
|
|
12465
|
+
});
|
|
12466
|
+
}); };
|
|
12467
|
+
var deserializeAws_restJson1ReleasePhoneNumberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12468
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
12469
|
+
var _c;
|
|
12470
|
+
return __generator(this, function (_d) {
|
|
12471
|
+
switch (_d.label) {
|
|
12472
|
+
case 0:
|
|
12473
|
+
_a = [__assign({}, output)];
|
|
12474
|
+
_c = {};
|
|
12475
|
+
return [4, parseBody(output.body, context)];
|
|
12476
|
+
case 1:
|
|
12477
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
12478
|
+
errorCode = "UnknownError";
|
|
12479
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
12480
|
+
_b = errorCode;
|
|
12481
|
+
switch (_b) {
|
|
12482
|
+
case "AccessDeniedException": return [3, 2];
|
|
12483
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
12484
|
+
case "IdempotencyException": return [3, 4];
|
|
12485
|
+
case "com.amazonaws.connect#IdempotencyException": return [3, 4];
|
|
12486
|
+
case "InternalServiceException": return [3, 6];
|
|
12487
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 6];
|
|
12488
|
+
case "InvalidParameterException": return [3, 8];
|
|
12489
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 8];
|
|
12490
|
+
case "ResourceInUseException": return [3, 10];
|
|
12491
|
+
case "com.amazonaws.connect#ResourceInUseException": return [3, 10];
|
|
12492
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
12493
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
|
|
12494
|
+
case "ThrottlingException": return [3, 14];
|
|
12495
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 14];
|
|
12496
|
+
}
|
|
12497
|
+
return [3, 16];
|
|
12498
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
12499
|
+
case 3: throw _d.sent();
|
|
12500
|
+
case 4: return [4, deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context)];
|
|
12501
|
+
case 5: throw _d.sent();
|
|
12502
|
+
case 6: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
12503
|
+
case 7: throw _d.sent();
|
|
12504
|
+
case 8: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
12505
|
+
case 9: throw _d.sent();
|
|
12506
|
+
case 10: return [4, deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context)];
|
|
12507
|
+
case 11: throw _d.sent();
|
|
12508
|
+
case 12: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
12509
|
+
case 13: throw _d.sent();
|
|
12510
|
+
case 14: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
12511
|
+
case 15: throw _d.sent();
|
|
12512
|
+
case 16:
|
|
12513
|
+
parsedBody = parsedOutput.body;
|
|
12514
|
+
response = new __BaseException({
|
|
12515
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
12516
|
+
$fault: "client",
|
|
12517
|
+
$metadata: deserializeMetadata(output),
|
|
12518
|
+
});
|
|
12519
|
+
throw __decorateServiceException(response, parsedBody);
|
|
12520
|
+
}
|
|
12521
|
+
});
|
|
12522
|
+
}); };
|
|
11837
12523
|
export var deserializeAws_restJson1ResumeContactRecordingCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11838
12524
|
var contents;
|
|
11839
12525
|
return __generator(this, function (_a) {
|
|
@@ -11892,6 +12578,78 @@ var deserializeAws_restJson1ResumeContactRecordingCommandError = function (outpu
|
|
|
11892
12578
|
}
|
|
11893
12579
|
});
|
|
11894
12580
|
}); };
|
|
12581
|
+
export var deserializeAws_restJson1SearchAvailablePhoneNumbersCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12582
|
+
var contents, data, _a, _b;
|
|
12583
|
+
return __generator(this, function (_c) {
|
|
12584
|
+
switch (_c.label) {
|
|
12585
|
+
case 0:
|
|
12586
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12587
|
+
return [2, deserializeAws_restJson1SearchAvailablePhoneNumbersCommandError(output, context)];
|
|
12588
|
+
}
|
|
12589
|
+
contents = {
|
|
12590
|
+
$metadata: deserializeMetadata(output),
|
|
12591
|
+
AvailableNumbersList: undefined,
|
|
12592
|
+
NextToken: undefined,
|
|
12593
|
+
};
|
|
12594
|
+
_a = __expectNonNull;
|
|
12595
|
+
_b = __expectObject;
|
|
12596
|
+
return [4, parseBody(output.body, context)];
|
|
12597
|
+
case 1:
|
|
12598
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
12599
|
+
if (data.AvailableNumbersList !== undefined && data.AvailableNumbersList !== null) {
|
|
12600
|
+
contents.AvailableNumbersList = deserializeAws_restJson1AvailableNumbersList(data.AvailableNumbersList, context);
|
|
12601
|
+
}
|
|
12602
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
12603
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
12604
|
+
}
|
|
12605
|
+
return [2, Promise.resolve(contents)];
|
|
12606
|
+
}
|
|
12607
|
+
});
|
|
12608
|
+
}); };
|
|
12609
|
+
var deserializeAws_restJson1SearchAvailablePhoneNumbersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12610
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
12611
|
+
var _c;
|
|
12612
|
+
return __generator(this, function (_d) {
|
|
12613
|
+
switch (_d.label) {
|
|
12614
|
+
case 0:
|
|
12615
|
+
_a = [__assign({}, output)];
|
|
12616
|
+
_c = {};
|
|
12617
|
+
return [4, parseBody(output.body, context)];
|
|
12618
|
+
case 1:
|
|
12619
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
12620
|
+
errorCode = "UnknownError";
|
|
12621
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
12622
|
+
_b = errorCode;
|
|
12623
|
+
switch (_b) {
|
|
12624
|
+
case "AccessDeniedException": return [3, 2];
|
|
12625
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
12626
|
+
case "InternalServiceException": return [3, 4];
|
|
12627
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 4];
|
|
12628
|
+
case "InvalidParameterException": return [3, 6];
|
|
12629
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 6];
|
|
12630
|
+
case "ThrottlingException": return [3, 8];
|
|
12631
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 8];
|
|
12632
|
+
}
|
|
12633
|
+
return [3, 10];
|
|
12634
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
12635
|
+
case 3: throw _d.sent();
|
|
12636
|
+
case 4: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
12637
|
+
case 5: throw _d.sent();
|
|
12638
|
+
case 6: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
12639
|
+
case 7: throw _d.sent();
|
|
12640
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
12641
|
+
case 9: throw _d.sent();
|
|
12642
|
+
case 10:
|
|
12643
|
+
parsedBody = parsedOutput.body;
|
|
12644
|
+
response = new __BaseException({
|
|
12645
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
12646
|
+
$fault: "client",
|
|
12647
|
+
$metadata: deserializeMetadata(output),
|
|
12648
|
+
});
|
|
12649
|
+
throw __decorateServiceException(response, parsedBody);
|
|
12650
|
+
}
|
|
12651
|
+
});
|
|
12652
|
+
}); };
|
|
11895
12653
|
export var deserializeAws_restJson1SearchVocabulariesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11896
12654
|
var contents, data, _a, _b;
|
|
11897
12655
|
return __generator(this, function (_c) {
|
|
@@ -13538,6 +14296,90 @@ var deserializeAws_restJson1UpdateInstanceStorageConfigCommandError = function (
|
|
|
13538
14296
|
}
|
|
13539
14297
|
});
|
|
13540
14298
|
}); };
|
|
14299
|
+
export var deserializeAws_restJson1UpdatePhoneNumberCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14300
|
+
var contents, data, _a, _b;
|
|
14301
|
+
return __generator(this, function (_c) {
|
|
14302
|
+
switch (_c.label) {
|
|
14303
|
+
case 0:
|
|
14304
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
14305
|
+
return [2, deserializeAws_restJson1UpdatePhoneNumberCommandError(output, context)];
|
|
14306
|
+
}
|
|
14307
|
+
contents = {
|
|
14308
|
+
$metadata: deserializeMetadata(output),
|
|
14309
|
+
PhoneNumberArn: undefined,
|
|
14310
|
+
PhoneNumberId: undefined,
|
|
14311
|
+
};
|
|
14312
|
+
_a = __expectNonNull;
|
|
14313
|
+
_b = __expectObject;
|
|
14314
|
+
return [4, parseBody(output.body, context)];
|
|
14315
|
+
case 1:
|
|
14316
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
14317
|
+
if (data.PhoneNumberArn !== undefined && data.PhoneNumberArn !== null) {
|
|
14318
|
+
contents.PhoneNumberArn = __expectString(data.PhoneNumberArn);
|
|
14319
|
+
}
|
|
14320
|
+
if (data.PhoneNumberId !== undefined && data.PhoneNumberId !== null) {
|
|
14321
|
+
contents.PhoneNumberId = __expectString(data.PhoneNumberId);
|
|
14322
|
+
}
|
|
14323
|
+
return [2, Promise.resolve(contents)];
|
|
14324
|
+
}
|
|
14325
|
+
});
|
|
14326
|
+
}); };
|
|
14327
|
+
var deserializeAws_restJson1UpdatePhoneNumberCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14328
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
14329
|
+
var _c;
|
|
14330
|
+
return __generator(this, function (_d) {
|
|
14331
|
+
switch (_d.label) {
|
|
14332
|
+
case 0:
|
|
14333
|
+
_a = [__assign({}, output)];
|
|
14334
|
+
_c = {};
|
|
14335
|
+
return [4, parseBody(output.body, context)];
|
|
14336
|
+
case 1:
|
|
14337
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
14338
|
+
errorCode = "UnknownError";
|
|
14339
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
14340
|
+
_b = errorCode;
|
|
14341
|
+
switch (_b) {
|
|
14342
|
+
case "AccessDeniedException": return [3, 2];
|
|
14343
|
+
case "com.amazonaws.connect#AccessDeniedException": return [3, 2];
|
|
14344
|
+
case "IdempotencyException": return [3, 4];
|
|
14345
|
+
case "com.amazonaws.connect#IdempotencyException": return [3, 4];
|
|
14346
|
+
case "InternalServiceException": return [3, 6];
|
|
14347
|
+
case "com.amazonaws.connect#InternalServiceException": return [3, 6];
|
|
14348
|
+
case "InvalidParameterException": return [3, 8];
|
|
14349
|
+
case "com.amazonaws.connect#InvalidParameterException": return [3, 8];
|
|
14350
|
+
case "ResourceInUseException": return [3, 10];
|
|
14351
|
+
case "com.amazonaws.connect#ResourceInUseException": return [3, 10];
|
|
14352
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
14353
|
+
case "com.amazonaws.connect#ResourceNotFoundException": return [3, 12];
|
|
14354
|
+
case "ThrottlingException": return [3, 14];
|
|
14355
|
+
case "com.amazonaws.connect#ThrottlingException": return [3, 14];
|
|
14356
|
+
}
|
|
14357
|
+
return [3, 16];
|
|
14358
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
14359
|
+
case 3: throw _d.sent();
|
|
14360
|
+
case 4: return [4, deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context)];
|
|
14361
|
+
case 5: throw _d.sent();
|
|
14362
|
+
case 6: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
|
|
14363
|
+
case 7: throw _d.sent();
|
|
14364
|
+
case 8: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
14365
|
+
case 9: throw _d.sent();
|
|
14366
|
+
case 10: return [4, deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context)];
|
|
14367
|
+
case 11: throw _d.sent();
|
|
14368
|
+
case 12: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
14369
|
+
case 13: throw _d.sent();
|
|
14370
|
+
case 14: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
14371
|
+
case 15: throw _d.sent();
|
|
14372
|
+
case 16:
|
|
14373
|
+
parsedBody = parsedOutput.body;
|
|
14374
|
+
response = new __BaseException({
|
|
14375
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
14376
|
+
$fault: "client",
|
|
14377
|
+
$metadata: deserializeMetadata(output),
|
|
14378
|
+
});
|
|
14379
|
+
throw __decorateServiceException(response, parsedBody);
|
|
14380
|
+
}
|
|
14381
|
+
});
|
|
14382
|
+
}); };
|
|
13541
14383
|
export var deserializeAws_restJson1UpdateQueueHoursOfOperationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13542
14384
|
var contents;
|
|
13543
14385
|
return __generator(this, function (_a) {
|
|
@@ -15229,9 +16071,29 @@ var serializeAws_restJson1PermissionsList = function (input, context) {
|
|
|
15229
16071
|
return entry;
|
|
15230
16072
|
});
|
|
15231
16073
|
};
|
|
16074
|
+
var serializeAws_restJson1PhoneNumberCountryCodes = function (input, context) {
|
|
16075
|
+
return input
|
|
16076
|
+
.filter(function (e) { return e != null; })
|
|
16077
|
+
.map(function (entry) {
|
|
16078
|
+
if (entry === null) {
|
|
16079
|
+
return null;
|
|
16080
|
+
}
|
|
16081
|
+
return entry;
|
|
16082
|
+
});
|
|
16083
|
+
};
|
|
15232
16084
|
var serializeAws_restJson1PhoneNumberQuickConnectConfig = function (input, context) {
|
|
15233
16085
|
return __assign({}, (input.PhoneNumber !== undefined && input.PhoneNumber !== null && { PhoneNumber: input.PhoneNumber }));
|
|
15234
16086
|
};
|
|
16087
|
+
var serializeAws_restJson1PhoneNumberTypes = function (input, context) {
|
|
16088
|
+
return input
|
|
16089
|
+
.filter(function (e) { return e != null; })
|
|
16090
|
+
.map(function (entry) {
|
|
16091
|
+
if (entry === null) {
|
|
16092
|
+
return null;
|
|
16093
|
+
}
|
|
16094
|
+
return entry;
|
|
16095
|
+
});
|
|
16096
|
+
};
|
|
15235
16097
|
var serializeAws_restJson1QueueQuickConnectConfig = function (input, context) {
|
|
15236
16098
|
return __assign(__assign({}, (input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId })), (input.QueueId !== undefined && input.QueueId !== null && { QueueId: input.QueueId }));
|
|
15237
16099
|
};
|
|
@@ -15430,6 +16292,41 @@ var deserializeAws_restJson1AttributesList = function (output, context) {
|
|
|
15430
16292
|
});
|
|
15431
16293
|
return retVal;
|
|
15432
16294
|
};
|
|
16295
|
+
var deserializeAws_restJson1AvailableNumbersList = function (output, context) {
|
|
16296
|
+
var retVal = (output || [])
|
|
16297
|
+
.filter(function (e) { return e != null; })
|
|
16298
|
+
.map(function (entry) {
|
|
16299
|
+
if (entry === null) {
|
|
16300
|
+
return null;
|
|
16301
|
+
}
|
|
16302
|
+
return deserializeAws_restJson1AvailableNumberSummary(entry, context);
|
|
16303
|
+
});
|
|
16304
|
+
return retVal;
|
|
16305
|
+
};
|
|
16306
|
+
var deserializeAws_restJson1AvailableNumberSummary = function (output, context) {
|
|
16307
|
+
return {
|
|
16308
|
+
PhoneNumber: __expectString(output.PhoneNumber),
|
|
16309
|
+
PhoneNumberCountryCode: __expectString(output.PhoneNumberCountryCode),
|
|
16310
|
+
PhoneNumberType: __expectString(output.PhoneNumberType),
|
|
16311
|
+
};
|
|
16312
|
+
};
|
|
16313
|
+
var deserializeAws_restJson1ClaimedPhoneNumberSummary = function (output, context) {
|
|
16314
|
+
return {
|
|
16315
|
+
PhoneNumber: __expectString(output.PhoneNumber),
|
|
16316
|
+
PhoneNumberArn: __expectString(output.PhoneNumberArn),
|
|
16317
|
+
PhoneNumberCountryCode: __expectString(output.PhoneNumberCountryCode),
|
|
16318
|
+
PhoneNumberDescription: __expectString(output.PhoneNumberDescription),
|
|
16319
|
+
PhoneNumberId: __expectString(output.PhoneNumberId),
|
|
16320
|
+
PhoneNumberStatus: output.PhoneNumberStatus !== undefined && output.PhoneNumberStatus !== null
|
|
16321
|
+
? deserializeAws_restJson1PhoneNumberStatus(output.PhoneNumberStatus, context)
|
|
16322
|
+
: undefined,
|
|
16323
|
+
PhoneNumberType: __expectString(output.PhoneNumberType),
|
|
16324
|
+
Tags: output.Tags !== undefined && output.Tags !== null
|
|
16325
|
+
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
16326
|
+
: undefined,
|
|
16327
|
+
TargetArn: __expectString(output.TargetArn),
|
|
16328
|
+
};
|
|
16329
|
+
};
|
|
15433
16330
|
var deserializeAws_restJson1Contact = function (output, context) {
|
|
15434
16331
|
return {
|
|
15435
16332
|
AgentInfo: output.AgentInfo !== undefined && output.AgentInfo !== null
|
|
@@ -15980,6 +16877,27 @@ var deserializeAws_restJson1LexV2Bot = function (output, context) {
|
|
|
15980
16877
|
AliasArn: __expectString(output.AliasArn),
|
|
15981
16878
|
};
|
|
15982
16879
|
};
|
|
16880
|
+
var deserializeAws_restJson1ListPhoneNumbersSummary = function (output, context) {
|
|
16881
|
+
return {
|
|
16882
|
+
PhoneNumber: __expectString(output.PhoneNumber),
|
|
16883
|
+
PhoneNumberArn: __expectString(output.PhoneNumberArn),
|
|
16884
|
+
PhoneNumberCountryCode: __expectString(output.PhoneNumberCountryCode),
|
|
16885
|
+
PhoneNumberId: __expectString(output.PhoneNumberId),
|
|
16886
|
+
PhoneNumberType: __expectString(output.PhoneNumberType),
|
|
16887
|
+
TargetArn: __expectString(output.TargetArn),
|
|
16888
|
+
};
|
|
16889
|
+
};
|
|
16890
|
+
var deserializeAws_restJson1ListPhoneNumbersSummaryList = function (output, context) {
|
|
16891
|
+
var retVal = (output || [])
|
|
16892
|
+
.filter(function (e) { return e != null; })
|
|
16893
|
+
.map(function (entry) {
|
|
16894
|
+
if (entry === null) {
|
|
16895
|
+
return null;
|
|
16896
|
+
}
|
|
16897
|
+
return deserializeAws_restJson1ListPhoneNumbersSummary(entry, context);
|
|
16898
|
+
});
|
|
16899
|
+
return retVal;
|
|
16900
|
+
};
|
|
15983
16901
|
var deserializeAws_restJson1MediaConcurrencies = function (output, context) {
|
|
15984
16902
|
var retVal = (output || [])
|
|
15985
16903
|
.filter(function (e) { return e != null; })
|
|
@@ -16031,6 +16949,12 @@ var deserializeAws_restJson1PhoneNumberQuickConnectConfig = function (output, co
|
|
|
16031
16949
|
PhoneNumber: __expectString(output.PhoneNumber),
|
|
16032
16950
|
};
|
|
16033
16951
|
};
|
|
16952
|
+
var deserializeAws_restJson1PhoneNumberStatus = function (output, context) {
|
|
16953
|
+
return {
|
|
16954
|
+
Message: __expectString(output.Message),
|
|
16955
|
+
Status: __expectString(output.Status),
|
|
16956
|
+
};
|
|
16957
|
+
};
|
|
16034
16958
|
var deserializeAws_restJson1PhoneNumberSummary = function (output, context) {
|
|
16035
16959
|
return {
|
|
16036
16960
|
Arn: __expectString(output.Arn),
|