@aws-sdk/client-connect 3.473.0 → 3.475.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/README.md +32 -0
- package/dist-cjs/Connect.js +8 -0
- package/dist-cjs/commands/PauseContactCommand.js +51 -0
- package/dist-cjs/commands/ResumeContactCommand.js +51 -0
- package/dist-cjs/commands/TagContactCommand.js +51 -0
- package/dist-cjs/commands/UntagContactCommand.js +51 -0
- package/dist-cjs/commands/index.js +4 -0
- package/dist-cjs/models/models_0.js +7 -5
- package/dist-cjs/models/models_1.js +19 -6
- package/dist-cjs/models/models_2.js +6 -1
- package/dist-cjs/protocols/Aws_restJson1.js +414 -10
- package/dist-es/Connect.js +8 -0
- package/dist-es/commands/PauseContactCommand.js +47 -0
- package/dist-es/commands/ResumeContactCommand.js +47 -0
- package/dist-es/commands/TagContactCommand.js +47 -0
- package/dist-es/commands/UntagContactCommand.js +47 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/models/models_0.js +6 -4
- package/dist-es/models/models_1.js +17 -5
- package/dist-es/models/models_2.js +5 -0
- package/dist-es/protocols/Aws_restJson1.js +400 -4
- package/dist-types/Connect.d.ts +28 -0
- package/dist-types/ConnectClient.d.ts +6 -2
- package/dist-types/commands/BatchAssociateAnalyticsDataSetCommand.d.ts +2 -2
- package/dist-types/commands/CreateIntegrationAssociationCommand.d.ts +1 -1
- package/dist-types/commands/CreateRuleCommand.d.ts +30 -2
- package/dist-types/commands/DescribeContactCommand.d.ts +8 -0
- package/dist-types/commands/DescribePromptCommand.d.ts +2 -1
- package/dist-types/commands/DescribeQueueCommand.d.ts +1 -1
- package/dist-types/commands/DescribeRuleCommand.d.ts +30 -2
- package/dist-types/commands/ListIntegrationAssociationsCommand.d.ts +1 -1
- package/dist-types/commands/ListRulesCommand.d.ts +3 -3
- package/dist-types/commands/PauseContactCommand.d.ts +97 -0
- package/dist-types/commands/ResumeContactCommand.d.ts +94 -0
- package/dist-types/commands/SearchUsersCommand.d.ts +1 -2
- package/dist-types/commands/SearchVocabulariesCommand.d.ts +1 -1
- package/dist-types/commands/StartOutboundVoiceContactCommand.d.ts +9 -0
- package/dist-types/commands/TagContactCommand.d.ts +92 -0
- package/dist-types/commands/UntagContactCommand.d.ts +91 -0
- package/dist-types/commands/UpdateRuleCommand.d.ts +29 -1
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +164 -175
- package/dist-types/models/models_1.d.ts +237 -319
- package/dist-types/models/models_2.d.ts +398 -9
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
- package/dist-types/ts3.4/Connect.d.ts +68 -0
- package/dist-types/ts3.4/ConnectClient.d.ts +24 -0
- package/dist-types/ts3.4/commands/DescribePromptCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/DescribeQueueCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/PauseContactCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ResumeContactCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/SearchUsersCommand.d.ts +1 -2
- package/dist-types/ts3.4/commands/SearchVocabulariesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/TagContactCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UntagContactCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +34 -37
- package/dist-types/ts3.4/models/models_1.d.ts +56 -65
- package/dist-types/ts3.4/models/models_2.d.ts +84 -5
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +48 -0
- package/package.json +4 -4
|
@@ -4,7 +4,7 @@ import { _json, collectBody, decorateServiceException as __decorateServiceExcept
|
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { ConnectServiceException as __BaseException } from "../models/ConnectServiceException";
|
|
6
6
|
import { AccessDeniedException, ContactFlowNotPublishedException, DuplicateResourceException, EvaluationAnswerData, IdempotencyException, InternalServiceException, InvalidContactFlowException, InvalidContactFlowModuleException, InvalidParameterException, InvalidRequestException, LimitExceededException, PropertyValidationException, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, ServiceQuotaExceededException, ThrottlingException, TooManyRequestsException, } from "../models/models_0";
|
|
7
|
-
import { MaximumResultReturnedException, OutputTypeNotFoundException, UserNotFoundException, } from "../models/models_1";
|
|
7
|
+
import { ConflictException, MaximumResultReturnedException, OutputTypeNotFoundException, UserNotFoundException, } from "../models/models_1";
|
|
8
8
|
import { ContactNotFoundException, DestinationNotAllowedException, EvaluationFormItem, OutboundContactNotPermittedException, } from "../models/models_2";
|
|
9
9
|
export const se_ActivateEvaluationFormCommand = async (input, context) => {
|
|
10
10
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -770,7 +770,7 @@ export const se_CreateRuleCommand = async (input, context) => {
|
|
|
770
770
|
resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
|
|
771
771
|
let body;
|
|
772
772
|
body = JSON.stringify(take(input, {
|
|
773
|
-
Actions: (_) =>
|
|
773
|
+
Actions: (_) => se_RuleActions(_, context),
|
|
774
774
|
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
775
775
|
Function: [],
|
|
776
776
|
Name: [],
|
|
@@ -3303,6 +3303,28 @@ export const se_MonitorContactCommand = async (input, context) => {
|
|
|
3303
3303
|
body,
|
|
3304
3304
|
});
|
|
3305
3305
|
};
|
|
3306
|
+
export const se_PauseContactCommand = async (input, context) => {
|
|
3307
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
3308
|
+
const headers = {
|
|
3309
|
+
"content-type": "application/json",
|
|
3310
|
+
};
|
|
3311
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/pause";
|
|
3312
|
+
let body;
|
|
3313
|
+
body = JSON.stringify(take(input, {
|
|
3314
|
+
ContactFlowId: [],
|
|
3315
|
+
ContactId: [],
|
|
3316
|
+
InstanceId: [],
|
|
3317
|
+
}));
|
|
3318
|
+
return new __HttpRequest({
|
|
3319
|
+
protocol,
|
|
3320
|
+
hostname,
|
|
3321
|
+
port,
|
|
3322
|
+
method: "POST",
|
|
3323
|
+
headers,
|
|
3324
|
+
path: resolvedPath,
|
|
3325
|
+
body,
|
|
3326
|
+
});
|
|
3327
|
+
};
|
|
3306
3328
|
export const se_PutUserStatusCommand = async (input, context) => {
|
|
3307
3329
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
3308
3330
|
const headers = {
|
|
@@ -3368,6 +3390,28 @@ export const se_ReplicateInstanceCommand = async (input, context) => {
|
|
|
3368
3390
|
body,
|
|
3369
3391
|
});
|
|
3370
3392
|
};
|
|
3393
|
+
export const se_ResumeContactCommand = async (input, context) => {
|
|
3394
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
3395
|
+
const headers = {
|
|
3396
|
+
"content-type": "application/json",
|
|
3397
|
+
};
|
|
3398
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/resume";
|
|
3399
|
+
let body;
|
|
3400
|
+
body = JSON.stringify(take(input, {
|
|
3401
|
+
ContactFlowId: [],
|
|
3402
|
+
ContactId: [],
|
|
3403
|
+
InstanceId: [],
|
|
3404
|
+
}));
|
|
3405
|
+
return new __HttpRequest({
|
|
3406
|
+
protocol,
|
|
3407
|
+
hostname,
|
|
3408
|
+
port,
|
|
3409
|
+
method: "POST",
|
|
3410
|
+
headers,
|
|
3411
|
+
path: resolvedPath,
|
|
3412
|
+
body,
|
|
3413
|
+
});
|
|
3414
|
+
};
|
|
3371
3415
|
export const se_ResumeContactRecordingCommand = async (input, context) => {
|
|
3372
3416
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
3373
3417
|
const headers = {
|
|
@@ -3769,9 +3813,13 @@ export const se_StartOutboundVoiceContactCommand = async (input, context) => {
|
|
|
3769
3813
|
CampaignId: [],
|
|
3770
3814
|
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
3771
3815
|
ContactFlowId: [],
|
|
3816
|
+
Description: [],
|
|
3772
3817
|
DestinationPhoneNumber: [],
|
|
3773
3818
|
InstanceId: [],
|
|
3819
|
+
Name: [],
|
|
3774
3820
|
QueueId: [],
|
|
3821
|
+
References: (_) => _json(_),
|
|
3822
|
+
RelatedContactId: [],
|
|
3775
3823
|
SourcePhoneNumber: [],
|
|
3776
3824
|
TrafficType: [],
|
|
3777
3825
|
}));
|
|
@@ -3956,6 +4004,28 @@ export const se_SuspendContactRecordingCommand = async (input, context) => {
|
|
|
3956
4004
|
body,
|
|
3957
4005
|
});
|
|
3958
4006
|
};
|
|
4007
|
+
export const se_TagContactCommand = async (input, context) => {
|
|
4008
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
4009
|
+
const headers = {
|
|
4010
|
+
"content-type": "application/json",
|
|
4011
|
+
};
|
|
4012
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/tags";
|
|
4013
|
+
let body;
|
|
4014
|
+
body = JSON.stringify(take(input, {
|
|
4015
|
+
ContactId: [],
|
|
4016
|
+
InstanceId: [],
|
|
4017
|
+
Tags: (_) => _json(_),
|
|
4018
|
+
}));
|
|
4019
|
+
return new __HttpRequest({
|
|
4020
|
+
protocol,
|
|
4021
|
+
hostname,
|
|
4022
|
+
port,
|
|
4023
|
+
method: "POST",
|
|
4024
|
+
headers,
|
|
4025
|
+
path: resolvedPath,
|
|
4026
|
+
body,
|
|
4027
|
+
});
|
|
4028
|
+
};
|
|
3959
4029
|
export const se_TagResourceCommand = async (input, context) => {
|
|
3960
4030
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
3961
4031
|
const headers = {
|
|
@@ -4002,6 +4072,30 @@ export const se_TransferContactCommand = async (input, context) => {
|
|
|
4002
4072
|
body,
|
|
4003
4073
|
});
|
|
4004
4074
|
};
|
|
4075
|
+
export const se_UntagContactCommand = async (input, context) => {
|
|
4076
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
4077
|
+
const headers = {};
|
|
4078
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/tags/{InstanceId}/{ContactId}";
|
|
4079
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ContactId", () => input.ContactId, "{ContactId}", false);
|
|
4080
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
|
|
4081
|
+
const query = map({
|
|
4082
|
+
TagKeys: [
|
|
4083
|
+
__expectNonNull(input.TagKeys, `TagKeys`) != null,
|
|
4084
|
+
() => (input.TagKeys || []).map((_entry) => _entry),
|
|
4085
|
+
],
|
|
4086
|
+
});
|
|
4087
|
+
let body;
|
|
4088
|
+
return new __HttpRequest({
|
|
4089
|
+
protocol,
|
|
4090
|
+
hostname,
|
|
4091
|
+
port,
|
|
4092
|
+
method: "DELETE",
|
|
4093
|
+
headers,
|
|
4094
|
+
path: resolvedPath,
|
|
4095
|
+
query,
|
|
4096
|
+
body,
|
|
4097
|
+
});
|
|
4098
|
+
};
|
|
4005
4099
|
export const se_UntagResourceCommand = async (input, context) => {
|
|
4006
4100
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
4007
4101
|
const headers = {};
|
|
@@ -4748,7 +4842,7 @@ export const se_UpdateRuleCommand = async (input, context) => {
|
|
|
4748
4842
|
resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
|
|
4749
4843
|
let body;
|
|
4750
4844
|
body = JSON.stringify(take(input, {
|
|
4751
|
-
Actions: (_) =>
|
|
4845
|
+
Actions: (_) => se_RuleActions(_, context),
|
|
4752
4846
|
Function: [],
|
|
4753
4847
|
Name: [],
|
|
4754
4848
|
PublishStatus: [],
|
|
@@ -12116,6 +12210,56 @@ const de_MonitorContactCommandError = async (output, context) => {
|
|
|
12116
12210
|
});
|
|
12117
12211
|
}
|
|
12118
12212
|
};
|
|
12213
|
+
export const de_PauseContactCommand = async (output, context) => {
|
|
12214
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12215
|
+
return de_PauseContactCommandError(output, context);
|
|
12216
|
+
}
|
|
12217
|
+
const contents = map({
|
|
12218
|
+
$metadata: deserializeMetadata(output),
|
|
12219
|
+
});
|
|
12220
|
+
await collectBody(output.body, context);
|
|
12221
|
+
return contents;
|
|
12222
|
+
};
|
|
12223
|
+
const de_PauseContactCommandError = async (output, context) => {
|
|
12224
|
+
const parsedOutput = {
|
|
12225
|
+
...output,
|
|
12226
|
+
body: await parseErrorBody(output.body, context),
|
|
12227
|
+
};
|
|
12228
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
12229
|
+
switch (errorCode) {
|
|
12230
|
+
case "AccessDeniedException":
|
|
12231
|
+
case "com.amazonaws.connect#AccessDeniedException":
|
|
12232
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
12233
|
+
case "ConflictException":
|
|
12234
|
+
case "com.amazonaws.connect#ConflictException":
|
|
12235
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
12236
|
+
case "InternalServiceException":
|
|
12237
|
+
case "com.amazonaws.connect#InternalServiceException":
|
|
12238
|
+
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
12239
|
+
case "InvalidParameterException":
|
|
12240
|
+
case "com.amazonaws.connect#InvalidParameterException":
|
|
12241
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
12242
|
+
case "InvalidRequestException":
|
|
12243
|
+
case "com.amazonaws.connect#InvalidRequestException":
|
|
12244
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
12245
|
+
case "LimitExceededException":
|
|
12246
|
+
case "com.amazonaws.connect#LimitExceededException":
|
|
12247
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
12248
|
+
case "ResourceNotFoundException":
|
|
12249
|
+
case "com.amazonaws.connect#ResourceNotFoundException":
|
|
12250
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
12251
|
+
case "ThrottlingException":
|
|
12252
|
+
case "com.amazonaws.connect#ThrottlingException":
|
|
12253
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
12254
|
+
default:
|
|
12255
|
+
const parsedBody = parsedOutput.body;
|
|
12256
|
+
return throwDefaultError({
|
|
12257
|
+
output,
|
|
12258
|
+
parsedBody,
|
|
12259
|
+
errorCode,
|
|
12260
|
+
});
|
|
12261
|
+
}
|
|
12262
|
+
};
|
|
12119
12263
|
export const de_PutUserStatusCommand = async (output, context) => {
|
|
12120
12264
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12121
12265
|
return de_PutUserStatusCommandError(output, context);
|
|
@@ -12262,6 +12406,53 @@ const de_ReplicateInstanceCommandError = async (output, context) => {
|
|
|
12262
12406
|
});
|
|
12263
12407
|
}
|
|
12264
12408
|
};
|
|
12409
|
+
export const de_ResumeContactCommand = async (output, context) => {
|
|
12410
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12411
|
+
return de_ResumeContactCommandError(output, context);
|
|
12412
|
+
}
|
|
12413
|
+
const contents = map({
|
|
12414
|
+
$metadata: deserializeMetadata(output),
|
|
12415
|
+
});
|
|
12416
|
+
await collectBody(output.body, context);
|
|
12417
|
+
return contents;
|
|
12418
|
+
};
|
|
12419
|
+
const de_ResumeContactCommandError = async (output, context) => {
|
|
12420
|
+
const parsedOutput = {
|
|
12421
|
+
...output,
|
|
12422
|
+
body: await parseErrorBody(output.body, context),
|
|
12423
|
+
};
|
|
12424
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
12425
|
+
switch (errorCode) {
|
|
12426
|
+
case "AccessDeniedException":
|
|
12427
|
+
case "com.amazonaws.connect#AccessDeniedException":
|
|
12428
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
12429
|
+
case "ConflictException":
|
|
12430
|
+
case "com.amazonaws.connect#ConflictException":
|
|
12431
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
12432
|
+
case "InternalServiceException":
|
|
12433
|
+
case "com.amazonaws.connect#InternalServiceException":
|
|
12434
|
+
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
12435
|
+
case "InvalidParameterException":
|
|
12436
|
+
case "com.amazonaws.connect#InvalidParameterException":
|
|
12437
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
12438
|
+
case "InvalidRequestException":
|
|
12439
|
+
case "com.amazonaws.connect#InvalidRequestException":
|
|
12440
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
12441
|
+
case "ResourceNotFoundException":
|
|
12442
|
+
case "com.amazonaws.connect#ResourceNotFoundException":
|
|
12443
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
12444
|
+
case "ThrottlingException":
|
|
12445
|
+
case "com.amazonaws.connect#ThrottlingException":
|
|
12446
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
12447
|
+
default:
|
|
12448
|
+
const parsedBody = parsedOutput.body;
|
|
12449
|
+
return throwDefaultError({
|
|
12450
|
+
output,
|
|
12451
|
+
parsedBody,
|
|
12452
|
+
errorCode,
|
|
12453
|
+
});
|
|
12454
|
+
}
|
|
12455
|
+
};
|
|
12265
12456
|
export const de_ResumeContactRecordingCommand = async (output, context) => {
|
|
12266
12457
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12267
12458
|
return de_ResumeContactRecordingCommandError(output, context);
|
|
@@ -13329,6 +13520,47 @@ const de_SuspendContactRecordingCommandError = async (output, context) => {
|
|
|
13329
13520
|
});
|
|
13330
13521
|
}
|
|
13331
13522
|
};
|
|
13523
|
+
export const de_TagContactCommand = async (output, context) => {
|
|
13524
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
13525
|
+
return de_TagContactCommandError(output, context);
|
|
13526
|
+
}
|
|
13527
|
+
const contents = map({
|
|
13528
|
+
$metadata: deserializeMetadata(output),
|
|
13529
|
+
});
|
|
13530
|
+
await collectBody(output.body, context);
|
|
13531
|
+
return contents;
|
|
13532
|
+
};
|
|
13533
|
+
const de_TagContactCommandError = async (output, context) => {
|
|
13534
|
+
const parsedOutput = {
|
|
13535
|
+
...output,
|
|
13536
|
+
body: await parseErrorBody(output.body, context),
|
|
13537
|
+
};
|
|
13538
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
13539
|
+
switch (errorCode) {
|
|
13540
|
+
case "InternalServiceException":
|
|
13541
|
+
case "com.amazonaws.connect#InternalServiceException":
|
|
13542
|
+
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
13543
|
+
case "InvalidParameterException":
|
|
13544
|
+
case "com.amazonaws.connect#InvalidParameterException":
|
|
13545
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
13546
|
+
case "InvalidRequestException":
|
|
13547
|
+
case "com.amazonaws.connect#InvalidRequestException":
|
|
13548
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
13549
|
+
case "ResourceNotFoundException":
|
|
13550
|
+
case "com.amazonaws.connect#ResourceNotFoundException":
|
|
13551
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
13552
|
+
case "ThrottlingException":
|
|
13553
|
+
case "com.amazonaws.connect#ThrottlingException":
|
|
13554
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
13555
|
+
default:
|
|
13556
|
+
const parsedBody = parsedOutput.body;
|
|
13557
|
+
return throwDefaultError({
|
|
13558
|
+
output,
|
|
13559
|
+
parsedBody,
|
|
13560
|
+
errorCode,
|
|
13561
|
+
});
|
|
13562
|
+
}
|
|
13563
|
+
};
|
|
13332
13564
|
export const de_TagResourceCommand = async (output, context) => {
|
|
13333
13565
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
13334
13566
|
return de_TagResourceCommandError(output, context);
|
|
@@ -13422,6 +13654,47 @@ const de_TransferContactCommandError = async (output, context) => {
|
|
|
13422
13654
|
});
|
|
13423
13655
|
}
|
|
13424
13656
|
};
|
|
13657
|
+
export const de_UntagContactCommand = async (output, context) => {
|
|
13658
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
13659
|
+
return de_UntagContactCommandError(output, context);
|
|
13660
|
+
}
|
|
13661
|
+
const contents = map({
|
|
13662
|
+
$metadata: deserializeMetadata(output),
|
|
13663
|
+
});
|
|
13664
|
+
await collectBody(output.body, context);
|
|
13665
|
+
return contents;
|
|
13666
|
+
};
|
|
13667
|
+
const de_UntagContactCommandError = async (output, context) => {
|
|
13668
|
+
const parsedOutput = {
|
|
13669
|
+
...output,
|
|
13670
|
+
body: await parseErrorBody(output.body, context),
|
|
13671
|
+
};
|
|
13672
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
13673
|
+
switch (errorCode) {
|
|
13674
|
+
case "InternalServiceException":
|
|
13675
|
+
case "com.amazonaws.connect#InternalServiceException":
|
|
13676
|
+
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
13677
|
+
case "InvalidParameterException":
|
|
13678
|
+
case "com.amazonaws.connect#InvalidParameterException":
|
|
13679
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
13680
|
+
case "InvalidRequestException":
|
|
13681
|
+
case "com.amazonaws.connect#InvalidRequestException":
|
|
13682
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
13683
|
+
case "ResourceNotFoundException":
|
|
13684
|
+
case "com.amazonaws.connect#ResourceNotFoundException":
|
|
13685
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
13686
|
+
case "ThrottlingException":
|
|
13687
|
+
case "com.amazonaws.connect#ThrottlingException":
|
|
13688
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
13689
|
+
default:
|
|
13690
|
+
const parsedBody = parsedOutput.body;
|
|
13691
|
+
return throwDefaultError({
|
|
13692
|
+
output,
|
|
13693
|
+
parsedBody,
|
|
13694
|
+
errorCode,
|
|
13695
|
+
});
|
|
13696
|
+
}
|
|
13697
|
+
};
|
|
13425
13698
|
export const de_UntagResourceCommand = async (output, context) => {
|
|
13426
13699
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
13427
13700
|
return de_UntagResourceCommandError(output, context);
|
|
@@ -15364,6 +15637,19 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
15364
15637
|
});
|
|
15365
15638
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
15366
15639
|
};
|
|
15640
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
15641
|
+
const contents = map({});
|
|
15642
|
+
const data = parsedOutput.body;
|
|
15643
|
+
const doc = take(data, {
|
|
15644
|
+
Message: __expectString,
|
|
15645
|
+
});
|
|
15646
|
+
Object.assign(contents, doc);
|
|
15647
|
+
const exception = new ConflictException({
|
|
15648
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
15649
|
+
...contents,
|
|
15650
|
+
});
|
|
15651
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
15652
|
+
};
|
|
15367
15653
|
const de_ContactFlowNotPublishedExceptionRes = async (parsedOutput, context) => {
|
|
15368
15654
|
const contents = map({});
|
|
15369
15655
|
const data = parsedOutput.body;
|
|
@@ -15666,6 +15952,12 @@ const de_UserNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
15666
15952
|
});
|
|
15667
15953
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
15668
15954
|
};
|
|
15955
|
+
const se_CreateCaseActionDefinition = (input, context) => {
|
|
15956
|
+
return take(input, {
|
|
15957
|
+
Fields: (_) => se_FieldValues(_, context),
|
|
15958
|
+
TemplateId: [],
|
|
15959
|
+
});
|
|
15960
|
+
};
|
|
15669
15961
|
const se_EvaluationAnswerData = (input, context) => {
|
|
15670
15962
|
return EvaluationAnswerData.visit(input, {
|
|
15671
15963
|
NotApplicable: (value) => ({ NotApplicable: value }),
|
|
@@ -15722,6 +16014,27 @@ const se_EvaluationFormSection = (input, context) => {
|
|
|
15722
16014
|
Weight: __serializeFloat,
|
|
15723
16015
|
});
|
|
15724
16016
|
};
|
|
16017
|
+
const se_FieldValue = (input, context) => {
|
|
16018
|
+
return take(input, {
|
|
16019
|
+
Id: [],
|
|
16020
|
+
Value: (_) => se_FieldValueUnion(_, context),
|
|
16021
|
+
});
|
|
16022
|
+
};
|
|
16023
|
+
const se_FieldValues = (input, context) => {
|
|
16024
|
+
return input
|
|
16025
|
+
.filter((e) => e != null)
|
|
16026
|
+
.map((entry) => {
|
|
16027
|
+
return se_FieldValue(entry, context);
|
|
16028
|
+
});
|
|
16029
|
+
};
|
|
16030
|
+
const se_FieldValueUnion = (input, context) => {
|
|
16031
|
+
return take(input, {
|
|
16032
|
+
BooleanValue: [],
|
|
16033
|
+
DoubleValue: __serializeFloat,
|
|
16034
|
+
EmptyValue: _json,
|
|
16035
|
+
StringValue: [],
|
|
16036
|
+
});
|
|
16037
|
+
};
|
|
15725
16038
|
const se_HistoricalMetric = (input, context) => {
|
|
15726
16039
|
return take(input, {
|
|
15727
16040
|
Name: [],
|
|
@@ -15822,6 +16135,25 @@ const se_RoutingProfileSearchCriteria = (input, context) => {
|
|
|
15822
16135
|
StringCondition: _json,
|
|
15823
16136
|
});
|
|
15824
16137
|
};
|
|
16138
|
+
const se_RuleAction = (input, context) => {
|
|
16139
|
+
return take(input, {
|
|
16140
|
+
ActionType: [],
|
|
16141
|
+
AssignContactCategoryAction: _json,
|
|
16142
|
+
CreateCaseAction: (_) => se_CreateCaseActionDefinition(_, context),
|
|
16143
|
+
EndAssociatedTasksAction: _json,
|
|
16144
|
+
EventBridgeAction: _json,
|
|
16145
|
+
SendNotificationAction: _json,
|
|
16146
|
+
TaskAction: _json,
|
|
16147
|
+
UpdateCaseAction: (_) => se_UpdateCaseActionDefinition(_, context),
|
|
16148
|
+
});
|
|
16149
|
+
};
|
|
16150
|
+
const se_RuleActions = (input, context) => {
|
|
16151
|
+
return input
|
|
16152
|
+
.filter((e) => e != null)
|
|
16153
|
+
.map((entry) => {
|
|
16154
|
+
return se_RuleAction(entry, context);
|
|
16155
|
+
});
|
|
16156
|
+
};
|
|
15825
16157
|
const se_SecurityProfileSearchConditionList = (input, context) => {
|
|
15826
16158
|
return input
|
|
15827
16159
|
.filter((e) => e != null)
|
|
@@ -15855,6 +16187,11 @@ const se_ThresholdV2 = (input, context) => {
|
|
|
15855
16187
|
ThresholdValue: __serializeFloat,
|
|
15856
16188
|
});
|
|
15857
16189
|
};
|
|
16190
|
+
const se_UpdateCaseActionDefinition = (input, context) => {
|
|
16191
|
+
return take(input, {
|
|
16192
|
+
Fields: (_) => se_FieldValues(_, context),
|
|
16193
|
+
});
|
|
16194
|
+
};
|
|
15858
16195
|
const se_UserSearchConditionList = (input, context) => {
|
|
15859
16196
|
return input
|
|
15860
16197
|
.filter((e) => e != null)
|
|
@@ -15891,6 +16228,7 @@ const de_AgentContactReferenceList = (output, context) => {
|
|
|
15891
16228
|
};
|
|
15892
16229
|
const de_AgentInfo = (output, context) => {
|
|
15893
16230
|
return take(output, {
|
|
16231
|
+
AgentPauseDurationInSeconds: __expectInt32,
|
|
15894
16232
|
ConnectedToAgentTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
15895
16233
|
Id: __expectString,
|
|
15896
16234
|
});
|
|
@@ -15945,15 +16283,26 @@ const de_Contact = (output, context) => {
|
|
|
15945
16283
|
InitialContactId: __expectString,
|
|
15946
16284
|
InitiationMethod: __expectString,
|
|
15947
16285
|
InitiationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
16286
|
+
LastPausedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
16287
|
+
LastResumedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
15948
16288
|
LastUpdateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
15949
16289
|
Name: __expectString,
|
|
15950
16290
|
PreviousContactId: __expectString,
|
|
15951
16291
|
QueueInfo: (_) => de_QueueInfo(_, context),
|
|
15952
16292
|
RelatedContactId: __expectString,
|
|
15953
16293
|
ScheduledTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
16294
|
+
Tags: _json,
|
|
16295
|
+
TotalPauseCount: __expectInt32,
|
|
16296
|
+
TotalPauseDurationInSeconds: __expectInt32,
|
|
15954
16297
|
WisdomInfo: _json,
|
|
15955
16298
|
});
|
|
15956
16299
|
};
|
|
16300
|
+
const de_CreateCaseActionDefinition = (output, context) => {
|
|
16301
|
+
return take(output, {
|
|
16302
|
+
Fields: (_) => de_FieldValues(_, context),
|
|
16303
|
+
TemplateId: __expectString,
|
|
16304
|
+
});
|
|
16305
|
+
};
|
|
15957
16306
|
const de_Credentials = (output, context) => {
|
|
15958
16307
|
return take(output, {
|
|
15959
16308
|
AccessToken: __expectString,
|
|
@@ -16190,6 +16539,28 @@ const de_EvaluationSummaryList = (output, context) => {
|
|
|
16190
16539
|
});
|
|
16191
16540
|
return retVal;
|
|
16192
16541
|
};
|
|
16542
|
+
const de_FieldValue = (output, context) => {
|
|
16543
|
+
return take(output, {
|
|
16544
|
+
Id: __expectString,
|
|
16545
|
+
Value: (_) => de_FieldValueUnion(_, context),
|
|
16546
|
+
});
|
|
16547
|
+
};
|
|
16548
|
+
const de_FieldValues = (output, context) => {
|
|
16549
|
+
const retVal = (output || [])
|
|
16550
|
+
.filter((e) => e != null)
|
|
16551
|
+
.map((entry) => {
|
|
16552
|
+
return de_FieldValue(entry, context);
|
|
16553
|
+
});
|
|
16554
|
+
return retVal;
|
|
16555
|
+
};
|
|
16556
|
+
const de_FieldValueUnion = (output, context) => {
|
|
16557
|
+
return take(output, {
|
|
16558
|
+
BooleanValue: __expectBoolean,
|
|
16559
|
+
DoubleValue: __limitedParseDouble,
|
|
16560
|
+
EmptyValue: _json,
|
|
16561
|
+
StringValue: __expectString,
|
|
16562
|
+
});
|
|
16563
|
+
};
|
|
16193
16564
|
const de_HierarchyGroup = (output, context) => {
|
|
16194
16565
|
return take(output, {
|
|
16195
16566
|
Arn: __expectString,
|
|
@@ -16644,7 +17015,7 @@ const de_RoutingProfileSummaryList = (output, context) => {
|
|
|
16644
17015
|
};
|
|
16645
17016
|
const de_Rule = (output, context) => {
|
|
16646
17017
|
return take(output, {
|
|
16647
|
-
Actions:
|
|
17018
|
+
Actions: (_) => de_RuleActions(_, context),
|
|
16648
17019
|
CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
16649
17020
|
Function: __expectString,
|
|
16650
17021
|
LastUpdatedBy: __expectString,
|
|
@@ -16657,6 +17028,26 @@ const de_Rule = (output, context) => {
|
|
|
16657
17028
|
TriggerEventSource: _json,
|
|
16658
17029
|
});
|
|
16659
17030
|
};
|
|
17031
|
+
const de_RuleAction = (output, context) => {
|
|
17032
|
+
return take(output, {
|
|
17033
|
+
ActionType: __expectString,
|
|
17034
|
+
AssignContactCategoryAction: _json,
|
|
17035
|
+
CreateCaseAction: (_) => de_CreateCaseActionDefinition(_, context),
|
|
17036
|
+
EndAssociatedTasksAction: _json,
|
|
17037
|
+
EventBridgeAction: _json,
|
|
17038
|
+
SendNotificationAction: _json,
|
|
17039
|
+
TaskAction: _json,
|
|
17040
|
+
UpdateCaseAction: (_) => de_UpdateCaseActionDefinition(_, context),
|
|
17041
|
+
});
|
|
17042
|
+
};
|
|
17043
|
+
const de_RuleActions = (output, context) => {
|
|
17044
|
+
const retVal = (output || [])
|
|
17045
|
+
.filter((e) => e != null)
|
|
17046
|
+
.map((entry) => {
|
|
17047
|
+
return de_RuleAction(entry, context);
|
|
17048
|
+
});
|
|
17049
|
+
return retVal;
|
|
17050
|
+
};
|
|
16660
17051
|
const de_RuleSummary = (output, context) => {
|
|
16661
17052
|
return take(output, {
|
|
16662
17053
|
ActionSummaries: _json,
|
|
@@ -16762,6 +17153,11 @@ const de_ThresholdV2 = (output, context) => {
|
|
|
16762
17153
|
ThresholdValue: __limitedParseDouble,
|
|
16763
17154
|
});
|
|
16764
17155
|
};
|
|
17156
|
+
const de_UpdateCaseActionDefinition = (output, context) => {
|
|
17157
|
+
return take(output, {
|
|
17158
|
+
Fields: (_) => de_FieldValues(_, context),
|
|
17159
|
+
});
|
|
17160
|
+
};
|
|
16765
17161
|
const de_User = (output, context) => {
|
|
16766
17162
|
return take(output, {
|
|
16767
17163
|
Arn: __expectString,
|
package/dist-types/Connect.d.ts
CHANGED
|
@@ -153,9 +153,11 @@ import { ListUsersCommandInput, ListUsersCommandOutput } from "./commands/ListUs
|
|
|
153
153
|
import { ListViewsCommandInput, ListViewsCommandOutput } from "./commands/ListViewsCommand";
|
|
154
154
|
import { ListViewVersionsCommandInput, ListViewVersionsCommandOutput } from "./commands/ListViewVersionsCommand";
|
|
155
155
|
import { MonitorContactCommandInput, MonitorContactCommandOutput } from "./commands/MonitorContactCommand";
|
|
156
|
+
import { PauseContactCommandInput, PauseContactCommandOutput } from "./commands/PauseContactCommand";
|
|
156
157
|
import { PutUserStatusCommandInput, PutUserStatusCommandOutput } from "./commands/PutUserStatusCommand";
|
|
157
158
|
import { ReleasePhoneNumberCommandInput, ReleasePhoneNumberCommandOutput } from "./commands/ReleasePhoneNumberCommand";
|
|
158
159
|
import { ReplicateInstanceCommandInput, ReplicateInstanceCommandOutput } from "./commands/ReplicateInstanceCommand";
|
|
160
|
+
import { ResumeContactCommandInput, ResumeContactCommandOutput } from "./commands/ResumeContactCommand";
|
|
159
161
|
import { ResumeContactRecordingCommandInput, ResumeContactRecordingCommandOutput } from "./commands/ResumeContactRecordingCommand";
|
|
160
162
|
import { SearchAvailablePhoneNumbersCommandInput, SearchAvailablePhoneNumbersCommandOutput } from "./commands/SearchAvailablePhoneNumbersCommand";
|
|
161
163
|
import { SearchHoursOfOperationsCommandInput, SearchHoursOfOperationsCommandOutput } from "./commands/SearchHoursOfOperationsCommand";
|
|
@@ -180,8 +182,10 @@ import { StopContactRecordingCommandInput, StopContactRecordingCommandOutput } f
|
|
|
180
182
|
import { StopContactStreamingCommandInput, StopContactStreamingCommandOutput } from "./commands/StopContactStreamingCommand";
|
|
181
183
|
import { SubmitContactEvaluationCommandInput, SubmitContactEvaluationCommandOutput } from "./commands/SubmitContactEvaluationCommand";
|
|
182
184
|
import { SuspendContactRecordingCommandInput, SuspendContactRecordingCommandOutput } from "./commands/SuspendContactRecordingCommand";
|
|
185
|
+
import { TagContactCommandInput, TagContactCommandOutput } from "./commands/TagContactCommand";
|
|
183
186
|
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
184
187
|
import { TransferContactCommandInput, TransferContactCommandOutput } from "./commands/TransferContactCommand";
|
|
188
|
+
import { UntagContactCommandInput, UntagContactCommandOutput } from "./commands/UntagContactCommand";
|
|
185
189
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
186
190
|
import { UpdateAgentStatusCommandInput, UpdateAgentStatusCommandOutput } from "./commands/UpdateAgentStatusCommand";
|
|
187
191
|
import { UpdateContactAttributesCommandInput, UpdateContactAttributesCommandOutput } from "./commands/UpdateContactAttributesCommand";
|
|
@@ -1152,6 +1156,12 @@ export interface Connect {
|
|
|
1152
1156
|
monitorContact(args: MonitorContactCommandInput, options?: __HttpHandlerOptions): Promise<MonitorContactCommandOutput>;
|
|
1153
1157
|
monitorContact(args: MonitorContactCommandInput, cb: (err: any, data?: MonitorContactCommandOutput) => void): void;
|
|
1154
1158
|
monitorContact(args: MonitorContactCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: MonitorContactCommandOutput) => void): void;
|
|
1159
|
+
/**
|
|
1160
|
+
* @see {@link PauseContactCommand}
|
|
1161
|
+
*/
|
|
1162
|
+
pauseContact(args: PauseContactCommandInput, options?: __HttpHandlerOptions): Promise<PauseContactCommandOutput>;
|
|
1163
|
+
pauseContact(args: PauseContactCommandInput, cb: (err: any, data?: PauseContactCommandOutput) => void): void;
|
|
1164
|
+
pauseContact(args: PauseContactCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PauseContactCommandOutput) => void): void;
|
|
1155
1165
|
/**
|
|
1156
1166
|
* @see {@link PutUserStatusCommand}
|
|
1157
1167
|
*/
|
|
@@ -1170,6 +1180,12 @@ export interface Connect {
|
|
|
1170
1180
|
replicateInstance(args: ReplicateInstanceCommandInput, options?: __HttpHandlerOptions): Promise<ReplicateInstanceCommandOutput>;
|
|
1171
1181
|
replicateInstance(args: ReplicateInstanceCommandInput, cb: (err: any, data?: ReplicateInstanceCommandOutput) => void): void;
|
|
1172
1182
|
replicateInstance(args: ReplicateInstanceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ReplicateInstanceCommandOutput) => void): void;
|
|
1183
|
+
/**
|
|
1184
|
+
* @see {@link ResumeContactCommand}
|
|
1185
|
+
*/
|
|
1186
|
+
resumeContact(args: ResumeContactCommandInput, options?: __HttpHandlerOptions): Promise<ResumeContactCommandOutput>;
|
|
1187
|
+
resumeContact(args: ResumeContactCommandInput, cb: (err: any, data?: ResumeContactCommandOutput) => void): void;
|
|
1188
|
+
resumeContact(args: ResumeContactCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ResumeContactCommandOutput) => void): void;
|
|
1173
1189
|
/**
|
|
1174
1190
|
* @see {@link ResumeContactRecordingCommand}
|
|
1175
1191
|
*/
|
|
@@ -1314,6 +1330,12 @@ export interface Connect {
|
|
|
1314
1330
|
suspendContactRecording(args: SuspendContactRecordingCommandInput, options?: __HttpHandlerOptions): Promise<SuspendContactRecordingCommandOutput>;
|
|
1315
1331
|
suspendContactRecording(args: SuspendContactRecordingCommandInput, cb: (err: any, data?: SuspendContactRecordingCommandOutput) => void): void;
|
|
1316
1332
|
suspendContactRecording(args: SuspendContactRecordingCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SuspendContactRecordingCommandOutput) => void): void;
|
|
1333
|
+
/**
|
|
1334
|
+
* @see {@link TagContactCommand}
|
|
1335
|
+
*/
|
|
1336
|
+
tagContact(args: TagContactCommandInput, options?: __HttpHandlerOptions): Promise<TagContactCommandOutput>;
|
|
1337
|
+
tagContact(args: TagContactCommandInput, cb: (err: any, data?: TagContactCommandOutput) => void): void;
|
|
1338
|
+
tagContact(args: TagContactCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagContactCommandOutput) => void): void;
|
|
1317
1339
|
/**
|
|
1318
1340
|
* @see {@link TagResourceCommand}
|
|
1319
1341
|
*/
|
|
@@ -1326,6 +1348,12 @@ export interface Connect {
|
|
|
1326
1348
|
transferContact(args: TransferContactCommandInput, options?: __HttpHandlerOptions): Promise<TransferContactCommandOutput>;
|
|
1327
1349
|
transferContact(args: TransferContactCommandInput, cb: (err: any, data?: TransferContactCommandOutput) => void): void;
|
|
1328
1350
|
transferContact(args: TransferContactCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TransferContactCommandOutput) => void): void;
|
|
1351
|
+
/**
|
|
1352
|
+
* @see {@link UntagContactCommand}
|
|
1353
|
+
*/
|
|
1354
|
+
untagContact(args: UntagContactCommandInput, options?: __HttpHandlerOptions): Promise<UntagContactCommandOutput>;
|
|
1355
|
+
untagContact(args: UntagContactCommandInput, cb: (err: any, data?: UntagContactCommandOutput) => void): void;
|
|
1356
|
+
untagContact(args: UntagContactCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagContactCommandOutput) => void): void;
|
|
1329
1357
|
/**
|
|
1330
1358
|
* @see {@link UntagResourceCommand}
|
|
1331
1359
|
*/
|