// 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/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_";

// Passes "open this file in a desktop application" tasks from M-Files Web to M-Files Web Companion.
//
// This interface provides ability to store task for web companion.
//
// **For M-Files components only.** M-Files Web and M-Files Web Companion use this service to open
// vault files in native desktop applications. Applications should not call it.
service IRPCWebCompanionTaskOperation {
	option (mfiles.api.service) = { book: "integration" level: LEVEL_SPECIALIZED title: "Web companion tasks" };

	// Stores a task for M-Files Web Companion and returns the task ID.
	//
	// **For M-Files components only.** M-Files Web calls it before handing a file over to M-Files Web
	// Companion. Applications should not call it.
	rpc AddWebCompanionTask( AddWebCompanionTaskRequest ) returns ( AddWebCompanionTaskResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_SESSION internal: true };
	}

	// Gets a task that M-Files Web stored for M-Files Web Companion.
	//
	// **For M-Files components only.** M-Files Web Companion calls it to pick up a task that M-Files
	// Web stored. Applications should not call it.
	rpc GetWebCompanionTask( GetWebCompanionTaskRequest ) returns ( GetWebCompanionTaskResponse ) {
		option (mfiles.api.method) = { session: SESSION_REQUIREMENT_NONE internal: true };
	}
}

// The request of AddWebCompanionTask.
message AddWebCompanionTaskRequest {

	// The Web Companion Task information.
	WebCompanionTask add_web_companion_request = 1;
}

// The response of AddWebCompanionTask.
message AddWebCompanionTaskResponse {

	// The ID of the stored task.
	int64 id = 1;
}

// The request of GetWebCompanionTask.
message GetWebCompanionTaskRequest {

	// Web Companion Task information.
	WebCompanionFetchTask get_web_companion_request = 1;
}

// The response of GetWebCompanionTask.
message GetWebCompanionTaskResponse {

	// For M-Files Web Companion.
	bytes id = 1;

	// The stored task.
	WebCompanionTaskInfo web_companion_task_info = 2;
}
