@aws-sdk/client-connect 3.315.0 → 3.318.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 +8 -0
- package/dist-cjs/Connect.js +176 -2380
- package/dist-cjs/commands/CreateParticipantCommand.js +45 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +8 -6
- package/dist-cjs/models/models_1.js +5 -1
- package/dist-cjs/protocols/Aws_restJson1.js +95 -21
- package/dist-es/Connect.js +176 -2380
- package/dist-es/commands/CreateParticipantCommand.js +41 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +6 -4
- package/dist-es/models/models_1.js +4 -0
- package/dist-es/protocols/Aws_restJson1.js +86 -14
- package/dist-types/Connect.d.ts +194 -808
- package/dist-types/ConnectClient.d.ts +3 -2
- package/dist-types/commands/CreateParticipantCommand.d.ts +88 -0
- package/dist-types/commands/ListAgentStatusesCommand.d.ts +2 -1
- package/dist-types/commands/ListApprovedOriginsCommand.d.ts +1 -1
- package/dist-types/commands/ListBotsCommand.d.ts +1 -2
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +97 -86
- package/dist-types/models/models_1.d.ts +91 -14
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/ts3.4/Connect.d.ts +19 -1
- package/dist-types/ts3.4/ConnectClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/CreateParticipantCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListAgentStatusesCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/ListApprovedOriginsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListBotsCommand.d.ts +1 -2
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +26 -24
- package/dist-types/ts3.4/models/models_1.d.ts +25 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +6 -6
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { de_CreateParticipantCommand, se_CreateParticipantCommand } from "../protocols/Aws_restJson1";
|
|
5
|
+
export class CreateParticipantCommand extends $Command {
|
|
6
|
+
static getEndpointParameterInstructions() {
|
|
7
|
+
return {
|
|
8
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
9
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
10
|
+
Region: { type: "builtInParams", name: "region" },
|
|
11
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
constructor(input) {
|
|
15
|
+
super();
|
|
16
|
+
this.input = input;
|
|
17
|
+
}
|
|
18
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
19
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
20
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, CreateParticipantCommand.getEndpointParameterInstructions()));
|
|
21
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
22
|
+
const { logger } = configuration;
|
|
23
|
+
const clientName = "ConnectClient";
|
|
24
|
+
const commandName = "CreateParticipantCommand";
|
|
25
|
+
const handlerExecutionContext = {
|
|
26
|
+
logger,
|
|
27
|
+
clientName,
|
|
28
|
+
commandName,
|
|
29
|
+
inputFilterSensitiveLog: (_) => _,
|
|
30
|
+
outputFilterSensitiveLog: (_) => _,
|
|
31
|
+
};
|
|
32
|
+
const { requestHandler } = configuration;
|
|
33
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
34
|
+
}
|
|
35
|
+
serialize(input, context) {
|
|
36
|
+
return se_CreateParticipantCommand(input, context);
|
|
37
|
+
}
|
|
38
|
+
deserialize(output, context) {
|
|
39
|
+
return de_CreateParticipantCommand(output, context);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -15,6 +15,7 @@ export * from "./CreateContactFlowModuleCommand";
|
|
|
15
15
|
export * from "./CreateHoursOfOperationCommand";
|
|
16
16
|
export * from "./CreateInstanceCommand";
|
|
17
17
|
export * from "./CreateIntegrationAssociationCommand";
|
|
18
|
+
export * from "./CreateParticipantCommand";
|
|
18
19
|
export * from "./CreateQueueCommand";
|
|
19
20
|
export * from "./CreateQuickConnectCommand";
|
|
20
21
|
export * from "./CreateRoutingProfileCommand";
|
|
@@ -296,6 +296,12 @@ export const SourceType = {
|
|
|
296
296
|
SALESFORCE: "SALESFORCE",
|
|
297
297
|
ZENDESK: "ZENDESK",
|
|
298
298
|
};
|
|
299
|
+
export const ParticipantRole = {
|
|
300
|
+
AGENT: "AGENT",
|
|
301
|
+
CUSTOMER: "CUSTOMER",
|
|
302
|
+
CUSTOM_BOT: "CUSTOM_BOT",
|
|
303
|
+
SYSTEM: "SYSTEM",
|
|
304
|
+
};
|
|
299
305
|
export const QuickConnectType = {
|
|
300
306
|
PHONE_NUMBER: "PHONE_NUMBER",
|
|
301
307
|
QUEUE: "QUEUE",
|
|
@@ -801,10 +807,6 @@ export const Statistic = {
|
|
|
801
807
|
export const Comparison = {
|
|
802
808
|
LT: "LT",
|
|
803
809
|
};
|
|
804
|
-
export const LexVersion = {
|
|
805
|
-
V1: "V1",
|
|
806
|
-
V2: "V2",
|
|
807
|
-
};
|
|
808
810
|
export const CreateInstanceRequestFilterSensitiveLog = (obj) => ({
|
|
809
811
|
...obj,
|
|
810
812
|
...(obj.InstanceAlias && { InstanceAlias: SENSITIVE_STRING }),
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
|
|
2
2
|
import { ConnectServiceException as __BaseException } from "./ConnectServiceException";
|
|
3
|
+
export const LexVersion = {
|
|
4
|
+
V1: "V1",
|
|
5
|
+
V2: "V2",
|
|
6
|
+
};
|
|
3
7
|
export const ReferenceStatus = {
|
|
4
8
|
APPROVED: "APPROVED",
|
|
5
9
|
REJECTED: "REJECTED",
|
|
@@ -232,7 +232,7 @@ export const se_ClaimPhoneNumberCommand = async (input, context) => {
|
|
|
232
232
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/claim";
|
|
233
233
|
let body;
|
|
234
234
|
body = JSON.stringify(take(input, {
|
|
235
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
235
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
236
236
|
PhoneNumber: [],
|
|
237
237
|
PhoneNumberDescription: [],
|
|
238
238
|
Tags: (_) => _json(_),
|
|
@@ -307,7 +307,7 @@ export const se_CreateContactFlowModuleCommand = async (input, context) => {
|
|
|
307
307
|
resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
|
|
308
308
|
let body;
|
|
309
309
|
body = JSON.stringify(take(input, {
|
|
310
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
310
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
311
311
|
Content: [],
|
|
312
312
|
Description: [],
|
|
313
313
|
Name: [],
|
|
@@ -400,6 +400,29 @@ export const se_CreateIntegrationAssociationCommand = async (input, context) =>
|
|
|
400
400
|
body,
|
|
401
401
|
});
|
|
402
402
|
};
|
|
403
|
+
export const se_CreateParticipantCommand = async (input, context) => {
|
|
404
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
405
|
+
const headers = {
|
|
406
|
+
"content-type": "application/json",
|
|
407
|
+
};
|
|
408
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/create-participant";
|
|
409
|
+
let body;
|
|
410
|
+
body = JSON.stringify(take(input, {
|
|
411
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
412
|
+
ContactId: [],
|
|
413
|
+
InstanceId: [],
|
|
414
|
+
ParticipantDetails: (_) => _json(_),
|
|
415
|
+
}));
|
|
416
|
+
return new __HttpRequest({
|
|
417
|
+
protocol,
|
|
418
|
+
hostname,
|
|
419
|
+
port,
|
|
420
|
+
method: "POST",
|
|
421
|
+
headers,
|
|
422
|
+
path: resolvedPath,
|
|
423
|
+
body,
|
|
424
|
+
});
|
|
425
|
+
};
|
|
403
426
|
export const se_CreateQueueCommand = async (input, context) => {
|
|
404
427
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
405
428
|
const headers = {
|
|
@@ -487,7 +510,7 @@ export const se_CreateRuleCommand = async (input, context) => {
|
|
|
487
510
|
let body;
|
|
488
511
|
body = JSON.stringify(take(input, {
|
|
489
512
|
Actions: (_) => _json(_),
|
|
490
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
513
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
491
514
|
Function: [],
|
|
492
515
|
Name: [],
|
|
493
516
|
PublishStatus: [],
|
|
@@ -538,7 +561,7 @@ export const se_CreateTaskTemplateCommand = async (input, context) => {
|
|
|
538
561
|
resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
|
|
539
562
|
let body;
|
|
540
563
|
body = JSON.stringify(take(input, {
|
|
541
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
564
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
542
565
|
Constraints: (_) => _json(_),
|
|
543
566
|
ContactFlowId: [],
|
|
544
567
|
Defaults: (_) => _json(_),
|
|
@@ -565,7 +588,7 @@ export const se_CreateTrafficDistributionGroupCommand = async (input, context) =
|
|
|
565
588
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution-group";
|
|
566
589
|
let body;
|
|
567
590
|
body = JSON.stringify(take(input, {
|
|
568
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
591
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
569
592
|
Description: [],
|
|
570
593
|
InstanceId: [],
|
|
571
594
|
Name: [],
|
|
@@ -666,7 +689,7 @@ export const se_CreateVocabularyCommand = async (input, context) => {
|
|
|
666
689
|
resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
|
|
667
690
|
let body;
|
|
668
691
|
body = JSON.stringify(take(input, {
|
|
669
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
692
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
670
693
|
Content: [],
|
|
671
694
|
LanguageCode: [],
|
|
672
695
|
Tags: (_) => _json(_),
|
|
@@ -2377,7 +2400,7 @@ export const se_MonitorContactCommand = async (input, context) => {
|
|
|
2377
2400
|
let body;
|
|
2378
2401
|
body = JSON.stringify(take(input, {
|
|
2379
2402
|
AllowedMonitorCapabilities: (_) => _json(_),
|
|
2380
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
2403
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
2381
2404
|
ContactId: [],
|
|
2382
2405
|
InstanceId: [],
|
|
2383
2406
|
UserId: [],
|
|
@@ -2443,7 +2466,7 @@ export const se_ReplicateInstanceCommand = async (input, context) => {
|
|
|
2443
2466
|
resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId, "{InstanceId}", false);
|
|
2444
2467
|
let body;
|
|
2445
2468
|
body = JSON.stringify(take(input, {
|
|
2446
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
2469
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
2447
2470
|
ReplicaAlias: [],
|
|
2448
2471
|
ReplicaRegion: [],
|
|
2449
2472
|
}));
|
|
@@ -2635,7 +2658,7 @@ export const se_StartChatContactCommand = async (input, context) => {
|
|
|
2635
2658
|
body = JSON.stringify(take(input, {
|
|
2636
2659
|
Attributes: (_) => _json(_),
|
|
2637
2660
|
ChatDurationInMinutes: [],
|
|
2638
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
2661
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
2639
2662
|
ContactFlowId: [],
|
|
2640
2663
|
InitialMessage: (_) => _json(_),
|
|
2641
2664
|
InstanceId: [],
|
|
@@ -2686,7 +2709,7 @@ export const se_StartContactStreamingCommand = async (input, context) => {
|
|
|
2686
2709
|
let body;
|
|
2687
2710
|
body = JSON.stringify(take(input, {
|
|
2688
2711
|
ChatStreamingConfiguration: (_) => _json(_),
|
|
2689
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
2712
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
2690
2713
|
ContactId: [],
|
|
2691
2714
|
InstanceId: [],
|
|
2692
2715
|
}));
|
|
@@ -2711,7 +2734,7 @@ export const se_StartOutboundVoiceContactCommand = async (input, context) => {
|
|
|
2711
2734
|
AnswerMachineDetectionConfig: (_) => _json(_),
|
|
2712
2735
|
Attributes: (_) => _json(_),
|
|
2713
2736
|
CampaignId: [],
|
|
2714
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
2737
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
2715
2738
|
ContactFlowId: [],
|
|
2716
2739
|
DestinationPhoneNumber: [],
|
|
2717
2740
|
InstanceId: [],
|
|
@@ -2738,7 +2761,7 @@ export const se_StartTaskContactCommand = async (input, context) => {
|
|
|
2738
2761
|
let body;
|
|
2739
2762
|
body = JSON.stringify(take(input, {
|
|
2740
2763
|
Attributes: (_) => _json(_),
|
|
2741
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
2764
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
2742
2765
|
ContactFlowId: [],
|
|
2743
2766
|
Description: [],
|
|
2744
2767
|
InstanceId: [],
|
|
@@ -2876,7 +2899,7 @@ export const se_TransferContactCommand = async (input, context) => {
|
|
|
2876
2899
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/transfer";
|
|
2877
2900
|
let body;
|
|
2878
2901
|
body = JSON.stringify(take(input, {
|
|
2879
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
2902
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
2880
2903
|
ContactFlowId: [],
|
|
2881
2904
|
ContactId: [],
|
|
2882
2905
|
InstanceId: [],
|
|
@@ -3239,7 +3262,7 @@ export const se_UpdatePhoneNumberCommand = async (input, context) => {
|
|
|
3239
3262
|
resolvedPath = __resolvedPath(resolvedPath, input, "PhoneNumberId", () => input.PhoneNumberId, "{PhoneNumberId}", false);
|
|
3240
3263
|
let body;
|
|
3241
3264
|
body = JSON.stringify(take(input, {
|
|
3242
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
3265
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
3243
3266
|
TargetArn: [],
|
|
3244
3267
|
}));
|
|
3245
3268
|
return new __HttpRequest({
|
|
@@ -4579,6 +4602,55 @@ const de_CreateIntegrationAssociationCommandError = async (output, context) => {
|
|
|
4579
4602
|
});
|
|
4580
4603
|
}
|
|
4581
4604
|
};
|
|
4605
|
+
export const de_CreateParticipantCommand = async (output, context) => {
|
|
4606
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4607
|
+
return de_CreateParticipantCommandError(output, context);
|
|
4608
|
+
}
|
|
4609
|
+
const contents = map({
|
|
4610
|
+
$metadata: deserializeMetadata(output),
|
|
4611
|
+
});
|
|
4612
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
4613
|
+
const doc = take(data, {
|
|
4614
|
+
ParticipantCredentials: _json,
|
|
4615
|
+
ParticipantId: __expectString,
|
|
4616
|
+
});
|
|
4617
|
+
Object.assign(contents, doc);
|
|
4618
|
+
return contents;
|
|
4619
|
+
};
|
|
4620
|
+
const de_CreateParticipantCommandError = async (output, context) => {
|
|
4621
|
+
const parsedOutput = {
|
|
4622
|
+
...output,
|
|
4623
|
+
body: await parseErrorBody(output.body, context),
|
|
4624
|
+
};
|
|
4625
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4626
|
+
switch (errorCode) {
|
|
4627
|
+
case "InternalServiceException":
|
|
4628
|
+
case "com.amazonaws.connect#InternalServiceException":
|
|
4629
|
+
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
4630
|
+
case "InvalidParameterException":
|
|
4631
|
+
case "com.amazonaws.connect#InvalidParameterException":
|
|
4632
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
4633
|
+
case "InvalidRequestException":
|
|
4634
|
+
case "com.amazonaws.connect#InvalidRequestException":
|
|
4635
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
4636
|
+
case "ResourceNotFoundException":
|
|
4637
|
+
case "com.amazonaws.connect#ResourceNotFoundException":
|
|
4638
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
4639
|
+
case "ServiceQuotaExceededException":
|
|
4640
|
+
case "com.amazonaws.connect#ServiceQuotaExceededException":
|
|
4641
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
4642
|
+
case "ThrottlingException":
|
|
4643
|
+
case "com.amazonaws.connect#ThrottlingException":
|
|
4644
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
4645
|
+
default:
|
|
4646
|
+
const parsedBody = parsedOutput.body;
|
|
4647
|
+
return throwDefaultError({
|
|
4648
|
+
output,
|
|
4649
|
+
parsedBody,
|
|
4650
|
+
errorCode,
|
|
4651
|
+
});
|
|
4652
|
+
}
|
|
4653
|
+
};
|
|
4582
4654
|
export const de_CreateQueueCommand = async (output, context) => {
|
|
4583
4655
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4584
4656
|
return de_CreateQueueCommandError(output, context);
|