@aws-sdk/client-connectparticipant 3.398.0 → 3.404.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 CHANGED
@@ -226,6 +226,14 @@ CreateParticipantConnection
226
226
 
227
227
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connectparticipant/classes/createparticipantconnectioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connectparticipant/interfaces/createparticipantconnectioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connectparticipant/interfaces/createparticipantconnectioncommandoutput.html)
228
228
 
229
+ </details>
230
+ <details>
231
+ <summary>
232
+ DescribeView
233
+ </summary>
234
+
235
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connectparticipant/classes/describeviewcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connectparticipant/interfaces/describeviewcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connectparticipant/interfaces/describeviewcommandoutput.html)
236
+
229
237
  </details>
230
238
  <details>
231
239
  <summary>
@@ -4,6 +4,7 @@ exports.ConnectParticipant = void 0;
4
4
  const smithy_client_1 = require("@smithy/smithy-client");
5
5
  const CompleteAttachmentUploadCommand_1 = require("./commands/CompleteAttachmentUploadCommand");
6
6
  const CreateParticipantConnectionCommand_1 = require("./commands/CreateParticipantConnectionCommand");
7
+ const DescribeViewCommand_1 = require("./commands/DescribeViewCommand");
7
8
  const DisconnectParticipantCommand_1 = require("./commands/DisconnectParticipantCommand");
8
9
  const GetAttachmentCommand_1 = require("./commands/GetAttachmentCommand");
9
10
  const GetTranscriptCommand_1 = require("./commands/GetTranscriptCommand");
@@ -14,6 +15,7 @@ const ConnectParticipantClient_1 = require("./ConnectParticipantClient");
14
15
  const commands = {
15
16
  CompleteAttachmentUploadCommand: CompleteAttachmentUploadCommand_1.CompleteAttachmentUploadCommand,
16
17
  CreateParticipantConnectionCommand: CreateParticipantConnectionCommand_1.CreateParticipantConnectionCommand,
18
+ DescribeViewCommand: DescribeViewCommand_1.DescribeViewCommand,
17
19
  DisconnectParticipantCommand: DisconnectParticipantCommand_1.DisconnectParticipantCommand,
18
20
  GetAttachmentCommand: GetAttachmentCommand_1.GetAttachmentCommand,
19
21
  GetTranscriptCommand: GetTranscriptCommand_1.GetTranscriptCommand,
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DescribeViewCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const models_0_1 = require("../models/models_0");
9
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
10
+ class DescribeViewCommand extends smithy_client_1.Command {
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ constructor(input) {
20
+ super();
21
+ this.input = input;
22
+ }
23
+ resolveMiddleware(clientStack, configuration, options) {
24
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeViewCommand.getEndpointParameterInstructions()));
26
+ const stack = clientStack.concat(this.middlewareStack);
27
+ const { logger } = configuration;
28
+ const clientName = "ConnectParticipantClient";
29
+ const commandName = "DescribeViewCommand";
30
+ const handlerExecutionContext = {
31
+ logger,
32
+ clientName,
33
+ commandName,
34
+ inputFilterSensitiveLog: (_) => _,
35
+ outputFilterSensitiveLog: models_0_1.DescribeViewResponseFilterSensitiveLog,
36
+ };
37
+ const { requestHandler } = configuration;
38
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
39
+ }
40
+ serialize(input, context) {
41
+ return (0, Aws_restJson1_1.se_DescribeViewCommand)(input, context);
42
+ }
43
+ deserialize(output, context) {
44
+ return (0, Aws_restJson1_1.de_DescribeViewCommand)(output, context);
45
+ }
46
+ }
47
+ exports.DescribeViewCommand = DescribeViewCommand;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./CompleteAttachmentUploadCommand"), exports);
5
5
  tslib_1.__exportStar(require("./CreateParticipantConnectionCommand"), exports);
6
+ tslib_1.__exportStar(require("./DescribeViewCommand"), exports);
6
7
  tslib_1.__exportStar(require("./DisconnectParticipantCommand"), exports);
7
8
  tslib_1.__exportStar(require("./GetAttachmentCommand"), exports);
8
9
  tslib_1.__exportStar(require("./GetTranscriptCommand"), exports);
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
4
  const s = "required", t = "fn", u = "argv", v = "ref";
5
5
  const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = "getAttr", g = { [s]: false, "type": "String" }, h = { [s]: true, "default": false, "type": "Boolean" }, i = { [v]: "Endpoint" }, j = { [t]: "booleanEquals", [u]: [{ [v]: "UseFIPS" }, true] }, k = { [t]: "booleanEquals", [u]: [{ [v]: "UseDualStack" }, true] }, l = {}, m = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [{ [v]: e }, "supportsFIPS"] }] }, n = { [v]: e }, o = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [n, "supportsDualStack"] }] }, p = [j], q = [k], r = [{ [v]: "Region" }];
