trevstack/proto/user/v1/user.proto
2025-03-23 14:33:25 -04:00

53 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
package user.v1;
message User {
uint32 id = 1;
string username = 2;
optional string profile_picture = 3;
}
service UserService {
rpc GetUser (GetUserRequest) returns (GetUserResponse) {}
rpc UpdatePassword (UpdatePasswordRequest) returns (UpdatePasswordResponse) {}
rpc GetAPIKey (GetAPIKeyRequest) returns (GetAPIKeyResponse) {}
rpc UpdateProfilePicture (UpdateProfilePictureRequest) returns (UpdateProfilePictureResponse) {}
rpc CreatePasskey (CreatePasskeyRequest) returns (CreatePasskeyResponse) {}
}
message GetUserRequest {}
message GetUserResponse {
User user = 1;
}
message UpdatePasswordRequest {
string old_password = 1;
string new_password = 2;
string confirm_password = 3;
}
message UpdatePasswordResponse {
User user = 1;
}
message GetAPIKeyRequest {
string password = 1;
string confirm_password = 2;
}
message GetAPIKeyResponse {
string key = 1;
}
message UpdateProfilePictureRequest {
string file_name = 1;
bytes data = 2;
}
message UpdateProfilePictureResponse {
User user = 1;
}
message CreatePasskeyRequest {
string id = 1;
bytes public_key = 2;
}
message CreatePasskeyResponse {}