// Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.11.6 // protoc v7.34.1 // source: auth.proto /* eslint-disable */ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices"; import { Observable } from "rxjs"; import { Status } from "./google/rpc/status"; export const protobufPackage = "auth.v1"; export interface LoginRequest { username: string; password: string; } export interface LoginResponse { accessToken: string; status: string; need2fa: boolean; tempToken: string; message: string; errorCode: string; error: Status | undefined; } export interface RegisterRequest { username: string; password: string; } export interface RegisterResponse { userId: string; status: string; message: string; } export interface Verify2FaRequest { tempToken: string; totpCode: string; telegramCode: string; reserveCode: string; } export interface Verify2FaResponse { accessToken: string; status: string; message: string; reserveCodes: string[]; } export interface AuthenticatedAccessRequest { accessToken: string; } export interface GetTwoFaStatusRequest { accessToken: string; } export interface GetTwoFaStatusResponse { totpEnabled: boolean; telegramEnabled: boolean; totpEnrollmentPending: boolean; telegramEnrollmentPending: boolean; } export interface StartTotpEnrollmentResponse { secretBase32: string; otpauthUri: string; issuer: string; accountLabel: string; } export interface ConfirmTotpEnrollmentRequest { accessToken: string; totpCode: string; } export interface ConfirmTotpEnrollmentResponse { status: string; message: string; reserveCodes: string[]; } export interface CancelTotpEnrollmentResponse { status: string; message: string; } export interface DisableTotpRequest { accessToken: string; password: string; totpCode?: string | undefined; } export interface DisableTotpResponse { status: string; message: string; } export interface StartTelegramEnrollmentResponse { enrollmentToken: string; deepLink: string; botUsername: string; expiresAtIso: string; } export interface ConfirmTelegramEnrollmentRequest { accessToken: string; enrollmentToken: string; otpCode: string; } export interface ConfirmTelegramEnrollmentResponse { status: string; message: string; reserveCodes: string[]; } export interface DisableTelegramRequest { accessToken: string; password: string; telegramOtpCode?: string | undefined; } export interface DisableTelegramResponse { status: string; message: string; } export const AUTH_V1_PACKAGE_NAME = "auth.v1"; export interface AuthServiceClient { login(request: LoginRequest): Observable; register(request: RegisterRequest): Observable; verify2Fa(request: Verify2FaRequest): Observable; } export interface AuthServiceController { login(request: LoginRequest): Promise | Observable | LoginResponse; register(request: RegisterRequest): Promise | Observable | RegisterResponse; verify2Fa(request: Verify2FaRequest): Promise | Observable | Verify2FaResponse; } export function AuthServiceControllerMethods() { return function (constructor: Function) { const grpcMethods: string[] = ["login", "register", "verify2Fa"]; for (const method of grpcMethods) { const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor); } const grpcStreamMethods: string[] = []; for (const method of grpcStreamMethods) { const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor); } }; } export const AUTH_SERVICE_NAME = "AuthService"; export interface TwoFaSrviceClient { getTwoFaStatus(request: GetTwoFaStatusRequest): Observable; startTotpEnrollment(request: AuthenticatedAccessRequest): Observable; confirmTotpErollment(request: ConfirmTotpEnrollmentRequest): Observable; cancelTotpEnrollment(request: AuthenticatedAccessRequest): Observable; disableTotp(request: DisableTotpRequest): Observable; startTelegramEnrollment(request: AuthenticatedAccessRequest): Observable; confirmTelegramEnrollment(request: ConfirmTelegramEnrollmentRequest): Observable; disableTelegram(request: DisableTelegramRequest): Observable; } export interface TwoFaSrviceController { getTwoFaStatus( request: GetTwoFaStatusRequest, ): Promise | Observable | GetTwoFaStatusResponse; startTotpEnrollment( request: AuthenticatedAccessRequest, ): Promise | Observable | StartTotpEnrollmentResponse; confirmTotpErollment( request: ConfirmTotpEnrollmentRequest, ): Promise | Observable | ConfirmTotpEnrollmentResponse; cancelTotpEnrollment( request: AuthenticatedAccessRequest, ): Promise | Observable | CancelTotpEnrollmentResponse; disableTotp( request: DisableTotpRequest, ): Promise | Observable | DisableTotpResponse; startTelegramEnrollment( request: AuthenticatedAccessRequest, ): | Promise | Observable | StartTelegramEnrollmentResponse; confirmTelegramEnrollment( request: ConfirmTelegramEnrollmentRequest, ): | Promise | Observable | ConfirmTelegramEnrollmentResponse; disableTelegram( request: DisableTelegramRequest, ): Promise | Observable | DisableTelegramResponse; } export function TwoFaSrviceControllerMethods() { return function (constructor: Function) { const grpcMethods: string[] = [ "getTwoFaStatus", "startTotpEnrollment", "confirmTotpErollment", "cancelTotpEnrollment", "disableTotp", "startTelegramEnrollment", "confirmTelegramEnrollment", "disableTelegram", ]; for (const method of grpcMethods) { const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); GrpcMethod("TwoFaSrvice", method)(constructor.prototype[method], method, descriptor); } const grpcStreamMethods: string[] = []; for (const method of grpcStreamMethods) { const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); GrpcStreamMethod("TwoFaSrvice", method)(constructor.prototype[method], method, descriptor); } }; } export const TWO_FA_SRVICE_SERVICE_NAME = "TwoFaSrvice";