// Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.11.4 // protoc v7.34.0 // source: auth.proto /* eslint-disable */ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices"; import { Observable } from "rxjs"; export const protobufPackage = "auth"; export enum TentaiAuthProvider { TENTAI_AUTH_PROVIDER_UNSPECIFIED = 0, TENTAI_AUTH_PROVIDER_GOOGLE = 1, TENTAI_AUTH_PROVIDER_APPLE = 2, TENTAI_AUTH_PROVIDER_EMAIL = 3, UNRECOGNIZED = -1, } export interface AuthenticateTentaiUserRequest { email: string; provider: TentaiAuthProvider; } export interface TelegramMiniAppAuthRequest { initData: string; } export interface TelegramLoginWidgetAuthRequest { id: string; hash: string; username: string; firstName: string; lastName: string; authDate: string; photoUrl: string; languageCode: string; allowsWriteToPm: boolean; } export interface GoogleAuthRequest { idToken: string; } export interface GoogleAuthStartRequest { returnUrl?: string | undefined; } export interface GoogleAuthStartResponse { authUrl: string; } export interface GoogleAuthCallbackRequest { code: string; state: string; } export interface ExchangeAuthCodeRequest { code: string; } export interface AuthExchangeCodeResponse { exchangeCode: string; returnUrl?: string | undefined; } export interface AppleAuthRequest { identityToken: string; authorizationCode?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; } export interface ContactCodeRequest { contact: string; isAuth: boolean; } export interface ContactVerifyRequest { contact: string; code: string; isAuth: boolean; } export interface RefreshTokenRequest { refreshToken: string; } export interface AccessTokenRequest { accessToken: string; } export interface AuthUserProfile { firstName?: string | undefined; lastName?: string | undefined; } export interface AuthTokensResponse { accessToken: string; refreshToken: string; returnUrl?: string | undefined; user?: AuthUserProfile | undefined; } export interface AccessTokenResponse { accessToken: string; } export interface MessageResponse { message: string; } export interface MeResponse { sub: string; } export const AUTH_PACKAGE_NAME = "auth"; export interface AuthServiceClient { telegramMiniAppAuth(request: TelegramMiniAppAuthRequest): Observable; telegramLoginWidgetAuth(request: TelegramLoginWidgetAuthRequest): Observable; googleAuthStart(request: GoogleAuthStartRequest): Observable; googleAuthCallback(request: GoogleAuthCallbackRequest): Observable; exchangeAuthCode(request: ExchangeAuthCodeRequest): Observable; googleAuth(request: GoogleAuthRequest): Observable; appleAuth(request: AppleAuthRequest): Observable; requestContactCode(request: ContactCodeRequest): Observable; verifyContactCode(request: ContactVerifyRequest): Observable; refreshToken(request: RefreshTokenRequest): Observable; logout(request: RefreshTokenRequest): Observable; getMe(request: AccessTokenRequest): Observable; authenticateTentaiUser(request: AuthenticateTentaiUserRequest): Observable; } export interface AuthServiceController { telegramMiniAppAuth( request: TelegramMiniAppAuthRequest, ): Promise | Observable | AuthTokensResponse; telegramLoginWidgetAuth( request: TelegramLoginWidgetAuthRequest, ): Promise | Observable | AuthTokensResponse; googleAuthStart( request: GoogleAuthStartRequest, ): Promise | Observable | GoogleAuthStartResponse; googleAuthCallback( request: GoogleAuthCallbackRequest, ): Promise | Observable | AuthExchangeCodeResponse; exchangeAuthCode( request: ExchangeAuthCodeRequest, ): Promise | Observable | AuthTokensResponse; googleAuth( request: GoogleAuthRequest, ): Promise | Observable | AuthTokensResponse; appleAuth( request: AppleAuthRequest, ): Promise | Observable | AuthTokensResponse; requestContactCode( request: ContactCodeRequest, ): Promise | Observable | MessageResponse; verifyContactCode( request: ContactVerifyRequest, ): Promise | Observable | AuthTokensResponse; refreshToken( request: RefreshTokenRequest, ): Promise | Observable | AccessTokenResponse; logout(request: RefreshTokenRequest): Promise | Observable | MessageResponse; getMe(request: AccessTokenRequest): Promise | Observable | MeResponse; authenticateTentaiUser( request: AuthenticateTentaiUserRequest, ): Promise | Observable | AccessTokenResponse; } export function AuthServiceControllerMethods() { return function (constructor: Function) { const grpcMethods: string[] = [ "telegramMiniAppAuth", "telegramLoginWidgetAuth", "googleAuthStart", "googleAuthCallback", "exchangeAuthCode", "googleAuth", "appleAuth", "requestContactCode", "verifyContactCode", "refreshToken", "logout", "getMe", "authenticateTentaiUser", ]; 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";