Skip to content

Commit

Permalink
feat(client-connect-contact-lens): Added PostContactSummary segment t…
Browse files Browse the repository at this point in the history
…ype on ListRealTimeContactAnalysisSegments API
  • Loading branch information
awstools committed Jul 23, 2024
1 parent 9175354 commit 272c2b4
Show file tree
Hide file tree
Showing 9 changed files with 299 additions and 49 deletions.
25 changes: 19 additions & 6 deletions clients/client-connect-contact-lens/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@

AWS SDK for JavaScript ConnectContactLens Client for Node.js, Browser and React Native.

<p>Contact Lens for Amazon Connect enables you to analyze conversations between customer and agents,
by using speech transcription, natural language processing, and intelligent search
capabilities. It performs sentiment analysis, detects issues, and enables you to automatically
<ul>
<li>
<p>
<a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Contact_Lens.html">Contact Lens actions</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Contact_Lens.html">Contact Lens data types</a>
</p>
</li>
</ul>
<p>Amazon Connect Contact Lens enables you to analyze conversations between customer and agents, by using
speech transcription, natural language processing, and intelligent search capabilities.
It performs sentiment analysis, detects issues, and enables you to automatically
categorize contacts.</p>
<p>Contact Lens for Amazon Connect provides both real-time and post-call analytics of customer-agent
conversations. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/analyze-conversations.html">Analyze conversations using
Contact Lens</a> in the <i>Amazon Connect Administrator Guide</i>. </p>
<p>Amazon Connect Contact Lens provides both real-time and post-call analytics of customer-agent
conversations. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/analyze-conversations.html">Analyze conversations
using speech analytics</a> in the <i>Amazon Connect Administrator
Guide</i>. </p>

## Installing

Expand Down
27 changes: 20 additions & 7 deletions clients/client-connect-contact-lens/src/ConnectContactLens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,26 @@ export interface ConnectContactLens {
}

