diff --git a/src/api/accounts/v1/accounts_v1_pb.ts b/src/api/accounts/v1/accounts_v1_pb.ts index 58af111..e532c0c 100644 --- a/src/api/accounts/v1/accounts_v1_pb.ts +++ b/src/api/accounts/v1/accounts_v1_pb.ts @@ -1,7 +1,7 @@ -/// This file has messages for describing environments +/// Protobuf definitions for the accounts service. // @generated by protoc-gen-es v2.12.0 with parameter "target=ts" -// @generated from file accounts/v1/accounts_v1.proto (package accounts, syntax proto3) +// @generated from file accounts/v1/accounts_v1.proto (package accounts.v1, syntax proto3) /* eslint-disable */ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; @@ -14,51 +14,12 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file accounts/v1/accounts_v1.proto. */ export const file_accounts_v1_accounts_v1: GenFile = /*@__PURE__*/ - fileDesc("Ch1hY2NvdW50cy92MS9hY2NvdW50c192MS5wcm90bxIIYWNjb3VudHMiIQoNRW1haWxWZXJpZmllZBIQCgh2ZXJpZmllZBgBIAEoCCIXCglBY2NvdW50SWQSCgoCaWQYASABKAkiIwoPQWNjb3VudFBhc3N3b3JkEhAKCHBhc3N3b3JkGAEgASgJIioKC0FjY291bnREYXRhEgwKBG5hbWUYASABKAkSDQoFZW1haWwYAiABKAkiZwoTQWNjb3VudFdpdGhQYXNzd29yZBIjCgRkYXRhGAEgASgLMhUuYWNjb3VudHMuQWNjb3VudERhdGESKwoIcGFzc3dvcmQYAiABKAsyGS5hY2NvdW50cy5BY2NvdW50UGFzc3dvcmQifAoaQWNjb3VudFdpdGhQYXNzd29yZEFuZENvZGUSIwoEZGF0YRgBIAEoCzIVLmFjY291bnRzLkFjY291bnREYXRhEisKCHBhc3N3b3JkGAIgASgLMhkuYWNjb3VudHMuQWNjb3VudFBhc3N3b3JkEgwKBGNvZGUYAyABKAkiUwoLQWNjb3VudEZ1bGwSHwoCaWQYASABKAsyEy5hY2NvdW50cy5BY2NvdW50SWQSIwoEZGF0YRgCIAEoCzIVLmFjY291bnRzLkFjY291bnREYXRhImsKFEFjY291bnRGdWxsV2l0aFRva2VuEh8KAmlkGAEgASgLMhMuYWNjb3VudHMuQWNjb3VudElkEiMKBGRhdGEYAiABKAsyFS5hY2NvdW50cy5BY2NvdW50RGF0YRINCgV0b2tlbhgDIAEoCTL2AgoIQWNjb3VudHMSSQoGU2lnblVwEh0uYWNjb3VudHMuQWNjb3VudFdpdGhQYXNzd29yZBoeLmFjY291bnRzLkFjY291bnRGdWxsV2l0aFRva2VuIgASSQoGU2lnbkluEh0uYWNjb3VudHMuQWNjb3VudFdpdGhQYXNzd29yZBoeLmFjY291bnRzLkFjY291bnRGdWxsV2l0aFRva2VuIgASQAoNUmVzZXRQYXNzd29yZBIVLmFjY291bnRzLkFjY291bnREYXRhGhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IgASTQoLTmV3UGFzc3dvcmQSJC5hY2NvdW50cy5BY2NvdW50V2l0aFBhc3N3b3JkQW5kQ29kZRoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSIAEkMKD0lzRW1haWxWZXJpZmllZBIVLmFjY291bnRzLkFjY291bnREYXRhGhcuYWNjb3VudHMuRW1haWxWZXJpZmllZCIAQkZaRGdpdGVhLmJhZGhvdXNlcGxhbnRzLm5ldC9zb2Z0cGxheWVyL3NvZnRwbGF5ZXItZ28tcHJvdG8vcGtnL2FjY291bnRzYgZwcm90bzM", [file_google_protobuf_empty]); + fileDesc("Ch1hY2NvdW50cy92MS9hY2NvdW50c192MS5wcm90bxILYWNjb3VudHMudjEiIwoPQWNjb3VudFBhc3N3b3JkEhAKCHBhc3N3b3JkGAEgASgJIioKC0FjY291bnREYXRhEgwKBG5hbWUYASABKAkSDQoFZW1haWwYAiABKAkiZwoNU2lnblVwUmVxdWVzdBImCgRkYXRhGAEgASgLMhguYWNjb3VudHMudjEuQWNjb3VudERhdGESLgoIcGFzc3dvcmQYAiABKAsyHC5hY2NvdW50cy52MS5BY2NvdW50UGFzc3dvcmQiLwoNU2lnbkluUmVxdWVzdBIMCgRjb2RlGAEgASgJEhAKCHZlcmlmaWVyGAIgASgJIj4KFFJlc2V0UGFzc3dvcmRSZXF1ZXN0EiYKBGRhdGEYASABKAsyGC5hY2NvdW50cy52MS5BY2NvdW50RGF0YSJ6ChJOZXdQYXNzd29yZFJlcXVlc3QSJgoEZGF0YRgBIAEoCzIYLmFjY291bnRzLnYxLkFjY291bnREYXRhEi4KCHBhc3N3b3JkGAIgASgLMhwuYWNjb3VudHMudjEuQWNjb3VudFBhc3N3b3JkEgwKBGNvZGUYAyABKAkiQAoWSXNFbWFpbFZlcmlmaWVkUmVxdWVzdBImCgRkYXRhGAEgASgLMhguYWNjb3VudHMudjEuQWNjb3VudERhdGEiKwoXSXNFbWFpbFZlcmlmaWVkUmVzcG9uc2USEAoIdmVyaWZpZWQYASABKAgyVwoVQWNjb3VudHNOb0F1dGhTZXJ2aWNlEj4KBlNpZ25JbhIaLmFjY291bnRzLnYxLlNpZ25JblJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiADK3AQoTQWNjb3VudHNBdXRoU2VydmljZRJeCg9Jc0VtYWlsVmVyaWZpZWQSIy5hY2NvdW50cy52MS5Jc0VtYWlsVmVyaWZpZWRSZXF1ZXN0GiQuYWNjb3VudHMudjEuSXNFbWFpbFZlcmlmaWVkUmVzcG9uc2UiABJACgxSZWZyZXNoVG9rZW4SFi5nb29nbGUucHJvdG9idWYuRW1wdHkaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiAEJJWkdnaXRlYS5iYWRob3VzZXBsYW50cy5uZXQvc29mdHBsYXllci9zb2Z0cGxheWVyLWdvLXByb3RvL3BrZy9hY2NvdW50cy92MWIGcHJvdG8z", [file_google_protobuf_empty]); /** - * @generated from message accounts.EmailVerified + * @generated from message accounts.v1.AccountPassword */ -export type EmailVerified = Message<"accounts.EmailVerified"> & { - /** - * @generated from field: bool verified = 1; - */ - verified: boolean; -}; - -/** - * Describes the message accounts.EmailVerified. - * Use `create(EmailVerifiedSchema)` to create a new message. - */ -export const EmailVerifiedSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_accounts_v1_accounts_v1, 0); - -/** - * * - * Represents a environment UUID only - * - * @generated from message accounts.AccountId - */ -export type AccountId = Message<"accounts.AccountId"> & { - /** - * Contour ID: UUID - * - * @generated from field: string id = 1; - */ - id: string; -}; - -/** - * Describes the message accounts.AccountId. - * Use `create(AccountIdSchema)` to create a new message. - */ -export const AccountIdSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_accounts_v1_accounts_v1, 1); - -/** - * @generated from message accounts.AccountPassword - */ -export type AccountPassword = Message<"accounts.AccountPassword"> & { +export type AccountPassword = Message<"accounts.v1.AccountPassword"> & { /** * @generated from field: string password = 1; */ @@ -66,16 +27,16 @@ export type AccountPassword = Message<"accounts.AccountPassword"> & { }; /** - * Describes the message accounts.AccountPassword. + * Describes the message accounts.v1.AccountPassword. * Use `create(AccountPasswordSchema)` to create a new message. */ export const AccountPasswordSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_accounts_v1_accounts_v1, 2); + messageDesc(file_accounts_v1_accounts_v1, 0); /** - * @generated from message accounts.AccountData + * @generated from message accounts.v1.AccountData */ -export type AccountData = Message<"accounts.AccountData"> & { +export type AccountData = Message<"accounts.v1.AccountData"> & { /** * Account name * @@ -92,45 +53,84 @@ export type AccountData = Message<"accounts.AccountData"> & { }; /** - * Describes the message accounts.AccountData. + * Describes the message accounts.v1.AccountData. * Use `create(AccountDataSchema)` to create a new message. */ export const AccountDataSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_accounts_v1_accounts_v1, 3); + messageDesc(file_accounts_v1_accounts_v1, 1); /** - * @generated from message accounts.AccountWithPassword + * @generated from message accounts.v1.SignUpRequest */ -export type AccountWithPassword = Message<"accounts.AccountWithPassword"> & { +export type SignUpRequest = Message<"accounts.v1.SignUpRequest"> & { /** - * @generated from field: accounts.AccountData data = 1; + * @generated from field: accounts.v1.AccountData data = 1; */ data?: AccountData | undefined; /** - * @generated from field: accounts.AccountPassword password = 2; + * @generated from field: accounts.v1.AccountPassword password = 2; */ password?: AccountPassword | undefined; }; /** - * Describes the message accounts.AccountWithPassword. - * Use `create(AccountWithPasswordSchema)` to create a new message. + * Describes the message accounts.v1.SignUpRequest. + * Use `create(SignUpRequestSchema)` to create a new message. */ -export const AccountWithPasswordSchema: GenMessage = /*@__PURE__*/ +export const SignUpRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_accounts_v1_accounts_v1, 2); + +/** + * @generated from message accounts.v1.SignInRequest + */ +export type SignInRequest = Message<"accounts.v1.SignInRequest"> & { + /** + * @generated from field: string code = 1; + */ + code: string; + + /** + * @generated from field: string verifier = 2; + */ + verifier: string; +}; + +/** + * Describes the message accounts.v1.SignInRequest. + * Use `create(SignInRequestSchema)` to create a new message. + */ +export const SignInRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_accounts_v1_accounts_v1, 3); + +/** + * @generated from message accounts.v1.ResetPasswordRequest + */ +export type ResetPasswordRequest = Message<"accounts.v1.ResetPasswordRequest"> & { + /** + * @generated from field: accounts.v1.AccountData data = 1; + */ + data?: AccountData | undefined; +}; + +/** + * Describes the message accounts.v1.ResetPasswordRequest. + * Use `create(ResetPasswordRequestSchema)` to create a new message. + */ +export const ResetPasswordRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_accounts_v1_accounts_v1, 4); /** - * @generated from message accounts.AccountWithPasswordAndCode + * @generated from message accounts.v1.NewPasswordRequest */ -export type AccountWithPasswordAndCode = Message<"accounts.AccountWithPasswordAndCode"> & { +export type NewPasswordRequest = Message<"accounts.v1.NewPasswordRequest"> & { /** - * @generated from field: accounts.AccountData data = 1; + * @generated from field: accounts.v1.AccountData data = 1; */ data?: AccountData | undefined; /** - * @generated from field: accounts.AccountPassword password = 2; + * @generated from field: accounts.v1.AccountPassword password = 2; */ password?: AccountPassword | undefined; @@ -141,108 +141,92 @@ export type AccountWithPasswordAndCode = Message<"accounts.AccountWithPasswordAn }; /** - * Describes the message accounts.AccountWithPasswordAndCode. - * Use `create(AccountWithPasswordAndCodeSchema)` to create a new message. + * Describes the message accounts.v1.NewPasswordRequest. + * Use `create(NewPasswordRequestSchema)` to create a new message. */ -export const AccountWithPasswordAndCodeSchema: GenMessage = /*@__PURE__*/ +export const NewPasswordRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_accounts_v1_accounts_v1, 5); /** - * @generated from message accounts.AccountFull + * @generated from message accounts.v1.IsEmailVerifiedRequest */ -export type AccountFull = Message<"accounts.AccountFull"> & { +export type IsEmailVerifiedRequest = Message<"accounts.v1.IsEmailVerifiedRequest"> & { /** - * @generated from field: accounts.AccountId id = 1; - */ - id?: AccountId | undefined; - - /** - * @generated from field: accounts.AccountData data = 2; + * @generated from field: accounts.v1.AccountData data = 1; */ data?: AccountData | undefined; }; /** - * Describes the message accounts.AccountFull. - * Use `create(AccountFullSchema)` to create a new message. + * Describes the message accounts.v1.IsEmailVerifiedRequest. + * Use `create(IsEmailVerifiedRequestSchema)` to create a new message. */ -export const AccountFullSchema: GenMessage = /*@__PURE__*/ +export const IsEmailVerifiedRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_accounts_v1_accounts_v1, 6); /** - * @generated from message accounts.AccountFullWithToken + * @generated from message accounts.v1.IsEmailVerifiedResponse */ -export type AccountFullWithToken = Message<"accounts.AccountFullWithToken"> & { +export type IsEmailVerifiedResponse = Message<"accounts.v1.IsEmailVerifiedResponse"> & { /** - * @generated from field: accounts.AccountId id = 1; + * @generated from field: bool verified = 1; */ - id?: AccountId | undefined; - - /** - * @generated from field: accounts.AccountData data = 2; - */ - data?: AccountData | undefined; - - /** - * @generated from field: string token = 3; - */ - token: string; + verified: boolean; }; /** - * Describes the message accounts.AccountFullWithToken. - * Use `create(AccountFullWithTokenSchema)` to create a new message. + * Describes the message accounts.v1.IsEmailVerifiedResponse. + * Use `create(IsEmailVerifiedResponseSchema)` to create a new message. */ -export const AccountFullWithTokenSchema: GenMessage = /*@__PURE__*/ +export const IsEmailVerifiedResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_accounts_v1_accounts_v1, 7); /** * * - * Service for handling environments + * Service for handling accounts that do not require authentication * - * @generated from service accounts.Accounts + * @generated from service accounts.v1.AccountsNoAuthService */ -export const Accounts: GenService<{ +export const AccountsNoAuthService: GenService<{ /** - * @generated from rpc accounts.Accounts.SignUp - */ - signUp: { - methodKind: "unary"; - input: typeof AccountWithPasswordSchema; - output: typeof AccountFullWithTokenSchema; - }, - /** - * @generated from rpc accounts.Accounts.SignIn + * Sing in into an existing account + * + * @generated from rpc accounts.v1.AccountsNoAuthService.SignIn */ signIn: { methodKind: "unary"; - input: typeof AccountWithPasswordSchema; - output: typeof AccountFullWithTokenSchema; - }, - /** - * @generated from rpc accounts.Accounts.ResetPassword - */ - resetPassword: { - methodKind: "unary"; - input: typeof AccountDataSchema; + input: typeof SignInRequestSchema; output: typeof EmptySchema; }, - /** - * @generated from rpc accounts.Accounts.NewPassword - */ - newPassword: { - methodKind: "unary"; - input: typeof AccountWithPasswordAndCodeSchema; - output: typeof EmptySchema; - }, - /** - * @generated from rpc accounts.Accounts.IsEmailVerified - */ - isEmailVerified: { - methodKind: "unary"; - input: typeof AccountDataSchema; - output: typeof EmailVerifiedSchema; - }, }> = /*@__PURE__*/ serviceDesc(file_accounts_v1_accounts_v1, 0); +/** + * * + * Service for handling accounts that do require authentication + * Tokens should be sent via metadata, so the service is able to authenticate a user for a request + * + * @generated from service accounts.v1.AccountsAuthService + */ +export const AccountsAuthService: GenService<{ + /** + * Is email for the current account verified + * + * @generated from rpc accounts.v1.AccountsAuthService.IsEmailVerified + */ + isEmailVerified: { + methodKind: "unary"; + input: typeof IsEmailVerifiedRequestSchema; + output: typeof IsEmailVerifiedResponseSchema; + }, + /** + * @generated from rpc accounts.v1.AccountsAuthService.RefreshToken + */ + refreshToken: { + methodKind: "unary"; + input: typeof EmptySchema; + output: typeof EmptySchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_accounts_v1_accounts_v1, 1); + diff --git a/src/api/test/v1/test_v1_pb.ts b/src/api/test/v1/test_v1_pb.ts index 2ad4d3c..0c94a01 100644 --- a/src/api/test/v1/test_v1_pb.ts +++ b/src/api/test/v1/test_v1_pb.ts @@ -10,7 +10,7 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file test/v1/test_v1.proto. */ export const file_test_v1_test_v1: GenFile = /*@__PURE__*/ - fileDesc("ChV0ZXN0L3YxL3Rlc3RfdjEucHJvdG8SB3Rlc3QudjEiDQoLUGluZ1JlcXVlc3QiDgoMUGluZ1Jlc3BvbnNlIg0KC1BvbmdSZXF1ZXN0Ig4KDFBvbmdSZXNwb25zZTJ7CgtUZXN0U2VydmljZRI1CgRQaW5nEhQudGVzdC52MS5QaW5nUmVxdWVzdBoVLnRlc3QudjEuUGluZ1Jlc3BvbnNlIgASNQoEUG9uZxIULnRlc3QudjEuUG9uZ1JlcXVlc3QaFS50ZXN0LnYxLlBvbmdSZXNwb25zZSIAQkVaQ2dpdGVhLmJhZGhvdXNlcGxhbnRzLm5ldC9zb2Z0cGxheWVyL3NvZnRwbGF5ZXItZ28tcHJvdG8vcGtnL3Rlc3QvdjFiBnByb3RvMw"); + fileDesc("ChV0ZXN0L3YxL3Rlc3RfdjEucHJvdG8SB3Rlc3QudjEiDQoLUGluZ1JlcXVlc3QiDgoMUGluZ1Jlc3BvbnNlIg0KC1BvbmdSZXF1ZXN0Ig4KDFBvbmdSZXNwb25zZTJKChFUZXN0Tm9BdXRoU2VydmljZRI1CgRQaW5nEhQudGVzdC52MS5QaW5nUmVxdWVzdBoVLnRlc3QudjEuUGluZ1Jlc3BvbnNlIgAySAoPVGVzdEF1dGhTZXJ2aWNlEjUKBFBvbmcSFC50ZXN0LnYxLlBvbmdSZXF1ZXN0GhUudGVzdC52MS5Qb25nUmVzcG9uc2UiAEJFWkNnaXRlYS5iYWRob3VzZXBsYW50cy5uZXQvc29mdHBsYXllci9zb2Z0cGxheWVyLWdvLXByb3RvL3BrZy90ZXN0L3YxYgZwcm90bzM"); /** * @generated from message test.v1.PingRequest @@ -68,19 +68,26 @@ export const PongResponseSchema: GenMessage = /*@__PURE__*/ * * * Service for handling environments * - * @generated from service test.v1.TestService + * @generated from service test.v1.TestNoAuthService */ -export const TestService: GenService<{ +export const TestNoAuthService: GenService<{ /** - * @generated from rpc test.v1.TestService.Ping + * @generated from rpc test.v1.TestNoAuthService.Ping */ ping: { methodKind: "unary"; input: typeof PingRequestSchema; output: typeof PingResponseSchema; }, +}> = /*@__PURE__*/ + serviceDesc(file_test_v1_test_v1, 0); + +/** + * @generated from service test.v1.TestAuthService + */ +export const TestAuthService: GenService<{ /** - * @generated from rpc test.v1.TestService.Pong + * @generated from rpc test.v1.TestAuthService.Pong */ pong: { methodKind: "unary"; @@ -88,5 +95,5 @@ export const TestService: GenService<{ output: typeof PongResponseSchema; }, }> = /*@__PURE__*/ - serviceDesc(file_test_v1_test_v1, 0); + serviceDesc(file_test_v1_test_v1, 1);