// Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.11.0 // protoc v6.33.4 // source: account.proto /* eslint-disable */ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices"; import { Observable } from "rxjs"; export const protobufPackage = "account.v1"; export enum Role { USER = 0, ADMIN = 1, UNRECOGNIZED = -1, } export interface GetAccountRequest { id: string; } export interface GetAccountResponse { id: string; phone: string; email: string; isPhoneVerified: boolean; isEmailVerified: boolean; role: Role; } export interface InitEmailChangeRequest { email: string; userId: string; } export interface InitEmailChangeResponse { ok: boolean; } export interface ConfirmEmailChangeRequest { email: string; code: string; userId: string; } export interface ConfirmEmailChangeResponse { ok: boolean; } export interface InitPhoneChangeRequest { phone: string; userId: string; } export interface InitPhoneChangeResponse { ok: boolean; } export interface ConfirmPhoneChangeRequest { phone: string; code: string; userId: string; } export interface ConfirmPhoneChangeResponse { ok: boolean; } export const ACCOUNT_V1_PACKAGE_NAME = "account.v1"; export interface AccountServiceClient { getAccount(request: GetAccountRequest): Observable; initEmailChange(request: InitEmailChangeRequest): Observable; confirmEmailChange(request: ConfirmEmailChangeRequest): Observable; initPhoneChange(request: InitPhoneChangeRequest): Observable; confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable; } export interface AccountServiceController { getAccount( request: GetAccountRequest, ): Promise | Observable | GetAccountResponse; initEmailChange( request: InitEmailChangeRequest, ): Promise | Observable | InitEmailChangeResponse; confirmEmailChange( request: ConfirmEmailChangeRequest, ): Promise | Observable | ConfirmEmailChangeResponse; initPhoneChange( request: InitPhoneChangeRequest, ): Promise | Observable | InitPhoneChangeResponse; confirmPhoneChange( request: ConfirmPhoneChangeRequest, ): Promise | Observable | ConfirmPhoneChangeResponse; } export function AccountServiceControllerMethods() { return function (constructor: Function) { const grpcMethods: string[] = [ "getAccount", "initEmailChange", "confirmEmailChange", "initPhoneChange", "confirmPhoneChange", ]; for (const method of grpcMethods) { const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor); } const grpcStreamMethods: string[] = []; for (const method of grpcStreamMethods) { const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); GrpcStreamMethod("AccountService", method)(constructor.prototype[method], method, descriptor); } }; } export const ACCOUNT_SERVICE_NAME = "AccountService";