All checks were successful
Publish / Publish npm package action (push) Successful in 17s
63 lines
1.8 KiB
TypeScript
63 lines
1.8 KiB
TypeScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-ts_proto v2.11.0
|
|
// protoc v6.33.4
|
|
// source: auth.proto
|
|
|
|
/* eslint-disable */
|
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
import { Observable } from "rxjs";
|
|
|
|
export const protobufPackage = "auth.v1";
|
|
|
|
export interface SendOtpRequest {
|
|
identifier: string;
|
|
type: string;
|
|
}
|
|
|
|
export interface SendOtpResponse {
|
|
ok: boolean;
|
|
}
|
|
|
|
export interface VerifyOtpRequest {
|
|
identifier: string;
|
|
type: string;
|
|
code: string;
|
|
}
|
|
|
|
export interface VerifyOtpResponse {
|
|
accessToken: string;
|
|
refreshToken: string;
|
|
}
|
|
|
|
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
|
|
export interface AuthServiceClient {
|
|
sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
|
|
|
|
verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
|
|
}
|
|
|
|
export interface AuthServiceController {
|
|
sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
|
|
|
|
verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
|
|
}
|
|
|
|
export function AuthServiceControllerMethods() {
|
|
return function (constructor: Function) {
|
|
const grpcMethods: string[] = ["sendOtp", "verifyOtp"];
|
|
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";
|