Bot controller has keys endpoints

This commit is contained in:
2025-08-23 19:52:05 +08:00
parent d9620fd6a4
commit 953bf5d4de
5 changed files with 370 additions and 16 deletions

View File

@@ -5,6 +5,7 @@ package proto;
option csharp_namespace = "DysonNetwork.Shared.Proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "account.proto";
import "file.proto";
@@ -136,15 +137,41 @@ message DeleteBotAccountResponse {
bool success = 1; // Whether the deletion was successful
}
message ApiKey {
string id = 1;
string label = 2;
string account_id = 3;
string session_id = 4;
google.protobuf.StringValue key = 5;
}
message GetApiKeyRequest {
string id = 1;
}
message ListApiKeyRequest {
string automated_id = 1;
}
message GetApiKeyBatchResponse {
repeated ApiKey data = 1;
}
message DeleteApiKeyResponse {
bool success = 1;
}
// This service should be implemented by the Pass service to handle the creation, update, and deletion of bot accounts
service BotAccountReceiverService {
// Create a new bot account
rpc CreateBotAccount(CreateBotAccountRequest) returns (CreateBotAccountResponse);
// Update an existing bot account
rpc UpdateBotAccount(UpdateBotAccountRequest) returns (UpdateBotAccountResponse);
// Delete a bot account
rpc DeleteBotAccount(DeleteBotAccountRequest) returns (DeleteBotAccountResponse);
rpc GetApiKey(GetApiKeyRequest) returns (ApiKey);
rpc ListApiKey(ListApiKeyRequest) returns (GetApiKeyBatchResponse);
rpc CreateApiKey(ApiKey) returns (ApiKey);
rpc UpdateApiKey(ApiKey) returns (ApiKey);
rpc RotateApiKey(GetApiKeyRequest) returns (ApiKey);
rpc DeleteApiKey(GetApiKeyRequest) returns (DeleteApiKeyResponse);
}