@google-cloud/discoveryengine 0.7.0 → 1.0.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +6 -0
  3. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +1 -2
  4. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +15 -2
  5. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +131 -0
  6. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +281 -0
  7. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +6 -5
  8. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +2 -1
  9. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +26 -22
  10. package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +193 -47
  12. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +41 -36
  13. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +2 -2
  14. package/build/protos/protos.d.ts +6529 -4472
  15. package/build/protos/protos.js +16561 -11622
  16. package/build/protos/protos.json +1842 -1317
  17. package/build/src/v1/completion_service_client.d.ts +6 -7
  18. package/build/src/v1/document_service_client.d.ts +83 -94
  19. package/build/src/v1/document_service_client.js +18 -22
  20. package/build/src/v1/schema_service_client.d.ts +39 -49
  21. package/build/src/v1/schema_service_client.js +17 -22
  22. package/build/src/v1/search_service_client.d.ts +31 -34
  23. package/build/src/v1/search_service_client.js +21 -23
  24. package/build/src/v1/user_event_service_client.d.ts +6 -10
  25. package/build/src/v1/user_event_service_client.js +1 -2
  26. package/build/src/v1beta/completion_service_client.d.ts +106 -8
  27. package/build/src/v1beta/completion_service_client.js +128 -0
  28. package/build/src/v1beta/conversational_search_service_client.d.ts +876 -0
  29. package/build/src/v1beta/conversational_search_service_client.js +1149 -0
  30. package/build/src/v1beta/conversational_search_service_client_config.json +68 -0
  31. package/build/src/v1beta/document_service_client.d.ts +183 -98
  32. package/build/src/v1beta/document_service_client.js +166 -22
  33. package/build/src/v1beta/index.d.ts +1 -0
  34. package/build/src/v1beta/index.js +3 -1
  35. package/build/src/v1beta/recommendation_service_client.d.ts +103 -11
  36. package/build/src/v1beta/recommendation_service_client.js +128 -0
  37. package/build/src/v1beta/schema_service_client.d.ts +132 -49
  38. package/build/src/v1beta/schema_service_client.js +163 -22
  39. package/build/src/v1beta/search_service_client.d.ts +163 -67
  40. package/build/src/v1beta/search_service_client.js +175 -45
  41. package/build/src/v1beta/user_event_service_client.d.ts +104 -15
  42. package/build/src/v1beta/user_event_service_client.js +147 -2
  43. package/package.json +8 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v0.8.0...discoveryengine-v1.0.0) (2023-08-06)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * migrate to Node 14 ([#4443](https://github.com/googleapis/google-cloud-node/issues/4443))
9
+ * [discoveryengine] fix typings for IAM methods ([#4457](https://github.com/googleapis/google-cloud-node/issues/4457)) and update node 14
10
+
11
+ ### Bug Fixes
12
+
13
+ * [discoveryengine] fix typings for IAM methods ([#4457](https://github.com/googleapis/google-cloud-node/issues/4457)) and update node 14 ([91b7527](https://github.com/googleapis/google-cloud-node/commit/91b75277f651cbe16c10987c56743868a48dd3f1))
14
+
15
+
16
+ ### Miscellaneous Chores
17
+
18
+ * Migrate to Node 14 ([#4443](https://github.com/googleapis/google-cloud-node/issues/4443)) ([2260f12](https://github.com/googleapis/google-cloud-node/commit/2260f12543d171bda95345e53475f5f0fdc45770))
19
+
20
+ ## [0.8.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v0.7.0...discoveryengine-v0.8.0) (2023-06-28)
21
+
22
+
23
+ ### Features
24
+
25
+ * [discoveryengine] support extractive content in search ([#4355](https://github.com/googleapis/google-cloud-node/issues/4355)) ([5958cfa](https://github.com/googleapis/google-cloud-node/commit/5958cfa56bd5280301f446a8863d6461ea86493e))
26
+
3
27
  ## [0.7.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v0.6.0...discoveryengine-v0.7.0) (2023-06-14)
4
28
 
5
29
 
package/README.md CHANGED
@@ -143,6 +143,12 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
143
143
  | User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/user_event_service.import_user_events.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-discoveryengine/samples/generated/v1/user_event_service.import_user_events.js,packages/google-cloud-discoveryengine/samples/README.md) |
144
144
  | User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/user_event_service.write_user_event.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-discoveryengine/samples/generated/v1/user_event_service.write_user_event.js,packages/google-cloud-discoveryengine/samples/README.md) |
145
145
  | Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.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-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js,packages/google-cloud-discoveryengine/samples/README.md) |
146
+ | Conversational_search_service.converse_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/conversational_search_service.converse_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-discoveryengine/samples/generated/v1beta/conversational_search_service.converse_conversation.js,packages/google-cloud-discoveryengine/samples/README.md) |
147
+ | Conversational_search_service.create_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/conversational_search_service.create_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-discoveryengine/samples/generated/v1beta/conversational_search_service.create_conversation.js,packages/google-cloud-discoveryengine/samples/README.md) |
148
+ | Conversational_search_service.delete_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/conversational_search_service.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-discoveryengine/samples/generated/v1beta/conversational_search_service.delete_conversation.js,packages/google-cloud-discoveryengine/samples/README.md) |
149
+ | Conversational_search_service.get_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/conversational_search_service.get_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-discoveryengine/samples/generated/v1beta/conversational_search_service.get_conversation.js,packages/google-cloud-discoveryengine/samples/README.md) |
150
+ | Conversational_search_service.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/conversational_search_service.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-discoveryengine/samples/generated/v1beta/conversational_search_service.list_conversations.js,packages/google-cloud-discoveryengine/samples/README.md) |
151
+ | Conversational_search_service.update_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/conversational_search_service.update_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-discoveryengine/samples/generated/v1beta/conversational_search_service.update_conversation.js,packages/google-cloud-discoveryengine/samples/README.md) |
146
152
  | Document_service.create_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.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-discoveryengine/samples/generated/v1beta/document_service.create_document.js,packages/google-cloud-discoveryengine/samples/README.md) |
