@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
2020import "google/api/client.proto" ;
2121import "google/api/field_behavior.proto" ;
2222import "google/api/resource.proto" ;
23+ import "google/cloud/dialogflow/v2/gcs.proto" ;
2324import "google/longrunning/operations.proto" ;
2425import "google/protobuf/field_mask.proto" ;
2526import "google/protobuf/timestamp.proto" ;
@@ -183,6 +184,30 @@ service Documents {
183184 metadata_type : "KnowledgeOperationMetadata"
184185 };
185186 }
187+
188+ // Exports a smart messaging candidate document into the specified
189+ // destination.
190+ //
191+ // This method is a [long-running
192+ // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
193+ // The returned `Operation` type has the following method-specific fields:
194+ //
195+ // - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
196+ // - `response`: [Document][google.cloud.dialogflow.v2.Document]
197+ rpc ExportDocument (ExportDocumentRequest ) returns (google.longrunning.Operation ) {
198+ option (google.api.http ) = {
199+ post : "/v2/{name=projects/*/knowledgeBases/*/documents/*}:export"
200+ body : "*"
201+ additional_bindings {
202+ post : "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:export"
203+ body : "*"
204+ }
205+ };
206+ option (google.longrunning.operation_info ) = {
207+ response_type : "Document"
208+ metadata_type : "KnowledgeOperationMetadata"
209+ };
210+ }
186211}
187212
188213// A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase].
@@ -328,6 +353,29 @@ message ListDocumentsRequest {
328353
329354 // The next_page_token value returned from a previous list request.
330355 string page_token = 3 ;
356+
357+ // The filter expression used to filter documents returned by the list method.
358+ // The expression has the following syntax:
359+ //
360+ // <field> <operator> <value> [AND <field> <operator> <value>] ...
361+ //
362+ // The following fields and operators are supported:
363+ //
364+ // * knowledge_types with has(:) operator
365+ // * display_name with has(:) operator
366+ // * state with equals(=) operator
367+ //
368+ // Examples:
369+ //
370+ // * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
371+ // * "display_name:customer" matches documents whose display name contains
372+ // "customer".
373+ // * "state=ACTIVE" matches documents with ACTIVE state.
374+ // * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
375+ //
376+ // For more information about filtering, see
377+ // [API Filtering](https://aip.dev/160).
378+ string filter = 4 ;
331379}
332380
333381// Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments].
@@ -403,6 +451,41 @@ message ReloadDocumentRequest {
403451 // the form `gs://<bucket-name>/<object-name>`.
404452 string content_uri = 3 [(google.api.field_behavior ) = OPTIONAL ];
405453 }
454+
455+ // Optional. Whether to import custom metadata from Google Cloud Storage.
456+ // Only valid when the document source is Google Cloud Storage URI.
457+ bool import_gcs_custom_metadata = 4 [(google.api.field_behavior ) = OPTIONAL ];
458+
459+ // Optional. When enabled, the reload request is to apply partial update to the smart
460+ // messaging allowlist.
461+ bool smart_messaging_partial_update = 5 [(google.api.field_behavior ) = OPTIONAL ];
462+ }
463+
464+ // Request message for [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument].
465+ message ExportDocumentRequest {
466+ // Required. The name of the document to export.
467+ // Format: `projects/<Project ID>/locations/<Location
468+ // ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
469+ string name = 1 [
470+ (google.api.field_behavior ) = REQUIRED ,
471+ (google.api.resource_reference ) = {
472+ type : "dialogflow.googleapis.com/Document"
473+ }
474+ ];
475+
476+ // Required. The destination for the export.
477+ oneof destination {
478+ // Cloud Storage file path to export the document.
479+ GcsDestination gcs_destination = 2 ;
480+ }
481+
482+ // When enabled, export the full content of the document including empirical
483+ // probability.
484+ bool export_full_content = 3 ;
485+
486+ // When enabled, export the smart messaging allowlist document for partial
487+ // update.
488+ bool smart_messaging_partial_update = 5 ;
406489}
407490
408491// Metadata in google::longrunning::Operation for Knowledge operations.
0 commit comments