Skip to content

Commit c7a240f

Browse files
feat: add Configurable Analysis, Bulk Upload, Bulk Analyze, Delete Issue Apis (#3736)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 495057883 Source-Link: https://togithub.com/googleapis/googleapis/commit/59a66eb3180ea8474c0a22da3fe964dbe7428c77 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/9e7f289c6c6e4fd5f63b6dcfee0d272ab1dca1de Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhY3RjZW50ZXJpbnNpZ2h0cy8uT3dsQm90LnlhbWwiLCJoIjoiOWU3ZjI4OWM2YzZlNGZkNWY2M2I2ZGNmZWUwZDI3MmFiMWRjYTFkZSJ9
1 parent fb1e9d6 commit c7a240f

15 files changed

+7497
-728
lines changed

packages/google-cloud-contactcenterinsights/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
8787

8888
| Sample | Source Code | Try it |
8989
| --------------------------- | --------------------------------- | ------ |
90+
| Contact_center_insights.bulk_analyze_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js,samples/README.md) |
9091
| Contact_center_insights.calculate_issue_model_stats | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js,samples/README.md) |
9192
| Contact_center_insights.calculate_stats | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js,samples/README.md) |
9293
| Contact_center_insights.create_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js,samples/README.md) |
@@ -96,6 +97,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
9697
| Contact_center_insights.create_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js,samples/README.md) |
9798
| Contact_center_insights.delete_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js,samples/README.md) |
9899
| Contact_center_insights.delete_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js,samples/README.md) |
100+
| Contact_center_insights.delete_issue | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js,samples/README.md) |
99101
| Contact_center_insights.delete_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js,samples/README.md) |
100102
| Contact_center_insights.delete_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js,samples/README.md) |
101103
| Contact_center_insights.delete_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js,samples/README.md) |
@@ -108,6 +110,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
108110
| Contact_center_insights.get_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js,samples/README.md) |
109111
| Contact_center_insights.get_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js,samples/README.md) |
110112
| Contact_center_insights.get_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js,samples/README.md) |
113+
| Contact_center_insights.ingest_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js,samples/README.md) |
111114
| Contact_center_insights.list_analyses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js,samples/README.md) |
112115
| Contact_center_insights.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js,samples/README.md) |
113116
| Contact_center_insights.list_issue_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js,samples/README.md) |

packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto

+169
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,33 @@ service ContactCenterInsights {
121121
option (google.api.method_signature) = "name";
122122
}
123123