147
153
  | Document_service.delete_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.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-discoveryengine/samples/generated/v1beta/document_service.delete_document.js,packages/google-cloud-discoveryengine/samples/README.md) |
148
154
  | Document_service.get_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.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-discoveryengine/samples/generated/v1beta/document_service.get_document.js,packages/google-cloud-discoveryengine/samples/README.md) |
@@ -113,8 +113,7 @@ message UserInfo {
113
113
  // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
114
114
  string user_id = 1;
115
115
 
116
- // User agent as included in the HTTP header. Required for getting
117
- // [SearchResponse.sponsored_results][].
116
+ // User agent as included in the HTTP header.
118
117
  //
119
118
  // The field must be a UTF-8 encoded string with a length limit of 1,000
120
119
  // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
@@ -74,13 +74,14 @@ message CompleteQueryRequest {
74
74
  // API calls. Do not use it when there is no traffic for Search API.
75
75
  // * `user-event` - Using suggestions generated from user-imported search
76
76
  // events.
77
+ // * `document-completable` - Using suggestions taken directly from
78
+ // user-imported document fields marked as completable.
77
79
  //
78
80
  // Default values:
79
81
  //
80
82
  // * `document` is the default model for regular dataStores.
81
83
  // * `search-history` is the default model for
82
- // [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH]
83
- // dataStores.
84
+ // [IndustryVertical.SITE_SEARCH][] dataStores.
84
85
  string query_model = 3;
85
86
 
86
87
  // A unique identifier for tracking visitors. For example, this could be
@@ -98,6 +99,12 @@ message CompleteQueryRequest {
98
99
  // The field must be a UTF-8 encoded string with a length limit of 128
99
100
  // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
100
101
  string user_pseudo_id = 4;
102
+
103
+ // Indicates if tail suggestions should be returned if there are no
104
+ // suggestions that match the full query. Even if set to true, if there are
105
+ // suggestions that match the full query, those are returned and no
106
+ // tail suggestions are returned.
107
+ bool include_tail_suggestions = 5;
101
108
  }
102
109
 
103
110
  // Response message for
@@ -113,4 +120,10 @@ message CompleteQueryResponse {
113
120
  // Results of the matched query suggestions. The result list is ordered and
114
121
  // the first result is a top suggestion.
115
122
  repeated QuerySuggestion query_suggestions = 1;
123
+
124
+ // True if the returned suggestions are all tail suggestions.
125
+ //
126
+ // For tail matching to be triggered, include_tail_suggestions in the request
127
+ // must be true and there must be no suggestions that match the full query.
128
+ bool tail_match_triggered = 2;
116
129
  }
@@ -0,0 +1,131 @@
1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1beta;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/protobuf/timestamp.proto";
22
+
23
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
24
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "ConversationProto";
27
+ option java_package = "com.google.cloud.discoveryengine.v1beta";
28
+ option objc_class_prefix = "DISCOVERYENGINE";
29
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
30
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
31
+
32
+ // External conversation proto definition.
33
+ message Conversation {
34
+ option (google.api.resource) = {
35
+ type: "discoveryengine.googleapis.com/Conversation"
36
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}"
37
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}"
38
+ };
39
+
40
+ // Enumeration of the state of the conversation.
41
+ enum State {
42
+ // Unknown.
43
+ STATE_UNSPECIFIED = 0;
44
+
45
+ // Conversation is currently open.
46
+ IN_PROGRESS = 1;
47
+
48
+ // Conversation has been completed.
49
+ COMPLETED = 2;
50
+ }
51
+
52
+ // Immutable. Fully qualified name
53
+ // `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
54
+ string name = 1 [(google.api.field_behavior) = IMMUTABLE];
55
+
56
+ // The state of the Conversation.
57
+ State state = 2;
58
+
59
+ // A unique identifier for tracking users.
60
+ string user_pseudo_id = 3;
61
+
62
+ // Conversation messages.
63
+ repeated ConversationMessage messages = 4;
64
+
65
+ // Output only. The time the conversation started.
66
+ google.protobuf.Timestamp start_time = 5
67
+ [(google.api.field_behavior) = OUTPUT_ONLY];
68
+
69
+ // Output only. The time the conversation finished.
70
+ google.protobuf.Timestamp end_time = 6
71
+ [(google.api.field_behavior) = OUTPUT_ONLY];
72
+ }
73
+
74
+ // Defines a reply message to user.
75
+ message Reply {
76
+ // Defines reference in reply.
77
+ message Reference {
78
+ // URI link reference.
79
+ string uri = 1;
80
+
81
+ // Anchor text.
82
+ string anchor_text = 2;
83
+
84
+ // Anchor text start index.
85
+ int32 start = 3;
86
+
87
+ // Anchor text end index.
88
+ int32 end = 4;
89
+ }
90
+
91
+ // Text reply.
92
+ string reply = 1;
93
+
94
+ // References in the reply.
95
+ repeated Reference references = 2;
96
+ }
97
+
98
+ // Defines context of the conversation
99
+ message ConversationContext {
100
+ // The current list of documents the user is seeing.
101
+ // It contains the document resource references.
102
+ repeated string context_documents = 1;
103
+
104
+ // The current active document the user opened.
105
+ // It contains the document resource reference.
106
+ string active_document = 2;
107
+ }
108
+
109
+ // Defines text input.
110
+ message TextInput {
111
+ // Text input.
112
+ string input = 1;
113
+
114
+ // Conversation context of the input.
115
+ ConversationContext context = 2;
116
+ }
117
+
118
+ // Defines a conversation message.
119
+ message ConversationMessage {
120
+ oneof message {
121
+ // User text input.
122
+ TextInput user_input = 1;
123
+
124
+ // Search reply.
125
+ Reply reply = 2;
126
+ }
127
+
128
+ // Output only. Message creation timestamp.
129
+ google.protobuf.Timestamp create_time = 3
130
+ [(google.api.field_behavior) = OUTPUT_ONLY];
131
+ }
@@ -0,0 +1,281 @@
1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1beta;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/cloud/discoveryengine/v1beta/conversation.proto";
24
+ import "google/cloud/discoveryengine/v1beta/search_service.proto";
25
+ import "google/protobuf/empty.proto";
26
+ import "google/protobuf/field_mask.proto";
27
+
28
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
29
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
30
+ option java_multiple_files = true;
31
+ option java_outer_classname = "ConversationalSearchServiceProto";
32
+ option java_package = "com.google.cloud.discoveryengine.v1beta";
33
+ option objc_class_prefix = "DISCOVERYENGINE";
34
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
35
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
36
+
37
+ // Service for conversational search.
38
+ service ConversationalSearchService {
39
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
40
+ option (google.api.oauth_scopes) =
41
+ "https://www.googleapis.com/auth/cloud-platform";
42
+
43
+ // Converses a conversation.
44
+ rpc ConverseConversation(ConverseConversationRequest)
45
+ returns (ConverseConversationResponse) {
46
+ option (google.api.http) = {
47
+ post: "/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}:converse"
48
+ body: "*"
49
+ additional_bindings {
50
+ post: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse"
51
+ body: "*"
52
+ }
53
+ };
54
+ option (google.api.method_signature) = "name,query";
55
+ }
56
+
57
+ // Creates a Conversation.
58
+ //
59
+ // If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to
60
+ // create already exists, an ALREADY_EXISTS error is returned.
61
+ rpc CreateConversation(CreateConversationRequest) returns (Conversation) {
62
+ option (google.api.http) = {
63
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversations"
64
+ body: "conversation"
65
+ additional_bindings {
66
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations"
67
+ body: "conversation"
68
+ }
69
+ };
70
+ option (google.api.method_signature) = "parent,conversation";
71
+ }
72
+
73
+ // Deletes a Conversation.
74
+ //
75
+ // If the [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to
76
+ // delete does not exist, a NOT_FOUND error is returned.
77
+ rpc DeleteConversation(DeleteConversationRequest)
78
+ returns (google.protobuf.Empty) {
79
+ option (google.api.http) = {
80
+ delete: "/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}"
81
+ additional_bindings {
82
+ delete: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}"
83
+ }
84
+ };
85
+ option (google.api.method_signature) = "name";
86
+ }
87
+
88
+ // Updates a Conversation.
89
+ //
90
+ // [Conversation][google.cloud.discoveryengine.v1beta.Conversation] action
91
+ // type cannot be changed. If the
92
+ // [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update
93
+ // does not exist, a NOT_FOUND error is returned.
94
+ rpc UpdateConversation(UpdateConversationRequest) returns (Conversation) {
95
+ option (google.api.http) = {
96
+ patch: "/v1beta/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}"
97
+ body: "conversation"
98
+ additional_bindings {
99
+ patch: "/v1beta/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}"
100
+ body: "conversation"
101
+ }
102
+ };
103
+ option (google.api.method_signature) = "conversation,update_mask";
104
+ }
105
+
106
+ // Gets a Conversation.
107
+ rpc GetConversation(GetConversationRequest) returns (Conversation) {
108
+ option (google.api.http) = {
109
+ get: "/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}"
110
+ additional_bindings {
111
+ get: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}"
112
+ }
113
+ };
114
+ option (google.api.method_signature) = "name";
115
+ }
116
+
117
+ // Lists all Conversations by their parent
118
+ // [DataStore][google.cloud.discoveryengine.v1beta.DataStore].
119
+ rpc ListConversations(ListConversationsRequest)
120
+ returns (ListConversationsResponse) {
121
+ option (google.api.http) = {
122
+ get: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversations"
123
+ additional_bindings {
124
+ get: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations"
125
+ }
126
+ };
127
+ option (google.api.method_signature) = "parent";
128
+ }
129
+ }
130
+
131
+ // Request message for
132
+ // [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation]
133
+ // method.
134
+ message ConverseConversationRequest {
135
+ // Required. The resource name of the Conversation to get. Format:
136
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
137
+ // Use
138
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
139
+ // to activate auto session mode, which automatically creates a new
140
+ // conversation inside a ConverseConversation session.
141
+ string name = 1 [
142
+ (google.api.field_behavior) = REQUIRED,
143
+ (google.api.resource_reference) = {
144
+ type: "discoveryengine.googleapis.com/Conversation"
145
+ }
146
+ ];
147
+
148
+ // Required. Current user input.
149
+ TextInput query = 2 [(google.api.field_behavior) = REQUIRED];
150
+
151
+ // The resource name of the Serving Config to use. Format:
152
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
153
+ // If this is not set, the default serving config will be used.
154
+ string serving_config = 3 [(google.api.resource_reference) = {
155
+ type: "discoveryengine.googleapis.com/ServingConfig"
156
+ }];
157
+
158
+ // The conversation to be used by auto session only. The name field will be
159
+ // ignored as we automatically assign new name for the conversation in auto
160
+ // session.
161
+ Conversation conversation = 5;
162
+
163
+ // Whether to turn on safe search.
164
+ bool safe_search = 6;
165
+ }
166
+
167
+ // Response message for
168
+ // [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1beta.ConversationalSearchService.ConverseConversation]
169
+ // method.
170
+ message ConverseConversationResponse {
171
+ // Answer to the current query.
172
+ Reply reply = 1;
173
+
174
+ // Updated conversation including the answer.
175
+ Conversation conversation = 2;
176
+
177
+ // Search Results.
178
+ repeated SearchResponse.SearchResult search_results = 3;
179
+ }
180
+
181
+ // Request for CreateConversation method.
182
+ message CreateConversationRequest {
183
+ // Required. Full resource name of parent data store. Format:
184
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
185
+ string parent = 1 [
186
+ (google.api.field_behavior) = REQUIRED,
187
+ (google.api.resource_reference) = {
188
+ type: "discoveryengine.googleapis.com/DataStore"
189
+ }
190
+ ];
191
+
192
+ // Required. The conversation to create.
193
+ Conversation conversation = 2 [(google.api.field_behavior) = REQUIRED];
194
+ }
195
+
196
+ // Request for UpdateConversation method.
197
+ message UpdateConversationRequest {
198
+ // Required. The Conversation to update.
199
+ Conversation conversation = 1 [(google.api.field_behavior) = REQUIRED];
200
+
201
+ // Indicates which fields in the provided
202
+ // [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update.
203
+ // The following are NOT supported:
204
+ //
205
+ // * [conversation.name][]
206
+ //
207
+ // If not set or empty, all supported fields are updated.
208
+ google.protobuf.FieldMask update_mask = 2;
209
+ }
210
+
211
+ // Request for DeleteConversation method.
212
+ message DeleteConversationRequest {
213
+ // Required. The resource name of the Conversation to delete. Format:
214
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
215
+ string name = 1 [
216
+ (google.api.field_behavior) = REQUIRED,
217
+ (google.api.resource_reference) = {
218
+ type: "discoveryengine.googleapis.com/Conversation"
219
+ }
220
+ ];
221
+ }
222
+
223
+ // Request for GetConversation method.
224
+ message GetConversationRequest {
225
+ // Required. The resource name of the Conversation to get. Format:
226
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
227
+ string name = 1 [
228
+ (google.api.field_behavior) = REQUIRED,
229
+ (google.api.resource_reference) = {
230
+ type: "discoveryengine.googleapis.com/Conversation"
231
+ }
232
+ ];
233
+ }
234
+
235
+ // Request for ListConversations method.
236
+ message ListConversationsRequest {
237
+ // Required. The data store resource name. Format:
238
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
239
+ string parent = 1 [
240
+ (google.api.field_behavior) = REQUIRED,
241
+ (google.api.resource_reference) = {
242
+ type: "discoveryengine.googleapis.com/DataStore"
243
+ }
244
+ ];
245
+
246
+ // Maximum number of results to return. If unspecified, defaults
247
+ // to 50. Max allowed value is 1000.
248
+ int32 page_size = 2;
249
+
250
+ // A page token, received from a previous `ListConversations` call.
251
+ // Provide this to retrieve the subsequent page.
252
+ string page_token = 3;
253
+
254
+ // A filter to apply on the list results. The supported features are:
255
+ // user_pseudo_id, state.
256
+ //
257
+ // Example:
258
+ // "user_pseudo_id = some_id"
259
+ string filter = 4;
260
+
261
+ // A comma-separated list of fields to order by, sorted in ascending order.
262
+ // Use "desc" after a field name for descending.
263
+ // Supported fields:
264
+ // * `update_time`
265
+ // * `create_time`
266
+ // * `conversation_name`
267
+ //
268
+ // Example:
269
+ // "update_time desc"
270
+ // "create_time"
271
+ string order_by = 5;
272
+ }
273
+
274
+ // Response for ListConversations method.
275
+ message ListConversationsResponse {
276
+ // All the Conversations for a given data store.
277
+ repeated Conversation conversations = 1;
278
+
279
+ // Pagination token, if not returned indicates the last page.
280
+ string next_page_token = 2;
281
+ }
@@ -59,8 +59,11 @@ message Document {
59
59
 
60
60
  // The MIME type of the content. Supported types:
61
61
  //
62
- // * `application/pdf` (PDF)
62
+ // * `application/pdf` (PDF, only native PDFs are supported for now)
63
63
  // * `text/html` (HTML)
64
+ // * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
65
+ // * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
66
+ // * `text/plain` (TXT)
64
67
  //
65
68
  // See https://www.iana.org/assignments/media-types/media-types.xhtml.
66
69
  string mime_type = 1;
@@ -72,14 +75,12 @@ message Document {
72
75
  // be provided otherwise an `INVALID_ARGUMENT` error is thrown.
73
76
  oneof data {
74
77
  // The structured JSON data for the document. It should conform to the
75
- // registered
76
- // [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an
78
+ // registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
77
79
  // `INVALID_ARGUMENT` error is thrown.
78
80
  google.protobuf.Struct struct_data = 4;
79
81
 
80
82
  // The JSON string representation of the document. It should conform to the
81
- // registered
82
- // [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an
83
+ // registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
83
84
  // `INVALID_ARGUMENT` error is thrown.
84
85
  string json_data = 5;
85
86
  }
@@ -189,7 +189,8 @@ message ListDocumentsRequest {
189
189
  // Use `default_branch` as the branch ID, to list documents under the default
190
190
  // branch.
191
191
  //
192
- // If the caller does not have permission to list [Documents][]s under this
192
+ // If the caller does not have permission to list
193
+ // [Document][google.cloud.discoveryengine.v1beta.Document]s under this
193
194
  // branch, regardless of whether or not this branch exists, a
194
195
  // `PERMISSION_DENIED` error is returned.
195
196
  string parent = 1 [