syntax = "proto3"; import "google/protobuf/timestamp.proto"; option go_package = "git.anthrove.art/anthrove/plug-[REPLACE_ME]/api/gRPC"; service PlugConnector { rpc TaskStart(PlugTaskCreation) returns (PlugTaskStatus); rpc TaskStatus(PlugTask) returns (PlugTaskStatus); rpc TaskCancel(PlugTask) returns (PlugTaskStatus); rpc Ping(PingRequest) returns (PongResponse); // Added Ping endpoint rpc SendMessage(SendMessageRequest) returns (SendMessageResponse); rpc GetUserMessages(GetMessagesRequest) returns (GetMessagesResponse); } message PingRequest { string message = 1; // Optional message field, can be removed if not needed google.protobuf.Timestamp timestamp = 2; } message PongResponse { string message = 1; // Optional message field, can be removed if not needed google.protobuf.Timestamp timestamp = 2; } message PlugTaskStatus { string task_id = 1; PlugTaskState task_state = 2; } enum PlugTaskState { UNKNOWN = 0; STARTED = 1; RUNNING = 2; STOPPED = 3; } message PlugTask { string task_id = 1; } message PlugTaskCreation { string user_id = 1; string user_source_name = 2; bool deep_scrape = 3; string api_key = 4; string user_source_id = 5; } message SendMessageRequest { string user_source_id = 1; string message = 2; string user_source_name = 3; } message SendMessageResponse { bool success = 1; } message GetMessagesRequest { string user_source_id = 1; string user_source_name = 2; } message GetMessagesResponse { repeated Message messages = 1; } message Message { string from_user_source_id = 1; string from_user_source_name = 2; google.protobuf.Timestamp created_at = 3; string body = 4; string title = 5; }