6
- const _data = { version: "1.0", parameters: { Region: g, UseDualStack: h, UseFIPS: h, Endpoint: g }, rules: [{ conditions: [{ [t]: a, [u]: [i] }], type: b, rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: i, properties: l, headers: l }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [t]: a, [u]: r }], type: b, rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: e }], type: b, rules: [{ conditions: [j, k], type: b, rules: [{ conditions: [m, o], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://participant.connect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: p, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ conditions: [{ [t]: "stringEquals", [u]: ["aws-us-gov", { [t]: f, [u]: [n, "name"] }] }], endpoint: { url: "https://participant.connect.{Region}.amazonaws.com", properties: l, headers: l }, type: d }, { endpoint: { url: "https://participant.connect-fips.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: q, type: b, rules: [{ conditions: [o], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://participant.connect.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://participant.connect.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
6
+ const _data = { version: "1.0", parameters: { Region: g, UseDualStack: h, UseFIPS: h, Endpoint: g }, rules: [{ conditions: [{ [t]: a, [u]: [i] }], type: b, rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: i, properties: l, headers: l }, type: d }] }, { conditions: [{ [t]: a, [u]: r }], type: b, rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: e }], type: b, rules: [{ conditions: [j, k], type: b, rules: [{ conditions: [m, o], type: b, rules: [{ endpoint: { url: "https://participant.connect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: p, type: b, rules: [{ conditions: [m], type: b, rules: [{ conditions: [{ [t]: "stringEquals", [u]: ["aws-us-gov", { [t]: f, [u]: [n, "name"] }] }], endpoint: { url: "https://participant.connect.{Region}.amazonaws.com", properties: l, headers: l }, type: d }, { endpoint: { url: "https://participant.connect-fips.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: q, type: b, rules: [{ conditions: [o], type: b, rules: [{ endpoint: { url: "https://participant.connect.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://participant.connect.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] };
7
7
  exports.ruleSet = _data;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChatItemType = exports.ParticipantRole = exports.ArtifactStatus = exports.SortKey = exports.ScanDirection = exports.ConnectionType = exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.InternalServerException = exports.ConflictException = exports.AccessDeniedException = void 0;
3
+ exports.DescribeViewResponseFilterSensitiveLog = exports.ViewFilterSensitiveLog = exports.ViewContentFilterSensitiveLog = exports.ChatItemType = exports.ParticipantRole = exports.ArtifactStatus = exports.SortKey = exports.ScanDirection = exports.ResourceNotFoundException = exports.ResourceType = exports.ConnectionType = exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.InternalServerException = exports.ConflictException = exports.AccessDeniedException = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
4
5
  const ConnectParticipantServiceException_1 = require("./ConnectParticipantServiceException");
5
6
  class AccessDeniedException extends ConnectParticipantServiceException_1.ConnectParticipantServiceException {
6
7
  constructor(opts) {
@@ -90,6 +91,31 @@ exports.ConnectionType = {
90
91
  CONNECTION_CREDENTIALS: "CONNECTION_CREDENTIALS",
91
92
  WEBSOCKET: "WEBSOCKET",
92
93
  };
94
+ exports.ResourceType = {
95
+ CONTACT: "CONTACT",
96
+ CONTACT_FLOW: "CONTACT_FLOW",
97
+ HIERARCHY_GROUP: "HIERARCHY_GROUP",
98
+ HIERARCHY_LEVEL: "HIERARCHY_LEVEL",
99
+ INSTANCE: "INSTANCE",
100
+ PARTICIPANT: "PARTICIPANT",
101
+ USER: "USER",
102
+ };
103
+ class ResourceNotFoundException extends ConnectParticipantServiceException_1.ConnectParticipantServiceException {
104
+ constructor(opts) {
105
+ super({
106
+ name: "ResourceNotFoundException",
107
+ $fault: "client",
108
+ ...opts,
109
+ });
110
+ this.name = "ResourceNotFoundException";
111
+ this.$fault = "client";
112
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
113
+ this.Message = opts.Message;
114
+ this.ResourceId = opts.ResourceId;
115
+ this.ResourceType = opts.ResourceType;
116
+ }
117
+ }
118
+ exports.ResourceNotFoundException = ResourceNotFoundException;
93
119
  exports.ScanDirection = {
94
120
  BACKWARD: "BACKWARD",
95
121
  FORWARD: "FORWARD",
@@ -106,6 +132,7 @@ exports.ArtifactStatus = {
106
132
  exports.ParticipantRole = {
107
133
  AGENT: "AGENT",
108
134
  CUSTOMER: "CUSTOMER",
135
+ CUSTOM_BOT: "CUSTOM_BOT",
109
136
  SYSTEM: "SYSTEM",
110
137
  };
111
138
  exports.ChatItemType = {
@@ -122,3 +149,21 @@ exports.ChatItemType = {
122
149
  TRANSFER_SUCCEEDED: "TRANSFER_SUCCEEDED",
123
150
  TYPING: "TYPING",
124
151
  };
152
+ const ViewContentFilterSensitiveLog = (obj) => ({
153
+ ...obj,
154
+ ...(obj.InputSchema && { InputSchema: smithy_client_1.SENSITIVE_STRING }),
155
+ ...(obj.Template && { Template: smithy_client_1.SENSITIVE_STRING }),
156
+ ...(obj.Actions && { Actions: smithy_client_1.SENSITIVE_STRING }),
157
+ });
158
+ exports.ViewContentFilterSensitiveLog = ViewContentFilterSensitiveLog;
159
+ const ViewFilterSensitiveLog = (obj) => ({
160
+ ...obj,
161
+ ...(obj.Name && { Name: smithy_client_1.SENSITIVE_STRING }),
162
+ ...(obj.Content && { Content: (0, exports.ViewContentFilterSensitiveLog)(obj.Content) }),
163
+ });
164
+ exports.ViewFilterSensitiveLog = ViewFilterSensitiveLog;
165
+ const DescribeViewResponseFilterSensitiveLog = (obj) => ({
166
+ ...obj,
167
+ ...(obj.View && { View: (0, exports.ViewFilterSensitiveLog)(obj.View) }),
168
+ });
169
+ exports.DescribeViewResponseFilterSensitiveLog = DescribeViewResponseFilterSensitiveLog;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_StartAttachmentUploadCommand = exports.de_SendMessageCommand = exports.de_SendEventCommand = exports.de_GetTranscriptCommand = exports.de_GetAttachmentCommand = exports.de_DisconnectParticipantCommand = exports.de_CreateParticipantConnectionCommand = exports.de_CompleteAttachmentUploadCommand = exports.se_StartAttachmentUploadCommand = exports.se_SendMessageCommand = exports.se_SendEventCommand = exports.se_GetTranscriptCommand = exports.se_GetAttachmentCommand = exports.se_DisconnectParticipantCommand = exports.se_CreateParticipantConnectionCommand = exports.se_CompleteAttachmentUploadCommand = void 0;
3
+ exports.de_StartAttachmentUploadCommand = exports.de_SendMessageCommand = exports.de_SendEventCommand = exports.de_GetTranscriptCommand = exports.de_GetAttachmentCommand = exports.de_DisconnectParticipantCommand = exports.de_DescribeViewCommand = exports.de_CreateParticipantConnectionCommand = exports.de_CompleteAttachmentUploadCommand = exports.se_StartAttachmentUploadCommand = exports.se_SendMessageCommand = exports.se_SendEventCommand = exports.se_GetTranscriptCommand = exports.se_GetAttachmentCommand = exports.se_DisconnectParticipantCommand = exports.se_DescribeViewCommand = exports.se_CreateParticipantConnectionCommand = exports.se_CompleteAttachmentUploadCommand = void 0;
4
4
  const protocol_http_1 = require("@smithy/protocol-http");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const uuid_1 = require("uuid");
@@ -52,6 +52,25 @@ const se_CreateParticipantConnectionCommand = async (input, context) => {
52
52
  });
53
53
  };
54
54
  exports.se_CreateParticipantConnectionCommand = se_CreateParticipantConnectionCommand;
55
+ const se_DescribeViewCommand = async (input, context) => {
56
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
57
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
58
+ "x-amz-bearer": input.ConnectionToken,
59
+ });
60
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/views/{ViewToken}";
61
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ViewToken", () => input.ViewToken, "{ViewToken}", false);
62
+ let body;
63
+ return new protocol_http_1.HttpRequest({
64
+ protocol,
65
+ hostname,
66
+ port,
67
+ method: "GET",
68
+ headers,
69
+ path: resolvedPath,
70
+ body,
71
+ });
72
+ };
73
+ exports.se_DescribeViewCommand = se_DescribeViewCommand;
55
74
  const se_DisconnectParticipantCommand = async (input, context) => {
56
75
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
57
76
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
@@ -285,6 +304,52 @@ const de_CreateParticipantConnectionCommandError = async (output, context) => {
285
304
  });
286
305
  }
287
306
  };
307
+ const de_DescribeViewCommand = async (output, context) => {
308
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
309
+ return de_DescribeViewCommandError(output, context);
310
+ }
311
+ const contents = (0, smithy_client_1.map)({
312
+ $metadata: deserializeMetadata(output),
313
+ });
314
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
315
+ const doc = (0, smithy_client_1.take)(data, {
316
+ View: smithy_client_1._json,
317
+ });
318
+ Object.assign(contents, doc);
319
+ return contents;
320
+ };
321
+ exports.de_DescribeViewCommand = de_DescribeViewCommand;
322
+ const de_DescribeViewCommandError = async (output, context) => {
323
+ const parsedOutput = {
324
+ ...output,
325
+ body: await parseErrorBody(output.body, context),
326
+ };
327
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
328
+ switch (errorCode) {
329
+ case "AccessDeniedException":
330
+ case "com.amazonaws.connectparticipant#AccessDeniedException":
331
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
332
+ case "InternalServerException":
333
+ case "com.amazonaws.connectparticipant#InternalServerException":
334
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
335
+ case "ResourceNotFoundException":
336
+ case "com.amazonaws.connectparticipant#ResourceNotFoundException":
337
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
338
+ case "ThrottlingException":
339
+ case "com.amazonaws.connectparticipant#ThrottlingException":
340
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
341
+ case "ValidationException":
342
+ case "com.amazonaws.connectparticipant#ValidationException":
343
+ throw await de_ValidationExceptionRes(parsedOutput, context);
344
+ default:
345
+ const parsedBody = parsedOutput.body;
346
+ return throwDefaultError({
347
+ output,
348
+ parsedBody,
349
+ errorCode,
350
+ });
351
+ }
352
+ };
288
353
  const de_DisconnectParticipantCommand = async (output, context) => {
289
354
  if (output.statusCode !== 200 && output.statusCode >= 300) {
290
355
  return de_DisconnectParticipantCommandError(output, context);
@@ -588,6 +653,21 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
588
653
  });
589
654
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
590
655
  };
656
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
657
+ const contents = (0, smithy_client_1.map)({});
658
+ const data = parsedOutput.body;
659
+ const doc = (0, smithy_client_1.take)(data, {
660
+ Message: smithy_client_1.expectString,
661
+ ResourceId: smithy_client_1.expectString,
662
+ ResourceType: smithy_client_1.expectString,
663
+ });
664
+ Object.assign(contents, doc);
665
+ const exception = new models_0_1.ResourceNotFoundException({
666
+ $metadata: deserializeMetadata(parsedOutput),
667
+ ...contents,
668
+ });
669
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
670
+ };
591
671
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
592
672
  const contents = (0, smithy_client_1.map)({});
593
673
  const data = parsedOutput.body;
@@ -1,6 +1,7 @@
1
1
  import { createAggregatedClient } from "@smithy/smithy-client";
2
2
  import { CompleteAttachmentUploadCommand, } from "./commands/CompleteAttachmentUploadCommand";
3
3
  import { CreateParticipantConnectionCommand, } from "./commands/CreateParticipantConnectionCommand";
4
+ import { DescribeViewCommand, } from "./commands/DescribeViewCommand";
4
5
  import { DisconnectParticipantCommand, } from "./commands/DisconnectParticipantCommand";
5
6
  import { GetAttachmentCommand, } from "./commands/GetAttachmentCommand";
6
7
  import { GetTranscriptCommand, } from "./commands/GetTranscriptCommand";
@@ -11,6 +12,7 @@ import { ConnectParticipantClient } from "./ConnectParticipantClient";
11
12
  const commands = {
12
13
  CompleteAttachmentUploadCommand,
13
14
  CreateParticipantConnectionCommand,
15
+ DescribeViewCommand,
14
16
  DisconnectParticipantCommand,
15
17
  GetAttachmentCommand,
16
18
  GetTranscriptCommand,
@@ -0,0 +1,43 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { DescribeViewResponseFilterSensitiveLog } from "../models/models_0";
5
+ import { de_DescribeViewCommand, se_DescribeViewCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class DescribeViewCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, DescribeViewCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "ConnectParticipantClient";
26
+ const commandName = "DescribeViewCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: DescribeViewResponseFilterSensitiveLog,
33
+ };
34
+ const { requestHandler } = configuration;
35
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
36
+ }
37
+ serialize(input, context) {
38
+ return se_DescribeViewCommand(input, context);
39
+ }
40
+ deserialize(output, context) {
41
+ return de_DescribeViewCommand(output, context);
42
+ }
43
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./CompleteAttachmentUploadCommand";
2
2
  export * from "./CreateParticipantConnectionCommand";
3
+ export * from "./DescribeViewCommand";
3
4
  export * from "./DisconnectParticipantCommand";
4
5
  export * from "./GetAttachmentCommand";
5
6
  export * from "./GetTranscriptCommand";
@@ -1,4 +1,4 @@
1
1
  const s = "required", t = "fn", u = "argv", v = "ref";
2
2
  const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = "getAttr", g = { [s]: false, "type": "String" }, h = { [s]: true, "default": false, "type": "Boolean" }, i = { [v]: "Endpoint" }, j = { [t]: "booleanEquals", [u]: [{ [v]: "UseFIPS" }, true] }, k = { [t]: "booleanEquals", [u]: [{ [v]: "UseDualStack" }, true] }, l = {}, m = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [{ [v]: e }, "supportsFIPS"] }] }, n = { [v]: e }, o = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [n, "supportsDualStack"] }] }, p = [j], q = [k], r = [{ [v]: "Region" }];