/**
* <p>Contact Lens for Amazon Connect enables you to analyze conversations between customer and agents,
* by using speech transcription, natural language processing, and intelligent search
* capabilities. It performs sentiment analysis, detects issues, and enables you to automatically
* categorize contacts.</p>
* <p>Contact Lens for Amazon Connect provides both real-time and post-call analytics of customer-agent
* conversations. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/analyze-conversations.html">Analyze conversations using
* Contact Lens</a> in the <i>Amazon Connect Administrator Guide</i>. </p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Contact_Lens.html">Contact Lens actions</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Contact_Lens.html">Contact Lens data types</a>
* </p>
* </li>
* </ul>
* <p>Amazon Connect Contact Lens enables you to analyze conversations between customer and agents, by using
* speech transcription, natural language processing, and intelligent search capabilities.
* It performs sentiment analysis, detects issues, and enables you to automatically
* categorize contacts.</p>
* <p>Amazon Connect Contact Lens provides both real-time and post-call analytics of customer-agent
* conversations. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/analyze-conversations.html">Analyze conversations
* using speech analytics</a> in the <i>Amazon Connect Administrator
* Guide</i>. </p>
* @public
*/
export class ConnectContactLens extends ConnectContactLensClient implements ConnectContactLens {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,26 @@ export type ConnectContactLensClientResolvedConfigType = __SmithyResolvedConfigu
export interface ConnectContactLensClientResolvedConfig extends ConnectContactLensClientResolvedConfigType {}

/**
* <p>Contact Lens for Amazon Connect enables you to analyze conversations between customer and agents,
* by using speech transcription, natural language processing, and intelligent search
* capabilities. It performs sentiment analysis, detects issues, and enables you to automatically
* categorize contacts.</p>
* <p>Contact Lens for Amazon Connect provides both real-time and post-call analytics of customer-agent
* conversations. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/analyze-conversations.html">Analyze conversations using
* Contact Lens</a> in the <i>Amazon Connect Administrator Guide</i>. </p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Contact_Lens.html">Contact Lens actions</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Contact_Lens.html">Contact Lens data types</a>
* </p>
* </li>
* </ul>
* <p>Amazon Connect Contact Lens enables you to analyze conversations between customer and agents, by using
* speech transcription, natural language processing, and intelligent search capabilities.
* It performs sentiment analysis, detects issues, and enables you to automatically
* categorize contacts.</p>
* <p>Amazon Connect Contact Lens provides both real-time and post-call analytics of customer-agent
* conversations. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/analyze-conversations.html">Analyze conversations
* using speech analytics</a> in the <i>Amazon Connect Administrator
* Guide</i>. </p>
* @public
*/
export class ConnectContactLensClient extends __Client<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function createAwsAuthSigv4HttpAuthOption(authParameters: ConnectContactLensHttp
name: "connect",
region: authParameters.region,
},
propertiesExtractor: (config: ConnectContactLensClientConfig, context) => ({
propertiesExtractor: (config: Partial<ConnectContactLensClientConfig>, context) => ({
/**
* @internal
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ export interface ListRealtimeContactAnalysisSegmentsCommandOutput
* // },
* // },
* // },
* // PostContactSummary: { // PostContactSummary
* // Content: "STRING_VALUE",
* // Status: "FAILED" || "COMPLETED", // required
* // FailureCode: "QUOTA_EXCEEDED" || "INSUFFICIENT_CONVERSATION_CONTENT" || "FAILED_SAFETY_GUIDELINES" || "INVALID_ANALYSIS_CONFIGURATION" || "INTERNAL_ERROR",
* // },
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
27 changes: 20 additions & 7 deletions clients/client-connect-contact-lens/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
// smithy-typescript generated code
/* eslint-disable */
/**
* <p>Contact Lens for Amazon Connect enables you to analyze conversations between customer and agents,
* by using speech transcription, natural language processing, and intelligent search
* capabilities. It performs sentiment analysis, detects issues, and enables you to automatically
* categorize contacts.</p>
* <p>Contact Lens for Amazon Connect provides both real-time and post-call analytics of customer-agent
* conversations. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/analyze-conversations.html">Analyze conversations using
* Contact Lens</a> in the <i>Amazon Connect Administrator Guide</i>. </p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Contact_Lens.html">Contact Lens actions</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Contact_Lens.html">Contact Lens data types</a>
* </p>
* </li>
* </ul>
* <p>Amazon Connect Contact Lens enables you to analyze conversations between customer and agents, by using
* speech transcription, natural language processing, and intelligent search capabilities.
* It performs sentiment analysis, detects issues, and enables you to automatically
* categorize contacts.</p>
* <p>Amazon Connect Contact Lens provides both real-time and post-call analytics of customer-agent
* conversations. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/analyze-conversations.html">Analyze conversations
* using speech analytics</a> in the <i>Amazon Connect Administrator
* Guide</i>. </p>
*
* @packageDocumentation
*/
Expand Down
122 changes: 109 additions & 13 deletions clients/client-connect-contact-lens/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export interface ListRealtimeContactAnalysisSegmentsRequest {
ContactId: string | undefined;

/**
* <p>The maximimum number of results to return per page.</p>
* <p>The maximum number of results to return per page.</p>
* @public
*/
MaxResults?: number;
Expand Down Expand Up @@ -130,8 +130,8 @@ export interface CategoryDetails {
}

/**
* <p>Provides the category rules that are used to automatically categorize contacts based on
* uttered keywords and phrases.</p>
* <p>Provides the category rules that are used to automatically categorize contacts based
* on uttered keywords and phrases.</p>
* @public
*/
export interface Categories {
Expand All @@ -149,7 +149,95 @@ export interface Categories {
}

/**
* <p>For characters that were detected as issues, where they occur in the transcript.</p>
* @public
* @enum
*/
export const PostContactSummaryFailureCode = {
FAILED_SAFETY_GUIDELINES: "FAILED_SAFETY_GUIDELINES",
INSUFFICIENT_CONVERSATION_CONTENT: "INSUFFICIENT_CONVERSATION_CONTENT",
INTERNAL_ERROR: "INTERNAL_ERROR",
INVALID_ANALYSIS_CONFIGURATION: "INVALID_ANALYSIS_CONFIGURATION",
QUOTA_EXCEEDED: "QUOTA_EXCEEDED",
} as const;

/**
* @public
*/
export type PostContactSummaryFailureCode =
(typeof PostContactSummaryFailureCode)[keyof typeof PostContactSummaryFailureCode];

/**
* @public
* @enum
*/
export const PostContactSummaryStatus = {
COMPLETED: "COMPLETED",
FAILED: "FAILED",
} as const;

/**
* @public
*/
export type PostContactSummaryStatus = (typeof PostContactSummaryStatus)[keyof typeof PostContactSummaryStatus];

/**
* <p>Information about the post-contact summary.</p>
* @public
*/
export interface PostContactSummary {
/**
* <p>The content of the summary.</p>
* @public
*/
Content?: string;

/**
* <p>Whether the summary was successfully COMPLETED or FAILED to be generated.</p>
* @public
*/
Status: PostContactSummaryStatus | undefined;

/**
* <p>If the summary failed to be generated, one of the following failure codes
* occurs:</p>
* <ul>
* <li>
* <p>
* <code>QUOTA_EXCEEDED</code>: The number of concurrent analytics jobs reached
* your service quota.</p>
* </li>
* <li>
* <p>
* <code>INSUFFICIENT_CONVERSATION_CONTENT</code>: The conversation needs to have
* at least one turn from both the participants in order to generate the
* summary.</p>
* </li>
* <li>
* <p>
* <code>FAILED_SAFETY_GUIDELINES</code>: The generated summary cannot be
* provided because it failed to meet system safety guidelines.</p>
* </li>
* <li>
* <p>
* <code>INVALID_ANALYSIS_CONFIGURATION</code>: This code occurs when, for
* example, you're using a
* <a href="https://docs.aws.amazon.com/connect/latest/adminguide/supported-languages.html#supported-languages-contact-lens">language</a>
* that isn't supported by generative AI-powered post-contact summaries.
* </p>
* </li>
* <li>
* <p>
* <code>INTERNAL_ERROR</code>: Internal system error.</p>
* </li>
* </ul>
* @public
*/
FailureCode?: PostContactSummaryFailureCode;
}

/**
* <p>For characters that were detected as issues, where they occur in the
* transcript.</p>
* @public
*/
export interface CharacterOffsets {
Expand All @@ -167,8 +255,8 @@ export interface CharacterOffsets {
}

/**
* <p>Potential issues that are detected based on an artificial intelligence analysis of each
* turn in the conversation.</p>
* <p>Potential issues that are detected based on an artificial intelligence analysis of
* each turn in the conversation.</p>
* @public
*/
export interface IssueDetected {
Expand Down Expand Up @@ -206,7 +294,7 @@ export interface Transcript {
Id: string | undefined;

/**
* <p>The identifier of the participant.</p>
* <p>The identifier of the participant. Valid values are CUSTOMER or AGENT.</p>
* @public
*/
ParticipantId: string | undefined;
Expand Down Expand Up @@ -236,7 +324,7 @@ export interface Transcript {
EndOffsetMillis: number | undefined;

/**
* <p>The sentiment of the detected for this piece of transcript.</p>
* <p>The sentiment detected for this piece of transcript.</p>
* @public
*/
Sentiment: SentimentValue | undefined;
Expand Down Expand Up @@ -264,6 +352,12 @@ export interface RealtimeContactAnalysisSegment {
* @public
*/
Categories?: Categories;

/**
* <p>Information about the post-contact summary.</p>
* @public
*/
PostContactSummary?: PostContactSummary;
}

/**
Expand All @@ -277,18 +371,20 @@ export interface ListRealtimeContactAnalysisSegmentsResponse {
Segments: RealtimeContactAnalysisSegment[] | undefined;

/**
* <p>If there are additional results, this is the token for the next set of results. If response includes <code>nextToken</code> there are two possible scenarios:</p>
* <p>If there are additional results, this is the token for the next set of results. If response includes <code>nextToken</code> there are two possible
* scenarios:</p>
* <ul>
* <li>
* <p>There are more segments so another call is required to get them.</p>
* </li>
* <li>
* <p>There are no more segments at this time, but more may be available later (real-time
* analysis is in progress) so the client should call the operation again to get new
* segments.</p>
* <p>There are no more segments at this time, but more may be available later
* (real-time analysis is in progress) so the client should call the operation
* again to get new segments.</p>
* </li>
* </ul>
* <p>If response does not include <code>nextToken</code>, the analysis is completed (successfully or failed) and there are no more segments to retrieve.</p>
* <p>If response does not include <code>nextToken</code>, the analysis is completed
* (successfully or failed) and there are no more segments to retrieve.</p>
* @public
*/
NextToken?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont

// de_PointsOfInterest omitted.

// de_PostContactSummary omitted.

// de_RealtimeContactAnalysisSegment omitted.

// de_RealtimeContactAnalysisSegments omitted.
Expand Down
Loading

0 comments on commit 272c2b4

Please sign in to comment.