Update account services proto
Some checks failed
ci/woodpecker/push/js-generate Pipeline failed
ci/woodpecker/push/go-generate Pipeline was successful
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/repo-checks Pipeline failed

Signed-off-by: Nikolai Rodionov <iam@allanger.xyz>
This commit is contained in:
2026-04-27 05:44:55 +02:00
parent 1d3ceb07da
commit 76a233dcfd

View File

@@ -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;
}