Skip to content

Commit

Permalink
feat!: update CCAI Insights protos.
Browse files Browse the repository at this point in the history
BREAKING_CHANGE: change nesting of Conversation.Transcript.Participant to ConversationParticipant and remove AnnotationBoundary.time_offset

PiperOrigin-RevId: 386489535
  • Loading branch information
Google APIs authored and copybara-github committed Jul 23, 2021
1 parent e9ee226 commit a5eda9f
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,26 @@ enum ConversationView {

// The response for calculating conversation statistics.
message CalculateStatsResponse {
// A time series representing conversations over time.
message TimeSeries {
// A single interval in a time series.
message Interval {
// The start time of this interval.
google.protobuf.Timestamp start_time = 1;

// The number of conversations created in this interval.
int32 conversation_count = 2;
}

// The duration of each interval.
google.protobuf.Duration interval_duration = 1;

// An ordered list of intervals from earliest to latest, where each interval
// represents the number of conversations that transpired during the time
// window.
repeated Interval points = 2;
}

// The average duration of all conversations. The average is calculated using
// only conversations that have a time duration.
google.protobuf.Duration average_duration = 1;
Expand All @@ -286,6 +306,10 @@ message CalculateStatsResponse {
// `projects/<Project ID>/locations/<Location ID>/issueModels/<Issue Model
// ID>/issues/<Issue ID>`
map<string, int32> issue_matches = 6;

// A time series representing the count of conversations created over time
// that match that requested filter criteria.
TimeSeries conversation_count_time_series = 7;
}

// Metadata for a create analysis operation.
Expand Down Expand Up @@ -481,6 +505,11 @@ message DeleteAnalysisRequest {
message ExportInsightsDataRequest {
// A BigQuery Table Reference.
message BigQueryDestination {
// A project ID or number. If specified, then export will attempt to
// write data to this project instead of the resource project. Otherwise,
// the resource project will be used.
string project_id = 3;

// Required. The name of the BigQuery dataset that the snapshot result should be
// exported to. If this dataset does not exist, the export call returns an
// INVALID_ARGUMENT error.
Expand Down
70 changes: 39 additions & 31 deletions google/cloud/contactcenterinsights/v1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ option java_outer_classname = "ResourcesProto";
option java_package = "com.google.cloud.contactcenterinsights.v1";
option php_namespace = "Google\\Cloud\\ContactCenterInsights\\V1";
option ruby_package = "Google::Cloud::ContactCenterInsights::V1";
option (google.api.resource_definition) = {
type: "dialogflow.googleapis.com/Participant"
pattern: "projects/{project}/conversations/{conversation}/participants/{participant}"
pattern: "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}"
};

// The conversation resource.
message Conversation {
Expand Down Expand Up @@ -68,31 +73,6 @@ message Conversation {
float confidence = 4;
}

// The participant of the transcript segment.
message Participant {
// The role of the participant.
enum Role {
// Participant's role is not set.
ROLE_UNSPECIFIED = 0;

// Participant is a human agent.
HUMAN_AGENT = 1;

// Participant is an automated agent.
AUTOMATED_AGENT = 2;

// Participant is an end user who conversed with the contact center.
END_USER = 3;
}

// The name of the Dialogflow participant. Format:
// projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}
string dialogflow_participant = 1;

// The role of the participant.
Role role = 2;
}

// The text of this segment.
string text = 1;

Expand All @@ -115,7 +95,7 @@ message Conversation {
int32 channel_tag = 5;

// The participant of this segment.
Participant participant = 8;
ConversationParticipant segment_participant = 9;
}

// A list of sequential transcript segments that comprise the conversation.
Expand Down Expand Up @@ -368,11 +348,6 @@ message CallAnnotation {
message AnnotationBoundary {
// A detailed boundary, which describes a more specific point.
oneof detailed_boundary {
// Deprecated: Use `word_index` for the detailed boundary.
// The time offset of this boundary with respect to the start time of the
// first word in the transcript piece.
google.protobuf.Duration time_offset = 2 [deprecated = true];

// The word index of this boundary with respect to the first word in the
// transcript piece. This index starts at zero.
int32 word_index = 3;
Expand Down Expand Up @@ -734,6 +709,11 @@ message PhraseMatcher {

// Output only. The most recent time at which the activation status was updated.
google.protobuf.Timestamp activation_update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];

// The role whose utterances the phrase matcher should be matched
// against. If the role is ROLE_UNSPECIFIED it will be matched against any
// utterances in the transcript.
ConversationParticipant.Role role_match = 10;
}

// A message representing a rule in the phrase matcher.
Expand Down Expand Up @@ -1015,3 +995,31 @@ message DialogflowInteractionData {
// (completely certain).
float confidence = 2;
}

// The call participant speaking for a given utterance.
message ConversationParticipant {
// The role of the participant.
enum Role {
// Participant's role is not set.
ROLE_UNSPECIFIED = 0;

// Participant is a human agent.
HUMAN_AGENT = 1;

// Participant is an automated agent.
AUTOMATED_AGENT = 2;

// Participant is an end user who conversed with the contact center.
END_USER = 3;

// Participant is either a human or automated agent.
ANY_AGENT = 4;
}

// The name of the Dialogflow participant. Format:
// projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}
string dialogflow_participant = 1;

// The role of the participant.
Role role = 2;
}

0 comments on commit a5eda9f

Please sign in to comment.