3
- const _data = { version: "1.0", parameters: { Region: g, UseDualStack: h, UseFIPS: h, Endpoint: g }, rules: [{ conditions: [{ [t]: a, [u]: [i] }], type: b, rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: i, properties: l, headers: l }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [t]: a, [u]: r }], type: b, rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: e }], type: b, rules: [{ conditions: [j, k], type: b, rules: [{ conditions: [m, o], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://participant.connect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: p, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ conditions: [{ [t]: "stringEquals", [u]: ["aws-us-gov", { [t]: f, [u]: [n, "name"] }] }], endpoint: { url: "https://participant.connect.{Region}.amazonaws.com", properties: l, headers: l }, type: d }, { endpoint: { url: "https://participant.connect-fips.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: q, type: b, rules: [{ conditions: [o], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://participant.connect.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://participant.connect.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
3
+ const _data = { version: "1.0", parameters: { Region: g, UseDualStack: h, UseFIPS: h, Endpoint: g }, rules: [{ conditions: [{ [t]: a, [u]: [i] }], type: b, rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: i, properties: l, headers: l }, type: d }] }, { conditions: [{ [t]: a, [u]: r }], type: b, rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: e }], type: b, rules: [{ conditions: [j, k], type: b, rules: [{ conditions: [m, o], type: b, rules: [{ endpoint: { url: "https://participant.connect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: p, type: b, rules: [{ conditions: [m], type: b, rules: [{ conditions: [{ [t]: "stringEquals", [u]: ["aws-us-gov", { [t]: f, [u]: [n, "name"] }] }], endpoint: { url: "https://participant.connect.{Region}.amazonaws.com", properties: l, headers: l }, type: d }, { endpoint: { url: "https://participant.connect-fips.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: q, type: b, rules: [{ conditions: [o], type: b, rules: [{ endpoint: { url: "https://participant.connect.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://participant.connect.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] };
4
4
  export const ruleSet = _data;
@@ -1,3 +1,4 @@
1
+ import { SENSITIVE_STRING } from "@smithy/smithy-client";
1
2
  import { ConnectParticipantServiceException as __BaseException } from "./ConnectParticipantServiceException";
2
3
  export class AccessDeniedException extends __BaseException {
3
4
  constructor(opts) {
@@ -81,6 +82,30 @@ export const ConnectionType = {
81
82
  CONNECTION_CREDENTIALS: "CONNECTION_CREDENTIALS",
82
83
  WEBSOCKET: "WEBSOCKET",
83
84
  };
85
+ export const ResourceType = {
86
+ CONTACT: "CONTACT",
87
+ CONTACT_FLOW: "CONTACT_FLOW",
88
+ HIERARCHY_GROUP: "HIERARCHY_GROUP",
89
+ HIERARCHY_LEVEL: "HIERARCHY_LEVEL",
90
+ INSTANCE: "INSTANCE",
91
+ PARTICIPANT: "PARTICIPANT",
92
+ USER: "USER",
93
+ };
94
+ export class ResourceNotFoundException extends __BaseException {
95
+ constructor(opts) {
96
+ super({
97
+ name: "ResourceNotFoundException",
98
+ $fault: "client",
99
+ ...opts,
100
+ });
101
+ this.name = "ResourceNotFoundException";
102
+ this.$fault = "client";
103
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
104
+ this.Message = opts.Message;
105
+ this.ResourceId = opts.ResourceId;
106
+ this.ResourceType = opts.ResourceType;
107
+ }
108
+ }
84
109
  export const ScanDirection = {
85
110
  BACKWARD: "BACKWARD",
86
111
  FORWARD: "FORWARD",
@@ -97,6 +122,7 @@ export const ArtifactStatus = {
97
122
  export const ParticipantRole = {
98
123
  AGENT: "AGENT",
99
124
  CUSTOMER: "CUSTOMER",
125
+ CUSTOM_BOT: "CUSTOM_BOT",
100
126
  SYSTEM: "SYSTEM",
101
127
  };
102
128
  export const ChatItemType = {
@@ -113,3 +139,18 @@ export const ChatItemType = {
113
139
  TRANSFER_SUCCEEDED: "TRANSFER_SUCCEEDED",
114
140
  TYPING: "TYPING",
115
141
  };
142
+ export const ViewContentFilterSensitiveLog = (obj) => ({
143
+ ...obj,
144
+ ...(obj.InputSchema && { InputSchema: SENSITIVE_STRING }),
145
+ ...(obj.Template && { Template: SENSITIVE_STRING }),
146
+ ...(obj.Actions && { Actions: SENSITIVE_STRING }),
147
+ });
148
+ export const ViewFilterSensitiveLog = (obj) => ({
149
+ ...obj,
150
+ ...(obj.Name && { Name: SENSITIVE_STRING }),
151
+ ...(obj.Content && { Content: ViewContentFilterSensitiveLog(obj.Content) }),
152
+ });
153
+ export const DescribeViewResponseFilterSensitiveLog = (obj) => ({
154
+ ...obj,
155
+ ...(obj.View && { View: ViewFilterSensitiveLog(obj.View) }),
156
+ });
@@ -1,8 +1,8 @@
1
1
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ConnectParticipantServiceException as __BaseException } from "../models/ConnectParticipantServiceException";
5
- import { AccessDeniedException, ConflictException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
+ import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_CompleteAttachmentUploadCommand = async (input, context) => {
7
7
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
8
  const headers = map({}, isSerializableHeaderValue, {
@@ -47,6 +47,24 @@ export const se_CreateParticipantConnectionCommand = async (input, context) => {
47
47
  body,
48
48
  });
49
49
  };
50
+ export const se_DescribeViewCommand = async (input, context) => {
51
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
+ const headers = map({}, isSerializableHeaderValue, {
53
+ "x-amz-bearer": input.ConnectionToken,
54
+ });
55
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/views/{ViewToken}";
56
+ resolvedPath = __resolvedPath(resolvedPath, input, "ViewToken", () => input.ViewToken, "{ViewToken}", false);
57
+ let body;
58
+ return new __HttpRequest({
59
+ protocol,
60
+ hostname,
61
+ port,
62
+ method: "GET",
63
+ headers,
64
+ path: resolvedPath,
65
+ body,
66
+ });
67
+ };
50
68
  export const se_DisconnectParticipantCommand = async (input, context) => {
51
69
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
70
  const headers = map({}, isSerializableHeaderValue, {
@@ -272,6 +290,51 @@ const de_CreateParticipantConnectionCommandError = async (output, context) => {
272
290
  });
273
291
  }
274
292
  };
293
+ export const de_DescribeViewCommand = async (output, context) => {
294
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
295
+ return de_DescribeViewCommandError(output, context);
296
+ }
297
+ const contents = map({
298
+ $metadata: deserializeMetadata(output),
299
+ });
300
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
301
+ const doc = take(data, {
302
+ View: _json,
303
+ });
304
+ Object.assign(contents, doc);
305
+ return contents;
306
+ };
307
+ const de_DescribeViewCommandError = async (output, context) => {
308
+ const parsedOutput = {
309
+ ...output,
310
+ body: await parseErrorBody(output.body, context),
311
+ };
312
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
313
+ switch (errorCode) {
314
+ case "AccessDeniedException":
315
+ case "com.amazonaws.connectparticipant#AccessDeniedException":
316
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
317
+ case "InternalServerException":
318
+ case "com.amazonaws.connectparticipant#InternalServerException":
319
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
320
+ case "ResourceNotFoundException":
321
+ case "com.amazonaws.connectparticipant#ResourceNotFoundException":
322
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
323
+ case "ThrottlingException":
324
+ case "com.amazonaws.connectparticipant#ThrottlingException":
325
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
326
+ case "ValidationException":
327
+ case "com.amazonaws.connectparticipant#ValidationException":
328
+ throw await de_ValidationExceptionRes(parsedOutput, context);
329
+ default:
330
+ const parsedBody = parsedOutput.body;
331
+ return throwDefaultError({
332
+ output,
333
+ parsedBody,
334
+ errorCode,
335
+ });
336
+ }
337
+ };
275
338
  export const de_DisconnectParticipantCommand = async (output, context) => {
276
339
  if (output.statusCode !== 200 && output.statusCode >= 300) {
277
340
  return de_DisconnectParticipantCommandError(output, context);
@@ -569,6 +632,21 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
569
632
  });
570
633
  return __decorateServiceException(exception, parsedOutput.body);
571
634
  };
635
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
636
+ const contents = map({});
637
+ const data = parsedOutput.body;
638
+ const doc = take(data, {
639
+ Message: __expectString,
640
+ ResourceId: __expectString,
641
+ ResourceType: __expectString,
642
+ });
643
+ Object.assign(contents, doc);
644
+ const exception = new ResourceNotFoundException({
645
+ $metadata: deserializeMetadata(parsedOutput),
646
+ ...contents,
647
+ });
648
+ return __decorateServiceException(exception, parsedOutput.body);
649
+ };
572
650
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
573
651
  const contents = map({});
574
652
  const data = parsedOutput.body;
@@ -1,6 +1,7 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
2
  import { CompleteAttachmentUploadCommandInput, CompleteAttachmentUploadCommandOutput } from "./commands/CompleteAttachmentUploadCommand";
3
3
  import { CreateParticipantConnectionCommandInput, CreateParticipantConnectionCommandOutput } from "./commands/CreateParticipantConnectionCommand";
4
+ import { DescribeViewCommandInput, DescribeViewCommandOutput } from "./commands/DescribeViewCommand";
4
5
  import { DisconnectParticipantCommandInput, DisconnectParticipantCommandOutput } from "./commands/DisconnectParticipantCommand";
5
6
  import { GetAttachmentCommandInput, GetAttachmentCommandOutput } from "./commands/GetAttachmentCommand";
6
7
  import { GetTranscriptCommandInput, GetTranscriptCommandOutput } from "./commands/GetTranscriptCommand";
@@ -21,6 +22,12 @@ export interface ConnectParticipant {
21
22
  createParticipantConnection(args: CreateParticipantConnectionCommandInput, options?: __HttpHandlerOptions): Promise<CreateParticipantConnectionCommandOutput>;
22
23
  createParticipantConnection(args: CreateParticipantConnectionCommandInput, cb: (err: any, data?: CreateParticipantConnectionCommandOutput) => void): void;
23
24
  createParticipantConnection(args: CreateParticipantConnectionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateParticipantConnectionCommandOutput) => void): void;
25
+ /**
26
+ * @see {@link DescribeViewCommand}
27
+ */
28
+ describeView(args: DescribeViewCommandInput, options?: __HttpHandlerOptions): Promise<DescribeViewCommandOutput>;
29
+ describeView(args: DescribeViewCommandInput, cb: (err: any, data?: DescribeViewCommandOutput) => void): void;
30
+ describeView(args: DescribeViewCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeViewCommandOutput) => void): void;
24
31
  /**
25
32
  * @see {@link DisconnectParticipantCommand}
26
33
  */
@@ -10,6 +10,7 @@ import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration
10
10
  import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
11
11
  import { CompleteAttachmentUploadCommandInput, CompleteAttachmentUploadCommandOutput } from "./commands/CompleteAttachmentUploadCommand";
12
12
  import { CreateParticipantConnectionCommandInput, CreateParticipantConnectionCommandOutput } from "./commands/CreateParticipantConnectionCommand";
13
+ import { DescribeViewCommandInput, DescribeViewCommandOutput } from "./commands/DescribeViewCommand";
13
14
  import { DisconnectParticipantCommandInput, DisconnectParticipantCommandOutput } from "./commands/DisconnectParticipantCommand";
14
15
  import { GetAttachmentCommandInput, GetAttachmentCommandOutput } from "./commands/GetAttachmentCommand";
15
16
  import { GetTranscriptCommandInput, GetTranscriptCommandOutput } from "./commands/GetTranscriptCommand";
@@ -22,11 +23,11 @@ export { __Client };
22
23
  /**
23
24
  * @public
24
25
  */
25
- export type ServiceInputTypes = CompleteAttachmentUploadCommandInput | CreateParticipantConnectionCommandInput | DisconnectParticipantCommandInput | GetAttachmentCommandInput | GetTranscriptCommandInput | SendEventCommandInput | SendMessageCommandInput | StartAttachmentUploadCommandInput;
26
+ export type ServiceInputTypes = CompleteAttachmentUploadCommandInput | CreateParticipantConnectionCommandInput | DescribeViewCommandInput | DisconnectParticipantCommandInput | GetAttachmentCommandInput | GetTranscriptCommandInput | SendEventCommandInput | SendMessageCommandInput | StartAttachmentUploadCommandInput;
26
27
  /**
27
28
  * @public
28
29
  */
29
- export type ServiceOutputTypes = CompleteAttachmentUploadCommandOutput | CreateParticipantConnectionCommandOutput | DisconnectParticipantCommandOutput | GetAttachmentCommandOutput | GetTranscriptCommandOutput | SendEventCommandOutput | SendMessageCommandOutput | StartAttachmentUploadCommandOutput;
30
+ export type ServiceOutputTypes = CompleteAttachmentUploadCommandOutput | CreateParticipantConnectionCommandOutput | DescribeViewCommandOutput | DisconnectParticipantCommandOutput | GetAttachmentCommandOutput | GetTranscriptCommandOutput | SendEventCommandOutput | SendMessageCommandOutput | StartAttachmentUploadCommandOutput;
30
31
  /**
31
32
  * @public
32
33
  */
@@ -0,0 +1,101 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
4
+ import { ConnectParticipantClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectParticipantClient";
5
+ import { DescribeViewRequest, DescribeViewResponse } from "../models/models_0";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link DescribeViewCommand}.
14
+ */
15
+ export interface DescribeViewCommandInput extends DescribeViewRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link DescribeViewCommand}.
21
+ */
22
+ export interface DescribeViewCommandOutput extends DescribeViewResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Retrieves the view for the specified view token.</p>
27
+ * @example
28
+ * Use a bare-bones client and the command you need to make an API call.
29
+ * ```javascript
30
+ * import { ConnectParticipantClient, DescribeViewCommand } from "@aws-sdk/client-connectparticipant"; // ES Modules import
31
+ * // const { ConnectParticipantClient, DescribeViewCommand } = require("@aws-sdk/client-connectparticipant"); // CommonJS import
32
+ * const client = new ConnectParticipantClient(config);
33
+ * const input = { // DescribeViewRequest
34
+ * ViewToken: "STRING_VALUE", // required
35
+ * ConnectionToken: "STRING_VALUE", // required
36
+ * };
37
+ * const command = new DescribeViewCommand(input);
38
+ * const response = await client.send(command);
39
+ * // { // DescribeViewResponse
40
+ * // View: { // View
41
+ * // Id: "STRING_VALUE",
42
+ * // Arn: "STRING_VALUE",
43
+ * // Name: "STRING_VALUE",
44
+ * // Version: Number("int"),
45
+ * // Content: { // ViewContent
46
+ * // InputSchema: "STRING_VALUE",
47
+ * // Template: "STRING_VALUE",
48
+ * // Actions: [ // ViewActions
49
+ * // "STRING_VALUE",
50
+ * // ],
51
+ * // },
52
+ * // },
53
+ * // };
54
+ *
55
+ * ```
56
+ *
57
+ * @param DescribeViewCommandInput - {@link DescribeViewCommandInput}
58
+ * @returns {@link DescribeViewCommandOutput}
59
+ * @see {@link DescribeViewCommandInput} for command's `input` shape.
60
+ * @see {@link DescribeViewCommandOutput} for command's `response` shape.
61
+ * @see {@link ConnectParticipantClientResolvedConfig | config} for ConnectParticipantClient's `config` shape.
62
+ *
63
+ * @throws {@link AccessDeniedException} (client fault)
64
+ * <p>You do not have sufficient access to perform this action.</p>
65
+ *
66
+ * @throws {@link InternalServerException} (server fault)
67
+ * <p>This exception occurs when there is an internal failure in the Amazon Connect service.</p>
68
+ *
69
+ * @throws {@link ResourceNotFoundException} (client fault)
70
+ * <p>The resource was not found.</p>
71
+ *
72
+ * @throws {@link ThrottlingException} (client fault)
73
+ * <p>The request was denied due to request throttling.</p>
74
+ *
75
+ * @throws {@link ValidationException} (client fault)
76
+ * <p>The input fails to satisfy the constraints specified by Amazon Connect.</p>
77
+ *
78
+ * @throws {@link ConnectParticipantServiceException}
79
+ * <p>Base exception class for all service exceptions from ConnectParticipant service.</p>
80
+ *
81
+ */
82
+ export declare class DescribeViewCommand extends $Command<DescribeViewCommandInput, DescribeViewCommandOutput, ConnectParticipantClientResolvedConfig> {
83
+ readonly input: DescribeViewCommandInput;
84
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
85
+ /**
86
+ * @public
87
+ */
88
+ constructor(input: DescribeViewCommandInput);
89
+ /**
90
+ * @internal
91
+ */
92
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ConnectParticipantClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DescribeViewCommandInput, DescribeViewCommandOutput>;
93
+ /**
94
+ * @internal
95
+ */
96
+ private serialize;
97
+ /**
98
+ * @internal
99
+ */
100
+ private deserialize;
101
+ }
@@ -65,7 +65,7 @@ export interface GetTranscriptCommandOutput extends GetTranscriptResponse, __Met
65
65
  * // Type: "TYPING" || "PARTICIPANT_JOINED" || "PARTICIPANT_LEFT" || "CHAT_ENDED" || "TRANSFER_SUCCEEDED" || "TRANSFER_FAILED" || "MESSAGE" || "EVENT" || "ATTACHMENT" || "CONNECTION_ACK" || "MESSAGE_DELIVERED" || "MESSAGE_READ",
66
66
  * // ParticipantId: "STRING_VALUE",
67
67
  * // DisplayName: "STRING_VALUE",
68
- * // ParticipantRole: "AGENT" || "CUSTOMER" || "SYSTEM",
68
+ * // ParticipantRole: "AGENT" || "CUSTOMER" || "SYSTEM" || "CUSTOM_BOT",
69
69
  * // Attachments: [ // Attachments
70
70
  * // { // AttachmentItem
71
71
  * // ContentType: "STRING_VALUE",
@@ -1,5 +1,6 @@
1
1
  export * from "./CompleteAttachmentUploadCommand";
2
2
  export * from "./CreateParticipantConnectionCommand";
3
+ export * from "./DescribeViewCommand";
3
4
  export * from "./DisconnectParticipantCommand";
4
5
  export * from "./GetAttachmentCommand";
5
6
  export * from "./GetTranscriptCommand";
@@ -124,8 +124,9 @@ export type ConnectionType = (typeof ConnectionType)[keyof typeof ConnectionType
124
124
  export interface CreateParticipantConnectionRequest {
125
125
  /**
126
126
  * @public
127
- * <p>Type of connection information required. This can be omitted if
128
- * <code>ConnectParticipant</code> is <code>true</code>.</p>
127
+ * <p>Type of connection information required. If you need <code>CONNECTION_CREDENTIALS</code> along with marking
128
+ * participant as connected, pass <code>CONNECTION_CREDENTIALS</code> in
129
+ * <code>Type</code>.</p>
129
130
  */
130
131
  Type?: (ConnectionType | string)[];
131
132
  /**
@@ -195,6 +196,124 @@ export interface CreateParticipantConnectionResponse {
195
196
  */
196
197
  ConnectionCredentials?: ConnectionCredentials;
197
198
  }
199
+ /**
200
+ * @public
201
+ */
202
+ export interface DescribeViewRequest {
203
+ /**
204
+ * @public
205
+ * <p>An encrypted token originating from the interactive message of a ShowView block operation.
206
+ * Represents the desired view.</p>
207
+ */
208
+ ViewToken: string | undefined;
209
+ /**
210
+ * @public
211
+ * <p>The connection token.</p>
212
+ */
213
+ ConnectionToken: string | undefined;
214
+ }
215
+ /**
216
+ * @public
217
+ * <p>View content containing all content necessary to render a view except for runtime input data.</p>
218
+ */
219
+ export interface ViewContent {
220
+ /**
221
+ * @public
222
+ * <p>The schema representing the input data that the view template must be supplied to render.</p>
223
+ */
224
+ InputSchema?: string;
225
+ /**
226
+ * @public
227
+ * <p>The view template representing the structure of the view.</p>
228
+ */
229
+ Template?: string;
230
+ /**
231
+ * @public
232
+ * <p>A list of actions possible from the view</p>
233
+ */
234
+ Actions?: string[];
235
+ }
236
+ /**
237
+ * @public
238
+ * <p>A view resource object. Contains metadata and content necessary to render the view.</p>
239
+ */
240
+ export interface View {
241
+ /**
242
+ * @public
243
+ * <p>The identifier of the view.</p>
244
+ */
245
+ Id?: string;
246
+ /**
247
+ * @public
248
+ * <p>The Amazon Resource Name (ARN) of the view.</p>
249
+ */
250
+ Arn?: string;
251
+ /**
252
+ * @public
253
+ * <p>The name of the view.</p>
254
+ */
255
+ Name?: string;
256
+ /**
257
+ * @public
258
+ * <p>The current version of the view.</p>
259
+ */
260
+ Version?: number;
261
+ /**
262
+ * @public
263
+ * <p>View content containing all content necessary to render a view except for runtime input data.</p>
264
+ */
265
+ Content?: ViewContent;
266
+ }
267
+ /**
268
+ * @public
269
+ */
270
+ export interface DescribeViewResponse {
271
+ /**
272
+ * @public
273
+ * <p>A view resource object. Contains metadata and content necessary to render the view.</p>
274
+ */
275
+ View?: View;
276
+ }
277
+ /**
278
+ * @public
279
+ * @enum
280
+ */
281
+ export declare const ResourceType: {
282
+ readonly CONTACT: "CONTACT";
283
+ readonly CONTACT_FLOW: "CONTACT_FLOW";
284
+ readonly HIERARCHY_GROUP: "HIERARCHY_GROUP";
285
+ readonly HIERARCHY_LEVEL: "HIERARCHY_LEVEL";
286
+ readonly INSTANCE: "INSTANCE";
287
+ readonly PARTICIPANT: "PARTICIPANT";
288
+ readonly USER: "USER";
289
+ };
290
+ /**
291
+ * @public
292
+ */
293
+ export type ResourceType = (typeof ResourceType)[keyof typeof ResourceType];
294
+ /**
295
+ * @public
296
+ * <p>The resource was not found.</p>
297
+ */
298
+ export declare class ResourceNotFoundException extends __BaseException {
299
+ readonly name: "ResourceNotFoundException";
300
+ readonly $fault: "client";
301
+ Message?: string;
302
+ /**
303
+ * @public
304
+ * <p>The identifier of the resource.</p>
305
+ */
306
+ ResourceId?: string;
307
+ /**
308
+ * @public
309
+ * <p>The type of Amazon Connect resource.</p>
310
+ */
311
+ ResourceType?: ResourceType | string;
312
+ /**
313
+ * @internal
314
+ */
315
+ constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
316
+ }
198
317
  /**
199
318
  * @public
200
319
  */
@@ -423,6 +542,7 @@ export interface MessageMetadata {
423
542
  export declare const ParticipantRole: {
424
543
  readonly AGENT: "AGENT";
425
544
  readonly CUSTOMER: "CUSTOMER";
545
+ readonly CUSTOM_BOT: "CUSTOM_BOT";
426
546
  readonly SYSTEM: "SYSTEM";
427
547
  };
428
548
  /**
@@ -737,3 +857,15 @@ export interface StartAttachmentUploadResponse {
737
857
  */
738
858
  UploadMetadata?: UploadMetadata;
739
859
  }
860
+ /**
861
+ * @internal
862
+ */
863
+ export declare const ViewContentFilterSensitiveLog: (obj: ViewContent) => any;
864
+ /**
865
+ * @internal
866
+ */
867
+ export declare const ViewFilterSensitiveLog: (obj: View) => any;
868
+ /**
869
+ * @internal
870
+ */
871
+ export declare const DescribeViewResponseFilterSensitiveLog: (obj: DescribeViewResponse) => any;
@@ -2,6 +2,7 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@s
2
2
  import { SerdeContext as __SerdeContext } from "@smithy/types";
3
3
  import { CompleteAttachmentUploadCommandInput, CompleteAttachmentUploadCommandOutput } from "../commands/CompleteAttachmentUploadCommand";
4
4
  import { CreateParticipantConnectionCommandInput, CreateParticipantConnectionCommandOutput } from "../commands/CreateParticipantConnectionCommand";
5
+ import { DescribeViewCommandInput, DescribeViewCommandOutput } from "../commands/DescribeViewCommand";
5
6
  import { DisconnectParticipantCommandInput, DisconnectParticipantCommandOutput } from "../commands/DisconnectParticipantCommand";
6
7
  import { GetAttachmentCommandInput, GetAttachmentCommandOutput } from "../commands/GetAttachmentCommand";
7
8
  import { GetTranscriptCommandInput, GetTranscriptCommandOutput } from "../commands/GetTranscriptCommand";
@@ -16,6 +17,10 @@ export declare const se_CompleteAttachmentUploadCommand: (input: CompleteAttachm
16
17
  * serializeAws_restJson1CreateParticipantConnectionCommand
17
18
  */
18
19
  export declare const se_CreateParticipantConnectionCommand: (input: CreateParticipantConnectionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
20
+ /**
21
+ * serializeAws_restJson1DescribeViewCommand
22
+ */
23
+ export declare const se_DescribeViewCommand: (input: DescribeViewCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
19
24
  /**
20
25
  * serializeAws_restJson1DisconnectParticipantCommand
21
26
  */
@@ -48,6 +53,10 @@ export declare const de_CompleteAttachmentUploadCommand: (output: __HttpResponse
48
53
  * deserializeAws_restJson1CreateParticipantConnectionCommand
49
54
  */
50
55
  export declare const de_CreateParticipantConnectionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateParticipantConnectionCommandOutput>;
56
+ /**
57
+ * deserializeAws_restJson1DescribeViewCommand
58
+ */
59
+ export declare const de_DescribeViewCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeViewCommandOutput>;
51
60
  /**
52
61
  * deserializeAws_restJson1DisconnectParticipantCommand
53
62
  */
@@ -7,6 +7,10 @@ import {
7
7
  CreateParticipantConnectionCommandInput,
8
8
  CreateParticipantConnectionCommandOutput,
9
9
  } from "./commands/CreateParticipantConnectionCommand";
10
+ import {
11
+ DescribeViewCommandInput,
12
+ DescribeViewCommandOutput,
13
+ } from "./commands/DescribeViewCommand";
10
14
  import {
11
15
  DisconnectParticipantCommandInput,
12
16
  DisconnectParticipantCommandOutput,
@@ -59,6 +63,19 @@ export interface ConnectParticipant {
59
63
  options: __HttpHandlerOptions,
60
64
  cb: (err: any, data?: CreateParticipantConnectionCommandOutput) => void
61
65
  ): void;
66
+ describeView(
67
+ args: DescribeViewCommandInput,
68
+ options?: __HttpHandlerOptions
69
+ ): Promise<DescribeViewCommandOutput>;
70
+ describeView(
71
+ args: DescribeViewCommandInput,
72
+ cb: (err: any, data?: DescribeViewCommandOutput) => void
73
+ ): void;
74
+ describeView(
75
+ args: DescribeViewCommandInput,
76
+ options: __HttpHandlerOptions,
77
+ cb: (err: any, data?: DescribeViewCommandOutput) => void
78
+ ): void;
62
79
  disconnectParticipant(
63
80
  args: DisconnectParticipantCommandInput,
64
81
  options?: __HttpHandlerOptions
@@ -53,6 +53,10 @@ import {
53
53
  CreateParticipantConnectionCommandInput,
54
54
  CreateParticipantConnectionCommandOutput,
55
55
  } from "./commands/CreateParticipantConnectionCommand";
56
+ import {
57
+ DescribeViewCommandInput,
58
+ DescribeViewCommandOutput,
59
+ } from "./commands/DescribeViewCommand";
56
60
  import {
57
61
  DisconnectParticipantCommandInput,
58
62
  DisconnectParticipantCommandOutput,
@@ -87,6 +91,7 @@ export { __Client };
87
91
  export type ServiceInputTypes =
88
92
  | CompleteAttachmentUploadCommandInput
89
93
  | CreateParticipantConnectionCommandInput
94
+ | DescribeViewCommandInput
90
95
  | DisconnectParticipantCommandInput
91
96
  | GetAttachmentCommandInput
92
97
  | GetTranscriptCommandInput
@@ -96,6 +101,7 @@ export type ServiceInputTypes =
96
101
  export type ServiceOutputTypes =
97
102
  | CompleteAttachmentUploadCommandOutput
98
103
  | CreateParticipantConnectionCommandOutput
104
+ | DescribeViewCommandOutput
99
105
  | DisconnectParticipantCommandOutput
100
106
  | GetAttachmentCommandOutput
101
107
  | GetTranscriptCommandOutput
@@ -0,0 +1,35 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import {
4
+ Handler,
5
+ HttpHandlerOptions as __HttpHandlerOptions,
6
+ MetadataBearer as __MetadataBearer,
7
+ MiddlewareStack,
8
+ } from "@smithy/types";
9
+ import {
10
+ ConnectParticipantClientResolvedConfig,
11
+ ServiceInputTypes,
12
+ ServiceOutputTypes,
13
+ } from "../ConnectParticipantClient";
14
+ import { DescribeViewRequest, DescribeViewResponse } from "../models/models_0";
15
+ export { __MetadataBearer, $Command };
16
+ export interface DescribeViewCommandInput extends DescribeViewRequest {}
17
+ export interface DescribeViewCommandOutput
18
+ extends DescribeViewResponse,
19
+ __MetadataBearer {}
20
+ export declare class DescribeViewCommand extends $Command<
21
+ DescribeViewCommandInput,
22
+ DescribeViewCommandOutput,
23
+ ConnectParticipantClientResolvedConfig
24
+ > {
25
+ readonly input: DescribeViewCommandInput;
26
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
27
+ constructor(input: DescribeViewCommandInput);
28
+ resolveMiddleware(
29
+ clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
30
+ configuration: ConnectParticipantClientResolvedConfig,
31
+ options?: __HttpHandlerOptions
32
+ ): Handler<DescribeViewCommandInput, DescribeViewCommandOutput>;
33
+ private serialize;
34
+ private deserialize;
35
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./CompleteAttachmentUploadCommand";
2
2
  export * from "./CreateParticipantConnectionCommand";
3
+ export * from "./DescribeViewCommand";
3
4
  export * from "./DisconnectParticipantCommand";
4
5
  export * from "./GetAttachmentCommand";
5
6
  export * from "./GetTranscriptCommand";
@@ -75,6 +75,45 @@ export interface CreateParticipantConnectionResponse {
75
75
  Websocket?: Websocket;
76
76
  ConnectionCredentials?: ConnectionCredentials;
77
77
  }
78
+ export interface DescribeViewRequest {
79
+ ViewToken: string | undefined;
80
+ ConnectionToken: string | undefined;
81
+ }
82
+ export interface ViewContent {
83
+ InputSchema?: string;
84
+ Template?: string;
85
+ Actions?: string[];
86
+ }
87
+ export interface View {
88
+ Id?: string;
89
+ Arn?: string;
90
+ Name?: string;
91
+ Version?: number;
92
+ Content?: ViewContent;
93
+ }
94
+ export interface DescribeViewResponse {
95
+ View?: View;
96
+ }
97
+ export declare const ResourceType: {
98
+ readonly CONTACT: "CONTACT";
99
+ readonly CONTACT_FLOW: "CONTACT_FLOW";
100
+ readonly HIERARCHY_GROUP: "HIERARCHY_GROUP";
101
+ readonly HIERARCHY_LEVEL: "HIERARCHY_LEVEL";
102
+ readonly INSTANCE: "INSTANCE";
103
+ readonly PARTICIPANT: "PARTICIPANT";
104
+ readonly USER: "USER";
105
+ };
106
+ export type ResourceType = (typeof ResourceType)[keyof typeof ResourceType];
107
+ export declare class ResourceNotFoundException extends __BaseException {
108
+ readonly name: "ResourceNotFoundException";
109
+ readonly $fault: "client";
110
+ Message?: string;
111
+ ResourceId?: string;
112
+ ResourceType?: ResourceType | string;
113
+ constructor(
114
+ opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>
115
+ );
116
+ }
78
117
  export interface DisconnectParticipantRequest {
79
118
  ClientToken?: string;
80
119
  ConnectionToken: string | undefined;
@@ -137,6 +176,7 @@ export interface MessageMetadata {
137
176
  export declare const ParticipantRole: {
138
177
  readonly AGENT: "AGENT";
139
178
  readonly CUSTOMER: "CUSTOMER";
179
+ readonly CUSTOM_BOT: "CUSTOM_BOT";
140
180
  readonly SYSTEM: "SYSTEM";
141
181
  };
142
182
  export type ParticipantRole =
@@ -211,3 +251,8 @@ export interface StartAttachmentUploadResponse {
211
251
  AttachmentId?: string;
212
252
  UploadMetadata?: UploadMetadata;
213
253
  }
254
+ export declare const ViewContentFilterSensitiveLog: (obj: ViewContent) => any;
255
+ export declare const ViewFilterSensitiveLog: (obj: View) => any;
256
+ export declare const DescribeViewResponseFilterSensitiveLog: (
257
+ obj: DescribeViewResponse
258
+ ) => any;
@@ -11,6 +11,10 @@ import {
11
11
  CreateParticipantConnectionCommandInput,
12
12
  CreateParticipantConnectionCommandOutput,
13
13
  } from "../commands/CreateParticipantConnectionCommand";
14
+ import {
15
+ DescribeViewCommandInput,
16
+ DescribeViewCommandOutput,
17
+ } from "../commands/DescribeViewCommand";
14
18
  import {
15
19
  DisconnectParticipantCommandInput,
16
20
  DisconnectParticipantCommandOutput,
@@ -43,6 +47,10 @@ export declare const se_CreateParticipantConnectionCommand: (
43
47
  input: CreateParticipantConnectionCommandInput,
44
48
  context: __SerdeContext
45
49
  ) => Promise<__HttpRequest>;
50
+ export declare const se_DescribeViewCommand: (
51
+ input: DescribeViewCommandInput,
52
+ context: __SerdeContext
53
+ ) => Promise<__HttpRequest>;
46
54
  export declare const se_DisconnectParticipantCommand: (
47
55
  input: DisconnectParticipantCommandInput,
48
56
  context: __SerdeContext
@@ -75,6 +83,10 @@ export declare const de_CreateParticipantConnectionCommand: (
75
83
  output: __HttpResponse,
76
84
  context: __SerdeContext
77
85
  ) => Promise<CreateParticipantConnectionCommandOutput>;
86
+ export declare const de_DescribeViewCommand: (
87
+ output: __HttpResponse,
88
+ context: __SerdeContext
89
+ ) => Promise<DescribeViewCommandOutput>;
78
90
  export declare const de_DisconnectParticipantCommand: (
79
91
  output: __HttpResponse,
80
92
  context: __SerdeContext
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-connectparticipant",
3
3
  "description": "AWS SDK for JavaScript Connectparticipant Client for Node.js, Browser and React Native",
4
- "version": "3.398.0",
4
+ "version": "3.404.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",