plug.proto aktualisiert

This commit is contained in:
Lennard Brinkhaus 2024-07-09 19:29:11 +00:00
parent 9cd117f2c2
commit 241db7ceab

View File

@ -9,6 +9,7 @@ service PlugConnector {
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 {
@ -42,13 +43,32 @@ message PlugTaskCreation {
string user_source_name = 2;
bool deep_scrape = 3;
string api_key = 4;
string user_name = 5;
}
message SendMessageRequest {
string user_id = 1;
string message = 2;
string user_name = 3;
}
message SendMessageResponse {
bool success = 1;
}
message GetMessagesRequest {
string user_id = 1;
string user_name = 2;
}
message GetMessagesResponse {
repeated Message messages = 1;
}
message Message {
string from_user_id = 1;
string from_user_name = 2;
google.protobuf.Timestamp created_at = 3;
string body = 4;
string title = 5;
}