From 76a233dcfdb1e87c355159891fa64c64bd935e05 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Mon, 27 Apr 2026 05:44:55 +0200 Subject: [PATCH] Update account services proto Signed-off-by: Nikolai Rodionov --- proto/accounts/v1/accounts_v1.proto | 53 +++++++++++++---------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/proto/accounts/v1/accounts_v1.proto b/proto/accounts/v1/accounts_v1.proto index 6c8fe28..a62ad05 100644 --- a/proto/accounts/v1/accounts_v1.proto +++ b/proto/accounts/v1/accounts_v1.proto @@ -1,60 +1,53 @@ /// This file has messages for describing environments syntax = "proto3"; -package accounts; +package accounts.v1; import "google/protobuf/empty.proto"; -option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts"; +option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts/v1"; /** * Service for handling environments */ -service Accounts { - rpc SignUp (AccountWithPassword) returns (AccountFullWithToken) {} - rpc SignIn (AccountWithPassword) returns (AccountFullWithToken) {} - rpc ResetPassword (AccountData) returns (google.protobuf.Empty) {} - rpc NewPassword (AccountWithPasswordAndCode) returns (google.protobuf.Empty) {} - rpc IsEmailVerified (AccountData) returns (EmailVerified) {} -} - -message EmailVerified { - bool verified = 1; -} -/** - * Represents a environment UUID only - */ -message AccountId { - string id = 1; // Contour ID: UUID +service AccountsService { + rpc SignUp (SignUpRequest) returns (google.protobuf.Empty) {} + rpc SignIn (SignInRequest) returns (google.protobuf.Empty) {} + rpc ResetPassword (ResetPasswordRequest) returns (google.protobuf.Empty) {} + rpc NewPassword (NewPasswordRequest) returns (google.protobuf.Empty) {} + rpc IsEmailVerified (IsEmailVerifiedRequest) returns (IsEmailVerifiedResponse) {} } message AccountPassword { string password = 1; } - message AccountData { string name = 1; // Account name string email = 2; // Account email } -message AccountWithPassword { +message SignUpRequest { AccountData data = 1; AccountPassword password = 2; } -message AccountWithPasswordAndCode { +message SignInRequest { + AccountData data = 1; + AccountPassword password = 2; +}; + +message ResetPasswordRequest { + AccountData data = 1; +} + +message NewPasswordRequest { AccountData data = 1; AccountPassword password = 2; string code = 3; } - -message AccountFull { - AccountId id = 1; - AccountData data = 2; +message IsEmailVerifiedRequest { + AccountData data = 1; } -message AccountFullWithToken { - AccountId id = 1; - AccountData data = 2; - string token = 3; +message IsEmailVerifiedResponse { + bool verified = 1; } -