Skip to content

Commit a5eda9f

Browse files
Google APIscopybara-github
authored andcommitted
feat!: update CCAI Insights protos.
BREAKING_CHANGE: change nesting of Conversation.Transcript.Participant to ConversationParticipant and remove AnnotationBoundary.time_offset PiperOrigin-RevId: 386489535
1 parent e9ee226 commit a5eda9f

2 files changed

Lines changed: 68 additions & 31 deletions

File tree

google/cloud/contactcenterinsights/v1/contact_center_insights.proto

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,26 @@ enum ConversationView {
263263

264264
// The response for calculating conversation statistics.
265265
message CalculateStatsResponse {
266+
// A time series representing conversations over time.
267+
message TimeSeries {
268+
// A single interval in a time series.
269+
message Interval {
270+
// The start time of this interval.
271+
google.protobuf.Timestamp start_time = 1;
272+
273+
// The number of conversations created in this interval.
274+
int32 conversation_count = 2;
275+
}
276+
277+
// The duration of each interval.
278+
google.protobuf.Duration interval_duration = 1;
279+
280+
// An ordered list of intervals from earliest to latest, where each interval
281+
// represents the number of conversations that transpired during the time
282+
// window.
283+
repeated Interval points = 2;
284+
}
285+
266286
// The average duration of all conversations. The average is calculated using
267287
// only conversations that have a time duration.
268288
google.protobuf.Duration average_duration = 1;
@@ -286,6 +306,10 @@ message CalculateStatsResponse {
286306
// `projects/<Project ID>/locations/<Location ID>/issueModels/<Issue Model
287307
// ID>/issues/<Issue ID>`
288308
map<string, int32> issue_matches = 6;
309+
310+
// A time series representing the count of conversations created over time
311+
// that match that requested filter criteria.
312+
TimeSeries conversation_count_time_series = 7;
289313
}
290314

291315
// Metadata for a create analysis operation.
@@ -481,6 +505,11 @@ message DeleteAnalysisRequest {
481505
message ExportInsightsDataRequest {
482506
// A BigQuery Table Reference.
483507
message BigQueryDestination {
508+
// A project ID or number. If specified, then export will attempt to
509+
// write data to this project instead of the resource project. Otherwise,
510+
// the resource project will be used.
511+
string project_id = 3;
512+
484513
// Required. The name of the BigQuery dataset that the snapshot result should be
485514
// exported to. If this dataset does not exist, the export call returns an
486515
// INVALID_ARGUMENT error.

google/cloud/contactcenterinsights/v1/resources.proto

Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ option java_outer_classname = "ResourcesProto";
2929
option java_package = "com.google.cloud.contactcenterinsights.v1";
3030
option php_namespace = "Google\\Cloud\\ContactCenterInsights\\V1";
3131
option ruby_package = "Google::Cloud::ContactCenterInsights::V1";
32+
option (google.api.resource_definition) = {
33+
type: "dialogflow.googleapis.com/Participant"
34+
pattern: "projects/{project}/conversations/{conversation}/participants/{participant}"
35+
pattern: "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}"
36+
};
3237

3338
// The conversation resource.
3439
message Conversation {
@@ -68,31 +73,6 @@ message Conversation {
6873
float confidence = 4;
6974
}
7075

71-
// The participant of the transcript segment.
72-
message Participant {
73-
// The role of the participant.
74-
enum Role {
75-
// Participant's role is not set.
76-
ROLE_UNSPECIFIED = 0;
77-
78-
// Participant is a human agent.
79-
HUMAN_AGENT = 1;
80-
81-
// Participant is an automated agent.
82-
AUTOMATED_AGENT = 2;
83-
84-
// Participant is an end user who conversed with the contact center.
85-
END_USER = 3;
86-
}
87-
88-
// The name of the Dialogflow participant. Format:
89-
// projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}
90-
string dialogflow_participant = 1;
91-
92-
// The role of the participant.
93-
Role role = 2;
94-
}
95-
9676
// The text of this segment.
9777
string text = 1;
9878

@@ -115,7 +95,7 @@ message Conversation {
11595
int32 channel_tag = 5;
11696

11797
// The participant of this segment.
118-
Participant participant = 8;
98+
ConversationParticipant segment_participant = 9;
11999
}
120100

121101
// A list of sequential transcript segments that comprise the conversation.
@@ -368,11 +348,6 @@ message CallAnnotation {
368348
message AnnotationBoundary {
369349
// A detailed boundary, which describes a more specific point.
370350
oneof detailed_boundary {
371-
// Deprecated: Use `word_index` for the detailed boundary.
372-
// The time offset of this boundary with respect to the start time of the
373-
// first word in the transcript piece.
374-
google.protobuf.Duration time_offset = 2 [deprecated = true];
375-
376351
// The word index of this boundary with respect to the first word in the
377352
// transcript piece. This index starts at zero.
378353
int32 word_index = 3;
@@ -734,6 +709,11 @@ message PhraseMatcher {
734709

735710
// Output only. The most recent time at which the activation status was updated.
736711
google.protobuf.Timestamp activation_update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
712+
713+
// The role whose utterances the phrase matcher should be matched
714+
// against. If the role is ROLE_UNSPECIFIED it will be matched against any
715+
// utterances in the transcript.
716+
ConversationParticipant.Role role_match = 10;
737717
}
738718

739719
// A message representing a rule in the phrase matcher.
@@ -1015,3 +995,31 @@ message DialogflowInteractionData {
1015995
// (completely certain).
1016996
float confidence = 2;
1017997
}
998+
999+
// The call participant speaking for a given utterance.
1000+
message ConversationParticipant {
1001+
// The role of the participant.
1002+
enum Role {
1003+
// Participant's role is not set.
1004+
ROLE_UNSPECIFIED = 0;
1005+
1006+
// Participant is a human agent.
1007+
HUMAN_AGENT = 1;
1008+
1009+
// Participant is an automated agent.
1010+
AUTOMATED_AGENT = 2;
1011+
1012+
// Participant is an end user who conversed with the contact center.
1013+
END_USER = 3;
1014+
1015+
// Participant is either a human or automated agent.
1016+
ANY_AGENT = 4;
1017+
}
1018+
1019+
// The name of the Dialogflow participant. Format:
1020+
// projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}
1021+
string dialogflow_participant = 1;
1022+
1023+
// The role of the participant.
1024+
Role role = 2;
1025+
}

0 commit comments

Comments
 (0)