124+
// Analyzes multiple conversations in a single request.
125+
rpc BulkAnalyzeConversations(BulkAnalyzeConversationsRequest) returns (google.longrunning.Operation) {
126+
option (google.api.http) = {
127+
post: "/v1/{parent=projects/*/locations/*}/conversations:bulkAnalyze"
128+
body: "*"
129+
};
130+
option (google.api.method_signature) = "parent,filter,analysis_percentage";
131+
option (google.longrunning.operation_info) = {
132+
response_type: "BulkAnalyzeConversationsResponse"
133+
metadata_type: "BulkAnalyzeConversationsMetadata"
134+
};
135+
}
136+
137+
// Imports conversations and processes them according to the user's
138+
// configuration.
139+
rpc IngestConversations(IngestConversationsRequest) returns (google.longrunning.Operation) {
140+
option (google.api.http) = {
141+
post: "/v1/{parent=projects/*/locations/*}/conversations:ingest"
142+
body: "*"
143+
};
144+
option (google.api.method_signature) = "parent";
145+
option (google.longrunning.operation_info) = {
146+
response_type: "IngestConversationsResponse"
147+
metadata_type: "IngestConversationsMetadata"
148+
};
149+
}
150+
124151
// Export insights data to a destination defined in the request body.
125152
rpc ExportInsightsData(ExportInsightsDataRequest) returns (google.longrunning.Operation) {
126153
option (google.api.http) = {
@@ -237,6 +264,14 @@ service ContactCenterInsights {
237264
option (google.api.method_signature) = "issue,update_mask";
238265
}
239266

267+
// Deletes an issue.
268+
rpc DeleteIssue(DeleteIssueRequest) returns (google.protobuf.Empty) {
269+
option (google.api.http) = {
270+
delete: "/v1/{name=projects/*/locations/*/issueModels/*/issues/*}"
271+
};
272+
option (google.api.method_signature) = "name";
273+
}
274+
240275
// Gets an issue model's statistics.
241276
rpc CalculateIssueModelStats(CalculateIssueModelStatsRequest) returns (CalculateIssueModelStatsResponse) {
242277
option (google.api.http) = {
@@ -456,6 +491,9 @@ message CreateAnalysisOperationMetadata {
456491
type: "contactcenterinsights.googleapis.com/Conversation"
457492
}
458493
];
494+
495+
// Output only. The annotator selector used for the analysis (if any).
496+
AnnotatorSelector annotator_selector = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
459497
}
460498

461499
// Request to create a conversation.
@@ -559,6 +597,73 @@ message DeleteConversationRequest {
559597
bool force = 2;
560598
}
561599

600+
// The request to ingest conversations.
601+
message IngestConversationsRequest {
602+
// Configuration for Cloud Storage bucket sources.
603+
message GcsSource {
604+
// Required. The Cloud Storage bucket containing source objects.
605+
string bucket_uri = 1 [(google.api.field_behavior) = REQUIRED];
606+
}
607+
608+
// Configuration for processing transcript objects.
609+
message TranscriptObjectConfig {
610+
// Required. The medium transcript objects represent.
611+
Conversation.Medium medium = 1 [(google.api.field_behavior) = REQUIRED];
612+
}
613+
614+
// Configuration that applies to all conversations.
615+
message ConversationConfig {
616+
// An opaque, user-specified string representing the human agent who handled
617+
// the conversations.
618+
string agent_id = 1;
619+
}
620+
621+
// Configuration for an external data store containing objects that will
622+
// be converted to conversations.
623+
oneof source {
624+
// A cloud storage bucket source.
625+
GcsSource gcs_source = 2;
626+
}
627+
628+
// Configuration for converting individual `source` objects to conversations.
629+
oneof object_config {
630+
// Configuration for when `source` contains conversation transcripts.
631+
TranscriptObjectConfig transcript_object_config = 3;
632+
}
633+
634+
// Required. The parent resource for new conversations.
635+
string parent = 1 [
636+
(google.api.field_behavior) = REQUIRED,
637+
(google.api.resource_reference) = {
638+
type: "locations.googleapis.com/Location"
639+
}
640+
];
641+
642+
// Configuration that applies to all conversations.
643+
ConversationConfig conversation_config = 4;
644+
}
645+
646+
// The metadata for an IngestConversations operation.
647+
message IngestConversationsMetadata {
648+
// Output only. The time the operation was created.
649+
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
650+
651+
// Output only. The time the operation finished running.
652+
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
653+
654+
// Output only. The original request for ingest.
655+
IngestConversationsRequest request = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
656+
657+
// Output only. Partial errors during ingest operation that might cause the operation
658+
// output to be incomplete.
659+
repeated google.rpc.Status partial_errors = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
660+
}
661+
662+
// The response to an IngestConversations operation.
663+
message IngestConversationsResponse {
664+
665+
}
666+
562667
// The request to create an analysis.
563668
message CreateAnalysisRequest {
564669
// Required. The parent resource of the analysis.
@@ -631,6 +736,59 @@ message DeleteAnalysisRequest {
631736
];
632737
}
633738

739+
// The request to analyze conversations in bulk.
740+
message BulkAnalyzeConversationsRequest {
741+
// Required. The parent resource to create analyses in.
742+
string parent = 1 [
743+
(google.api.field_behavior) = REQUIRED,
744+
(google.api.resource_reference) = {
745+
type: "locations.googleapis.com/Location"
746+
}
747+
];
748+
749+
// Required. Filter used to select the subset of conversations to analyze.
750+
string filter = 2 [(google.api.field_behavior) = REQUIRED];
751+
752+
// Required. Percentage of selected conversation to analyze, between
753+
// [0, 100].
754+
float analysis_percentage = 3 [(google.api.field_behavior) = REQUIRED];
755+
756+
// To select the annotators to run and the phrase matchers to use
757+
// (if any). If not specified, all annotators will be run.
758+
AnnotatorSelector annotator_selector = 8;
759+
}
760+
761+
// The metadata for a bulk analyze conversations operation.
762+
message BulkAnalyzeConversationsMetadata {
763+
// The time the operation was created.
764+
google.protobuf.Timestamp create_time = 1;
765+
766+
// The time the operation finished running.
767+
google.protobuf.Timestamp end_time = 2;
768+
769+
// The original request for bulk analyze.
770+
BulkAnalyzeConversationsRequest request = 3;
771+
772+
// The number of requested analyses that have completed successfully so far.
773+
int32 completed_analyses_count = 4;
774+
775+
// The number of requested analyses that have failed so far.
776+
int32 failed_analyses_count = 5;
777+
778+
// Total number of analyses requested. Computed by the number of conversations
779+
// returned by `filter` multiplied by `analysis_percentage` in the request.
780+
int32 total_requested_analyses_count = 6;
781+
}
782+
783+
// The response for a bulk analyze conversations operation.
784+
message BulkAnalyzeConversationsResponse {
785+
// Count of successful analyses.
786+
int32 successful_analysis_count = 1;
787+
788+
// Count of failed analyses.
789+
int32 failed_analysis_count = 2;
790+
}
791+
634792
// The request to export insights.
635793
message ExportInsightsDataRequest {
636794
// A BigQuery Table Reference.
@@ -891,6 +1049,17 @@ message UpdateIssueRequest {
8911049
google.protobuf.FieldMask update_mask = 2;
8921050
}
8931051

1052+
// The request to delete an issue.
1053+
message DeleteIssueRequest {
1054+
// Required. The name of the issue to delete.
1055+
string name = 1 [
1056+
(google.api.field_behavior) = REQUIRED,
1057+
(google.api.resource_reference) = {
1058+
type: "contactcenterinsights.googleapis.com/Issue"
1059+
}
1060+
];
1061+
}
1062+
8941063
// Request to get statistics of an issue model.
8951064
message CalculateIssueModelStatsRequest {
8961065
// Required. The resource name of the issue model to query against.

0 commit comments

Comments
 (0)