Files
contracts/gen/ldap-auth.ts
2026-04-02 17:54:22 +00:00

57 lines
1.8 KiB
TypeScript

// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.6
// protoc v3.21.12
// source: ldap-auth.proto
/* eslint-disable */
import type { Metadata } from "@grpc/grpc-js";
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
import { UserData } from "./ldap";
export const protobufPackage = "ldap_auth.v1";
/** --- Авторизация --- */
export interface VerifyRequest {
username: string;
password: string;
}
export interface VerifyResponse {
success: boolean;
errorMessage: string;
/** Отдаем полные данные при успешном входе */
user: UserData | undefined;
}
export const LDAP_AUTH_V1_PACKAGE_NAME = "ldap_auth.v1";
export interface LdapAuthServiceClient {
verifyUser(request: VerifyRequest, metadata?: Metadata): Observable<VerifyResponse>;
}
export interface LdapAuthServiceController {
verifyUser(
request: VerifyRequest,
metadata?: Metadata,
): Promise<VerifyResponse> | Observable<VerifyResponse> | VerifyResponse;
}
export function LdapAuthServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["verifyUser"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("LdapAuthService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("LdapAuthService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const LDAP_AUTH_SERVICE_NAME = "LdapAuthService";