contracts/gen/auth.ts
Sergey Krylov c5aedf698f
Some checks failed
Publish / Publish npm package action (push) Failing after 7s
feat: add auth contract
2026-01-21 05:15:53 +03:00

48 lines
1.4 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 const AUTH_V1_PACKAGE_NAME = "auth.v1";
export interface AuthServiceClient {
sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
}
export interface AuthServiceController {
sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
}
export function AuthServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["sendOtp"];
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";