// M-Files Server gRPC API 26.11. Generated from the M-Files Server IDL; do not edit.
// Documentation: https://developer.m-files.com/APIs/gRPC-API/
syntax = "proto3";

package MFiles;

import "mfiles/api/annotations.proto";
import "mfiles/enums.proto";
import "mfiles/structs.proto";

option csharp_namespace = "MFiles.Grpc";
option go_package = "github.com/M-Files/mfiles-grpc-api/go/mfiles;mfiles";
option java_multiple_files = true;
option java_package = "com.mfiles.grpc";
option objc_class_prefix = "MF_";

// An interface for performing searches.
//
// All search operations can be done via this interface.
//
// Use this service to find objects by conditions, to count them, and to browse views the way the
// M-Files clients do.
//
// | Job | Method |
// | --- | --- |
// | Find objects that match conditions | [SearchObjects](mfiles:MFiles.IRPCSearch.SearchObjects) |
// | Count matching objects without fetching them | [GetObjectCountInSearch](mfiles:MFiles.IRPCSearch.GetObjectCountInSearch) |
// | Browse views, view levels and their objects | [GetFolderContents](mfiles:MFiles.IRPCSearch.GetFolderContents) |
// | Facet counts for a full-text search UI | [GetFacetValues](mfiles:MFiles.IRPCSearch.GetFacetValues) |
//
// The other methods serve specific M-Files client features (hit highlighting, listing counts,
// notification badges, pinboard, Aino Search and summaries).
//
// **Condition model.** A search is a [SearchConditionArray](mfiles:MFiles.SearchConditionArray);
// all of its conditions must match (AND). `SearchObjects` and `GetObjectCountInSearch` accept
// exactly one array: an empty request or two or more arrays fail with "The parameter is incorrect."
// To match one of several values of a lookup, use `CONDITION_TYPE_EQUAL` with a multi-select lookup
// value that lists them; for other OR cases, run one search per alternative.
// An array with no conditions matches every object the caller can see.
//
// **What a search returns.**
//
// - Only objects the caller is allowed to see: the same search returns fewer objects for a normal
//   user than for a vault administrator.
// - Deleted objects too, for callers who may see deleted objects (vault administrators, for
//   example), unless the array contains the "not deleted" condition: a `STATUS_TYPE_IS_DELETED`
//   status value `CONDITION_TYPE_EQUAL` to Boolean `false`. Add it to every search.
// - One version per object: the latest checked-in version, or the checked-out version when the
//   object is checked out to the caller.
// - Object and version information without the property values. Read the properties with
//   [GetObjectVersionAndPropertiesOfMultipleObjects](mfiles:MFiles.IRPCObjectOperations.GetObjectVersionAndPropertiesOfMultipleObjects).
//
// **Limits and timeouts.** In `SearchObjects`, `limit` and `timeout_in_seconds` left at 0 mean no
// limit and no timeout; the server does not apply a default. Set both. A vault administrator can
// configure forced maxima that cap both values. `GetObjectCountInSearch` counts up to 10,000
// objects by default and reports larger counts as "more than".
//
// **Errors.** Search errors arrive with gRPC status `UNKNOWN` and the M-Files error message as the
// status details, for example "Invalid search condition." for a condition the server cannot
// evaluate.
//
// The [Search concept](https://developer.m-files.com/APIs/gRPC-API/concepts/search/) shows the
// conditions you need most as complete messages, and the
// [paging guide](https://developer.m-files.com/APIs/gRPC-API/guides/paging/) reads a large result
// set page by page.
service IRPCSearch {
	option (mfiles.api.service) = { book: "vault" level: LEVEL_CORE title: "Search" };

	// Gets the count of objects in the specified folder.
	//
	// Used by the M-Files clients to show object counts in folder listings. To count the results of a
	// search, use [GetObjectCountInSearch](mfiles:MFiles.IRPCSearch.GetObjectCountInSearch).
	rpc GetFolderObjectsCount( GetFolderObjectsCountRequest ) returns ( GetFolderObjectsCountResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Retrieves the facet values for the documents that satisfy the specified search conditions.
	//
	// For search UIs that show facets (refiners) next to full-text search results. Facets are computed
	// only when the vault's search index supports them (not with a dtSearch index) and the search has
	// exactly one full-text (any-field) condition. Otherwise the call succeeds with empty `data`. The
	// `data` string uses an
	// internal format that the M-Files clients read; it is not described here.
	rpc GetFacetValues( GetFacetValuesRequest ) returns ( GetFacetValuesResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Finds the words of a text that a full-text search condition matches, for hit highlighting.
	//
	// `search_condition` must be an `EXPRESSION_TYPE_ANY_FIELD` condition with `CONDITION_TYPE_CONTAINS`
	// and a text value; anything else fails with "The parameter is incorrect." The server always
	// matches any of the search words, also for an all-words or Boolean search. `hits` lists the matched
	// words as they appear in `input`, for example "invoices" for the search word "invoice".
	rpc GetSearchHits( GetSearchHitsRequest ) returns ( GetSearchHitsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Counts the objects that match the given conditions without returning them.
	//
	// Takes the same conditions as [SearchObjects](mfiles:MFiles.IRPCSearch.SearchObjects) and counts
	// the same objects: latest versions the caller can see, deleted objects included unless excluded by a
	// condition. The result is one count for all object types together. The count stops at 10,000 by
	// default (a vault setting); a larger count is reported with `SRCOUNTFLAGS.more_than`. No search
	// timeout is applied.
	rpc GetObjectCountInSearch( GetObjectCountInSearchRequest ) returns ( GetObjectCountInSearchResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Gets value list items that are referenced by one or more documents (possibly limiting the set of documents with conditions) in ID order.
	//
	// Returns the items of `value_list` that at least one matching object refers to, in ascending ID
	// order, `batch_size` items at a time. For the next batch, pass the ID of the last item received
	// in `last_received_item_id`. Only the first condition array in `utf8szconds` is used.
	rpc SearchReferencedValueListItems( SearchReferencedValueListItemsRequest ) returns ( SearchReferencedValueListItemsResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets the property values that a new object created in the given folder gets from that folder.
	//
	// Used by the M-Files clients to prefill the metadata card when the user creates an object in a
	// view or grouping folder.
	rpc GetPrefillProperties( GetPrefillPropertiesRequest ) returns ( GetPrefillPropertiesResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets the objects count for notification badge.
	//
	// Used by the M-Files clients for notification badges: the counts of the caller's "Assigned to Me"
	// and "Checked Out to Me" views.
	rpc GetObjectsCountForNotifications( GetObjectsCountForNotificationsRequest ) returns ( GetObjectsCountForNotificationsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION };
	}

	// Gets the contents of the Pinboard items.
	//
	// Used by the M-Files clients to show the caller's pinned items.
	rpc GetFolderContentsOfPinboard( GetFolderContentsOfPinboardRequest ) returns ( GetFolderContentsOfPinboardResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Searches the vault for objects that match the given conditions.
	//
	// Results are filtered by the caller's permissions. See the service overview for the condition
	// model and for what a result contains.
	//
	// **Order.** Without `sorting`, results are ranked by relevance (`SearchResultsItem.score`);
	// `SearchFlags.disable_relevancy_ranking` turns ranking off. `sorting` takes one rule; see
	// [SortRule](mfiles:MFiles.SortRule) for the supported keys.
	//
	// **Paging.** `page_requests` is not supported. To read a large result set in pages, sort by
	// object ID (sort key -102, ascending) and repeat the search with an extra
	// `STATUS_TYPE_OBJECT_ID` condition `CONDITION_TYPE_GREATER_THAN` the last object ID received,
	// until `has_more_results` is false. This works with database conditions only: object ID sorting
	// cannot be combined with a full-text (any-field) condition.
	//
	// **Full-text search.** Add an `EXPRESSION_TYPE_ANY_FIELD` condition with `CONDITION_TYPE_CONTAINS`
	// and a text value. Its [FTSFLAGS](mfiles:MFiles.FTSFLAGS) must set `search_metadata`,
	// `search_filedata` or both; without either the call fails with "Invalid search condition.", and an
	// empty text fails with "The search request contained no text".
	//
	// **Aino (semantic) search.** Setting `FTSFLAGS.search_aino` on the any-field condition runs the
	// search against the vault's enabled Aino index; `target` is then ignored. If the vault has no
	// enabled Aino index, the call fails with "An enabled Aino index must be present to make an Aino
	// Search." An Aino result carries the object ID, the title, one file ID, `score` and the matching
	// text passage in `chunk`. The other fields of `object` are not filled: Aino results do not carry
	// the class (`class_id` 0 does not mean the Document class) or the object version, and the file
	// version is reported as 1. Read the object with
	// [GetObjectVersionAndPropertiesOfMultipleObjects](mfiles:MFiles.IRPCObjectOperations.GetObjectVersionAndPropertiesOfMultipleObjects)
	// before using those values. An Aino search that also has a `STATUS_TYPE_OBJECT_TYPE` condition
	// returns no results; filter by class or properties instead.
	rpc SearchObjects( SearchObjectsRequest ) returns ( SearchObjectsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Gets the contents of the specified folder, or a delta that indicates changes to document vault data since the logical timestamp known by the caller.
	//
	// Used by the M-Files clients to refresh a cached folder listing. For a plain listing, use
	// [GetFolderContents](mfiles:MFiles.IRPCSearch.GetFolderContents).
	rpc GetFolderContentsOrDelta( GetFolderContentsOrDeltaRequest ) returns ( GetFolderContentsOrDeltaResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Lists the contents of a view or a view level: subviews, grouping folders and objects.
	//
	// This is how the M-Files clients browse views. `path` is the folder location from the vault root:
	//
	// 1. An empty `path` lists the root: `view_folders` holds the views the caller can see.
	// 2. Append a `FOLDER_TYPE_VIEW_FOLDER` folder with a view ID to list that view. A view can contain
	//    subviews (`view_folders`), grouping levels (`property_folders`), objects, or a mix. A view
	//    nested in another view can also be listed without its parent view in `path`.
	// 3. To open a grouping folder, append a `FOLDER_TYPE_PROPERTY_FOLDER` folder whose `typed_value` is
	//    the [TypedValue](mfiles:MFiles.TypedValue) returned in `property_folders`, unchanged.
	//
	// Results are filtered by the caller's permissions. To find objects by conditions, use
	// [SearchObjects](mfiles:MFiles.IRPCSearch.SearchObjects) instead.
	rpc GetFolderContents( GetFolderContentsRequest ) returns ( GetFolderContentsResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true highlighted: true };
	}

	// Runs an Aino Search query for the M-Files clients.
	//
	// The request and response are text documents in a format internal to the M-Files clients. The call
	// requires Aino Search to be enabled on the server.
	rpc QuerySearchAgent( QuerySearchAgentRequest ) returns ( QuerySearchAgentResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// Creates an Aino summary for the M-Files clients.
	//
	// The request and response are text documents in a format internal to the M-Files clients. The call
	// fails with "Your current subscription does not include the specified feature." when Aino
	// summarization is not available for the vault.
	rpc CreateSummarization( CreateSummarizationRequest ) returns ( CreateSummarizationResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}

	// The search covers the folders that the listing of the level would show without the folder limit. The
	// results can be saved as part of the user's folder selection. Fails with E_NOTIMPL when the feature is
	// not enabled on the server.
	rpc SearchViewLevelFolders( SearchViewLevelFoldersRequest ) returns ( SearchViewLevelFoldersResponse ) {
		option idempotency_level = IDEMPOTENT;
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION_OR_ASSERTION returns_metadata_structure_version: true };
	}
}

// The request of GetFolderObjectsCount.
message GetFolderObjectsCountRequest {

	// The importance level of this call. Typically CALL_IMPORTANCE_NORMAL.
	CallImportance callimp = 1;

	// Search options.
	SearchTarget search_options = 2;

	// Describes the parent folder.
	repeated Folder parent = 3;

	// Facet search flags. Ignored if bFacetMode is false.
	FACETSEARCHFLAGS facetsearchflags = 4;

	// Search results count requests.
	repeated SearchResultsCountRequest srcrequestarr = 5;

	// The OT specific limit for object count.
	uint32 max_objects_limit_for_groups = 6;

	// If set, specifies the additional facet search filter.
	StringValue facet_filter = 7;
}

// The response of GetFolderObjectsCount.
message GetFolderObjectsCountResponse {

	// Resulting search results counts.
	repeated SearchResultsCount psrcountarr = 1;

	// Receives search status flags.
	SEARCHSTATUSFLAGS psearchstatusflags = 2;

	// Additional information about the completed search operation.
	SearchOutputInfo search_output_info = 3;
}

// The request of GetFacetValues.
message GetFacetValuesRequest {

	// Search options.
	SearchTarget search_options = 1;

	// Exactly one condition array; all of its conditions must match. No array or more than one array fails with "Invalid search condition."
	repeated SearchConditionArray search_condition_arrays = 2;

	// The facets to compute, as expressions; for example an `EXPRESSION_TYPE_PROPERTY_VALUE` expression for property 100 (Class).
	repeated Expression facets_requested = 3;

	// The maximum number of facet values returned for each facet. Use 0 to retrieve all facet values.
	uint32 max_facet_values_count = 4;

	// Facet search flags. Ignored if bFacetMode is false.
	FACETSEARCHFLAGS facetsearchflags = 5;

	// If set, specifies the additional facet search filter.
	StringValue facet_filter = 6;
}

// The response of GetFacetValues.
message GetFacetValuesResponse {

	// Receives the facet values as string data. Use CData_FacetValues to inspect the data.
	string data = 1;

	// Receives search status flags.
	SEARCHSTATUSFLAGS psearchstatusflags = 2;

	// Additional information about the completed search operation.
	SearchOutputInfo search_output_info = 3;
}

// The request of GetSearchHits.
message GetSearchHitsRequest {

	// Search options.
	SearchTarget search_options = 1;

	// The source text for searching.
	string input = 2;

	// The full-text search condition that specifies the search words (Represented by SearchCondition sturct).
	SearchCondition search_condition = 3;
}

// The response of GetSearchHits.
message GetSearchHitsResponse {

	// Receives the hit strings.
	repeated string hits = 1;

	// Additional information about the completed search operation.
	SearchOutputInfo search_output_info = 2;
}

// The request of GetObjectCountInSearch.
message GetObjectCountInSearchRequest {

	// The importance level of this call. Typically `CALL_IMPORTANCE_NORMAL`.
	CallImportance callimp = 1;

	// The search index and search mode. Leave unset for the vault's default index.
	SearchTarget search_options = 2;

	// Exactly one condition array; all of its conditions must match. No array or more than one array fails with "The parameter is incorrect."
	repeated SearchConditionArray search_condition_arrays = 3;

	// Search flags. `look_in_all_versions` and `return_latest_visible_version` are not supported and fail with "Invalid search condition."
	SearchFlags searchflags = 4;
}

// The response of GetObjectCountInSearch.
message GetObjectCountInSearchResponse {

	// One count, with `group_id` -100 (all object types). `flags.exact_measure` means `count` is exact; `flags.more_than` means more objects match than `count`.
	repeated SearchResultsCount psrcountarr = 1;

	// Additional information about the completed search operation.
	SearchOutputInfo search_output_info = 2;
}

// The request of SearchReferencedValueListItems.
message SearchReferencedValueListItemsRequest {

	// ID of the valuelist.
	int32 value_list = 1;

	// The last valuelist item id that was received by the client. 0 for first call.
	uint32 last_received_item_id = 2;

	// The maximum number of items to return. Set a value greater than 0: a request with 0 returns no items.
	uint32 batch_size = 3;

	// The conditions that the referring objects must match. Only the first condition array is used; all of its conditions must match.
	repeated SearchConditionArray utf8szconds = 4;
}

// The response of SearchReferencedValueListItems.
message SearchReferencedValueListItemsResponse {

	// Resulting valuelist items.
	repeated ValueListItem pvlitems = 1;
}

// The request of GetPrefillProperties.
message GetPrefillPropertiesRequest {

	// Target object type.
	int32 object_type = 1;

	// Describes the parent folder.
	repeated Folder value = 2;
}

// The response of GetPrefillProperties.
message GetPrefillPropertiesResponse {

	// List of prefill properties.
	repeated PropertyValue propertyvaluearray = 1;
}

// The request of GetObjectsCountForNotifications.
message GetObjectsCountForNotificationsRequest {

	// Notification data request flags.
	NOTIFICATIONDATAREQUESTFLAGS notification_data_request_flags = 1;

	// Search flags. Supports 'INCLUDE_UNMANAGED_OBJECTS' flag only.
	SearchFlags search_flags = 2;
}

// The response of GetObjectsCountForNotifications.
message GetObjectsCountForNotificationsResponse {

	// Objects count from "Assigned to me" view.
	uint32 assigned_to_me_objects_count = 1;

	// Number of checked out objects by current user from the current computer.
	uint32 checked_out_to_me_objects_count_on_this_computer = 2;

	// Objects count from "Checkedout to me" view.
	uint32 checked_out_to_me_objects_count = 3;
}

// The request of GetFolderContentsOfPinboard.
message GetFolderContentsOfPinboardRequest {

	// Requested max results. If this is 0, it should be ignored.
	uint32 max_results = 1;

	// True if parent location of the property and traditional folders to be included in the result.
	bool include_parent = 2;
}

// The response of GetFolderContentsOfPinboard.
message GetFolderContentsOfPinboardResponse {

	// Resulting views.
	repeated ViewWithParentLocation view_folders_with_parent_location = 1;

	// Resulting property folders.
	repeated PropertyFolderWithParent property_folders_with_parent_location = 2;

	// Resulting traditional folders.
	repeated TraditionalFolderWithParent traditional_folders_with_parent_location = 3;

	// Resulting objects.
	repeated PinnedObject objects = 4;

	// External views. ( Represented by ExternalViewWithParentLocation struct 0
	repeated ExternalViewWithParentLocation external_folders_with_parent_location = 5;

	// Are there more property folders? Currently it is false. It will be implemented in future.
	bool more_property_folders = 6;

	// Are there more objects? Currently it is false. It will be implemented in future.
	bool more_objects = 7;

	// Are there more external view folders? Currently it is false. It will be implemented in future.
	bool more_external_folders = 8;

	// Receives the list of item group identifications IDs the results of which were limited. The group identification ID depends on how the search results were grouped. E.g. object type ID.Currently it is not carrying any data. It will be implemented in future.
	repeated int32 limited_item_groups = 9;

	// Additional information about the completed search operation.Currently it is not carrying any data. It will be implemented in future.
	SearchOutputInfo search_output_info = 10;
}

// The request of SearchObjects.
message SearchObjectsRequest {

	// The importance level of this call. Typically `CALL_IMPORTANCE_NORMAL`.
	CallImportance call_importance = 1;

	// The search index and search mode. Leave unset to use the vault's default index and `SEARCH_MODE_DEFAULT`. An unknown index name fails with "Target index is not available."
	SearchTarget target = 2;

	// Exactly one condition array; all of its conditions must match. An empty array matches every object the caller can see, deleted objects included. No array or more than one array fails with "The parameter is incorrect."
	repeated SearchConditionArray conditions = 3;

	// Search flags. Unset searches the latest versions of all object types as one relevance-ranked list. See [SearchFlags](mfiles:MFiles.SearchFlags).
	SearchFlags options = 4;

	// Not supported. Must be empty; otherwise the call fails with "Not implemented."
	repeated SearchResultsPageRequest page_requests = 5;

	// The maximum number of results. 0 means no limit: the server does not apply a default, only a maximum that the vault administrator may have configured. With `separately_search_in_each_object_type` the limit applies to each object type, and the values 200 and 500 select the server default of 50 results per object type. With `sorting` and 0, at most 20,000 results (a vault setting) are sorted.
	uint32 limit = 6;

	// The search timeout in seconds. 0 means no timeout. A maximum configured for the vault caps larger values and replaces 0. A search that times out fails.
	uint32 timeout_in_seconds = 7;

	// If set, specifies the additional facet search filter.
	StringValue facet_filter = 8;

	// How to sort the results. Unset sorts by relevance. At most one rule; see [SearchResultsSorting](mfiles:MFiles.SearchResultsSorting).
	SearchResultsSorting sorting = 9;
}

// The response of SearchObjects.
message SearchObjectsResponse {

	// The matching objects, at most `limit`. Each item has the object and version information but not the property values.
	repeated SearchResultsItem results = 1;

	// True if more objects match than were returned.
	bool has_more_results = 2;

	// With `separately_search_in_each_object_type`, the object type IDs whose results were cut by `limit`. Otherwise empty.
	repeated int32 pages_with_more_results = 3;

	// Timing information for diagnostics.
	SearchOutputInfo search_execution_info = 4;

	// Search status flags, for example `resorted_to_default_sort` when the requested sorting was replaced by relevance order.
	SEARCHSTATUSFLAGS options = 5;
}

// The request of GetFolderContentsOrDelta.
message GetFolderContentsOrDeltaRequest {

	// The importance level of this call. Typically CALL_IMPORTANCE_NORMAL.
	CallImportance callimp = 1;

	// Search options.
	SearchTarget search_options = 2;

	// Describes the parent folder.
	repeated Folder parent = 3;

	// If not empty, specifies search results page requests.
	repeated SearchResultsPageRequest results_page_requests = 4;

	// The vault content version ID currently known by the caller. If the vault content has not been updated since, *pi64CurrentVCVersionOnServer is set to this same number and no data is returned. Specify zero to force the retrieval of normal folder contents. When this is zero, the server never returns an appropriate delta.
	int64 callers_current_vcversion = 5;

	// True if the caller allows returning a delta (changes to the vault content).
	bool allow_returning_delta = 6;

	// Specifies an upper change limit for returning a delta. If changes are no more than this limit, a delta can be returned.
	uint32 upper_change_limit_for_delta = 7;

	// Requested max results. If this is 0, it should be ignored.
	uint32 max_results = 8;

	// If set, specifies the additional facet search filter.
	StringValue facet_filter = 9;

	// If not empty, specifies how search results are being sorted.
	SearchResultsSorting sorting = 10;
}

// The response of GetFolderContentsOrDelta.
message GetFolderContentsOrDeltaResponse {

	// Receives the current vault content version on the server. If this is the same as the one specified by the caller, no delta data is returned. However a full folder content can be returned to refresh the single folder.
	int64 current_vcversion_on_server = 1;

	// Views or delta.
	ViewsOrDelta views_or_delta = 2;

	// Property folders or delta.
	PropertyFoldersOrDelta property_folders_or_delta = 3;

	// Traditional folders or delta.
	TraditionalFoldersOrDelta traditional_folders_or_delta = 4;

	// Objects or delta.
	ObjectsOrDelta objects_or_delta = 5;

	// Value list items delta. Valid only if a delta is returned for objects.
	ValueListItemsDelta vl_items_delta = 6;

	// External views or delta.
	repeated ExternalView json_external_view_folders_or_delta = 7;

	// Are there more property folders?
	bool more_property_folders = 8;

	// The maximum property folders allowed. The server used this value to limit the returned property folders. If zero, the limit is infinite.
	uint32 max_property_folders_limit = 9;

	// Are there more objects?
	bool more_objects = 10;

	// The maximum objects allowed. The server used this value to limit the returned objects. If zero, the limit is infinite.
	uint32 max_objects_limit = 11;

	// Are there more external views?
	bool more_external_view_folders = 12;

	// The maximum external views allowed. The server used this value to limit the returned objects. If zero, the limit is infinite.
	uint32 max_external_view_folders_limit = 13;

	// Receives search status flags.
	SEARCHSTATUSFLAGS psearchstatusflags = 14;

	// Additional information about the completed search operation.
	SearchOutputInfo search_output_info = 15;
}

// A request structure for GetFolderContents RPC call. It contains all request data.
message GetFolderContentsRequest {

	// The importance level of this call. Typically CALL_IMPORTANCE_NORMAL.
	CallImportance call_importance = 1;

	// Search options.
	SearchTarget target = 2;

	// The folder location from the vault root, one [Folder](mfiles:MFiles.Folder) per level. Empty lists the vault root.
	repeated Folder path = 3;

	// If not empty, specifies search results page requests.
	repeated SearchResultsPageRequest page_requests = 4;

	// The maximum number of objects to return; 0 leaves the limit to the server. `has_more_objects` tells whether more objects exist.
	uint32 limit = 5;

	// If set, specifies the additional facet search filter.
	StringValue facet_filter = 6;

	// If not empty, specifies how search results are being sorted.
	SearchResultsSorting sorting = 7;

	// True to also return the user's selected folders of the level in selectedPropertyFolders. Ignored when the folder selection is not available. If the selected folders cannot be listed, for example because the search times out, the whole call fails; retry without includeSelectedFolders.
	bool include_selected_folders = 8;

	// With includeSelectedFolders, true to skip the normal property folder listing. Ignored without includeSelectedFolders.
	bool selected_folders_only = 9;
}

// A response structure for GetFolderContents RPC call. It contains all response data.
message GetFolderContentsResponse {

	// Resulting views array.
	repeated View view_folders = 1;

	// Resulting property folders array.
	repeated TypedValue property_folders = 2;

	// Resulting traditional folders array.
	repeated Lookup traditional_folders = 3;

	// Resulting objects array.
	repeated SearchResultsItem objects = 4;

	// Reulsting external views array.
	repeated ExternalView external_repository_folders = 5;

	// Are there more property folders?
	bool has_more_property_folders = 6;

	// Are there more objects?
	bool has_more_objects = 7;

	// Are there more external view folders?
	bool has_more_external_repository_folders = 8;

	// The list of item group identifications IDs the results of which were limited. The group identification ID depends on how the search results were grouped. E.g. object type ID.
	repeated int32 pages_with_more_results = 9;

	// Additional information about the completed search operation.
	SearchOutputInfo search_execution_info = 10;

	// Search status flags.
	SEARCHSTATUSFLAGS options = 11;

	// Continuation token for paginating search results for objects from Master Storage.
	string objects_continuation_token = 12;

	// True if there are additional results that can't be counted in advance.
	bool has_additional_results = 13;

	// The user's still valid selected property folders of the level, in no particular order. Filled only when includeSelectedFolders was requested.
	repeated TypedValue selected_property_folders = 14;

	// The effective limit of the property folders of the level, which is also the folder selection limit. Zero means no limit, or that the folder selection is not available or the folder does not list a view level. Use canHaveSelectedFolders to tell if the level can hold a selection.
	uint32 max_property_folders_limit = 15;

	// True when the folders of the level can be selected.
	bool can_have_selected_folders = 16;
}

// QuerySearchAgentRequest method structure.
message QuerySearchAgentRequest {

	// The query in JSON.
	string query = 1;
}

// QuerySearchAgentResponse method structure.
message QuerySearchAgentResponse {

	// The response in JSON.
	string response = 1;
}

// CreateSummarizationRequest method structure.
message CreateSummarizationRequest {

	// The request in JSON.
	string data = 1;
}

// CreateSummarizationResponse method structure.
message CreateSummarizationResponse {

	// The response in JSON.
	string data = 1;
}

// Searches the folders of one view level by name. The search covers every folder that the listing of the level would
// show without the folder limit, including the folders beyond it.
message SearchViewLevelFoldersRequest {

	// The folder location, from the vault root to the parent of the level whose folders are searched. The same path that the listing of the level uses.
	repeated Folder folder_location = 1;

	// The text that the folder names must contain, ignoring letter case. At most 100 characters. Empty matches every folder.
	string search_text = 2;

	// The maximum number of results. Zero means 100. The value is clamped to 1-500.
	uint32 limit = 3;
}

// A structure that specifies the response type for the SearchViewLevelFolders method.
message SearchViewLevelFoldersResponse {

	// The matching folders, at most the requested limit, sorted by name ignoring case and diacritics, with numbers in numeric order.
	repeated ViewLevelFolderSearchResult results = 1;

	// True when more folders match than were returned, or when the level has more folders than the search goes through. Narrowing the search text does not reveal the folders beyond that cap.
	bool has_more_results = 2;
}
